From: Daniel Leidert Date: Sat, 31 May 2025 03:25:27 +0000 (+0200) Subject: Import libreoffice_7.0.4-4+deb11u13.debian.tar.xz X-Git-Tag: archive/raspbian/1%7.0.4-4+rpi1+deb11u13^2~86^4 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=5ad9237d59f87d5d71eaa35f755498dea4a7da16;p=libreoffice.git Import libreoffice_7.0.4-4+deb11u13.debian.tar.xz [dgit import tarball libreoffice 1:7.0.4-4+deb11u13 libreoffice_7.0.4-4+deb11u13.debian.tar.xz] --- 5ad9237d59f87d5d71eaa35f755498dea4a7da16 diff --git a/debian/README b/debian/README new file mode 100644 index 00000000000..95a01507981 --- /dev/null +++ b/debian/README @@ -0,0 +1,83 @@ +LibreOffice build system +------------------------ + +Building the packages from source +================================= +Overview: + apt-get source libreoffice + apt-get build-dep libreoffice (to install build dependencies) + cd + debuild + +Changing the build behaviour with DEB_BUILD_OPTIONS +--------------------------------------------------- +These options are supported: + + debug - build with FULL debug symbols. Default is just to build + with SMALL ones since the deb otherwise gets too big + ((>400M, ca. 1GB I-S)) + + ccache - enable the use of ccache during the build. This is highly + recommended if you plan on building the package more than + once, or doing any development on the packages. Be aware + that you need EXTRAPACKAGES="ccache" in /etc/pbuilderrc + when trying to build libreoffice with ccache in + $DEB_BUILD_OPTIONS under pbuilder (this has no effect + on speed, hough because the cache does not persist in + pbuilder) + + parallel= + - enable n projects to be built in parallel. + The log output can get a little confusing, and some projects + may fail still. You need to remove config.status if you + change this value after interrupting a build. + + lang= + - Build only the specified language + + nocheck + - disable run of tests when enabled in rules + + +The targets that are built during the package build +--------------------------------------------------- + +- targets run during the package build - + +unpack - Does prerequisites for the build: packing, unpacking etc. + +build - as the name says + +install - Copy files from debian/tmp/pkg into the correct locations + for the final package layout in debian/libreoffice* + where we need to do that here because it affects arch-dep + and arch-indep stuff and therefore cannot be done in + install-arch / install-indep. + +install-arch - installs arch-dependent stuff into the arch-dep. packages +install-indep - " "-independent " " " "-indep. packages + +langpackgs - Installs the language packgs +helppkgs - Installs the help packages + +maintscripts - Generates the maintainer scripts + +get-orig-source - gets original source tarballs and unpacks them + GIT_BASEURL can be set to a local mirror + GIT_BRANCH is the branch to clone from the repos + GIT_TAG is tag that should be packed + GIT_BRANCH and GIT_TAG can both be master + +Building the package from git master +==================================== +To do a build from git master, do: + mkdir libreoffice-git + cd libreoffice-git + git clone https://salsa.debian.org/libreoffice-team/libreoffice/libreoffice.git debian + ./debian/rules unpack GIT_BRANCH=master GIT_TAG=master SOURCE_TARBALLS=n + dpkg-buildpackage + +Build system file layout +======================== +debian/scripts: + Directory containing various debian-specific build-related scripts. diff --git a/debian/README.Debian b/debian/README.Debian new file mode 100644 index 00000000000..1493746d015 --- /dev/null +++ b/debian/README.Debian @@ -0,0 +1,307 @@ + Readme for libreoffice package for Debian + -------------------------------------------- + +Contents +======== +Introduction +Quick start +Printer setup + Native CUPS support + Non-CUPS systems +Language support + Spellcheck dictionaries, Hyphenation patterns and Thesauri + Help packages +Display and crashing problems + X server crashes +Font problems + Why are the menu fonts smaller than in older versions? + Changing the default user interface font typeface for non-KDE/Gnome desktops +Disabling the splash screen +AppArmor problems +More information about LibreOffice in Debian + + +Introduction +============ +Welcome to the LibreOffice packages for the Debian distribution. These +packages are of the release of LibreOffice with the following +modifications: + + * Packaged as libreoffice-core (architecture-dependent core files), + libreoffice-common (architecture-independent common files), + libreoffice-{calc,writer,draw,impress,base} (the LibreOffice modules) + libreoffice-l10n- and libreoffice-help- and + other subpackages (-filters-* for lesser used filters, -gtk/-gnome/-kde, + ttf-opensymbol for the OpenSymbol font, ...). + + * Integration with other Debian packages: + - Global desktop integration for all users for KDE and Gnome desktops. + Menu entries for all window managers that support the Debian 'menu' + package. + + * Some extra features not yet present in official releases: + - Many of the patches included in the Ximian edition + + * Extra documentation - this README and man pages. + + +Quick start +=========== + +To start using LibreOffice, execute the command + + libreoffice + +as the user which you wish to start LibreOffice as. This will create the +necessary user files in ~/.libreoffice/3 for you. Alternatively, you +can start LibreOffice from the menus, if you have the menu package +installed/use KDE or GNOME. + +Printing +======== + +Printing on CUPS systems +------------------------ +The Debian packages include native CUPS support from version 1.1.1-3. This +is standard in all OpenOffice.org versions since 2.0. +When LibreOffice detects a CUPS system, it will download printer settings for +all CUPS queues, and these can be set from within the printer properties dialog. + +If you wish to add additional filters or print commands, you can add them +using 'spadmin'. Note that the 'Add a printer' option is disabled - you +should add printers using your favourite CUPS frontend. + +When creating a new document, LibreOffice will use the default paper size of +your default CUPS printer queue. If your new documents have the wrong paper +size, please check the configuration of your printer. + +Non-CUPS systems (lpr, lprng, SAL_DISABLE_CUPS=1) +--------------------------------- +There is a tool supplied with LibreOffice for setting up printers. You can +execute this with the command + + /usr/lib/openoffice/program/spadmin + +To change the page size and other default settings on non-CUPS systems, +modify /etc/openoffice/psprint.conf. The settings are documented in there. + +Language support +================ +You can get foreign language support by installing the +libreoffice-l10n- package for your language. You will also need the +'locales' (or belocs-locales-data for some locales, alternatively locales-all +if you want all locales) package installed. +The user interface language is selected according to your locale(1) settings. + +To change the user interface language for all users, run + + dpkg-reconfigure locales + +[ This is not needed when you install locales-all ] + +To change the language for just one user, you must arrange for the LC_MESSAGES +or LANG environment variable to be set. You can list all available locales +with the command 'locale -a'. +For example, to run LibreOffice in German from the command line: + + LANG=de_DE libreoffice + +Spellcheck dictionaries, Hyphenation patterns and Thesauri +---------------------------------------------------------- +Currently, there are dictionaries available for Afrikaans, Arabic, Armenian, +Bulgarian, Catalan, Croatian, Czech, Danish, Dutch, English (AUS/GB/US), +Esperanto, Estonian, Farsi, Finnish, French, Galician, German (DE/CH/AT), +Greek, Hebrew, Hungarian, Irish (Gaeilge), Italian, Kurdish, Latvian, +Lithuanian, Manx Gaelic, Norwegian Bokmal, Norwegian Nynorsk, Polish, +Portuguese, Portuguese (Brazilian), Russian, Scots Gaelic, Slovak, Slovenian, +Spanish, Swahili, Swedish, Thai, Ukrainian and Uzbek. +Dictionaries are packaged as myspell- (or, for newer ones improved +for hunspell hunspell-). + +Currently, there are thesauri available for Czech, English (AUS/GB/US), +German (DE/CH), Italian, Polish and Slovak. +Thesauri are packaged as mythes- + +Currently, there are hyphenation patterns available for English (USA), +Croatian, Estonian, German, Hungarian, Italian, Polish, Slovenian and +Lithuanian. +Hyphenation patterns are packaged as hyphen-. + +Help packages +------------- +Currently, there are localized help packages available for +Bulgarian, Chinese, Czech, Danish, Dutch, English (GB), English (USA), +Estonian, French, Galician, German, Hungarian, Italian, Japanese, Khmer, +Macedonian, Polish, Portuguese (Brazil), Russian, Slovakian, Slovenian and +Spanish and Swedish. +They are packaged as libreoffice-help-. + +Problems +================================ + +Here are some problems that have been reported with this version. If you do +not see your problem here, please check for open bug reports: + + http://bugs.debian.org/debian-openoffice@lists.debian.org + +1. If you are using NFS mounted file systems, you should make sure that locking +is functioning: + + 'Make sure NFS lockd/statd is running on the client, or mount the NFS export + with the 'nolock' option. + + If /usr gets mounted from an initrd, check 'ps' output once the system is + fully booted to ensure that you see a [lockd] kernel process, or an + 'rpc.lockd' / 'rpc.statd' userspace process. + + If not, just issue your mount command again (no need to even -o remount it + seems!) and run /etc/init.d/nfs-common restart.' (Thanks to Gavin Hamill) + + See this mailing list thread for more information: + http://lists.debian.org/debian-openoffice/2004/debian-openoffice-200402/msg00223.html + +X server crash with Matrox cards +-------------------------------- +If your X server is using the mga driver, you may find that your X server +crashes. You can work around this problem by adding this line to the mga +Device section: + + Option "XaaNoScreenToScreenColorExpandFill" + +There is a bug already open against xserver-xfree86 for this problem. Thanks +to Philip Armstrong for this information. + +LibreOffice crash with nVidia cards +-------------------------------------- +It seems that LibreOffice can trigger some obscure bugs in the X server +drivers for Nvidia cards too, especially if you have more than one processor. +Try updating your drivers to the latest version. + +Moreover LibreOffice may hang and takes X with it when RenderAccel +is enabled when using the proprietary nVidia Drivers. Disabling this option +helps then. + +Font problems +============= + +Why are the menu fonts smaller than in older versions? +------------------------------------------------------ +This is caused by a change in the way LibreOfffice interprets your X server DPI +setting. +This setting, when correctly configured, means that software can display text +at its true size on the display. + +The official OpenOffice.org version assumes that anyone who has their X server +configured with a DPI of less than 96 has not actually configured it at all, +and sets it back to 96. Unfortunately, this has the side effect that +displays with a lower DPI setting, such as some LCD laptop displays, cannot +display the page at its true size. + +So you can fix this by correctly setting the DPI for your X server. Gnome +users will find that it is set to 96 DPI by default; others may need to edit +their X server configuration. + +The best way to get the correct DPI setting is to add a 'DisplaySize' entry to +the Monitor section. From the XF86Config-4 man page: + + DisplaySize width height + This optional entry gives the width and height, in millimetres, of the + picture area of the monitor. If given this is used to calculate the + horizontal and vertical pitch (DPI) of the screen. + +If you set this value correctly, X will calculate and use the correct DPI +setting, even if you use several different display resolutions. + +From Nikita V. Youshchenko : + +- Many display manager configurations pass the option "-dpi 100" to the X + server by default, overriding any autodetected DPI. This has to be removed + for DisplaySize to work. The file that you need to edit varies depending on + the way your X server is started: + xdm: /etc/X11/xdm/Xservers + kdm: /etc/kde3/kdm/Xservers + gdm: /etc/gdm/gdm.conf + startx: /etc/X11/xinit/xserverrc + +- Gnome's gconf overrides the autodetected DPI, by setting Xft.dpi to a value + entered in configuration dialog, 96 by default. I don't know what is + the clean fix for this. Perhaps it should be fixed on the Gnome side. + +From Juergen Kreileder :> + +- Note that with most recent graphics cards and monitors XFree86 is able to + get the monitor size (and thus the correct dpi value) through ddc. + (**) NVIDIA(0): Validated modes for display device DFP-0: + (**) NVIDIA(0): Default mode "1600x1200": 189.0 MHz, 87.5 kHz, 70.0 Hz + (II) NVIDIA(0): Virtual screen size determined to be 1600 x 1200 + (--) NVIDIA(0): Display dimensions: (410, 310) mm + (--) NVIDIA(0): DPI set to (99, 98) + (That's with the proprietary NVIDIA drivers but other XFree86 drivers have + that support too.) + +If you use KDE or Gnome, LibreOffice will use the same font face and size as +your desktop environment. If you use another window manager, you can either +let it pick a default font itself, or change the font to be used (see next +section), or set the OOO_FORCE_DESKTOP environment variable to +kde (for kde3)/kde4 or gnome, to use KDE or Gnome settings respectively. + +Changing the default user interface font typeface for non-KDE/Gnome desktops +---------------------------------------------------------------------------- +If you do not want to use KDE or Gnome settings and want to change font sizes +within LibreOffice, you can configure the user interface font as follows: + +- Font size - + +You can change the font scaling using the user interface: + + Tools Menu -> Options -> View -> Scale + +- Font typeface - + +You can change the default font typeface by replacing it with a different font +installed on your system. This can be done using the font replacement function. +Choose Tools - Options - LibreOffice - Font Replacement to access this +function. + +To change the font of the LibreOffice user interface, you have to replace +the default font "Andale Sans UI" with another font and mark the "always" +setting for this replacement. "Andale Sans UI" is not selectable and has to be +typed in. The replacement font has to be a font which supports the requested +locale ( e.g for Korean language the replacement font has to be a font +including Korean characters). + +Refer to the LibreOffice Help for a detailed explanation of the font +replacement dialog. + +Disabling the splash screen +=========================== +If you don't like the splash screen staying in front of other windows while +LibreOffice is loading, you can disable it by editing +/etc/openoffice/sofficerc. Change Logo=1 to Logo=0. + +AppArmor problems +================= + +LibreOffice in Debian ships with AppArmor profiles: + + /etc/apparmor.d/usr.lib.libreoffice.* + +To debug issues with these AppArmor profiles, see: + + https://wiki.debian.org/AppArmor/Debug + +If you are using custom settings such as a custom env:UserInstallation +directory, you may need to adjust them to match your local setup. +In this example, you would need to add your custom +env:UserInstallation to @{libo_user_dirs} in the +usr.lib.libreoffice.program.soffice.bin profile. + +More information about LibreOffice in Debian +=============================================== +Please read the official README.gz (in the same directory as this file), too. + +If you have questions, either post to our the mailing list: + + http://lists.debian.org/debian-openoffice + +The Debian LibreOffice team diff --git a/debian/README.Debian-source b/debian/README.Debian-source new file mode 100644 index 00000000000..7b9f523b2fd --- /dev/null +++ b/debian/README.Debian-source @@ -0,0 +1,82 @@ +Package directory modes +======================= +The packages can be built directly from a set of git checkouts (vcs mode), +or from a set of release tarballs (tarball mode). + +Vcs mode is useful if you want to work on libreoffice during the development +cycle. You can check out the latest sources and track them while you make +changes. + +Tarball mode is used to prepare packages of official libreoffice releases +from the tarballs created by upstream. + +Source package creation steps for tarball mode +============================================== +The .orig.tar.gz consists of the (separate) source tarballs available +from The Document Foundation from +http://download.documentfoundation.org/libreoffice/src/ + +or base on an old version and add/remove the files manually and/or symlink +to the old version if this didn't change - see git diff of download.lst. This +is even better given we probably want to add only needed stuff there, and not +all tarballs (most of those we don't use) + +See the "Format: 3.0 (quilt)" section dpkg-source(1) for more details. + +Package directory layout - vcs mode +=================================== + +In vcs mode we are working directly from checkouts of the libreoffice sources. + +We pull in sources to these places: + + "top" directory - checkout of LO's "core" repo + debian - git packaging repository from pkg-openoffice project on alioth + helpcontent2 - checkout of LO's "help" repo (git submodule) + translations - checkout of LO's "translations" repo (git submodule) + tarballs - see above in tarball mode + +$ git clone git://gerrit.libreoffice.org/core +$ cd core +$ git submodule init + +(maybe remove dictionaries again, see .git/config, we don't need it here.) + +./g pull -r (git pull -r, but also does the necessary steps for the submodules) + +For tarballs/, see above + diff --git a/debian/README.qa b/debian/README.qa new file mode 100644 index 00000000000..3da75a9fea6 --- /dev/null +++ b/debian/README.qa @@ -0,0 +1,59 @@ +LibreOffice QA Tools + +smoketest +========= + +smoketest executes a set of macros that create a minimal document in +each of LibreOffice's applications, tests cut&paste and +saving/loading in various formats. + +Invoke it as oosmoketest. + +This program manipulates the LibreOffice user configuration, USE IT +WITH A DEDICATED USER ACCOUNT if you value your settings. + +qadevOOo +======== + +qadevOOo is a framework for executing tests for the LibreOffice +API. It is documented at +http://qa.openoffice.org/qadevOOo_doc/user-guide.html + +Predefined properties files exist in /usr/lib/openoffice/qadevOOo. + +Invoke it like e.g: + + ootestapi -ini /usr/lib/openoffice/qadevOOo/java.props -o sd.SdMasterPage + +That properties files specify AppExecutionCommand, i.e. an office will +be started if necessary. Some tests, however seem to work better if +the office was started manually, as written in the user guide. + + /usr/lib/openoffice/program/soffice "-accept=socket,host=localhost,port=8100;urp;" + +Use this invocation and not ooffice to prevent interference with the +quickstarter code. + +testtool +======== + +testtool is a framework for executing tests by automating actions in +LibreOffice's user interface. It is documented at +http://qa.openoffice.org/qatesttool/index.html + +Test scripts for testtool are available in the +libreoffice-qa-ui-tests package. + +Start it as ootesttool. + +If you're starting it for the first time, create a profile in +Extras->Settings where you specify the location of test scripts and +output path for log files. The default values point to the scripts +from the libreoffice-qa-ui-tests package, so simply giving a name +to the profile and pressing the "New" button is enough. + +Then open a test script and press F5 to start the test. + +Some test scripts may change your LibreOffice user +configuration. USE IT WITH A DEDICATED USER ACCOUNT if you value your +settings. diff --git a/debian/branding/progress.conf b/debian/branding/progress.conf new file mode 100644 index 00000000000..59ff72ce41d --- /dev/null +++ b/debian/branding/progress.conf @@ -0,0 +1 @@ +PROGRESSBARCOLOR=215,7,81 diff --git a/debian/bug-presubj b/debian/bug-presubj new file mode 100644 index 00000000000..602de78b9f7 --- /dev/null +++ b/debian/bug-presubj @@ -0,0 +1,60 @@ +Reporting a bug against LibreOffice +-------------------------------------- +I) Make sure it's a LibreOffice bug after all: #398923 and its friends for + example are not. + Set the Version: header right. If you found a bug in a specific version, + set that as version:, even if you in the meanwhile upgraded. If you are on + an up-to-date version and tried old versions and they have the bug, too, set + the Version: header to the earliest version you found it in (of course, if + versions inbetween don't have the bug use the version in which it reappeared + and sustained to the current version) + +II) Check on the BTS (http://bugs.debian.org/src:libreoffice) whether the + bug already is reported. Do *NOT* report a new one then. For judging whether + it's already reported, read *ALL* the bugs, think, try and use common sense. + +III) If you have crashes with a document, try another one. If only that or + similar docs causes problems please attach THIS (or a similar type one + causing it). Otherwise, don't file a bug, we can't look at it anyway. + +IV) Please attach more info if possible (see + https://wiki.documentfoundation.org/QA/BugReport/Debug_Information#GNU.2FLinux). + Install libreoffice-*-dbgsym or libreoffice-dbg before doing this (and maybe + the packages it Recommends and/or -dbgsym/-dbg of the libraries LO depends + on). + Please note that those *-dbgsym packages are not in the main archive; you + need to add the debug archive for that. + See https://wiki.debian.org/AutomaticDebugPackages + Please also read /usr/share/doc/libreoffice-common/README.gz for common + problems ("Problems During Program Startup") + If you have NFS/Samba/... file locking problems (i.e. files opened + read-only when they should be read-write), also see the "File Locking" + section in above file. + +V) If the bug is also in the version you can get from www.libreoffice.org, file + it there (see https://wiki.documentfoundation.org/QA/BugReport) in the first + place. If you really think this also should be a bug in the Debian BTS + (because it's (release-)critical or otherwise important) please file a bug + there too *BUT* note the TDF bug number in the bug or mark it forwarded + yourself if you can. Especially this is for feature requests. + If you tested other LibreOffice packages and the bug is (not) in version + foo from bar, mention that, too. + +VI) Only report bugs on completely up-to-date systems. Don't file bugs on a + obsolete version and neither on sid/testing systems really old. If bugs + got fixed in sid, it doesn't make sense to file them anymore. (Exception + is security bugs or really critical bugs which should be get fixed in + stable.) When you think a dependency is missing/wrong/too lax please be + *sure* that this is the case before reporting it. Most times it isn't. + Use common sense and the bug severities for judging here. When you think + you have an up-to-date system, check whether you really have one. + (And do a dist-upgrade, try to reproduce the bug again). + Also don't report bugs on broken mix systems unless you are sure about the + dependencies/conflicts (see above). + +VII) Please give as much info as possible (installed OOo packages, installed + extensions, "special" configs, additions, changes, whatever). Better too + much than too less. (See #396225 for example which was caused by an + unsupportable, non-free extension) + +Thanks. diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 00000000000..b22e274fbe5 Binary files /dev/null and b/debian/changelog differ diff --git a/debian/control b/debian/control new file mode 100644 index 00000000000..50b1fb2a6fb Binary files /dev/null and b/debian/control differ diff --git a/debian/control.evolution.in b/debian/control.evolution.in new file mode 100644 index 00000000000..8b387cad9ef --- /dev/null +++ b/debian/control.evolution.in @@ -0,0 +1,17 @@ +Package: libreoffice-evolution +Architecture: %OOO_BASE_ARCHS% +Section: gnome +Depends: libreoffice-base, + libreoffice-common (>= 1:7.0.0~alpha~), + libreoffice-core (= ${binary:Version}), + ${libebook-dep}, + ${misc:Depends}, + ${shlibs:Depends} +Recommends: evolution +Description: office productivity suite -- Evolution addressbook support + LibreOffice is a full-featured office productivity suite that provides + a near drop-in replacement for Microsoft(R) Office. + . + This package allows LibreOffice to access Evolution address books. + You need to install evolution separately. + diff --git a/debian/control.firebird.in b/debian/control.firebird.in new file mode 100644 index 00000000000..89cc8b331c0 --- /dev/null +++ b/debian/control.firebird.in @@ -0,0 +1,12 @@ +Package: libreoffice-sdbc-firebird +Depends: libreoffice-core-nogui | libreoffice-core, ${shlibs:Depends}, ${misc:Depends}, ${firebird-engine-depends} +Architecture: %OOO_FIREBIRD_ARCHS% +Section: database +Enhances: libreoffice-base-drivers +Description: Firebird SDBC driver for LibreOffice + LibreOffice is a full-featured office productivity suite that provides + a near drop-in replacement for Microsoft(R) Office. + . + The Firebird SDBC Driver allows one to use the Firebird database from + LibreOffice without any wrapper layer such as ODBC or JDBC. + diff --git a/debian/control.fonts.in b/debian/control.fonts.in new file mode 100644 index 00000000000..f52165d404c --- /dev/null +++ b/debian/control.fonts.in @@ -0,0 +1,13 @@ +Package: fonts-opensymbol +Section: fonts +Architecture: all +Multi-Arch: foreign +Depends: ${misc:Depends} +Recommends: fontconfig +Replaces: ttf-opensymbol +Provides: ttf-opensymbol +Description: OpenSymbol TrueType font + This package contains the OpenSymbol TrueType font included in + LibreOffice. This font contains symbols (like fonts as Wingdings(tm)), + bullets (needed for bullets in LibreOffice) and non-latin character + diff --git a/debian/control.gtk3.in b/debian/control.gtk3.in new file mode 100644 index 00000000000..6dd26771630 --- /dev/null +++ b/debian/control.gtk3.in @@ -0,0 +1,49 @@ +Package: libreoffice-gtk3 +Architecture: %OOO_ARCHS% +Depends: libreoffice-core (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends} +Suggests: libreofficekit-data +Recommends: gstreamer1.0-gtk3 +Section: gnome +Enhances: libreoffice +Description: office productivity suite -- GTK+ 3 integration + LibreOffice is a full-featured office productivity suite that provides + a near drop-in replacement for Microsoft(R) Office. + . + This package contains the Gtk plugin for drawing LibreOffices widgets + with Gtk+ 3 and Gtk/GNOMEish print dialog when running under GNOME. + +Package: gir1.2-lokdocview-0.1 +Architecture: %OOO_ARCHS% +Section: introspection +Depends: ${gir:Depends}, ${misc:Depends}, liblibreofficekitgtk (= ${binary:Version}) +Description: GTK3 widget wrapping LibreOffice functionality - introspection + LOKDocView is the GTK3 widget that wraps the libreoffice functionality and + exposes a simple API for applications to use this widget. + . + This package contains the Introspection data. + +Package: liblibreofficekitgtk +Section: gnome +Architecture: %OOO_ARCHS% +Depends: ${shlibs:Depends}, ${misc:Depends}, libreofficekit-data +Replaces: libreoffice-gtk3 (<< 1:5.2.0~) +Breaks: libreoffice-gtk3 (<< 1:5.2.0~) +Recommends: libreoffice-gtk3 +Description: GTK3 widget wrapping LibreOffice functionality + This package contains a (basic) GTK+ document viewer widget (used + by e.g. LOKDocView) + +Package: libreofficekit-data +Architecture: all +Section: web +Depends: ${misc:Depends} +Recommends: gir1.2-lokdocview-0.1 +Description: common data for LOKDocView + LOKDocView is the GTK3 widget that wraps the libreoffice functionality and + exposes a simple API for applications to use this widget. + . + This package contains architecture-independent data (e.g. the selection + handlers). + diff --git a/debian/control.help.in b/debian/control.help.in new file mode 100644 index 00000000000..38403bcc786 --- /dev/null +++ b/debian/control.help.in @@ -0,0 +1,17 @@ +Package: libreoffice-help-@LCODE@ +Architecture: all +Section: doc +Recommends: libreoffice-core (>> ${base-version}) +Depends: libreoffice-l10n-@LCODE@, + libreoffice-common (>= 1:6.1.0~), + ${help-depends}, + ${misc:Depends} +Provides: libreoffice-help (= ${help-l10n-virtual-version}) +Replaces: libreoffice-help-common (<< 1:6.4.1~rc1) +Description: office productivity suite -- @LNAME@ help + LibreOffice is a full-featured office productivity suite that provides + a near drop-in replacement for Microsoft(R) Office. + . + This package contains the help of LibreOffice in + @LNAME@. + diff --git a/debian/control.in b/debian/control.in new file mode 100644 index 00000000000..7016fa26f25 --- /dev/null +++ b/debian/control.in @@ -0,0 +1,935 @@ +Source: libreoffice +Section: editors +Priority: optional +Maintainer: Debian LibreOffice Maintainers +Uploaders: Rene Engelhard , Chris Halls +Build-Depends: %BUILD_DEPS%, +Build-Depends-Indep: %BUILD_DEPS_INDEP% +Build-Conflicts: nvidia-glx-dev, + nvidia-glx-legacy-dev, + amd-libopencl1, + nvidia-libopencl1 +Standards-Version: 4.0.1 +Vcs-Git: https://salsa.debian.org/libreoffice-team/libreoffice/libreoffice.git +Vcs-Browser: https://salsa.debian.org/libreoffice-team/libreoffice/libreoffice +Bugs: @BUGS@ +Homepage: http://www.libreoffice.org + +Package: libreoffice +Architecture: %OOO_ARCHS% +Section: metapackages +Depends: libreoffice-base%OOO_NO_BASE_ARCHS%, + libreoffice-calc, + libreoffice-core (= ${binary:Version}), + libreoffice-draw, + libreoffice-impress, + libreoffice-math, + libreoffice-report-builder-bin%OOO_NO_REPORTBUILDER_ARCHS%, + libreoffice-writer, + ${misc:Depends}, + ${pyuno-depends} +Recommends: ${java-common-depends}, + fonts-sil-gentium-basic, + fonts-crosextra-caladea, + fonts-crosextra-carlito, + fonts-dejavu, + fonts-liberation, + fonts-liberation2, + fonts-linuxlibertine, + fonts-noto-core, + fonts-noto-extra, + fonts-noto-mono, + fonts-noto-ui-core, + libreoffice-script-provider-bsh, + libreoffice-script-provider-js, + libreoffice-script-provider-python, + libreoffice-nlpsolver, + libreoffice-report-builder%OOO_NO_REPORTBUILDER_ARCHS%, + libreoffice-wiki-publisher, + libreoffice-sdbc-mysql, + libreoffice-sdbc-postgresql +Suggests: cups-bsd, + ghostscript, + hunspell-dictionary, + hyphen-hyphenation-patterns, + firefox-esr | thunderbird | firefox, + imagemagick | graphicsmagick-imagemagick-compat, + libgl1, + libreoffice-grammarcheck, + libreoffice-help (= ${help-l10n-virtual-version}), + libreoffice-l10n (= ${help-l10n-virtual-version}), + ${libsane-suggests}, + libxrender1, + myspell-dictionary, + mythes-thesaurus, + openclipart2-libreoffice | openclipart-libreoffice, + pstoedit, + unixodbc, + gnupg, + gpa, + ${gstreamer-plugins-suggests}, + ${java-runtime-depends}, + ${ooo-officebean-dep}, + libreoffice-librelogo, + %LO-DESKTOP-INTEGRATION% +Conflicts: libreoffice-dev (<= 1:5.0.3~rc1-2), libreoffice-dev-doc (<= 1:5.0.3~rc1-2) +Description: office productivity suite (metapackage) + LibreOffice is a full-featured office productivity suite that provides + a near drop-in replacement for Microsoft(R) Office. + . + This metapackage installs all components of libreoffice: + * libreoffice-writer: Word processor + * libreoffice-calc: Spreadsheet + * libreoffice-impress: Presentation + * libreoffice-draw: Drawing + * libreoffice-base: Database + * libreoffice-math: Equation editor + It also recommends additional packages (e.g. fonts) in order to match an + upstream LibreOffice install as closely as possible. + . + You can extend the functionality of LibreOffice by installing these + packages: + * hunspell-*/myspell-*: Hunspell/Myspell dictionaries + for use with LibreOffice + * libreoffice-l10n-*: UI interface translation + * libreoffice-help-*: User help + * mythes-*: Thesauri for the use with LibreOffice + * hyphen-*: Hyphenation patterns for LibreOffice + * libreoffice-gtk(2|3): Gtk UI Plugin, GNOME File Picker support + * libreoffice-gnome: GIO backend + * unixodbc: ODBC database support + * cups-bsd: Allows LibreOffice to detect your CUPS printer queues + automatically + * libsane: Use your sane-supported scanner with LibreOffice + * libxrender1: Speed up display by using Xrender library + * libgl1: OpenGL support + * openclipart-libreoffice: Open Clip Art Gallery with LibreOffice index + files + * firefox-esr | thunderbird | firefox: + Mozilla profile with Certificates needed for XML Security... + * openjdk-11-jre | openjdk-8-jre | java8-runtime: + Java Runtime Environment for use with LibreOffice + * pstoedit / imagemagick / ghostscript: helper tools for EPS + * gstreamer0.10-plugins-*: GStreamer plugins for use with LibreOffices + media backend + * libpaper-utils: papersize detection support via paperconf + +Package: libreoffice-nogui +Architecture: %OOO_NOGUI_ARCHS% +Section: metapackages +Depends: libreoffice-base-nogui%OOO_NO_BASE_ARCHS%, + libreoffice-calc-nogui, + libreoffice-core-nogui (= ${binary:Version}), + libreoffice-draw-nogui, + libreoffice-impress-nogui, + libreoffice-math-nogui, + libreoffice-report-builder-bin-nogui%OOO_NO_REPORTBUILDER_ARCHS%, + libreoffice-writer-nogui, + ${misc:Depends}, + ${pyuno-depends} +Recommends: ${java-common-depends}, + libreoffice-script-provider-bsh, + libreoffice-script-provider-js, + libreoffice-script-provider-python, + libreoffice-sdbc-mysql, + libreoffice-sdbc-postgresql +Suggests: ghostscript, + hunspell-dictionary, + hyphen-hyphenation-patterns, + imagemagick | graphicsmagick-imagemagick-compat, + libreoffice-grammarcheck, + myspell-dictionary, + mythes-thesaurus, + pstoedit, + unixodbc, + gnupg, + gpa, + ${java-runtime-depends} +Description: office productivity suite (metapackage, no GUI) + LibreOffice is a full-featured office productivity suite that provides + a near drop-in replacement for Microsoft(R) Office. + . + This metapackage installs all components of libreoffice: + * libreoffice-writer: Word processor + * libreoffice-calc: Spreadsheet + * libreoffice-impress: Presentation + * libreoffice-draw: Drawing + * libreoffice-base: Database + * libreoffice-math: Equation editor + . + WITHOUT GUI SUPPORT. + . + This package is intended mostly for scripting needs. + +Package: libreoffice-l10n-za +Section: metapackages +Architecture: all +Depends: libreoffice-l10n-af, + libreoffice-l10n-en-za, + libreoffice-l10n-nr, + libreoffice-l10n-nso, + libreoffice-l10n-ss, + libreoffice-l10n-st, + libreoffice-l10n-tn, + libreoffice-l10n-ts, + libreoffice-l10n-ve, + libreoffice-l10n-xh, + libreoffice-l10n-zu, + ${misc:Depends} +Description: office productivity suite -- South African language packages + LibreOffice is a full-featured office productivity suite that provides + a near drop-in replacement for Microsoft(R) Office. + . + This package is a metapackage installing l10n packages for all 11 South + African languages. + +Package: libreoffice-l10n-in +Section: metapackages +Architecture: all +Depends: libreoffice-l10n-as, + libreoffice-l10n-bn, + libreoffice-l10n-gu, + libreoffice-l10n-hi, + libreoffice-l10n-kn, + libreoffice-l10n-ml, + libreoffice-l10n-mr, + libreoffice-l10n-ne, + libreoffice-l10n-or, + libreoffice-l10n-pa-in, + libreoffice-l10n-ta, + libreoffice-l10n-te, + ${misc:Depends} +Recommends: fonts-indic +Description: office productivity suite -- Indic language packages + LibreOffice is a full-featured office productivity suite that provides + a near drop-in replacement for Microsoft(R) Office. + . + This package is a metapackage installing l10n packages for all available + indic languages. + +Package: libreoffice-core +Architecture: %OOO_ARCHS% +Depends: fontconfig, + fonts-opensymbol, + libreoffice-common (>> ${base-version}), + ure (>= 1:7.0.0~), + ${misc:Depends}, + ${shlibs:Depends} +Recommends: libpaper-utils, ${gstreamer-plugins-suggests} +Breaks: libreoffice-base (<< ${binary:Version}), + libreoffice-calc (<< ${binary:Version}), + libreoffice-dev (<< ${binary:Version}), + libreoffice-draw (<< ${binary:Version}), + libreoffice-evolution (<< ${binary:Version}), + libreoffice-gnome (<< ${binary:Version}), + libreoffice-gtk2 (<< ${binary:Version}), + libreoffice-gtk3 (<< ${binary:Version}), + libreoffice-impress (<< ${binary:Version}), + libreoffice-qt5 (<< ${binary:Version}), + libreoffice-kde4 (<< ${binary:Version}), + libreoffice-kde5 (<< ${binary:Version}), + libreoffice-kf5 (<< ${binary:Version}), + libreoffice-officebean (<< ${binary:Version}), + libreoffice-writer (<< ${binary:Version}), + browser-plugin-libreoffice, + libreoffice-pdfimport (<< 1:5.4~), + libreoffice-common (<< 1:5.4.1), + libreoffice-avmedia-backend-gstreamer (<< ${binary:Version}) +Conflicts: libreoffice-filter-binfilter, libreoffice-avmedia-backend-vlc, libreoffice-mysql-connector (<< 1:6.2.0~), libreoffice-core-nogui +# for bullseye, copied from libreoffice-common, see #985297 + , + libreoffice-base (<< 1:7.0.0~alpha~), + libreoffice-calc (<< 1:7.0.0~alpha~), + libreoffice-draw (<< 1:7.0.0~alpha~), + libreoffice-impress (<< 1:7.0.0~alpha~), + libreoffice-math (<< 1:7.0.0~alpha~), + libreoffice-report-builder (<< 1:7.0.0~alpha~), + libreoffice-writer (<< 1:7.0.0~alpha~), +Replaces: libreoffice-pdfimport (<< 1:5.4~), libreoffice-common (<< 1:6.3.0~rc1~), libreoffice-avmedia-backend-gstreamer, libreoffice-core-nogui +Description: office productivity suite -- arch-dependent files + LibreOffice is a full-featured office productivity suite that provides + a near drop-in replacement for Microsoft(R) Office. + . + This package contains the architecture-dependent core files of + LibreOffice. See the libreoffice package for more information. + +Package: libreoffice-core-nogui +Architecture: %OOO_NOGUI_ARCHS% +Depends: fontconfig, + fonts-opensymbol, + libreoffice-common (>> ${base-version}), + ure (>= 1:7.0.0~), + ${misc:Depends}, + ${shlibs:Depends} +Recommends: libpaper-utils +Breaks: libreoffice-base (<< ${binary:Version}), + libreoffice-calc, + libreoffice-dev (<< ${binary:Version}), + libreoffice-draw (<< ${binary:Version}), + libreoffice-evolution (<< ${binary:Version}), + libreoffice-gnome (<< ${binary:Version}), + libreoffice-gtk2, + libreoffice-gtk3, + libreoffice-impress (<< ${binary:Version}), + libreoffice-qt5, + libreoffice-kde4, + libreoffice-kde5, + libreoffice-kf5, + libreoffice-officebean (<< ${binary:Version}), + libreoffice-writer (<< ${binary:Version}), + browser-plugin-libreoffice, + libreoffice-pdfimport (<< 1:5.4~), + libreoffice-common (<< 1:5.4.1), + libreoffice-avmedia-backend-gstreamer (<< ${binary:Version}) +Conflicts: libreoffice-filter-binfilter, libreoffice-avmedia-backend-vlc, libreoffice-mysql-connector (<< 1:6.2.0~), libreoffice-core +Provides: libreoffice-bundled +Replaces: libreoffice-pdfimport (<< 1:5.4~), libreoffice-common (<< 1:6.3.0~rc1~), libreoffice-avmedia-backend-gstreamer, libreoffice-core +Description: office productivity suite -- arch-dependent files (no GUI variant) + LibreOffice is a full-featured office productivity suite that provides + a near drop-in replacement for Microsoft(R) Office. + . + This package contains the architecture-dependent core files of + LibreOffice without GUI support for server-based or commandline usage of + LibreOffice. + +Package: libreoffice-common +Architecture: all +Depends: libreoffice-style-colibre, ure, ${numbertext-data-recommends}, ${misc:Depends} +Suggests: libreoffice-style, +Recommends: ${pyuno-depends}, ${textcat-data-recommends}, xdg-utils, fonts-liberation2 | ttf-mscorefonts-installer +Conflicts: openoffice.org-unbundled, + broffice, + libreoffice-filter-mobiledev, + libreoffice-l10n-4.3, + libreoffice-l10n-4.4, + libreoffice-wiki-publisher (<< 1.2.0+LibO5.4.0~rc2), + libreoffice-base (<< 1:7.0.0~alpha~), + libreoffice-base-nogui (<< 1:7.0.0~alpha~), + libreoffice-calc (<< 1:7.0.0~alpha~), + libreoffice-calc-nogui (<< 1:7.0.0~alpha~), + libreoffice-draw (<< 1:7.0.0~alpha~), + libreoffice-draw-nogui (<< 1:7.0.0~alpha~), + libreoffice-evolution (<< 1:7.0.0~alpha~), + libreoffice-gnome (<< 1:7.0.0~alpha~), + libreoffice-impress (<< 1:7.0.0~alpha~), + libreoffice-impress-nogui (<< 1:7.0.0~alpha~), + libreoffice-l10n (<< 7.0), + libreoffice-librelogo (<< 1:7.0.0~alpha~), + libreoffice-math (<< 1:7.0.0~alpha~), + libreoffice-math-nogui (<< 1:7.0.0~alpha~), + libreoffice-sdbc-postgresql (<< 1:7.0.0~alpha~), + python3-uno (<< 1:7.0.0~alpha~), + libreoffice-report-builder (<< 1:7.0.0~alpha~), + libreoffice-writer (<< 1:7.0.0~alpha~), + libreoffice-writer-nogui (<< 1:7.0.0~alpha~) +Provides: libreoffice-l10n-en-us +Breaks: libreoffice-core (<< 1:${oover}~), + libreoffice-core (<< 1:6.4.2~rc1), + libreoffice-help-5.2, + libreoffice-help (<< 5.4), + libreoffice-l10n (<< 7.0), + libreoffice-librelogo (<< 1:7.0.0~alpha), + libreoffice-sdbc-postgresql (<< 1:7.0.0~alpha), + libreoffice-report-builder (<< 1:7.0.0~alpha), + libreoffice-evolution (<< 1:7.0.0~alpha), + libreoffice-gnome (<< 1:7.0.0~alpha), + python3-uno (<< 1:7.0.0~alpha), + libreoffice-core (>= 1:${next-oover}~), + libreoffice-style-andromeda (<< 1:${oover}~), + libreoffice-style-crystal (<< 1:${oover}~), + libreoffice-style-crystal (>= 1:${next-oover}~), + libreoffice-style-galaxy (<< 1:${oover}~), + libreoffice-style-galaxy (>= 1:${next-oover}~), + libreoffice-style-hicontrast (<< 1:${oover}~), + libreoffice-style-hicontrast (>= 1:${next-oover}~), + libreoffice-style-tango, + libreoffice-writer2latex (<< 1.0.2-9), + libreoffice-writer2xhtml (<< 1.0.2-9), + libreoffice-base (<< 1:6.4.0~beta1-2~), + openclipart-libreoffice (<= 1:0.18+dfsg-17) +Replaces: libreoffice-base (<< 1:6.4.0~beta1-2~), + libreoffice-pdfimport (<< 1:5.4~), + openclipart-libreoffice (<= 1:0.18+dfsg-17) +Description: office productivity suite -- arch-independent files + LibreOffice is a full-featured office productivity suite that provides + a near drop-in replacement for Microsoft(R) Office. + . + This package contains the architecture-independent files of + LibreOffice. + +Package: libreoffice-java-common +Architecture: all +Depends: libreoffice-common, liblibreoffice-java, libjuh-java, libridl-java, libjurt-java, libunoil-java, libunoloader-java, ${java:Depends}, ${misc:Depends} +Breaks: libunoil-java (<< 1:6.4.0~rc1-6) +Replaces: libunoil-java (<< 1:6.4.0~rc1-6) +Description: office productivity suite -- arch-independent Java support files + LibreOffice is a full-featured office productivity suite that provides + a near drop-in replacement for Microsoft(R) Office. + . + This package contains the architecture-independent files of + the Java support for LibreOffice (Java classes, scripts, config snippets). + +Package: libreoffice-help-common +Architecture: all +Depends: libreoffice-common, ${help-common-depends}, ${misc:Depends} +Breaks: libreoffice-common (<< 1:6.1.0~alpha1-1) +Replaces: libreoffice-common (<< 1:6.1.0~alpha1-1) +Description: office productivity suite -- common files for LibreOffice help + LibreOffice is a full-featured office productivity suite that provides + a near drop-in replacement for Microsoft(R) Office. + . + This package contains the common files (e.g. language-independent, media) files + for the LibreOffice Help. + +Package: libreoffice-writer +Architecture: %OOO_ARCHS% +Depends: libreoffice-base-core (= ${binary:Version})%OOO_NO_BASE_ARCHS%, + libreoffice-core (= ${binary:Version}), + libreoffice-common (>= 1:7.0.0~alpha~), + ${misc:Depends}, + ${shlibs:Depends} +Recommends: libreoffice-math, +Suggests: fonts-crosextra-caladea, + fonts-crosextra-carlito, + libreoffice-base, + ${java-common-depends}, + ${java-runtime-depends} +Replaces: libreoffice-common (<< 1:6.4.2~rc1~) +Breaks: libreoffice-common (<< 1:6.4.2~rc1~) +Description: office productivity suite -- word processor + LibreOffice is a full-featured office productivity suite that provides + a near drop-in replacement for Microsoft(R) Office. + . + This package contains the wordprocessor component for LibreOffice. + +Package: libreoffice-writer-nogui +Architecture: %OOO_NOGUI_ARCHS% +Depends: libreoffice-base-core (= ${binary:Version})%OOO_NO_BASE_ARCHS%, + libreoffice-core-nogui (= ${binary:Version}) | libreoffice-core (= ${binary:Version}), + libreoffice-common (>= 1:7.0.0~alpha~), + ${misc:Depends}, + ${shlibs:Depends} +Recommends: libreoffice-math-nogui, +Suggests: fonts-crosextra-caladea, + fonts-crosextra-carlito, + libreoffice-base, + ${java-common-depends}, + ${java-runtime-depends} +Replaces: libreoffice-common (<< 1:6.4.2~rc1~), libreoffice-writer +Breaks: libreoffice-common (<< 1:6.4.2~rc1~) +Conflicts: libreoffice-writer +Description: office productivity suite -- word processor (no GUI variant) + LibreOffice is a full-featured office productivity suite that provides + a near drop-in replacement for Microsoft(R) Office. + . + This package contains the wordprocessor component for LibreOffice. + +Package: libreoffice-calc +Architecture: %OOO_ARCHS% +Depends: libreoffice-base-core (= ${binary:Version})%OOO_NO_BASE_ARCHS%, + libreoffice-core (= ${binary:Version}), + libreoffice-common (>= 1:7.0.0~alpha~), + ${lpsolve-dep}, + ${misc:Depends}, + ${shlibs:Depends} +Suggests: ocl-icd-libopencl1 | mesa-opencl-icd | beignet-opencl-icd +Replaces: libreoffice-common (<< 1:6.4.2~rc1~) +Breaks: libreoffice-common (<< 1:6.4.2~rc1~) +Description: office productivity suite -- spreadsheet + LibreOffice is a full-featured office productivity suite that provides + a near drop-in replacement for Microsoft(R) Office. + . + This package contains the spreadsheet component for LibreOffice. + +Package: libreoffice-calc-nogui +Architecture: %OOO_NOGUI_ARCHS% +Depends: libreoffice-base-core (= ${binary:Version})%OOO_NO_BASE_ARCHS%, + libreoffice-core-nogui (= ${binary:Version}) | libreoffice-core (= ${binary:Version}), + libreoffice-common (>= 1:7.0.0~alpha~), + ${lpsolve-dep}, + ${misc:Depends}, + ${shlibs:Depends} +Replaces: libreoffice-common (<< 1:6.4.2~rc1~), libreoffice-calc +Breaks: libreoffice-common (<< 1:6.4.2~rc1~) +Conflicts: libreoffice-calc +Description: office productivity suite -- spreadsheet (no GUI variant) + LibreOffice is a full-featured office productivity suite that provides + a near drop-in replacement for Microsoft(R) Office. + . + This package contains the spreadsheet component for LibreOffice + for use with libreoffice-core-nogui. + +Package: libreoffice-impress +Architecture: %OOO_ARCHS% +Depends: libreoffice-core (= ${binary:Version}), + libreoffice-draw (= ${binary:Version}), + libreoffice-common (>= 1:7.0.0~alpha~), + ${misc:Depends}, + ${shlibs:Depends} +Replaces: libreoffice-common (<< 1:6.4.2~rc1~), libreoffice-ogltrans (<< 1:6.1.4-2~) +Conflicts: libreoffice-ogltrans (<< 1:6.1.4-2~) +Provides: libreoffice-ogltrans +Breaks: libreoffice-common (<< 1:6.4.2~rc1~) +Description: office productivity suite -- presentation + LibreOffice is a full-featured office productivity suite that provides + a near drop-in replacement for Microsoft(R) Office. + . + This package contains the presentation component for LibreOffice. + +Package: libreoffice-impress-nogui +Architecture: %OOO_NOGUI_ARCHS% +Depends: libreoffice-core-nogui (= ${binary:Version}) | libreoffice-core (= ${binary:Version}), + libreoffice-draw-nogui (= ${binary:Version}) | libreoffice-draw (= ${binary:Version}), + libreoffice-common (>= 1:7.0.0~alpha~), + ${misc:Depends}, + ${shlibs:Depends} +Replaces: libreoffice-common (<< 1:6.4.2~rc1~), libreoffice-impress +Conflicts: libreoffice-ogltrans (<< 1:6.1.4-2~), libreoffice-impress +Breaks: libreoffice-common (<< 1:6.4.2~rc1~) +Description: office productivity suite -- presentation (no GUI variant) + LibreOffice is a full-featured office productivity suite that provides + a near drop-in replacement for Microsoft(R) Office. + . + This package contains the presentation component for LibreOffice. + +Package: libreoffice-draw +Architecture: %OOO_ARCHS% +Depends: libreoffice-core (= ${binary:Version}), + libreoffice-common (>= 1:7.0.0~alpha~), + ${misc:Depends}, + ${shlibs:Depends} +Replaces: libreoffice-core (<< 1:6.4.1~rc1-3), libreoffice-impress (<< 1:5.2.0-2), libreoffice-common (<< 1:6.4.2~rc1~) +Breaks: libreoffice-core (<< 1:6.4.1~rc1-3), libreoffice-impress (<< 1:5.2.0-2), libreoffice-common (<< 1:6.4.2~rc1~) +Description: office productivity suite -- drawing + LibreOffice is a full-featured office productivity suite that provides + a near drop-in replacement for Microsoft(R) Office. + . + This package contains the drawing component for LibreOffice. + +Package: libreoffice-draw-nogui +Architecture: %OOO_NOGUI_ARCHS% +Depends: libreoffice-core-nogui (= ${binary:Version}) | libreoffice-core (= ${binary:Version}), + libreoffice-common (>= 1:7.0.0~alpha~), + ${misc:Depends}, + ${shlibs:Depends} +Replaces: libreoffice-impress (<< 1:5.2.0-2), libreoffice-common (<< 1:6.4.2~rc1~), libreoffice-draw +Breaks: libreoffice-impress (<< 1:5.2.0-2), libreoffice-common (<< 1:6.4.2~rc1~) +Conflicts: libreoffice-draw +Description: office productivity suite -- drawing (no GUI variant) + LibreOffice is a full-featured office productivity suite that provides + a near drop-in replacement for Microsoft(R) Office. + . + This package contains the drawing component for LibreOffice. + +Package: libreoffice-math +Architecture: %OOO_ARCHS% +Depends: fonts-opensymbol (>= 2:102.11), + libreoffice-core (= ${binary:Version}), + libreoffice-common (>= 1:7.0.0~alpha~), + ${misc:Depends}, + ${shlibs:Depends} +Replaces: libreoffice-common (<< 1:6.4.2~rc1~) +Breaks: libreoffice-common (<< 1:6.4.2~rc1~) +Description: office productivity suite -- equation editor + LibreOffice is a full-featured office productivity suite that provides + a near drop-in replacement for Microsoft(R) Office. + . + This package contains the equation editor component for LibreOffice. + +Package: libreoffice-math-nogui +Architecture: %OOO_NOGUI_ARCHS% +Depends: fonts-opensymbol (>= 2:102.11), + libreoffice-core-nogui (= ${binary:Version}) | libreoffice-core (= ${binary:Version}), + libreoffice-common (>= 1:7.0.0~alpha~), + ${misc:Depends}, + ${shlibs:Depends} +Replaces: libreoffice-common (<< 1:6.4.2~rc1~), libreoffice-math +Conflicts: libreoffice-common (<< 1:6.4.2~rc1~), libreoffice-math +Description: office productivity suite -- equation editor (no GUI variant) + LibreOffice is a full-featured office productivity suite that provides + a near drop-in replacement for Microsoft(R) Office. + . + This package contains the equation editor component for LibreOffice. + +Package: libreoffice-base-core +Architecture: %OOO_BASE_ARCHS% +Depends: libreoffice-core-nogui (= ${binary:Version}) | libreoffice-core (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends} +Suggests: libreoffice-base +Replaces: libreoffice-base-drivers (<< 1:6.1.1~rc1-2) +Description: office productivity suite -- shared library + LibreOffice is a full-featured office productivity suite that provides + a near drop-in replacement for Microsoft(R) Office. + . + This package contains common libraries of LibreOffice Base used by + Base, Writer and Calc. + . + If you need full Base functionality (or actual database drivers), please + install libreoffice-base (and/or libreoffice-base-drivers and/o + libreoffice-sdbc-*). + +Package: libreoffice-base +Architecture: %OOO_BASE_ARCHS% +Section: database +Pre-Depends: dpkg (>= 1.19.1) +Depends: libreoffice-base-core (= ${binary:Version}), + libreoffice-base-drivers (= ${binary:Version}), + libreoffice-core (= ${binary:Version}), + libreoffice-common (>= 1:7.0.0~alpha~), + ${misc:Depends}, + ${shlibs:Depends} +Suggests: libreoffice-report-builder, + unixodbc, + python3-uno +Recommends: libreoffice-writer, ${java-common-depends}, ${java-runtime-depends} +Replaces: libreoffice-common (<< 1:6.4.2~rc1~) +Breaks: libreoffice-common (<< 1:6.4.2~rc1~) +Description: office productivity suite -- database + LibreOffice is a full-featured office productivity suite that provides + a near drop-in replacement for Microsoft(R) Office. + . + This package contains the database component for LibreOffice. + +Package: libreoffice-base-nogui +Architecture: %OOO_NOGUI_ARCHS% +Section: database +Depends: libreoffice-base-core (= ${binary:Version}), + libreoffice-base-drivers (= ${binary:Version}), + libreoffice-core-nogui (= ${binary:Version}) | libreoffice-core (= ${binary:Version}), + libreoffice-common (>= 1:7.0.0~alpha~), + ${misc:Depends}, + ${shlibs:Depends} +Suggests: libreoffice-report-builder, + unixodbc, + python3-uno +Recommends: libreoffice-writer, ${java-common-depends}, ${java-runtime-depends} +Replaces: libreoffice-common (<< 1:6.4.2~rc1~), libreoffice-base +Breaks: libreoffice-common (<< 1:6.4.2~rc1~) +Conflicts: libreoffice-base +Description: office productivity suite -- database (no GUI variant) + LibreOffice is a full-featured office productivity suite that provides + a near drop-in replacement for Microsoft(R) Office. + . + This package contains the database component for LibreOffice. + +Package: libreoffice-style-breeze +Architecture: all +Enhances: libreoffice-core +Depends: libreoffice-style-colibre, ${misc:Depends} +Suggests: breeze-icon-theme +Provides: libreoffice-style +Recommends: libreoffice-common +Description: office productivity suite -- Breeze symbol style + LibreOffice is a full-featured office productivity suite that provides + a near drop-in replacement for Microsoft(R) Office. + . + This package contains the "breeze" symbol style, default style for KDE 5. + +Package: libreoffice-style-colibre +Architecture: all +Enhances: libreoffice-core +Depends: ${misc:Depends} +Provides: libreoffice-style +Recommends: libreoffice-common +Description: office productivity suite -- colibre symbol style + LibreOffice is a full-featured office productivity suite that provides + a near drop-in replacement for Microsoft(R) Office. + . + This package contains the "colibre" symbol style - a icon theme + which follow Microsoft(R) Offices color scheme. + +Package: libreoffice-style-sifr +Architecture: all +Enhances: libreoffice-core +Depends: libreoffice-style-breeze, ${misc:Depends} +Provides: libreoffice-style, libreoffice-style-hicontrast +Replaces: libreoffice-style-hicontrast +Conflicts: libreoffice-style-hicontrast +Recommends: libreoffice-common +Description: office productivity suite -- Sifr symbol style + LibreOffice is a full-featured office productivity suite that provides + a near drop-in replacement for Microsoft(R) Office. + . + This package contains the "sifr" symbol style (an adaption of the Gnome + symbolic theme), needs to be manually enabled in the LibreOffice option + menu. + +Package: libreoffice-style-elementary +Architecture: all +Depends: libreoffice-style-colibre, ${misc:Depends} +Enhances: libreoffice-core +Provides: libreoffice-style +Recommends: libreoffice-common +Description: office productivity suite -- Elementary symbol style + LibreOffice is a full-featured office productivity suite that provides + a near drop-in replacement for Microsoft(R) Office. + . + This package contains the "elementary" symbol style, default style + for GTK+/Gnome. + +Package: libreoffice-style-karasa-jaga +Architecture: all +Depends: ${misc:Depends} +Enhances: libreoffice-core +Provides: libreoffice-style +Recommends: libreoffice-common +Description: office productivity suite -- Karasa Jaga symbol style + LibreOffice is a full-featured office productivity suite that provides + a near drop-in replacement for Microsoft(R) Office. + . + This package contains the "karasa_jaga" symbol style. + +Package: libreoffice-style-sukapura +Architecture: all +Depends: ${misc:Depends} +Enhances: libreoffice-core +Provides: libreoffice-style +Recommends: libreoffice-common +Description: office productivity suite -- Sukapura symbol style + LibreOffice is a full-featured office productivity suite that provides + a near drop-in replacement for Microsoft(R) Office. + . + This package contains the "sukapura" symbol style. + +Package: libreoffice-gnome +Architecture: %OOO_ARCHS% +Depends: libreoffice-core (= ${binary:Version}), + libreoffice-common (>= 1:7.0.0~alpha~), + ${misc:Depends}, + ${shlibs:Depends} +Recommends: ${gnome-gtk-recommends}, libreoffice-style-elementary +Suggests: libreoffice-evolution, seahorse +Section: gnome +Enhances: libreoffice +Provides: libreoffice-gtk-gnome +Replaces: libreoffice-gtk (<< 1:5.0.0~rc2-1) +Description: office productivity suite -- GNOME integration + LibreOffice is a full-featured office productivity suite that provides + a near drop-in replacement for Microsoft(R) Office. + . + This package contains the GIO support. + . + You can extend the functionality of this by installing these packages: + . + * libreoffice-evolution: Evolution addressbook support + * evolution + +Package: python3-uno +Section: python +Architecture: %OOO_ARCHS% +Enhances: libreoffice +Depends: libreoffice-core-nogui (= ${binary:Version}) | libreoffice-core (= ${binary:Version}), + libreoffice-common (>= 1:7.0.0~alpha~), + ${misc:Depends}, + ${python3:Depends}, + ${shlibs:Depends} +Conflicts: python-uno +Replaces: libreoffice-core (= 1:4.3.0~beta1-1), libreoffice-common (<< 1:4.4.0~beta2) +Build-Profiles: +Description: Python-UNO bridge + The Python-UNO bridge allows use of the standard LibreOffice API + with the Python scripting language. It additionally allows + others to develop UNO components in Python, thus Python UNO components + may be run within the LibreOffice process and can be called from C++ + or the built in StarBasic scripting language. +Homepage: http://udk.openoffice.org/python/python-bridge.html + +Package: libreoffice-script-provider-python +Architecture: all +Section: python +Depends: libreoffice-common, + libreoffice-core-nogui | libreoffice-core, + ${misc:Depends}, + ${python3:Depends}, + ${pyuno-depends} +Build-Profiles: +Description: Python script support provider for LibreOffice scripting framework + LibreOffice is a full-featured office productivity suite that provides + a near drop-in replacement for Microsoft(R) Office. + . + The Scripting Framework allows LibreOffice users to write and run macros + in multiple languages including LibreOffice Basic, Python, Java, BeanShell + and JavaScript. These macros can then be assigned to menus, toolbars, + keyboard shortcuts, events and embedded objects. + . + This package contains the script provider to support Python. + +Package: libreoffice-script-provider-bsh +Architecture: all +Section: java +Depends: libreoffice-common, + libreoffice-core-nogui | libreoffice-core, + ${java-common-depends}, + liblibreoffice-java, + ${java:Depends}, + ${java-runtime-depends}, + ${misc:Depends} +Description: BeanShell script support provider for LibreOffice scripting framework + LibreOffice is a full-featured office productivity suite that provides + a near drop-in replacement for Microsoft(R) Office. + . + The Scripting Framework allows LibreOffice users to write and run macros + in multiple languages including LibreOffice Basic, Python, Java, BeanShell + and JavaScript. These macros can then be assigned to menus, toolbars, + keyboard shortcuts, events and embedded objects. + . + This package contains the script provider to support BeanShell. + +Package: libreoffice-script-provider-js +Architecture: all +Section: web +Depends: libreoffice-common, + libreoffice-core-nogui | libreoffice-core, + ${java-common-depends}, + liblibreoffice-java, + ${java:Depends}, + ${java-runtime-depends}, + ${misc:Depends} +Description: JavaScript script support provider for LibreOffice scripting framework + LibreOffice is a full-featured office productivity suite that provides + a near drop-in replacement for Microsoft(R) Office. + . + The Scripting Framework allows LibreOffice users to write and run macros + in multiple languages including LibreOffice Basic, Python, Java, BeanShell + and JavaScript. These macros can then be assigned to menus, toolbars, + keyboard shortcuts, events and embedded objects. + . + This package contains the script provider to support JavaScript. + +Package: libreoffice-sdbc-hsqldb +Depends: libreoffice-core-nogui | libreoffice-core, ${java-common-depends}, ${java:Depends}, ${java-runtime-depends}, ${shlibs:Depends}, ${misc:Depends} +Architecture: %OOO_JAVA_ARCHS% +Section: database +Enhances: libreoffice-base-drivers +Description: HSQLDB SDBC driver for LibreOffice + LibreOffice is a full-featured office productivity suite that provides + a near drop-in replacement for Microsoft(R) Office. + . + The HSQLDB SDBC Driver allows one to use the HSQLDB embedded database from + LibreOffice without any wrapper layer such as ODBC or JDBC. + +Package: libreoffice-sdbc-mysql +Section: database +Architecture: %OOO_BASE_ARCHS% +Depends: libreoffice-core-nogui | libreoffice-core, ${misc:Depends}, ${shlibs:Depends} +Suggests: default-mysql-server | virtual-mysql-server +Description: MariaDB/MySQL SDBC driver for LibreOffice + LibreOffice is a full-featured office productivity suite that provides + a near drop-in replacement for Microsoft(R) Office. + . + The MariaDB/MySQL driver allows one to use the MariaDB or MySQL + database from LibreOffice without any wrapper layer such as ODBC or JDBC. + +Package: libreoffice-base-drivers +Depends: libreoffice-core-nogui | libreoffice-core, ${shlibs:Depends}, ${misc:Depends} +Architecture: %OOO_BASE_ARCHS% +Section: database +Suggests: libreoffice-sdbc-postgresql | odbc-postgresql | libpg-java, + libreoffice-sdbc-mysql | libmyodbc | libmariadb-java, + libsqliteodbc | tdsodbc | odbc-mdbtools, + libjtds-java, +Recommends: libreoffice-sdbc-hsqldb [%OOO_JAVA_ARCHS%], ${base-firebird-recommends} +Replaces: libreoffice-base (<< 1:4.3.0-3), libreoffice-core (<< 1:6.2.0~beta1~) +Breaks: libreoffice-base (<< 1:4.3.0-3) +Description: Database connectivity drivers for LibreOffice + LibreOffice is a full-featured office productivity suite that provides + a near drop-in replacement for Microsoft(R) Office. + . + This package contains the database connectivity drivers used by LibreOffices + database functionality: + - ODBC + - JDBC + - dBase + - Calc + - Flat files + . + You can extend this by installing: + . + * unixodbc: ODBC database support + * libmyodbc | odbc-postgresql | libsqliteodbc | tdsodbc | odbc-mdbtools: ODBC + drivers for: + - MySQL + - PostgreSQL + - SQLite + - MS SQL / Sybase SQL + - *.mdb (JET / MS Access) + * libmariadb-java | libpg-java | libjtds-java: JDBC Drivers + for: + - MySQL/MariaDB + - PostgreSQL + - MS SQL Server and Sybase + * libreoffice-sdbc-hsqldb: embedded HSQLDB SDBC Driver + * libreoffice-sdbc-firebird: Firebird SDBC Driver + * libreoffice-sdbc-postgresql: PostgreSQL SDBC Driver + * libreoffice-sdbc-mysql: MySQL/MariaDB SDBC Driver + +Package: python3-access2base +Section: python +Architecture: all +Homepage: http://www.access2base.com/access2base.html +Depends: libreoffice-common (>= 1:6.4.0~beta1-2~), libreoffice-base, python3-uno, ${python3:Depends}, ${misc:Depends} +Replaces: libreoffice-base +Description: interface between Python and the LibreOffice Access2Base library + Access2Base is a LibreOffice/OpenOffice Basic library of macros for + (business or personal) application developers and advanced users. + . + Their syntax and their meaning are directly inspired by MSAccess. + The macros are callable from + - a LibreOffice / OpenOffice Base application, + - any LibreOffice / OpenOffice document wanting to access data + stored in databases. + . + This package contains an interface between Python (user) scripts + and Access2Base. + +Package: libunoil-java +Section: oldlibs +Depends: ${java:Depends}, ${misc:Depends}, libridl-java +Architecture: all +Replaces: libreoffice-java-common (<< 1:6.4.0~rc1-6) +Breaks: libreoffice-java-common (<< 1:6.4.0~rc1-6) +Description: LibreOffice UNO runtime environment -- UNO interface library (compatibility library) + LibreOffice is a full-featured office productivity suite that provides + a near drop-in replacement for Microsoft(R) Office. + . + This package formerly contained the precompiled Java interfaces of + the LibreOffice API. + . + This has now been merged into liblibreoffice-java but this package still + exists for compatibility with applications referencing the old + library. + +Package: libreoffice-officebean +Architecture: %OOO_JAVA_ARCHS% +Section: oldlibs +Depends: libreoffice-core-nogui (= ${binary:Version}) | libreoffice-core (= ${binary:Version}), + libofficebean-java (>= 1:6.4.0~rc2), +Description: transitional package for libofficebean-java + LibreOffice is a full-featured office productivity suite that provides + a near drop-in replacement for Microsoft(R) Office. + . + This package formerly contained binaries for the the LibreOffice Office Bean + for embedding LibreOffice in custom Java applications. + . + This has now been merged into libofficebean-java so this package can safely + be removed. + +Package: libofficebean-java +Section: java +Depends: liblibreoffice-java, + ${java-runtime-depends}, + ${java:Depends}, + ${shlibs:Depends}, + ${misc:Depends} +Recommends: libreoffice-core-nogui | libreoffice-core +Architecture: %OOO_JAVA_ARCHS% +Replaces: libreoffice-officebean (<< 1:6.4.0~rc2-1) +Breaks: libreoffice-officebean (<< 1:6.4.0~rc2-1) +Description: generic Java Bean wrapper for LibreOffice components + LibreOffice is a full-featured office productivity suite that provides + a near drop-in replacement for Microsoft(R) Office. + . + This package contains the Java library for the the LibreOffice Office Bean + for embedding LibreOffice in custom Java applications. + diff --git a/debian/control.kf5.in b/debian/control.kf5.in new file mode 100644 index 00000000000..3eaa5b3702c --- /dev/null +++ b/debian/control.kf5.in @@ -0,0 +1,17 @@ +Package: libreoffice-kf5 +Architecture: %OOO_ARCHS% +Depends: libreoffice-core (= ${binary:Version}), + ${kf5-qt5-depends}, + ${misc:Depends}, + ${shlibs:Depends} +Recommends: ${plasma-iconset-dep} +Replaces: libreoffice-kde (<< 1:6.1.0~alpha1-1) +Section: kde +Enhances: libreoffice +Description: office productivity suite -- KDE Frameworks 5 integration + LibreOffice is a full-featured office productivity suite that provides + a near drop-in replacement for Microsoft(R) Office. + . + This package contains the KF5 plugin for LibreOffice and a KF5-based File + Picker when running under Plasma. + diff --git a/debian/control.lang.in b/debian/control.lang.in new file mode 100644 index 00000000000..95036569354 --- /dev/null +++ b/debian/control.lang.in @@ -0,0 +1,29 @@ +Package: libreoffice-l10n-@LCODE@ +Section: localization +Architecture: all +Depends: libreoffice-common (>= 1:7.0.0~alpha~), ${misc:Depends}, @LOCALES_DEPENDS@ +Recommends: libreoffice-core (>> ${base-version}) @FONT_RECOMMENDS@ +Provides: libreoffice-l10n (= ${help-l10n-virtual-version}) +Suggests: hunspell-dictionary-@LCODE@ | myspell-dictionary-@LCODE@, + hyphen-@LCODE@, + libreoffice-grammarcheck-@LCODE@, + libreoffice-help-@LCODE@, + mythes-@LCODE@ +Description: office productivity suite -- @LNAME@ language package + LibreOffice is a full-featured office productivity suite that provides + a near drop-in replacement for Microsoft(R) Office. + . + This package contains the localization of LibreOffice in + @LNAME@. + It contains the user interface, the templates and the autotext features. + (please note that not all this is available for all possible languages). + You can switch user interface language using the locales system. + . + Spelling dictionaries, hyphenation patterns, thesauri and help are not + included in this package. There are some available in separate packages + (myspell-*, hyphen-*, mythes-*, libreoffice-help-*) + . + If you just want to be able to spellcheck etc. in other languages, you can + install extra dictionaries/hyphenation patterns/thesauri independently of + the language packs. + diff --git a/debian/control.librelogo.in b/debian/control.librelogo.in new file mode 100644 index 00000000000..a07a2e08e2d --- /dev/null +++ b/debian/control.librelogo.in @@ -0,0 +1,22 @@ +Package: libreoffice-librelogo +Section: misc +Architecture: all +Depends: libreoffice-core, + libreoffice-writer, + libreoffice-script-provider-python, + libreoffice-common (>= 1:7.0.0~alpha), + ${misc:Depends} +Build-Profiles: +Homepage: http://librelogo.org +Description: Logo-like programming language for LibreOffice + LibreOffice is a full-featured office productivity suite that provides + a near drop-in replacement for Microsoft(R) Office. + . + This package contains Librelogo, which is a pyuno-based Logo-like programming + language with interactive vectorgraphics for education and DTP + - basic Logo syntax for back compatibility with educational Logo systems + - interactive vectorgraphics in LibreOffice Writer + - native commands (easily translatable) + - Python data structures (list, tuple, set, dictionary) and other Python + features + diff --git a/debian/control.lokit.in b/debian/control.lokit.in new file mode 100644 index 00000000000..59dfd57c26f --- /dev/null +++ b/debian/control.lokit.in @@ -0,0 +1,16 @@ +Package: libreofficekit-dev +Section: libdevel +Architecture: %OOO_ARCHS% +Depends: ${misc:Depends}, gir1.2-lokdocview-0.1 (= ${binary:Version}) +Suggests: libgtk-3-dev +Recommends: libreoffice-core, libreofficekit-data +Replaces: gir1.2-lokdocview-0.1 (<< 1:5.4.0~rc1) +Description: LibreOfficeKit -- headers + LibreOfficeKit can be used for accessing LibreOffice functionality through + C/C++, without any need to use UNO. + . + For now it only offers document conversion (in addition to an experimental + tiled rendering API). + . + This package contains the headers needed for using LibreOfficeKit. + diff --git a/debian/control.mediawiki.in b/debian/control.mediawiki.in new file mode 100644 index 00000000000..9255a51a0aa --- /dev/null +++ b/debian/control.mediawiki.in @@ -0,0 +1,18 @@ +Package: libreoffice-wiki-publisher +Section: misc +Architecture: all +Depends: libreoffice-core, + liblibreoffice-java, + ${java-common-depends}, + ${java:Depends}, + ${java-runtime-depends}, + ${misc:Depends} +Enhances: libreoffice-writer +Suggests: mediawiki +Description: LibreOffice extension for working with MediaWiki articles + LibreOffice is a full-featured office productivity suite that provides + a near drop-in replacement for Microsoft(R) Office. + . + This package contains an extension to create/edit/publish MediaWiki + articles with LibreOffice + diff --git a/debian/control.nlpsolver.in b/debian/control.nlpsolver.in new file mode 100644 index 00000000000..9b540eeaa8c --- /dev/null +++ b/debian/control.nlpsolver.in @@ -0,0 +1,14 @@ +Package: libreoffice-nlpsolver +Architecture: all +Depends: ${misc:Depends}, libreoffice-calc, libreoffice-core, liblibreoffice-java, ${java-common-depends}, ${java-runtime-depends} +Section: math +Description: "Solver for Nonlinear Programming" extension for LibreOffice + By default LibreOffice Calc ships with a solver engine for linear + programming only. This allows the optimization of models to a certain degree. + However, if the formulas or constraints become more complex, + nonlinear programming is required. That missing gap is now filled by the + Solver for Nonlinear Programming extension. + . + Currently it incorporates two Evolutionary Algorithms which are able to + handle floating point and integer variables as well as nonlinear constraints. + diff --git a/debian/control.plasma.in b/debian/control.plasma.in new file mode 100644 index 00000000000..640f076ceb8 --- /dev/null +++ b/debian/control.plasma.in @@ -0,0 +1,13 @@ +Package: libreoffice-plasma +Architecture: %OOO_ARCHS% +Depends: libreoffice-core (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends} +Replaces: libreoffice-kde5 (<< 1:6.4.0~) +Description: office productivity suite -- some Plasma integration + LibreOffice is a full-featured office productivity suite that provides + a near drop-in replacement for Microsoft(R) Office. + . + This package contains some minor Plasma integration (like AppData + and "Create New..." integration) and a KDE/KF5 configuration backend. + diff --git a/debian/control.postgresql.in b/debian/control.postgresql.in new file mode 100644 index 00000000000..ffbfb05b4be --- /dev/null +++ b/debian/control.postgresql.in @@ -0,0 +1,17 @@ +Package: libreoffice-sdbc-postgresql +Section: misc +Architecture: %OOO_BASE_ARCHS% +Depends: libreoffice-core, + libreoffice-common (>= 1:7.0.0~alpha), + ${misc:Depends}, + ${shlibs:Depends} +Suggests: postgresql (>= 8.4) +Enhances: libreoffice-base-drivers +Description: PostgreSQL SDBC driver for LibreOffice + LibreOffice is a full-featured office productivity suite that provides + a near drop-in replacement for Microsoft(R) Office. + . + The PostgreSQL SDBC Driver allows one to use the PostgreSQL database from + LibreOffice without any wrapper layer such as ODBC or JDBC. +Homepage: http://wiki.documentfoundation.org/PostgreSQL-SDBC + diff --git a/debian/control.qt5.in b/debian/control.qt5.in new file mode 100644 index 00000000000..9681f5f6a3f --- /dev/null +++ b/debian/control.qt5.in @@ -0,0 +1,14 @@ +Package: libreoffice-qt5 +Architecture: %OOO_ARCHS% +Depends: libreoffice-core (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends} +Recommends: qtgstreamer-plugins-qt5 +Enhances: libreoffice +Description: office productivity suite -- Qt 5 integration + LibreOffice is a full-featured office productivity suite that provides + a near drop-in replacement for Microsoft(R) Office. + . + This package contains the Qt 5 plugin for drawing LibreOffices widgets + with Qt 5 and a Qt File Picker and print dialog. + diff --git a/debian/control.reportbuilder.in b/debian/control.reportbuilder.in new file mode 100644 index 00000000000..4a2edd0115d --- /dev/null +++ b/debian/control.reportbuilder.in @@ -0,0 +1,55 @@ +Package: libreoffice-report-builder +Section: misc +Architecture: all +Depends: libreoffice-core | libreoffice-core-nogui, + libreoffice-report-builder-bin (>= ${base-version}), + libreoffice-common (>= 1:7.0.0~alpha), + liblibreoffice-java, + ${java:Depends}, + ${java-common-depends}, + ${misc:Depends}, + ${report-builder-jar-depends} +Provides: libreoffice-reportdesigner +Enhances: libreoffice-base +Breaks: libreoffice-common (<< 1:6.4.2~rc1~) +Replaces: libreoffice-common (<< 1:6.4.2~r~~) +Description: LibreOffice component for building database reports + LibreOffice is a full-featured office productivity suite that provides + a near drop-in replacement for Microsoft(R) Office. + . + This package contains the report builder: + "Create with the Sun Report Builder stylish, smart-looking database reports. + The flexible report editor can define group and page headers as well as + group and page footers and even calculation fields are available to + accomplish complex database reports." + +Package: libreoffice-report-builder-bin +Section: misc +Architecture: %OOO_REPORTBUILDER_ARCHS% +Depends: libreoffice-core, + libreoffice-base, + ${misc:Depends}, + ${shlibs:Depends} +Description: LibreOffice component for building database reports -- libraries + LibreOffice is a full-featured office productivity suite that provides + a near drop-in replacement for Microsoft(R) Office. + . + This package contains some architecture-dependent support libraries + (librpt*.so) for the report builder component. + +Package: libreoffice-report-builder-bin-nogui +Section: misc +Architecture: %OOO_REPORTBUILDER_ARCHS% +Depends: libreoffice-core-nogui | libreoffice-core, + libreoffice-base-nogui | libreoffice-base, + ${misc:Depends}, + ${shlibs:Depends} +Conflicts: libreoffice-report-builder-bin +Replaces: libreoffice-report-builder-bin +Description: LibreOffice component for building database reports -- libraries (no GUI variant) + LibreOffice is a full-featured office productivity suite that provides + a near drop-in replacement for Microsoft(R) Office. + . + This package contains some architecture-dependent support libraries + (librpt*.so) for the report builder component. + diff --git a/debian/control.sdk.in b/debian/control.sdk.in new file mode 100644 index 00000000000..4372651cf56 --- /dev/null +++ b/debian/control.sdk.in @@ -0,0 +1,70 @@ +Package: libreoffice-dev +Section: devel +Architecture: %OOO_ARCHS% +Depends: libreoffice-core-nogui (= ${binary:Version}) | libreoffice-core (= ${binary:Version}), + libreoffice-dev-common (= ${source:Version}), + ${idlc-cpp-depends}, + ${misc:Depends}, + ${shlibs:Depends} +Recommends: g++, ${java-common-depends}, ${java-runtime-depends} +Suggests: libmythes-dev, libreofficekit-dev, libreoffice-dev-doc +Replaces: libreoffice-dev-common (<< 1:5.4.1~) +Conflicts: libreoffice-dev-doc (<< 1:5.2.5-2~), libreoffice (<< 1:5.2.5-2~) +Breaks: libreoffice-dev-common (<< 1:5.4.1~) +Description: office productivity suite -- SDK -- architecture-dependent parts + LibreOffice is a full-featured office productivity suite that provides + a near drop-in replacement for Microsoft(R) Office. + . + This package contains the (architecture-dependent) files needed to build + plugins/add-ons for LibreOffice (build tools, libraries, arch-dependent + includes, ...). + +Package: libreoffice-dev-gui +Section: devel +Architecture: %OOO_ARCHS% +Depends: libreoffice-core (= ${binary:Version}), + libreoffice-dev (= ${binary:Version}), + libreoffice-dev-common (= ${source:Version}), + ${misc:Depends}, + ${shlibs:Depends} +Replaces: libreoffice-dev (<< 1:7.0.0~) +Breaks: libreoffice-dev (<< 1:7.0.0~) +Description: office productivity suite -- "GUI" development stuff + LibreOffice is a full-featured office productivity suite that provides + a near drop-in replacement for Microsoft(R) Office. + . + This package contains the gengal and ui-previewer utilities which were moved + from libreoffice-dev. + +Package: libreoffice-dev-common +Section: devel +Architecture: all +Depends: ${misc:Depends} +Replaces: libreoffice-dev (<< 1:5.2.0~) +Breaks: libreoffice-dev (<< 1:5.2.0~) +Conflicts: libreoffice (<< 1:5.2.5-2~) +Description: office productivity suite -- SDK -- architecture-independent parts + LibreOffice is a full-featured office productivity suite that provides + a near drop-in replacement for Microsoft(R) Office. + . + This package contains the (architecture-independent) files needed to build + plugins/add-ons for LibreOffice (includes, IDL files, ...) + +Package: libreoffice-dev-doc +Section: doc +Architecture: all +Depends: ${misc:Depends} +Recommends: libreoffice-dev (= ${binary:Version}), + www-browser +Conflicts: openoffice.org-dev-doc, libreoffice-dev (<= 1:5.0.3~rc1-2), libreoffice (<< 1:5.2.5-2~) +Build-Profiles: +Description: office productivity suite -- SDK documentation + LibreOffice is a full-featured office productivity suite that provides + a near drop-in replacement for Microsoft(R) Office. + . + This package contains the documentation of the LibreOffice SDK: + . + * C++/Java API reference + * IDL reference + * C++/Java/Basic examples + diff --git a/debian/control.test-packages.in b/debian/control.test-packages.in new file mode 100644 index 00000000000..bbe7d9d1037 --- /dev/null +++ b/debian/control.test-packages.in @@ -0,0 +1,18 @@ +Package: libreoffice-subsequentcheckbase +Section: libs +Architecture: all +Depends: liblibreoffice-java, ${java:Depends}, ${misc:Depends} +Build-Profiles: +Description: LibreOffice java test libraries + Java libraries LibreOffice subsequentchecks integration test suite + +Package: libreoffice-smoketest-data +Section: misc +Depends: ${misc:Depends} +Architecture: all +Build-Profiles: +Replaces: libreoffice-java-common (<< 1:6.4.0~rc1-6) +Breaks: libreoffice-java-common (<< 1:6.4.0~rc1-6) +Description: data files for LibreOffices "smoketest" + Data files for the LibreOffice "smoketest". + diff --git a/debian/control.transitionals.in b/debian/control.transitionals.in new file mode 100644 index 00000000000..c31c6fba2a9 --- /dev/null +++ b/debian/control.transitionals.in @@ -0,0 +1,36 @@ +Package: libreoffice-mysql-connector +Section: oldlibs +Architecture: %OOO_BASE_ARCHS% +Depends: libreoffice-sdbc-mysql, ${misc:Depends} +Description: transitional package for MariaDB/MySQL Connector extension for LibreOffice + LibreOffice is a full-featured office productivity suite that provides + a near drop-in replacement for Microsoft(R) Office. + . + This package used to contain the LibreOffice MySQL/MariaDB Connector extension. + This has now been added to the "main" packages (libreoffice-sdbc-mysql) + and this package thus can be safely removed once installed. + +Package: libreoffice-avmedia-backend-gstreamer +Section: oldlibs +Architecture: %OOO_ARCHS% +Depends: libreoffice-core (>> 1:6.3.0~rc1~), ${misc:Depends} +Description: transitional package for GStreamer backend for LibreOffice + LibreOffice is a full-featured office productivity suite that provides + a near drop-in replacement for Microsoft(R) Office. + . + This package used to contain the GStreamer backend for LibreOffice. + This has now been merged into the "core" package and this package thus + can be safely removed once installed. + +Package: libreoffice-kde5 +Section: oldlibs +Architecture: %OOO_ARCHS% +Depends: libreoffice-plasma, libreoffice-kf5 +Description: transitional package for LibreOffice "KDE 5" integration + LibreOffice is a full-featured office productivity suite that provides + a near drop-in replacement for Microsoft(R) Office. + . + This package used to contain the "KDE 5" integration. It was split + into -kf5 (KF5 UI plugin) and -plasma (some Plasma integration). This + packsge can be safely removed once installed. + diff --git a/debian/control.ure.in b/debian/control.ure.in new file mode 100644 index 00000000000..7b16b3c31bd --- /dev/null +++ b/debian/control.ure.in @@ -0,0 +1,199 @@ +Package: uno-libs-private +Section: libs +Architecture: %OOO_ARCHS% +Depends: ${misc:Depends}, ${shlibs:Depends} +Replaces: uno-libs3 +Breaks: uno-libs3 +Description: LibreOffice UNO runtime environment -- private libraries used by public ones + The Uno Runtime Environment (URE) is the well-known UNO component model + of LibreOffice, packaged up as an individual product. + . + It offers you a flexible, low-overhead component model that is most ideal + for (but not limited to) combining in one application components written in + different computer languages, and developed by different parties. You can use + it to create any kind of application, in whatever application domain you can + imagine. + . + This package contains some private UNO/URE libraries which are used by public + ones (e.g. cppu). + +Package: libuno-sal3 +Section: libs +Architecture: %OOO_ARCHS% +Depends: ${misc:Depends}, ${shlibs:Depends} +Replaces: ure (<< 5.0.0~rc2-1), uno-libs3 +Breaks: libreoffice-core (<< 1:4.3.0~), uno-libs3 +Description: LibreOffice UNO runtime environment -- SAL public library + The Uno Runtime Environment (URE) is the well-known UNO component model + of LibreOffice, packaged up as an individual product. + . + It offers you a flexible, low-overhead component model that is most ideal + for (but not limited to) combining in one application components written in + different computer languages, and developed by different parties. You can use + it to create any kind of application, in whatever application domain you can + imagine. + . + This package contains the System Abstraction Layer (SAL) library. + +Package: libuno-salhelpergcc3-3 +Section: libs +Architecture: %OOO_ARCHS% +Depends: ${misc:Depends}, ${shlibs:Depends} +Replaces: ure (<< 5.0.0~rc2-1), uno-libs3 +Breaks: libreoffice-core (<< 1:4.3.0~), uno-libs3 +Description: LibreOffice UNO runtime environment -- SAL helpers for C++ library + The Uno Runtime Environment (URE) is the well-known UNO component model + of LibreOffice, packaged up as an individual product. + . + It offers you a flexible, low-overhead component model that is most ideal + for (but not limited to) combining in one application components written in + different computer languages, and developed by different parties. You can use + it to create any kind of application, in whatever application domain you can + imagine. + . + This package contains C++ helpers to make use of sal easier. + +Package: libuno-cppu3 +Section: libs +Architecture: %OOO_ARCHS% +Depends: ${misc:Depends}, ${shlibs:Depends} +Replaces: ure (<< 5.0.0~rc2-1), uno-libs3 +Breaks: libreoffice-core (<< 1:4.3.0~), uno-libs3 +Description: LibreOffice UNO runtime environment -- CPPU public library + The Uno Runtime Environment (URE) is the well-known UNO component model + of LibreOffice, packaged up as an individual product. + . + It offers you a flexible, low-overhead component model that is most ideal + for (but not limited to) combining in one application components written in + different computer languages, and developed by different parties. You can use + it to create any kind of application, in whatever application domain you can + imagine. + . + This package contains CPPU, the type definitions/implementations for the core + of UNO. + +Package: libuno-cppuhelpergcc3-3 +Section: libs +Architecture: %OOO_ARCHS% +Depends: ${misc:Depends}, ${shlibs:Depends}, uno-libs-private (= ${binary:Version}) +Replaces: ure (<< 5.0.0~rc2-1), uno-libs3 +Breaks: libreoffice-core (<< 1:4.3.0~), uno-libs3 +Description: LibreOffice UNO runtime environment -- CPPU helper library + The Uno Runtime Environment (URE) is the well-known UNO component model + of LibreOffice, packaged up as an individual product. + . + It offers you a flexible, low-overhead component model that is most ideal + for (but not limited to) combining in one application components written in + different computer languages, and developed by different parties. You can use + it to create any kind of application, in whatever application domain you can + imagine. + . + This package contains the cppuhelper library (helpers for using cppu in C++, + e.g. templates for implementing UNO components, bootstrapping stuff) + +Package: libuno-purpenvhelpergcc3-3 +Section: libs +Architecture: %OOO_ARCHS% +Depends: ${misc:Depends}, ${shlibs:Depends} +Replaces: ure (<< 5.0.0~rc2-1), uno-libs3 +Breaks: libreoffice-core (<< 1:4.3.0~), uno-libs3 +Description: LibreOffice UNO runtime environment -- "purpose environment" helper + The Uno Runtime Environment (URE) is the well-known UNO component model + of LibreOffice, packaged up as an individual product. + . + It offers you a flexible, low-overhead component model that is most ideal + for (but not limited to) combining in one application components written in + different computer languages, and developed by different parties. You can use + it to create any kind of application, in whatever application domain you can + imagine. + . + This package contains a library which contains a helper for implementing + so-called "purpose environments". + +Package: ure +Section: libs +Architecture: %OOO_ARCHS% +Depends: ${misc:Depends}, ${shlibs:Depends}, uno-libs-private (= ${binary:Version}) +Recommends: liblibreoffice-java, libjuh-java, libjurt-java, libridl-java, libunoloader-java +Suggests: ${java-runtime-depends} +Replaces: libreoffice-common (<< 1:4.5.0), libreoffice-core (<< 1:5.3.0~beta1~), libjuh-java (<< 1:6.4.0~rc1-6), libridl-java (<< 1:6.4.0~rc1-6), libunoloader-java (<< 1:6.4.0~rc1-6), libjurt-java (<< 1:6.4.0~rc1-6) +Breaks: libreoffice-core (<< 1:5.3.0~beta1~), libreoffice-common (<< 1:4.5.0), libjuh-java (<< 1:6.4.0~rc1-6), libridl-java (<< 1:6.4.0~rc1-6), libunoloader-java (<< 1:6.4.0~rc1-6), libjurt-java (<< 1:6.4.0~rc1-6) +Description: LibreOffice UNO runtime environment + The Uno Runtime Environment (URE) is the well-known UNO component model + of LibreOffice, packaged up as an individual product. + . + It offers you a flexible, low-overhead component model that is most ideal + for (but not limited to) combining in one application components written in + different computer languages, and developed by different parties. You can use + it to create any kind of application, in whatever application domain you can + imagine. + +Package: libjuh-java +Architecture: all +Section: oldlibs +Depends: ${java:Depends}, ${misc:Depends}, liblibreoffice-java +Replaces: ure (<< 6.4.0~rc1-6) +Breaks: ure (<< 6.4.0~rc1-6) +Description: LibreOffice UNO runtime environment -- Java Uno helper (compatibility library) + The Uno Runtime Environment (URE) is the well-known UNO component model + of LibreOffice, packaged up as an individual product. + . + This package formerly contained various tools and adapters for Java Uno. + . + This has now been merged into liblibreoffice-java but this package still exists + for compatibility with applications referencing the old library. + +Package: libridl-java +Architecture: all +Section: oldlibs +Depends: ${java:Depends}, ${misc:Depends}, liblibreoffice-java +Replaces: ure (<< 6.4.0~rc1-6) +Breaks: ure (<< 6.4.0~rc1-6) +Description: LibreOffice UNO runtime environment -- Java Uno runtime and base types and types access library (compatibility library) + The Uno Runtime Environment (URE) is the well-known UNO component model + of LibreOffice, packaged up as an individual product. + . + This package formely contained the implementation of the base types for the + Java Uno typesystem, as well as a types access library. + . + This has now been merged into liblibreoffice-java but this package still exists + for compatibility with applications referencing the old library. + +Package: libunoloader-java +Architecture: all +Section: java +Depends: ${java:Depends}, ${misc:Depends} +Replaces: ure (<< 6.4.0~rc1-6) +Breaks: ure (<< 6.4.0~rc1-6) +Description: LibreOffice UNO runtime environment -- (Java) UNO loader + The Uno Runtime Environment (URE) is the well-known UNO component model + of LibreOffice, packaged up as an individual product. + . + This package contains a UNO loader library for Java. + +Package: libjurt-java +Architecture: all +Section: oldlibs +Depends: ${java:Depends}, ${misc:Depends}, liblibreoffice-java +Replaces: ure (<< 6.4.0~rc1-6) +Breaks: ure (<< 6.4.0~rc1-6) +Description: LibreOffice UNO runtime environment -- Java Uno Runtime (compatibility library) + The Uno Runtime Environment (URE) is the well-known UNO component model + of LibreOffice, packaged up as an individual product. + . + This package formerly contained the "Java Uno Runtime" and basically + implements Java Uno. + . + This has now been merged into liblibreoffice-java but this package still exists + for compatibility with applications referencing the old library. + +Package: liblibreoffice-java +Architecture: all +Section: java +Depends: ure, libunoloader-java, ${java:Depends}, ${misc:Depends} +Description: LibreOffice UNO runtime environment -- Java library + The Uno Runtime Environment (URE) is the well-known UNO component model + of LibreOffice, packaged up as an individual product. + . + This package contains the public Java libraries. + diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 00000000000..d94a9a86956 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,293 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: LibreOffice +Upstream-Contact: libreoffice@lists.freedesktop.org +Source: http://download.documentfoundation.org/libreoffice/src +# they are already removed when packing the upstream tarballs, but are in git... +#Files-Excluded: schema/*/* + +Files: * +Copyright: Copyright 2000, 2010 Oracle and/or its affiliates. + Copyright (c) 2000, 2010 LibreOffice contributors and/or their affiliates. +License: MPL-2.0 + On Debian systems the full text of the MPL-2.0 can be found in + /usr/share/common-licenses/MPL-2.0. + . + Some files include Apache-2.0 licensed material: + . + # This file incorporates work covered by the following license notice: + # + # Licensed to the Apache Software Foundation (ASF) under one or more + # contributor license agreements. See the NOTICE file distributed + # with this work for additional information regarding copyright + # ownership. The ASF licenses this file to you under the Apache + # License, Version 2.0 (the "License"); you may not use this file + # except in compliance with the License. You may obtain a copy of + # the License at http://www.apache.org/licenses/LICENSE-2.0 . + . + On Debian systems the full text of the Apache-2.0 license can be found in + /usr/share/common-licenses/Apache-2.0. + +Files: extras/source/truetype/symbol/OpenSymbol.sfd +Copyright: (c) 2009 Sun Microsystems Inc. + (c) 2010 Google Corporation + (c) 2011 Julien Nabet + (c) 2011 Olivier Hallot + (c) 2013 Mathias Hasselmann + (c) 2015 Khaled Hosny + (c) 2016 Mike Kaganski +License: MPL-2.0 + On Debian systems the full text of the MPL-2.0 can be found in + /usr/share/common-licenses/MPL-2.0. + . + Some files include Apache-2.0 licensed material: + . + # This file incorporates work covered by the following license notice: + # + # Licensed to the Apache Software Foundation (ASF) under one or more + # contributor license agreements. See the NOTICE file distributed + # with this work for additional information regarding copyright + # ownership. The ASF licenses this file to you under the Apache + # License, Version 2.0 (the "License"); you may not use this file + # except in compliance with the License. You may obtain a copy of + # the License at http://www.apache.org/licenses/LICENSE-2.0 . + . + On Debian systems the full text of the Apache-2.0 license can be found in + /usr/share/common-licenses/Apache-2.0. + +Files: swext/mediawiki/src/filter/odt2mediawiki.xsl +Copyright: Copyright (C) 2007-2013 Bernhard Haumacher (haui@haumacher.de) +License: Apache-2.0 + +Files: sysui/desktop/apparmor/* +Copyright: Copyright (C) 2016 Canonical Ltd. + Copyright (C) 2017 Software in the Public Interest, Inc. +License: MPL-2.0 + +Files: icon-themes/breeze*/* +Copyright: Copyright 2014 Uri Herrera + Copyright 2015 Andreas Kainz and other contributors +License: GPL-2+ + +Files: icon-themes/sifr*/* +Copyright: Jakub Steiner + Lapo Calamandrei + Hylke Bons + Barbara Muraus + Issa Alkurtass + Norah Abanumay + Copyright 2017-2018 Matthias Freund +License: CC-BY-SA-3.0 + +Files: icon_themes/elementary*/* +Copyright: Copyright 2015 by Simon Steinbeiss , Pasi Lallinaho +License: GPL-3+ + +Files: icon-themes/colibre*/* +Copyright: Copyright 2018 Andreas Kainz +License: CC0-1.0 + +https://github.com/rizmut/libreoffice-style-karasa-jaga/blob/master/COPYING +Files: icon-themes/karasa_jaga/* +Copyright: Copyright (c) 2014 Rizal Muttaqin +License: LGPL-3+ + +Files: icon_themes/sukapura*/* +Copyright: Copyright (c) 2019-2020 Rizal Muttaqin +License: MPL_2.0 + +Files: helpcontent2/help3xsl/fuse.js +Copyright: Copyright (c) 2012-2017 Kirollos Risk (http://kiro.me) +License: Apache-2.0 + +Files: helpcontent2/help3xsl/paginathing.js +Copyright: (C) 2018 Alfred Crosby +License: Expat + +Files: helpcontent2/help3xsl/normalize.css +Copyright: Copyright © Nicolas Gallagher and Jonathan Neal +License: Expat + +Files: helpcontent2/help3xsl/fuzzysort.js +Copyright: Copyright (c) 2018 Stephen Kamenar +License: Expat + +Files: debian/* +Copyright: Copyright (C) 2002-2009 Software in the Public Interest, Inc. +License: GPL-2 + +Files: debian/scripts/get_ttf_version.pl +Copyright: Copyright (C) 2015 Software in the Public Interest, Inc. +License: MPL-2.0 + +Files: debian/templates/debian-presentation.otp +Copyright: Copyright (C) 2010 Raphaël Hertzog +License: GPL-2+ + +Files: debian/templates/debian-presentation-background.xcf +Copyright: Copyright Alexis Younes "ayo" +License: GPL-2+ + +Files: tarballs/*dtoa* +Copyright: Copyright (c) 1991, 2000, 2001 by Lucent Technologies. +License: Expat + +# https://github.com/google/skia/blob/master/LICENSE +Files: tarballs/*skia* +Copyright: Copyright (c) 2011 Google Inc. +License: BSD-3-clause + +Files: tarballs/*rhino* +Copyright: Copyright (C) 1997-2000 Netscape Communications Corporation + Copyright (C) 2000 See Beyond Communications Corporation +License: MPL-1.1 or GPL-2 or LGPL-2 + +Files: tarballs/*xsltml* +Copyright: Copyright (C) 2001-2003 Vasil Yaroshevich +License: other + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation + files (the ``Software''), to deal in the Software without + restriction, including without limitation the rights to use, + copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following + conditions: + . + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + . + Except as contained in this notice, the names of individuals + credited with contribution to this software shall not be used in + advertising or otherwise to promote the sale, use or other + dealings in this Software without prior written authorization + from the individuals in question. + . + Any stylesheet derived from this Software that is publically + distributed will be identified with a different name and the + version strings in any derived Software will be changed so that + no possibility of confusion between the derived package and this + Software will exist. + +Files: tarballs/*swingEx* +Copyright: Copyright 2008 by Sun Microsystems, Inc. +License: LGPL-3 + On Debian systems the full text of the LGPL-3 can be found in + /usr/share/common-licenses/LGPL-3 + +Files: tarballs/*pdfium* +Copyright: // Copyright 2014-2016 PDFium Authors. + // Original code copyright 2014 Foxit Software Inc. +License: other + // Redistribution and use in source and binary forms, with or without + // modification, are permitted provided that the following conditions are + // met: + // + // * Redistributions of source code must retain the above copyright + // notice, this list of conditions and the following disclaimer. + // * Redistributions in binary form must reproduce the above + // copyright notice, this list of conditions and the following disclaimer + // in the documentation and/or other materials provided with the + // distribution. + // * Neither the name of Google Inc. nor the names of its + // contributors may be used to endorse or promote products derived from + // this software without specific prior written permission. + // + // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Files: debian/patches/add-access2base-doc.diff wizards/source/access2base/access2base.html +License: other +Copyright: Copyright (c) Jeremy Ruston 2004-2007 + Copyright (c) UnaMesa Association 2007-2012 +License: other + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + . + Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + . + Redistributions in binary form must reproduce the above copyright notice, this + list of conditions and the following disclaimer in the documentation and/or other + materials provided with the distribution. + . + Neither the name of the UnaMesa Association nor the names of its contributors may be + used to endorse or promote products derived from this software without specific + prior written permission. + . + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH + DAMAGE. + +License: Expat + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + . + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + . + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +License: MPL-2.0 + On Debian systems the full text of the MPL-2.0 can be found in + /usr/share/common-licenses/MPL-2.0. + +License: Apache-2.0 + On Debian systems the full text of the Apache-2.0 license can be found in + /usr/share/common-licenses/Apache-2.0. + +License: GPL-2+ + On Debian systems the full text of the GPL-2 can be found in + /usr/share/common-licenses/GPL-2 + +License: GPL-3+ + On Debian systems the full text of the GPL-3 can be found in + /usr/share/common-licenses/GPL-3 + +License: GPL-2 + On Debian systems the full text of the GPL-2 can be found in + /usr/share/common-licenses/GPL-2 + +License: MPL-1.1 + On Debian systems the full text of the MPL-1.1 can be found in + /usr/share/common-licenses/MPL-1.1 + +License: LGPL-2 + On Debian systems the full text of the LGPL-2 can be found in + /usr/share/common-licenses/LGPL-2 + +License: LGPL-3+ + On Debian systems the full text of the LGPL-3 can be found in + /usr/share/common-licenses/LGPL-3 + +License: CC0-1.0 + On Debian systems the full text of the CC0-1.0 license can be found in + /usr/share/common-licenses/CC0-1.0 + + diff --git a/debian/gir1.2-lokdocview-0.1.maintscript b/debian/gir1.2-lokdocview-0.1.maintscript new file mode 100644 index 00000000000..af2542fa92b --- /dev/null +++ b/debian/gir1.2-lokdocview-0.1.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/gir1.2-lokdocview-0.1 /usr/share/doc/libreoffice-core 1:6.4.0~alpha1~git20191013 diff --git a/debian/libjuh-java.lintian-overrides b/debian/libjuh-java.lintian-overrides new file mode 100644 index 00000000000..6b27b4f14ac --- /dev/null +++ b/debian/libjuh-java.lintian-overrides @@ -0,0 +1 @@ +libjuh-java: codeless-jar usr/share/java/juh-*.jar diff --git a/debian/libjuh-java.poms b/debian/libjuh-java.poms new file mode 100644 index 00000000000..78b7ec145c5 --- /dev/null +++ b/debian/libjuh-java.poms @@ -0,0 +1,28 @@ +# List of POM files for the package +# Format of this file is: +# [option]* +# where option can be: +# --ignore: ignore this POM and its artifact if any +# --ignore-pom: don't install the POM. To use on POM files that are created +# temporarily for certain artifacts such as Javadoc jars. [mh_install, mh_installpoms] +# --no-parent: remove the tag from the POM +# --package=: an alternative package to use when installing this POM +# and its artifact +# --has-package-version: to indicate that the original version of the POM is the same as the upstream part +# of the version for the package. +# --keep-elements=: a list of XML elements to keep in the POM +# during a clean operation with mh_cleanpom or mh_installpom +# --artifact=: path to the build artifact associated with this POM, +# it will be installed when using the command mh_install. [mh_install] +# --java-lib: install the jar into /usr/share/java to comply with Debian +# packaging guidelines +# --usj-name=: name to use when installing the library in /usr/share/java +# --usj-version=: version to use when installing the library in /usr/share/java +# --no-usj-versionless: don't install the versionless link in /usr/share/java +# --dest-jar=: the destination for the real jar. +# It will be installed with mh_install. [mh_install] +# --classifier=: Optional, the classifier for the jar. Empty by default. +# --site-xml=: Optional, the location for site.xml if it needs to be installed. +# Empty by default. [mh_install] +# +debian/pom.juh.xml --no-parent --has-package-version diff --git a/debian/libjurt-java.lintian-overrides b/debian/libjurt-java.lintian-overrides new file mode 100644 index 00000000000..4af0a88a8dd --- /dev/null +++ b/debian/libjurt-java.lintian-overrides @@ -0,0 +1 @@ +libjurt-java: codeless-jar usr/share/java/jurt-*.jar diff --git a/debian/libjurt-java.poms b/debian/libjurt-java.poms new file mode 100644 index 00000000000..2bc6296377a --- /dev/null +++ b/debian/libjurt-java.poms @@ -0,0 +1,28 @@ +# List of POM files for the package +# Format of this file is: +# [option]* +# where option can be: +# --ignore: ignore this POM and its artifact if any +# --ignore-pom: don't install the POM. To use on POM files that are created +# temporarily for certain artifacts such as Javadoc jars. [mh_install, mh_installpoms] +# --no-parent: remove the tag from the POM +# --package=: an alternative package to use when installing this POM +# and its artifact +# --has-package-version: to indicate that the original version of the POM is the same as the upstream part +# of the version for the package. +# --keep-elements=: a list of XML elements to keep in the POM +# during a clean operation with mh_cleanpom or mh_installpom +# --artifact=: path to the build artifact associated with this POM, +# it will be installed when using the command mh_install. [mh_install] +# --java-lib: install the jar into /usr/share/java to comply with Debian +# packaging guidelines +# --usj-name=: name to use when installing the library in /usr/share/java +# --usj-version=: version to use when installing the library in /usr/share/java +# --no-usj-versionless: don't install the versionless link in /usr/share/java +# --dest-jar=: the destination for the real jar. +# It will be installed with mh_install. [mh_install] +# --classifier=: Optional, the classifier for the jar. Empty by default. +# --site-xml=: Optional, the location for site.xml if it needs to be installed. +# Empty by default. [mh_install] +# +debian/pom.jurt.xml --no-parent --has-package-version diff --git a/debian/liblibreoffice-java.poms b/debian/liblibreoffice-java.poms new file mode 100644 index 00000000000..dcd4c61db52 --- /dev/null +++ b/debian/liblibreoffice-java.poms @@ -0,0 +1,28 @@ +# List of POM files for the package +# Format of this file is: +# [option]* +# where option can be: +# --ignore: ignore this POM and its artifact if any +# --ignore-pom: don't install the POM. To use on POM files that are created +# temporarily for certain artifacts such as Javadoc jars. [mh_install, mh_installpoms] +# --no-parent: remove the tag from the POM +# --package=: an alternative package to use when installing this POM +# and its artifact +# --has-package-version: to indicate that the original version of the POM is the same as the upstream part +# of the version for the package. +# --keep-elements=: a list of XML elements to keep in the POM +# during a clean operation with mh_cleanpom or mh_installpom +# --artifact=: path to the build artifact associated with this POM, +# it will be installed when using the command mh_install. [mh_install] +# --java-lib: install the jar into /usr/share/java to comply with Debian +# packaging guidelines +# --usj-name=: name to use when installing the library in /usr/share/java +# --usj-version=: version to use when installing the library in /usr/share/java +# --no-usj-versionless: don't install the versionless link in /usr/share/java +# --dest-jar=: the destination for the real jar. +# It will be installed with mh_install. [mh_install] +# --classifier=: Optional, the classifier for the jar. Empty by default. +# --site-xml=: Optional, the location for site.xml if it needs to be installed. +# Empty by default. [mh_install] +# +debian/pom.libreoffice.xml --no-parent --has-package-version diff --git a/debian/liblibreofficekitgtk.links b/debian/liblibreofficekitgtk.links new file mode 100644 index 00000000000..c8017de61d1 --- /dev/null +++ b/debian/liblibreofficekitgtk.links @@ -0,0 +1 @@ +usr/lib/libreoffice/program/liblibreofficekitgtk.so usr/lib/liblibreofficekitgtk.so diff --git a/debian/liblibreofficekitgtk.maintscript b/debian/liblibreofficekitgtk.maintscript new file mode 100644 index 00000000000..bc4fa417f62 --- /dev/null +++ b/debian/liblibreofficekitgtk.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/liblibreofficekitgtk /usr/share/doc/libreoffice-core 1:6.4.0~alpha1~git20191013 diff --git a/debian/libofficebean-java.poms b/debian/libofficebean-java.poms new file mode 100644 index 00000000000..36e613aa9ae --- /dev/null +++ b/debian/libofficebean-java.poms @@ -0,0 +1,28 @@ +# List of POM files for the package +# Format of this file is: +# [option]* +# where option can be: +# --ignore: ignore this POM and its artifact if any +# --ignore-pom: don't install the POM. To use on POM files that are created +# temporarily for certain artifacts such as Javadoc jars. [mh_install, mh_installpoms] +# --no-parent: remove the tag from the POM +# --package=: an alternative package to use when installing this POM +# and its artifact +# --has-package-version: to indicate that the original version of the POM is the same as the upstream part +# of the version for the package. +# --keep-elements=: a list of XML elements to keep in the POM +# during a clean operation with mh_cleanpom or mh_installpom +# --artifact=: path to the build artifact associated with this POM, +# it will be installed when using the command mh_install. [mh_install] +# --java-lib: install the jar into /usr/share/java to comply with Debian +# packaging guidelines +# --usj-name=: name to use when installing the library in /usr/share/java +# --usj-version=: version to use when installing the library in /usr/share/java +# --no-usj-versionless: don't install the versionless link in /usr/share/java +# --dest-jar=: the destination for the real jar. +# It will be installed with mh_install. [mh_install] +# --classifier=: Optional, the classifier for the jar. Empty by default. +# --site-xml=: Optional, the location for site.xml if it needs to be installed. +# Empty by default. [mh_install] +# +debian/pom.officebean.xml --no-parent --has-package-version diff --git a/debian/libreoffice-avmedia-backend-gstreamer.maintscript b/debian/libreoffice-avmedia-backend-gstreamer.maintscript new file mode 100644 index 00000000000..b89fd7bd09a --- /dev/null +++ b/debian/libreoffice-avmedia-backend-gstreamer.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-avmedia-backend-gstreamer /usr/share/doc/libreoffice-core 1:6.4.0~alpha1~git20191013 diff --git a/debian/libreoffice-base-core.maintscript b/debian/libreoffice-base-core.maintscript new file mode 100644 index 00000000000..de6bf069418 --- /dev/null +++ b/debian/libreoffice-base-core.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-base-core /usr/share/doc/libreoffice-core 1:6.4.0~alpha1~git20191013 diff --git a/debian/libreoffice-base-drivers.NEWS b/debian/libreoffice-base-drivers.NEWS new file mode 100644 index 00000000000..0a0b922f8f2 --- /dev/null +++ b/debian/libreoffice-base-drivers.NEWS @@ -0,0 +1,14 @@ +libreoffice (1:6.1.3-2) unstable; urgency=low + + * The JDBC Driver used for JDBC Access by the LibreOffice MySQL driver + (NOT libreoffice-mysql-connector) contained in this package has been + changed from MySQL to MariaDB (libmysql-java -> libmariadb-java). See + http://bugs.debian.org/913360 and https://bugs.debian.org/912916. + + This also involves changing the classes used in the code, so using + libmysql-java and com.mysql.jdbc.Driver does not work anymore. + + If you want to connect to MySQL or MariaDB databases over JDBC, use + libmariadb-java. + + -- Rene Engelhard Fri, 16 Nov 2018 19:35:22 +0100 diff --git a/debian/libreoffice-base-drivers.maintscript b/debian/libreoffice-base-drivers.maintscript new file mode 100644 index 00000000000..a2c6bc2d038 --- /dev/null +++ b/debian/libreoffice-base-drivers.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-base-drivers /usr/share/doc/libreoffice-core 1:6.4.0~alpha1~git20191013 diff --git a/debian/libreoffice-base-nogui.bug-control b/debian/libreoffice-base-nogui.bug-control new file mode 100644 index 00000000000..31f42c1f1f7 --- /dev/null +++ b/debian/libreoffice-base-nogui.bug-control @@ -0,0 +1,2 @@ +report-with: libreoffice-core +package-status: unixodbc libmyodbc odbc-postgresql libsqliteodbc tdsodbc mdbtools libmariadb-java libmysql-java libpg-java libsapdbc-java diff --git a/debian/libreoffice-base-nogui.mime b/debian/libreoffice-base-nogui.mime new file mode 100644 index 00000000000..3174fccf851 --- /dev/null +++ b/debian/libreoffice-base-nogui.mime @@ -0,0 +1,11 @@ +### +# shared-mime-info + +# OASIS OpenDocument Format +application/vnd.oasis.opendocument.database; soffice --nologo --base %s; edit=soffice --nologo --base %s; print=soffice --nologo --base -p %s; test=test -n "$DISPLAY"; description="OpenDocument Database"; nametemplate=%s.odb; priority=9 + +# OpenOffice.org 1.0 +application/vnd.sun.xml.base; soffice --nologo --writer %s; edit=soffice --nologo --writer %s; description="OpenOffice.org Database"; nametemplate=%s.sdb; priority=8 + +# +### diff --git a/debian/libreoffice-base-nogui.ucf b/debian/libreoffice-base-nogui.ucf new file mode 100644 index 00000000000..79c8af29cd5 --- /dev/null +++ b/debian/libreoffice-base-nogui.ucf @@ -0,0 +1 @@ +/usr/lib/libreoffice/share/.registry/base.xcd /etc/libreoffice/registry/base.xcd diff --git a/debian/libreoffice-base.NEWS b/debian/libreoffice-base.NEWS new file mode 100644 index 00000000000..b7a30f1a0e0 --- /dev/null +++ b/debian/libreoffice-base.NEWS @@ -0,0 +1,14 @@ +libreoffice (1:4.2.1-1) experimental; urgency=low + + * the database drivers have been split out to a new libreoffice-base-drivers + package. This package depends on most of them, but that explicitly + _does not_ include the HSQLDB SDBC Driver or the new Firebird SDBC Driver + (both for the embedded database) - whose because of their dependencies are + split into extra packages. + . + If you used a "normal" embedded database in your (old) database file you + _must_ install libreoffice-sdbc-hsqldb so that it can "connect" to it. + . + Similar with the new Firebird embedded database in 4.2 and -sdbc-firebird. + + -- Rene Engelhard Fri, 16 Aug 2013 10:21:53 +0200 diff --git a/debian/libreoffice-base.bug-control b/debian/libreoffice-base.bug-control new file mode 100644 index 00000000000..31f42c1f1f7 --- /dev/null +++ b/debian/libreoffice-base.bug-control @@ -0,0 +1,2 @@ +report-with: libreoffice-core +package-status: unixodbc libmyodbc odbc-postgresql libsqliteodbc tdsodbc mdbtools libmariadb-java libmysql-java libpg-java libsapdbc-java diff --git a/debian/libreoffice-base.lintian-overrides b/debian/libreoffice-base.lintian-overrides new file mode 100644 index 00000000000..d1500e8d835 --- /dev/null +++ b/debian/libreoffice-base.lintian-overrides @@ -0,0 +1 @@ +libreoffice-base: desktop-command-not-in-package usr/share/applications/libreoffice-base.desktop libreoffice diff --git a/debian/libreoffice-base.maintscript b/debian/libreoffice-base.maintscript new file mode 100644 index 00000000000..14d5ac448c5 --- /dev/null +++ b/debian/libreoffice-base.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-base /usr/share/doc/libreoffice-core 1:6.4.0~alpha1~git20191013 diff --git a/debian/libreoffice-base.manpages b/debian/libreoffice-base.manpages new file mode 100644 index 00000000000..144eec74763 --- /dev/null +++ b/debian/libreoffice-base.manpages @@ -0,0 +1 @@ +debian/tmp/usr/share/man/man1/lobase.1.gz diff --git a/debian/libreoffice-base.mime b/debian/libreoffice-base.mime new file mode 100644 index 00000000000..3174fccf851 --- /dev/null +++ b/debian/libreoffice-base.mime @@ -0,0 +1,11 @@ +### +# shared-mime-info + +# OASIS OpenDocument Format +application/vnd.oasis.opendocument.database; soffice --nologo --base %s; edit=soffice --nologo --base %s; print=soffice --nologo --base -p %s; test=test -n "$DISPLAY"; description="OpenDocument Database"; nametemplate=%s.odb; priority=9 + +# OpenOffice.org 1.0 +application/vnd.sun.xml.base; soffice --nologo --writer %s; edit=soffice --nologo --writer %s; description="OpenOffice.org Database"; nametemplate=%s.sdb; priority=8 + +# +### diff --git a/debian/libreoffice-base.preinst.in b/debian/libreoffice-base.preinst.in new file mode 100644 index 00000000000..08ab83ab0ba --- /dev/null +++ b/debian/libreoffice-base.preinst.in @@ -0,0 +1,21 @@ +#!/bin/sh + +set -e + +#INCLUDE_SHELL_LIB# + +if [ upgrade = "$1" ] || dpkg --compare-versions "$2" lt 1:6.4.0~beta1-2; then + dpkg-divert --remove --no-rename \ + --divert /usr/lib/libreoffice/share/basic/dialog.xlc.noaccess \ + /usr/lib/libreoffice/share/basic/dialog.xlc + dpkg-divert --remove --no-rename \ + --divert /usr/lib/libreoffice/share/basic/script.xlc.noaccess \ + /usr/lib/libreoffice/share/basic/script.xlc + # cleanup + rm -f /usr/lib/libreoffice/share/basic/script.xlc.noaccess + rm -f /usr/lib/libreoffice/share/basic/dialog.xlc.noaccess +fi + +#DEBHELPER# + +exit 0 diff --git a/debian/libreoffice-base.ucf b/debian/libreoffice-base.ucf new file mode 100644 index 00000000000..79c8af29cd5 --- /dev/null +++ b/debian/libreoffice-base.ucf @@ -0,0 +1 @@ +/usr/lib/libreoffice/share/.registry/base.xcd /etc/libreoffice/registry/base.xcd diff --git a/debian/libreoffice-calc-nogui.lintian-overrides b/debian/libreoffice-calc-nogui.lintian-overrides new file mode 100644 index 00000000000..630bb42ecd4 --- /dev/null +++ b/debian/libreoffice-calc-nogui.lintian-overrides @@ -0,0 +1 @@ +libreoffice-calc-nogui: binary-or-shlib-defines-rpath diff --git a/debian/libreoffice-calc-nogui.mime b/debian/libreoffice-calc-nogui.mime new file mode 100644 index 00000000000..d306e622514 --- /dev/null +++ b/debian/libreoffice-calc-nogui.mime @@ -0,0 +1,37 @@ +### +# shared-mime-info + +# Generic +text/csv; soffice --nologo --calc %s; edit=soffice --nologo --calc %s; test=test -n "$DISPLAY"; description="CSV Document"; nametemplate=%s.csv; priority=3 +text/spreadsheet; soffice --nologo --calc %s; edit=soffice --nologo --calc %s; test=test -n "$DISPLAY"; description="Spreadsheet Interchange Document"; nametemplate=%s.slk; priority=3 + +# Corel Quattro Pro +application/x-quattropro; soffice --nologo --calc %s; edit=soffice --nologo --calc %s; test=test -n "$DISPLAY"; description="Quattro Pro 6 for Windows Spreadsheet"; nametemplate=%s.wb2; priority=3 + +# dBase dBASE +application/x-dbf; soffice --nologo --calc %s; edit=soffice --nologo --calc %s; test=test -n "$DISPLAY"; description="xBase Document"; nametemplate=%s.dbf; priority=3 + +# ECMA Office Open XML (Microsoft Office 2007) +application/vnd.ms-excel.sheet.macroEnabled.12; soffice --nologo --calc %s; edit=soffice --nologo --calc %s; test=test -n "$DISPLAY"; description="Office Open XML Spreadsheet with Macros Enabled"; nametemplate=%s.xlsm; priority=3 +application/vnd.ms-excel.template.macroEnabled.12; soffice --nologo --calc %s; edit=soffice --nologo --calc %s; test=test -n "$DISPLAY"; description="Office Open XML Spreadsheet Template with Macros Enabled"; nametemplate=%s.xltm; priority=3 +application/vnd.openxmlformats-officedocument.spreadsheetml.sheet; soffice --nologo --calc %s; edit=soffice --nologo --calc %s; test=test -n "$DISPLAY"; description="Office Open XML Spreadsheet"; nametemplate=%s.xlsx; priority=3 +application/vnd.openxmlformats-officedocument.spreadsheetml.template; soffice --nologo --calc %s; edit=soffice --nologo --calc %s; test=test -n "$DISPLAY"; description="Office Open XML Spreadsheet Template"; nametemplate=%s.xltx; priority=3 + +# IBM Lotus 1-2-3 +application/vnd.lotus-1-2-3; soffice --nologo --calc %s; edit=soffice --nologo --calc %s; test=test -n "$DISPLAY"; description="Lotus 1-2-3 spreadsheet"; nametemplate=%s.123; priority=3 + +# Microsoft Excel +application/vnd.ms-excel; soffice --nologo --calc %s; edit=soffice --nologo --calc %s; test=test -n "$DISPLAY"; description="Microsoft Excel Document"; nametemplate=%s.xls; priority=3 + +# OASIS OpenDocument Format +application/vnd.oasis.opendocument.chart; soffice --nologo --calc %s; edit=soffice --nologo --calc %s; print=soffice --nologo --calc -p %s; test=test -n "$DISPLAY"; description="OpenDocument Chart"; nametemplate=%s.odc; priority=9 +application/vnd.oasis.opendocument.spreadsheet; soffice --nologo --calc %s; edit=soffice --nologo --calc %s; print=soffice --nologo --calc -p %s; test=test -n "$DISPLAY"; description="OpenDocument Spreadsheet"; nametemplate=%s.ods; priority=9 +application/vnd.oasis.opendocument.spreadsheet-template; soffice --nologo --calc %s; edit=soffice --nologo --calc %s; print=soffice --nologo --calc -p %s; test=test -n "$DISPLAY"; description="OpenDocument Spreadsheet Template"; nametemplate=%s.ots; priority=9 + +# OpenOffice.org 1.0 +application/vnd.sun.xml.calc; soffice --nologo --calc %s; edit=soffice --nologo --calc %s; test=test -n "$DISPLAY"; description="OpenOffice.org Spreadsheet"; nametemplate=%s.sxc; priority=8 +application/vnd.sun.xml.calc.template; soffice --nologo --calc %s; edit=soffice --nologo --calc %s; test=test -n "$DISPLAY"; description="OpenOffice.org Spreadsheet Template"; nametemplate=%s.stc; priority=8 + +# +### + diff --git a/debian/libreoffice-calc-nogui.ucf b/debian/libreoffice-calc-nogui.ucf new file mode 100644 index 00000000000..4820977edc1 --- /dev/null +++ b/debian/libreoffice-calc-nogui.ucf @@ -0,0 +1 @@ +/usr/lib/libreoffice/share/.registry/calc.xcd /etc/libreoffice/registry/calc.xcd diff --git a/debian/libreoffice-calc.bug-control b/debian/libreoffice-calc.bug-control new file mode 100644 index 00000000000..1ac405f9788 --- /dev/null +++ b/debian/libreoffice-calc.bug-control @@ -0,0 +1 @@ +report-with: libreoffice-core diff --git a/debian/libreoffice-calc.lintian-overrides b/debian/libreoffice-calc.lintian-overrides new file mode 100644 index 00000000000..004fc535988 --- /dev/null +++ b/debian/libreoffice-calc.lintian-overrides @@ -0,0 +1,2 @@ +libreoffice-calc: binary-or-shlib-defines-rpath +libreoffice-calc: desktop-command-not-in-package usr/share/applications/libreoffice-calc.desktop libreoffice diff --git a/debian/libreoffice-calc.maintscript b/debian/libreoffice-calc.maintscript new file mode 100644 index 00000000000..859933b7271 --- /dev/null +++ b/debian/libreoffice-calc.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-calc /usr/share/doc/libreoffice-core 1:6.4.0~alpha1~git20191013 diff --git a/debian/libreoffice-calc.manpages b/debian/libreoffice-calc.manpages new file mode 100644 index 00000000000..a4b78ee3406 --- /dev/null +++ b/debian/libreoffice-calc.manpages @@ -0,0 +1,2 @@ +debian/tmp/usr/share/man/man1/localc.1.gz + diff --git a/debian/libreoffice-calc.mime b/debian/libreoffice-calc.mime new file mode 100644 index 00000000000..d306e622514 --- /dev/null +++ b/debian/libreoffice-calc.mime @@ -0,0 +1,37 @@ +### +# shared-mime-info + +# Generic +text/csv; soffice --nologo --calc %s; edit=soffice --nologo --calc %s; test=test -n "$DISPLAY"; description="CSV Document"; nametemplate=%s.csv; priority=3 +text/spreadsheet; soffice --nologo --calc %s; edit=soffice --nologo --calc %s; test=test -n "$DISPLAY"; description="Spreadsheet Interchange Document"; nametemplate=%s.slk; priority=3 + +# Corel Quattro Pro +application/x-quattropro; soffice --nologo --calc %s; edit=soffice --nologo --calc %s; test=test -n "$DISPLAY"; description="Quattro Pro 6 for Windows Spreadsheet"; nametemplate=%s.wb2; priority=3 + +# dBase dBASE +application/x-dbf; soffice --nologo --calc %s; edit=soffice --nologo --calc %s; test=test -n "$DISPLAY"; description="xBase Document"; nametemplate=%s.dbf; priority=3 + +# ECMA Office Open XML (Microsoft Office 2007) +application/vnd.ms-excel.sheet.macroEnabled.12; soffice --nologo --calc %s; edit=soffice --nologo --calc %s; test=test -n "$DISPLAY"; description="Office Open XML Spreadsheet with Macros Enabled"; nametemplate=%s.xlsm; priority=3 +application/vnd.ms-excel.template.macroEnabled.12; soffice --nologo --calc %s; edit=soffice --nologo --calc %s; test=test -n "$DISPLAY"; description="Office Open XML Spreadsheet Template with Macros Enabled"; nametemplate=%s.xltm; priority=3 +application/vnd.openxmlformats-officedocument.spreadsheetml.sheet; soffice --nologo --calc %s; edit=soffice --nologo --calc %s; test=test -n "$DISPLAY"; description="Office Open XML Spreadsheet"; nametemplate=%s.xlsx; priority=3 +application/vnd.openxmlformats-officedocument.spreadsheetml.template; soffice --nologo --calc %s; edit=soffice --nologo --calc %s; test=test -n "$DISPLAY"; description="Office Open XML Spreadsheet Template"; nametemplate=%s.xltx; priority=3 + +# IBM Lotus 1-2-3 +application/vnd.lotus-1-2-3; soffice --nologo --calc %s; edit=soffice --nologo --calc %s; test=test -n "$DISPLAY"; description="Lotus 1-2-3 spreadsheet"; nametemplate=%s.123; priority=3 + +# Microsoft Excel +application/vnd.ms-excel; soffice --nologo --calc %s; edit=soffice --nologo --calc %s; test=test -n "$DISPLAY"; description="Microsoft Excel Document"; nametemplate=%s.xls; priority=3 + +# OASIS OpenDocument Format +application/vnd.oasis.opendocument.chart; soffice --nologo --calc %s; edit=soffice --nologo --calc %s; print=soffice --nologo --calc -p %s; test=test -n "$DISPLAY"; description="OpenDocument Chart"; nametemplate=%s.odc; priority=9 +application/vnd.oasis.opendocument.spreadsheet; soffice --nologo --calc %s; edit=soffice --nologo --calc %s; print=soffice --nologo --calc -p %s; test=test -n "$DISPLAY"; description="OpenDocument Spreadsheet"; nametemplate=%s.ods; priority=9 +application/vnd.oasis.opendocument.spreadsheet-template; soffice --nologo --calc %s; edit=soffice --nologo --calc %s; print=soffice --nologo --calc -p %s; test=test -n "$DISPLAY"; description="OpenDocument Spreadsheet Template"; nametemplate=%s.ots; priority=9 + +# OpenOffice.org 1.0 +application/vnd.sun.xml.calc; soffice --nologo --calc %s; edit=soffice --nologo --calc %s; test=test -n "$DISPLAY"; description="OpenOffice.org Spreadsheet"; nametemplate=%s.sxc; priority=8 +application/vnd.sun.xml.calc.template; soffice --nologo --calc %s; edit=soffice --nologo --calc %s; test=test -n "$DISPLAY"; description="OpenOffice.org Spreadsheet Template"; nametemplate=%s.stc; priority=8 + +# +### + diff --git a/debian/libreoffice-calc.ucf b/debian/libreoffice-calc.ucf new file mode 100644 index 00000000000..4820977edc1 --- /dev/null +++ b/debian/libreoffice-calc.ucf @@ -0,0 +1 @@ +/usr/lib/libreoffice/share/.registry/calc.xcd /etc/libreoffice/registry/calc.xcd diff --git a/debian/libreoffice-common.bug-control b/debian/libreoffice-common.bug-control new file mode 100644 index 00000000000..38da481c1f2 --- /dev/null +++ b/debian/libreoffice-common.bug-control @@ -0,0 +1 @@ +report-with: python-uno python3-uno diff --git a/debian/libreoffice-common.docs b/debian/libreoffice-common.docs new file mode 100644 index 00000000000..e2675791300 --- /dev/null +++ b/debian/libreoffice-common.docs @@ -0,0 +1 @@ +wizards/source/access2base/access2base.html diff --git a/debian/libreoffice-common.links.in b/debian/libreoffice-common.links.in new file mode 100644 index 00000000000..8365f3eefbf --- /dev/null +++ b/debian/libreoffice-common.links.in @@ -0,0 +1,37 @@ +usr/share/icons/hicolor/16x16/mimetypes/libreoffice-oasis-database.png usr/share/icons/hicolor/16x16/mimetypes/application-vnd.oasis.opendocument.database.png +usr/share/icons/hicolor/16x16/mimetypes/libreoffice-oasis-drawing.png usr/share/icons/hicolor/16x16/mimetypes/application-vnd.oasis.opendocument.drawing.png +usr/share/icons/hicolor/16x16/mimetypes/libreoffice-oasis-drawing-template.png usr/share/icons/hicolor/16x16/mimetypes/application-vnd.oasis.opendocument.drawing-template.png +usr/share/icons/hicolor/16x16/mimetypes/libreoffice-oasis-formula.png usr/share/icons/hicolor/16x16/mimetypes/application-vnd.oasis.opendocument.formula.png +usr/share/icons/hicolor/16x16/mimetypes/libreoffice-oasis-master-document.png usr/share/icons/hicolor/16x16/mimetypes/application-vnd.oasis.opendocument.master-document.png +usr/share/icons/hicolor/16x16/mimetypes/libreoffice-oasis-presentation.png usr/share/icons/hicolor/16x16/mimetypes/application-vnd.oasis.opendocument.presentation.png +usr/share/icons/hicolor/16x16/mimetypes/libreoffice-oasis-presentation-template.png usr/share/icons/hicolor/16x16/mimetypes/application-vnd.oasis.opendocument.presentation-template.png +usr/share/icons/hicolor/16x16/mimetypes/libreoffice-oasis-spreadsheet.png usr/share/icons/hicolor/16x16/mimetypes/application-vnd.oasis.opendocument.spreadsheet.png +usr/share/icons/hicolor/16x16/mimetypes/libreoffice-oasis-spreadsheet-template.png usr/share/icons/hicolor/16x16/mimetypes/application-vnd.oasis.opendocument.spreadsheet-template.png +usr/share/icons/hicolor/16x16/mimetypes/libreoffice-oasis-text.png usr/share/icons/hicolor/16x16/mimetypes/application-vnd.oasis.opendocument.text.png +usr/share/icons/hicolor/16x16/mimetypes/libreoffice-oasis-text-template.png usr/share/icons/hicolor/16x16/mimetypes/application-vnd.oasis.opendocument.text-template.png +usr/share/icons/hicolor/16x16/mimetypes/libreoffice-oasis-web-template.png usr/share/icons/hicolor/16x16/mimetypes/application-vnd.oasis.opendocument.web-template.png +usr/share/icons/hicolor/32x32/mimetypes/libreoffice-oasis-database.png usr/share/icons/hicolor/32x32/mimetypes/application-vnd.oasis.opendocument.database.png +usr/share/icons/hicolor/32x32/mimetypes/libreoffice-oasis-drawing.png usr/share/icons/hicolor/32x32/mimetypes/application-vnd.oasis.opendocument.drawing.png +usr/share/icons/hicolor/32x32/mimetypes/libreoffice-oasis-drawing-template.png usr/share/icons/hicolor/32x32/mimetypes/application-vnd.oasis.opendocument.drawing-template.png +usr/share/icons/hicolor/32x32/mimetypes/libreoffice-oasis-formula.png usr/share/icons/hicolor/32x32/mimetypes/application-vnd.oasis.opendocument.formula.png +usr/share/icons/hicolor/32x32/mimetypes/libreoffice-oasis-master-document.png usr/share/icons/hicolor/32x32/mimetypes/application-vnd.oasis.opendocument.master-document.png +usr/share/icons/hicolor/32x32/mimetypes/libreoffice-oasis-presentation.png usr/share/icons/hicolor/32x32/mimetypes/application-vnd.oasis.opendocument.presentation.png +usr/share/icons/hicolor/32x32/mimetypes/libreoffice-oasis-presentation-template.png usr/share/icons/hicolor/32x32/mimetypes/application-vnd.oasis.opendocument.presentation-template.png +usr/share/icons/hicolor/32x32/mimetypes/libreoffice-oasis-spreadsheet.png usr/share/icons/hicolor/32x32/mimetypes/application-vnd.oasis.opendocument.spreadsheet.png +usr/share/icons/hicolor/32x32/mimetypes/libreoffice-oasis-spreadsheet-template.png usr/share/icons/hicolor/32x32/mimetypes/application-vnd.oasis.opendocument.spreadsheet-template.png +usr/share/icons/hicolor/32x32/mimetypes/libreoffice-oasis-text.png usr/share/icons/hicolor/32x32/mimetypes/application-vnd.oasis.opendocument.text.png +usr/share/icons/hicolor/32x32/mimetypes/libreoffice-oasis-text-template.png usr/share/icons/hicolor/32x32/mimetypes/application-vnd.oasis.opendocument.text-template.png +usr/share/icons/hicolor/32x32/mimetypes/libreoffice-oasis-web-template.png usr/share/icons/hicolor/32x32/mimetypes/application-vnd.oasis.opendocument.web-template.png +usr/share/icons/hicolor/48x48/mimetypes/libreoffice-oasis-database.png usr/share/icons/hicolor/48x48/mimetypes/application-vnd.oasis.opendocument.database.png +usr/share/icons/hicolor/48x48/mimetypes/libreoffice-oasis-drawing.png usr/share/icons/hicolor/48x48/mimetypes/application-vnd.oasis.opendocument.drawing.png +usr/share/icons/hicolor/48x48/mimetypes/libreoffice-oasis-drawing-template.png usr/share/icons/hicolor/48x48/mimetypes/application-vnd.oasis.opendocument.drawing-template.png +usr/share/icons/hicolor/48x48/mimetypes/libreoffice-oasis-formula.png usr/share/icons/hicolor/48x48/mimetypes/application-vnd.oasis.opendocument.formula.png +usr/share/icons/hicolor/48x48/mimetypes/libreoffice-oasis-master-document.png usr/share/icons/hicolor/48x48/mimetypes/application-vnd.oasis.opendocument.master-document.png +usr/share/icons/hicolor/48x48/mimetypes/libreoffice-oasis-presentation.png usr/share/icons/hicolor/48x48/mimetypes/application-vnd.oasis.opendocument.presentation.png +usr/share/icons/hicolor/48x48/mimetypes/libreoffice-oasis-presentation-template.png usr/share/icons/hicolor/48x48/mimetypes/application-vnd.oasis.opendocument.presentation-template.png +usr/share/icons/hicolor/48x48/mimetypes/libreoffice-oasis-spreadsheet.png usr/share/icons/hicolor/48x48/mimetypes/application-vnd.oasis.opendocument.spreadsheet.png +usr/share/icons/hicolor/48x48/mimetypes/libreoffice-oasis-spreadsheet-template.png usr/share/icons/hicolor/48x48/mimetypes/application-vnd.oasis.opendocument.spreadsheet-template.png +usr/share/icons/hicolor/48x48/mimetypes/libreoffice-oasis-text.png usr/share/icons/hicolor/48x48/mimetypes/application-vnd.oasis.opendocument.text.png +usr/share/icons/hicolor/48x48/mimetypes/libreoffice-oasis-text-template.png usr/share/icons/hicolor/48x48/mimetypes/application-vnd.oasis.opendocument.text-template.png +usr/share/icons/hicolor/48x48/mimetypes/libreoffice-oasis-web-template.png usr/share/icons/hicolor/48x48/mimetypes/application-vnd.oasis.opendocument.web-template.png +etc/libreoffice/registry usr/lib/libreoffice/share/registry diff --git a/debian/libreoffice-common.lintian-overrides b/debian/libreoffice-common.lintian-overrides new file mode 100644 index 00000000000..efdaf3d980c --- /dev/null +++ b/debian/libreoffice-common.lintian-overrides @@ -0,0 +1,2 @@ +# this is essentially a breaks with version +libreoffice-common: breaks-without-version libreoffice-help-5.2 diff --git a/debian/libreoffice-common.maintscript b/debian/libreoffice-common.maintscript new file mode 100644 index 00000000000..5ef5e3d2f8c --- /dev/null +++ b/debian/libreoffice-common.maintscript @@ -0,0 +1,11 @@ +mv_conffile /etc/apparmor.d/usr.lib.libreofficeprogram.oosplash /etc/apparmor.d/usr.lib.libreoffice.program.oosplash 1:5.4.3-1 +mv_conffile /etc/apparmor.d/usr.lib.libreofficeprogram.senddoc /etc/apparmor.d/usr.lib.libreoffice.program.senddoc 1:5.4.3-1 +mv_conffile /etc/apparmor.d/usr.lib.libreofficeprogram.soffice.bin /etc/apparmor.d/usr.lib.libreoffice.program.soffice.bin 1:5.4.3-1 +mv_conffile /etc/apparmor.d/usr.lib.libreofficeprogram.xpdfimport /etc/apparmor.d/usr.lib.libreoffice.program.xpdfimport 1:5.4.3-1 + +# do this manually since dpkg-maintscript-helper dir_to_symlink +# does not work reliably in this case because we cannot ensure that all +# conflicting packages previously shipping files in +# /usr/lib/libreoffice/share/registry are either upgraded or removed +# but not just deconfigured, see #985297 +#dir_to_symlink /usr/lib/libreoffice/share/registry /etc/libreoffice/registry 1:7.0.2~rc1-1 diff --git a/debian/libreoffice-common.manpages b/debian/libreoffice-common.manpages new file mode 100644 index 00000000000..37ce2e86511 --- /dev/null +++ b/debian/libreoffice-common.manpages @@ -0,0 +1,4 @@ +debian/tmp/usr/share/man/man1/libreoffice.1.gz +debian/tmp/usr/share/man/man1/loffice.1.gz +debian/tmp/usr/share/man/man1/unopkg.1.gz +debian/tmp/usr/share/man/man1/lofromtemplate.1.gz diff --git a/debian/libreoffice-common.postinst.in b/debian/libreoffice-common.postinst.in new file mode 100644 index 00000000000..dd95adf44a6 --- /dev/null +++ b/debian/libreoffice-common.postinst.in @@ -0,0 +1,43 @@ +#!/bin/sh + +set -e + +#INCLUDE_SHELL_LIB# + +if [ "$1" = "triggered" ]; then + for triggername in $2; do + case "$triggername" in + # new "bundled" extensions (since 3.3) + "/@OODIR@/share/extensions") + make_lo_sync_extensions + ;; + "/@OODIR@") + # check also whether /usr/bin/loolwsd-systemplate-setup + # is +x do to not fail when it's gone but + # /var/lib/lool/systemplate is still there (loolwsd + # removed but not purged) + if [ -x /usr/bin/loolwsd-systemplate-setup -a \ + -d /var/lib/lool/systemplate ]; then + update_lool_systemplate + fi + ;; + esac + done +fi + +#DEBHELPER# + +# do this manually since dpkg-maintscript-helper dir_to_symlink +# does not work reliably in this case because we cannot ensure that all +# conflicting packages previously shipping files in +# /usr/lib/libreoffice/share/registry are either upgraded or removed +# but not just deconfigured, see #985297 +if [ "$1" = "configure" ] && dpkg --compare-versions "$2" lt-nl "1:7.0.4-4~" ; then + if [ ! -L /usr/lib/libreoffice/share/registry ]; then + if [ -d /usr/lib/libreoffice/share/registry ]; then + # this will fail if the directory is not yet empty + rmdir -v /usr/lib/libreoffice/share/registry + fi + ln -sfvT /etc/libreoffice/registry /usr/lib/libreoffice/share/registry + fi +fi diff --git a/debian/libreoffice-common.postrm.in b/debian/libreoffice-common.postrm.in new file mode 100644 index 00000000000..c4471b59176 --- /dev/null +++ b/debian/libreoffice-common.postrm.in @@ -0,0 +1,26 @@ +#!/bin/sh + +set -e + +#INCLUDE_SHELL_LIB# + +case "$1" in + remove|abort-install|abort-upgrade) + rm -rf /`echo @OODIR@ | sed -e s,usr/,var/,g`/share/prereg/bundled + rmdir /`echo @OODIR@ | sed -e s,usr/,var/,g`/share/prereg/ || true + rmdir /`echo @OODIR@ | sed -e s,usr/,var/,g`/share/ || true + # this belongs to -core, but won't work until we have -common stuff removed, too, so try here again + # in adduition to -core + rmdir /`echo @OODIR@ | sed -e s,usr/,var/,g`/program/ || true + rmdir /`echo @OODIR@ | sed -e s,usr/,var/,g` || true + # and try to remove /@OOBRANDDIR@ itself + rmdir /`echo @OODIR@ | sed -e s,usr/,var/,g` || true + ;; + purge) + rm -f /`echo @OODIR@ | sed -e s,usr/,var/,g`/share/config/javasettingsunopkginstall.xml + rmdir /`echo @OODIR@ | sed -e s,usr/,var/,g`/share/config || true + rmdir /`echo @OODIR@ | sed -e s,usr/,var/,g`/share || true + ;; +esac + +#DEBHELPER# diff --git a/debian/libreoffice-common.triggers.in b/debian/libreoffice-common.triggers.in new file mode 100644 index 00000000000..274301752fe --- /dev/null +++ b/debian/libreoffice-common.triggers.in @@ -0,0 +1,2 @@ +interest-noawait /@OODIR@/share/extensions +interest-noawait /@OODIR@ diff --git a/debian/libreoffice-common.ucf b/debian/libreoffice-common.ucf new file mode 100644 index 00000000000..b929f5f9c37 --- /dev/null +++ b/debian/libreoffice-common.ucf @@ -0,0 +1,6 @@ +/usr/lib/libreoffice/share/.registry/main.xcd /etc/libreoffice/registry/main.xcd +/usr/lib/libreoffice/share/.registry/pdfimport.xcd /etc/libreoffice/registry/pdfimport.xcd +/usr/lib/libreoffice/share/.registry/xsltfilter.xcd /etc/libreoffice/registry/xsltfilter.xcd +/usr/lib/libreoffice/share/.registry/lingucomponent.xcd /etc/libreoffice/registry/lingucomponent.xcd +/usr/lib/libreoffice/share/.registry/Langpack-en-US.xcd /etc/libreoffice/registry/Langpack-en-US.xcd +/usr/lib/libreoffice/share/.registry/res/fcfg_langpack_en-US.xcd /etc/libreoffice/registry/res/fcfg_langpack_en-US.xcd diff --git a/debian/libreoffice-core-nogui.bug-control b/debian/libreoffice-core-nogui.bug-control new file mode 100644 index 00000000000..7896392642f --- /dev/null +++ b/debian/libreoffice-core-nogui.bug-control @@ -0,0 +1 @@ +report-with: libreoffice-common libreoffice-java-common fonts-opensymbol diff --git a/debian/libreoffice-core-nogui.bug-script.in b/debian/libreoffice-core-nogui.bug-script.in new file mode 100755 index 00000000000..bba16b11cfc --- /dev/null +++ b/debian/libreoffice-core-nogui.bug-script.in @@ -0,0 +1,16 @@ +#!/bin/sh + +# list all installed extensions. --bundled, --shared and non-shared +/usr/lib/libreoffice/program/unopkg list --bundled >&3 +/usr/lib/libreoffice/program/unopkg list --shared >&3 +/usr/lib/libreoffice/program/unopkg list >&3 + +# experimental stuff enabled? +echo "" >&3 +echo "Experimental features enabled:" >&3 +#_lo_profile_ver=`echo @OOVER@ | cut -d. -f1` +_lo_profile_ver=4 +if [ -d "$HOME/.config/libreoffice/$_lo_profile_ver" ]; then + grep ExperimentalMode $HOME/.config/libreoffice/$_lo_profile_ver/user/registrymodifications.xcu >&3 +fi + diff --git a/debian/libreoffice-core-nogui.lintian-overrides b/debian/libreoffice-core-nogui.lintian-overrides new file mode 100644 index 00000000000..4c422e088c3 --- /dev/null +++ b/debian/libreoffice-core-nogui.lintian-overrides @@ -0,0 +1 @@ +libreoffice-core-nogui: embedded-library usr/lib/libreoffice/program/libpdfiumlo.so: openjpeg diff --git a/debian/libreoffice-core.bug-control b/debian/libreoffice-core.bug-control new file mode 100644 index 00000000000..f9456ca02a6 --- /dev/null +++ b/debian/libreoffice-core.bug-control @@ -0,0 +1,2 @@ +report-with: libreoffice-common libreoffice-java-common fonts-opensymbol +package-status: libxrender1 libxinerama1 libsane iceweasel firefox icedove iceape-browser pstoedit imagemagick fglrx-driver nvidia-glx nvidia-glx-legacy diff --git a/debian/libreoffice-core.bug-script.in b/debian/libreoffice-core.bug-script.in new file mode 100755 index 00000000000..2bfd1bea415 --- /dev/null +++ b/debian/libreoffice-core.bug-script.in @@ -0,0 +1,20 @@ +#!/bin/sh + +# list all installed extensions. --bundled, --shared and non-shared +/usr/lib/libreoffice/program/unopkg list --bundled >&3 +/usr/lib/libreoffice/program/unopkg list --shared >&3 +/usr/lib/libreoffice/program/unopkg list >&3 + +# experimental stuff enabled? +echo "" >&3 +echo "Experimental features enabled:" >&3 +#_lo_profile_ver=`echo @OOVER@ | cut -d. -f1` +_lo_profile_ver=4 +if [ -d "$HOME/.config/libreoffice/$_lo_profile_ver" ]; then + grep ExperimentalMode $HOME/.config/libreoffice/$_lo_profile_ver/user/registrymodifications.xcu >&3 +fi + +# installed VCLplugs +echo "" >&3 +echo "Installed VCLplugs:" >&3 +dpkg -l libreoffice-gtk3 libreoffice-qt5 libreoffice-kf5 >&3 diff --git a/debian/libreoffice-core.lintian-overrides b/debian/libreoffice-core.lintian-overrides new file mode 100644 index 00000000000..3a4d1d8b84d --- /dev/null +++ b/debian/libreoffice-core.lintian-overrides @@ -0,0 +1 @@ +libreoffice-core: embedded-library usr/lib/libreoffice/program/libpdfiumlo.so: openjpeg diff --git a/debian/libreoffice-core.maintscript b/debian/libreoffice-core.maintscript new file mode 100644 index 00000000000..926d53c1ae5 --- /dev/null +++ b/debian/libreoffice-core.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-core /usr/share/doc/libreoffice-core 1:6.4.0~alpha1~git20191013 diff --git a/debian/libreoffice-core.postrm.in b/debian/libreoffice-core.postrm.in new file mode 100755 index 00000000000..95ed9cb4f46 --- /dev/null +++ b/debian/libreoffice-core.postrm.in @@ -0,0 +1,13 @@ +#!/bin/sh + +set -e + +#INCLUDE_SHELL_LIB# + +if [ "$1" = "remove" ]; then + rm -rf /var/spool/libreoffice +fi + +#DEBHELPER# + +exit 0 diff --git a/debian/libreoffice-dev-common.maintscript b/debian/libreoffice-dev-common.maintscript new file mode 100644 index 00000000000..d9ebd73ef24 --- /dev/null +++ b/debian/libreoffice-dev-common.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-dev-common /usr/share/doc/libreoffice-common 1:6.4.0~alpha1~git20191013 diff --git a/debian/libreoffice-dev-doc.links b/debian/libreoffice-dev-doc.links new file mode 100644 index 00000000000..7e6fd17fba7 --- /dev/null +++ b/debian/libreoffice-dev-doc.links @@ -0,0 +1 @@ +usr/share/doc/libreoffice/sdk/docs usr/share/doc/libreoffice-dev-doc/api diff --git a/debian/libreoffice-dev.lintian-overrides b/debian/libreoffice-dev.lintian-overrides new file mode 100644 index 00000000000..f1338bb4535 --- /dev/null +++ b/debian/libreoffice-dev.lintian-overrides @@ -0,0 +1 @@ +libreoffice-dev: wrong-section-according-to-package-name libreoffice-dev => libdevel diff --git a/debian/libreoffice-dev.maintscript b/debian/libreoffice-dev.maintscript new file mode 100644 index 00000000000..dc89bb3d31d --- /dev/null +++ b/debian/libreoffice-dev.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-dev /usr/share/doc/libreoffice-core 1:6.4.0~alpha1~git20191013 diff --git a/debian/libreoffice-draw-nogui.bug-control b/debian/libreoffice-draw-nogui.bug-control new file mode 100644 index 00000000000..1ac405f9788 --- /dev/null +++ b/debian/libreoffice-draw-nogui.bug-control @@ -0,0 +1 @@ +report-with: libreoffice-core diff --git a/debian/libreoffice-draw-nogui.mime b/debian/libreoffice-draw-nogui.mime new file mode 100644 index 00000000000..e0b81d3bfb4 --- /dev/null +++ b/debian/libreoffice-draw-nogui.mime @@ -0,0 +1,13 @@ +### +# shared-mime-info + +# OASIS OpenDocument Format +application/vnd.oasis.opendocument.graphics; soffice --nologo --draw %s; edit=soffice --nologo --draw %s; print=soffice --nologo --draw -p %s; test=test -n "$DISPLAY"; description="OpenDocument Drawing"; nametemplate=%s.odg; priority=9 +application/vnd.oasis.opendocument.graphics-template; soffice --nologo --draw %s; edit=soffice --nologo --draw %s; print=soffice --nologo --draw -p %s; test=test -n "$DISPLAY"; description="OpenDocument Drawing Template"; nametemplate=%s.otg; priority=9 + +# OpenOffice.org 1.0 +application/vnd.sun.xml.draw; soffice --nologo --draw %s; edit=soffice --nologo --draw %s; test=test -n "$DISPLAY"; description="OpenOffice.org Drawing"; nametemplate=%s.sxd; priority=8 +application/vnd.sun.xml.draw.template; soffice --nologo --draw %s; edit=soffice --nologo --draw %s; test=test -n "$DISPLAY"; description="OpenOffice.org Drawing Template"; nametemplate=%s.std; priority=8 + +# +### diff --git a/debian/libreoffice-draw-nogui.ucf b/debian/libreoffice-draw-nogui.ucf new file mode 100644 index 00000000000..a1e42c709f6 --- /dev/null +++ b/debian/libreoffice-draw-nogui.ucf @@ -0,0 +1,2 @@ +/usr/lib/libreoffice/share/.registry/draw.xcd /etc/libreoffice/registry/draw.xcd +/usr/lib/libreoffice/share/.registry/graphicfilter.xcd /etc/libreoffice/registry/graphicfilter.xcd diff --git a/debian/libreoffice-draw.bug-control b/debian/libreoffice-draw.bug-control new file mode 100644 index 00000000000..1ac405f9788 --- /dev/null +++ b/debian/libreoffice-draw.bug-control @@ -0,0 +1 @@ +report-with: libreoffice-core diff --git a/debian/libreoffice-draw.lintian-overrides b/debian/libreoffice-draw.lintian-overrides new file mode 100644 index 00000000000..12588b54def --- /dev/null +++ b/debian/libreoffice-draw.lintian-overrides @@ -0,0 +1 @@ +libreoffice-draw: desktop-command-not-in-package usr/share/applications/libreoffice-draw.desktop libreoffice diff --git a/debian/libreoffice-draw.maintscript b/debian/libreoffice-draw.maintscript new file mode 100644 index 00000000000..cf0ace643cf --- /dev/null +++ b/debian/libreoffice-draw.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-draw /usr/share/doc/libreoffice-core 1:6.4.0~alpha1~git20191013 diff --git a/debian/libreoffice-draw.manpages b/debian/libreoffice-draw.manpages new file mode 100644 index 00000000000..3267e53d6e2 --- /dev/null +++ b/debian/libreoffice-draw.manpages @@ -0,0 +1 @@ +debian/tmp/usr/share/man/man1/lodraw.1.gz diff --git a/debian/libreoffice-draw.mime b/debian/libreoffice-draw.mime new file mode 100644 index 00000000000..e0b81d3bfb4 --- /dev/null +++ b/debian/libreoffice-draw.mime @@ -0,0 +1,13 @@ +### +# shared-mime-info + +# OASIS OpenDocument Format +application/vnd.oasis.opendocument.graphics; soffice --nologo --draw %s; edit=soffice --nologo --draw %s; print=soffice --nologo --draw -p %s; test=test -n "$DISPLAY"; description="OpenDocument Drawing"; nametemplate=%s.odg; priority=9 +application/vnd.oasis.opendocument.graphics-template; soffice --nologo --draw %s; edit=soffice --nologo --draw %s; print=soffice --nologo --draw -p %s; test=test -n "$DISPLAY"; description="OpenDocument Drawing Template"; nametemplate=%s.otg; priority=9 + +# OpenOffice.org 1.0 +application/vnd.sun.xml.draw; soffice --nologo --draw %s; edit=soffice --nologo --draw %s; test=test -n "$DISPLAY"; description="OpenOffice.org Drawing"; nametemplate=%s.sxd; priority=8 +application/vnd.sun.xml.draw.template; soffice --nologo --draw %s; edit=soffice --nologo --draw %s; test=test -n "$DISPLAY"; description="OpenOffice.org Drawing Template"; nametemplate=%s.std; priority=8 + +# +### diff --git a/debian/libreoffice-draw.ucf b/debian/libreoffice-draw.ucf new file mode 100644 index 00000000000..a1e42c709f6 --- /dev/null +++ b/debian/libreoffice-draw.ucf @@ -0,0 +1,2 @@ +/usr/lib/libreoffice/share/.registry/draw.xcd /etc/libreoffice/registry/draw.xcd +/usr/lib/libreoffice/share/.registry/graphicfilter.xcd /etc/libreoffice/registry/graphicfilter.xcd diff --git a/debian/libreoffice-evolution.bug-control b/debian/libreoffice-evolution.bug-control new file mode 100644 index 00000000000..aa427dea40d --- /dev/null +++ b/debian/libreoffice-evolution.bug-control @@ -0,0 +1 @@ +report-with: libreoffice-core evolution libreoffice-base diff --git a/debian/libreoffice-evolution.maintscript b/debian/libreoffice-evolution.maintscript new file mode 100644 index 00000000000..3d581a38dbe --- /dev/null +++ b/debian/libreoffice-evolution.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-evolution /usr/share/doc/libreoffice-core 1:6.4.0~alpha1~git20191013 diff --git a/debian/libreoffice-evolution.ucf b/debian/libreoffice-evolution.ucf new file mode 100644 index 00000000000..8b029ede374 --- /dev/null +++ b/debian/libreoffice-evolution.ucf @@ -0,0 +1 @@ +/usr/lib/libreoffice/share/.registry/evoab.xcd /etc/libreoffice/registry/evoab.xcd diff --git a/debian/libreoffice-gnome.maintscript b/debian/libreoffice-gnome.maintscript new file mode 100644 index 00000000000..5ea20d66f35 --- /dev/null +++ b/debian/libreoffice-gnome.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-gnome /usr/share/doc/libreoffice-core 1:6.4.0~alpha1~git20191013 diff --git a/debian/libreoffice-gnome.ucf b/debian/libreoffice-gnome.ucf new file mode 100644 index 00000000000..7306c2e357b --- /dev/null +++ b/debian/libreoffice-gnome.ucf @@ -0,0 +1 @@ +/usr/lib/libreoffice/share/.registry/gnome.xcd /etc/libreoffice/registry/gnome.xcd diff --git a/debian/libreoffice-gtk3.maintscript b/debian/libreoffice-gtk3.maintscript new file mode 100644 index 00000000000..284aeadb753 --- /dev/null +++ b/debian/libreoffice-gtk3.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-gtk3 /usr/share/doc/libreoffice-core 1:6.4.0~alpha1~git20191013 diff --git a/debian/libreoffice-help-ca-valencia.maintscript b/debian/libreoffice-help-ca-valencia.maintscript new file mode 100644 index 00000000000..333a3f817b1 --- /dev/null +++ b/debian/libreoffice-help-ca-valencia.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-help-ca-valencia /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-help-ca.maintscript b/debian/libreoffice-help-ca.maintscript new file mode 100644 index 00000000000..36688ec51d9 --- /dev/null +++ b/debian/libreoffice-help-ca.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-help-ca /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-help-common.links b/debian/libreoffice-help-common.links new file mode 100644 index 00000000000..48ab2acd4ce --- /dev/null +++ b/debian/libreoffice-help-common.links @@ -0,0 +1 @@ +/usr/share/javascript/normalize.css/normalize.css usr/share/libreoffice/help/normalize.css diff --git a/debian/libreoffice-help-common.maintscript b/debian/libreoffice-help-common.maintscript new file mode 100644 index 00000000000..635c1ca10f5 --- /dev/null +++ b/debian/libreoffice-help-common.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-help-common /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-help-cs.maintscript b/debian/libreoffice-help-cs.maintscript new file mode 100644 index 00000000000..24048eadd38 --- /dev/null +++ b/debian/libreoffice-help-cs.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-help-cs /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-help-da.maintscript b/debian/libreoffice-help-da.maintscript new file mode 100644 index 00000000000..fdf5f339b19 --- /dev/null +++ b/debian/libreoffice-help-da.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-help-da /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-help-de.maintscript b/debian/libreoffice-help-de.maintscript new file mode 100644 index 00000000000..d55b7661775 --- /dev/null +++ b/debian/libreoffice-help-de.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-help-de /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-help-dz.maintscript b/debian/libreoffice-help-dz.maintscript new file mode 100644 index 00000000000..d4fe0143039 --- /dev/null +++ b/debian/libreoffice-help-dz.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-help-dz /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-help-el.maintscript b/debian/libreoffice-help-el.maintscript new file mode 100644 index 00000000000..5ad40b15a77 --- /dev/null +++ b/debian/libreoffice-help-el.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-help-el /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-help-en-gb.maintscript b/debian/libreoffice-help-en-gb.maintscript new file mode 100644 index 00000000000..f0386001673 --- /dev/null +++ b/debian/libreoffice-help-en-gb.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-help-en-gb /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-help-en-us.maintscript b/debian/libreoffice-help-en-us.maintscript new file mode 100644 index 00000000000..a4a63f7dbb2 --- /dev/null +++ b/debian/libreoffice-help-en-us.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-help-en-us /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-help-es.maintscript b/debian/libreoffice-help-es.maintscript new file mode 100644 index 00000000000..2b04756b620 --- /dev/null +++ b/debian/libreoffice-help-es.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-help-es /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-help-et.maintscript b/debian/libreoffice-help-et.maintscript new file mode 100644 index 00000000000..d65fd19165c --- /dev/null +++ b/debian/libreoffice-help-et.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-help-et /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-help-eu.maintscript b/debian/libreoffice-help-eu.maintscript new file mode 100644 index 00000000000..e243177487a --- /dev/null +++ b/debian/libreoffice-help-eu.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-help-eu /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-help-fi.maintscript b/debian/libreoffice-help-fi.maintscript new file mode 100644 index 00000000000..93b944a1a45 --- /dev/null +++ b/debian/libreoffice-help-fi.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-help-fi /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-help-fr.maintscript b/debian/libreoffice-help-fr.maintscript new file mode 100644 index 00000000000..d94c693d367 --- /dev/null +++ b/debian/libreoffice-help-fr.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-help-fr /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-help-gl.maintscript b/debian/libreoffice-help-gl.maintscript new file mode 100644 index 00000000000..10cabd0e987 --- /dev/null +++ b/debian/libreoffice-help-gl.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-help-gl /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-help-hi.maintscript b/debian/libreoffice-help-hi.maintscript new file mode 100644 index 00000000000..34485e89c8e --- /dev/null +++ b/debian/libreoffice-help-hi.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-help-hi /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-help-hu.maintscript b/debian/libreoffice-help-hu.maintscript new file mode 100644 index 00000000000..9d307fbfc3b --- /dev/null +++ b/debian/libreoffice-help-hu.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-help-hu /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-help-id.maintscript b/debian/libreoffice-help-id.maintscript new file mode 100644 index 00000000000..9dfe92f51a1 --- /dev/null +++ b/debian/libreoffice-help-id.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-help-id /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-help-it.maintscript b/debian/libreoffice-help-it.maintscript new file mode 100644 index 00000000000..a9f1015ff56 --- /dev/null +++ b/debian/libreoffice-help-it.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-help-it /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-help-ja.maintscript b/debian/libreoffice-help-ja.maintscript new file mode 100644 index 00000000000..00db55cb21a --- /dev/null +++ b/debian/libreoffice-help-ja.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-help-ja /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-help-km.maintscript b/debian/libreoffice-help-km.maintscript new file mode 100644 index 00000000000..2fb9ccd6457 --- /dev/null +++ b/debian/libreoffice-help-km.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-help-km /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-help-ko.maintscript b/debian/libreoffice-help-ko.maintscript new file mode 100644 index 00000000000..aed2e03d649 --- /dev/null +++ b/debian/libreoffice-help-ko.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-help-ko /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-help-nl.maintscript b/debian/libreoffice-help-nl.maintscript new file mode 100644 index 00000000000..ab75a603e30 --- /dev/null +++ b/debian/libreoffice-help-nl.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-help-nl /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-help-om.maintscript b/debian/libreoffice-help-om.maintscript new file mode 100644 index 00000000000..64d5f549e39 --- /dev/null +++ b/debian/libreoffice-help-om.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-help-om /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-help-pl.maintscript b/debian/libreoffice-help-pl.maintscript new file mode 100644 index 00000000000..b1fca4d24d0 --- /dev/null +++ b/debian/libreoffice-help-pl.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-help-pl /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-help-pt-br.maintscript b/debian/libreoffice-help-pt-br.maintscript new file mode 100644 index 00000000000..ca4f77f6fbc --- /dev/null +++ b/debian/libreoffice-help-pt-br.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-help-pt-br /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-help-pt.maintscript b/debian/libreoffice-help-pt.maintscript new file mode 100644 index 00000000000..5d368903125 --- /dev/null +++ b/debian/libreoffice-help-pt.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-help-pt /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-help-ru.maintscript b/debian/libreoffice-help-ru.maintscript new file mode 100644 index 00000000000..13ff092f416 --- /dev/null +++ b/debian/libreoffice-help-ru.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-help-ru /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-help-sk.maintscript b/debian/libreoffice-help-sk.maintscript new file mode 100644 index 00000000000..9306f1976f1 --- /dev/null +++ b/debian/libreoffice-help-sk.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-help-sk /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-help-sl.maintscript b/debian/libreoffice-help-sl.maintscript new file mode 100644 index 00000000000..88eba79837b --- /dev/null +++ b/debian/libreoffice-help-sl.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-help-sl /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-help-sv.maintscript b/debian/libreoffice-help-sv.maintscript new file mode 100644 index 00000000000..4c230591aee --- /dev/null +++ b/debian/libreoffice-help-sv.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-help-sv /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-help-tr.maintscript b/debian/libreoffice-help-tr.maintscript new file mode 100644 index 00000000000..08522b12adc --- /dev/null +++ b/debian/libreoffice-help-tr.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-help-tr /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-help-vi.maintscript b/debian/libreoffice-help-vi.maintscript new file mode 100644 index 00000000000..c2ee611d03f --- /dev/null +++ b/debian/libreoffice-help-vi.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-help-vi /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-help-zh-cn.maintscript b/debian/libreoffice-help-zh-cn.maintscript new file mode 100644 index 00000000000..1e3c388c1b6 --- /dev/null +++ b/debian/libreoffice-help-zh-cn.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-help-zh-cn /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-help-zh-tw.maintscript b/debian/libreoffice-help-zh-tw.maintscript new file mode 100644 index 00000000000..b13206f1914 --- /dev/null +++ b/debian/libreoffice-help-zh-tw.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-help-zh-tw /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-help.lintian-overrides.in b/debian/libreoffice-help.lintian-overrides.in new file mode 100644 index 00000000000..17fde6dd126 --- /dev/null +++ b/debian/libreoffice-help.lintian-overrides.in @@ -0,0 +1,15 @@ +# these are in -help-common. See lintian bug http://bugs.debian.org/897244 +doc-base-file-references-missing-file libreoffice-help-@LCODE@:8 /usr/share/libreoffice/help/media/* +doc-base-file-references-missing-file libreoffice-help-@LCODE@:8 /usr/share/libreoffice/help/help.html +doc-base-file-references-missing-file libreoffice-help-@LCODE@:8 /usr/share/libreoffice/help/idxcaption.xsl +doc-base-file-references-missing-file libreoffice-help-@LCODE@:8 /usr/share/libreoffice/help/fuse.js +doc-base-file-references-missing-file libreoffice-help-@LCODE@:8 /usr/share/libreoffice/help/help.js +doc-base-file-references-missing-file libreoffice-help-@LCODE@:8 /usr/share/libreoffice/help/hid2file.js +doc-base-file-references-missing-file libreoffice-help-@LCODE@:8 /usr/share/libreoffice/help/paginathing.js +doc-base-file-references-missing-file libreoffice-help-@LCODE@:8 /usr/share/libreoffice/help/idxcontent.xsl +doc-base-file-references-missing-file libreoffice-help-@LCODE@:8 /usr/share/libreoffice/help/index.html +doc-base-file-references-missing-file libreoffice-help-@LCODE@:8 /usr/share/libreoffice/help/normalize.css +doc-base-file-references-missing-file libreoffice-help-@LCODE@:8 /usr/share/libreoffice/help/main_transform.xsl +doc-base-file-references-missing-file libreoffice-help-@LCODE@:8 /usr/share/libreoffice/help/help2.js +doc-base-file-references-missing-file libreoffice-help-@LCODE@:8 /usr/share/libreoffice/help/default.css + diff --git a/debian/libreoffice-impress-nogui.bug-control b/debian/libreoffice-impress-nogui.bug-control new file mode 100644 index 00000000000..a3a052e7da4 --- /dev/null +++ b/debian/libreoffice-impress-nogui.bug-control @@ -0,0 +1 @@ +report-with: libreoffice-core libreoffice-draw diff --git a/debian/libreoffice-impress-nogui.mime b/debian/libreoffice-impress-nogui.mime new file mode 100644 index 00000000000..ed8a11fd90b --- /dev/null +++ b/debian/libreoffice-impress-nogui.mime @@ -0,0 +1,25 @@ +### +# shared-mime-info + +# ECMA Office Open XML (Microsoft Office 2007) +application/vnd.ms-powerpoint.presentation.macroEnabled.12; soffice --nologo --impress %s; edit=soffice --nologo --impress %s; test=test -n "$DISPLAY"; description="Office Open XML Presentation with Macros Enabled"; nametemplate=%s.pptm; priority=3 +application/vnd.ms-powerpoint.slideshow.macroEnabled.12; soffice --nologo --impress %s; edit=soffice --nologo --impress %s; test=test -n "$DISPLAY"; description="Office Open XML Presentation Slide Show with Macros Enabled"; nametemplate=%s.ppsm; priority=3 +application/vnd.ms-powerpoint.template.macroEnabled.12; soffice --nologo --impress %s; edit=soffice --nologo --impress %s; test=test -n "$DISPLAY"; description="Office Open XML Presentation Template with Macros Enabled"; nametemplate=%s.potm; priority=3 +application/vnd.openxmlformats-officedocument.presentationml.presentation; soffice --nologo --impress %s; edit=soffice --nologo --impress %s; test=test -n "$DISPLAY"; description="Office Open XML Presentation"; nametemplate=%s.pptx; priority=3 +application/vnd.openxmlformats-officedocument.presentationml.slideshow; soffice --nologo --impress %s; edit=soffice --nologo --impress %s; test=test -n "$DISPLAY"; description="Office Open XML Presentation Slide Show"; nametemplate=%s.ppsx; priority=3 +application/vnd.openxmlformats-officedocument.presentationml.template; soffice --nologo --impress %s; edit=soffice --nologo --impress %s; test=test -n "$DISPLAY"; description="Office Open XML Presentation Template"; nametemplate=%s.potx; priority=3 + +# Microsoft PowerPoint +application/vnd.ms-powerpoint; soffice --nologo --impress %s; edit=soffice --nologo --impress %s; test=test -n "$DISPLAY"; description="Microsoft PowerPoint Document"; nametemplate=%s.ppt; priority=3 + +# OASIS OpenDocument Format +application/vnd.oasis.opendocument.presentation; soffice --nologo --impress %s; edit=soffice --nologo --impress %s; print=soffice --nologo --impress -p %s; test=test -n "$DISPLAY"; description="OpenDocument Presentation"; nametemplate=%s.odp; priority=9 +application/vnd.oasis.opendocument.presentation-template; soffice --nologo --impress %s; edit=soffice --nologo --impress %s; print=soffice --nologo --impress -p %s; test=test -n "$DISPLAY"; description="OpenDocument Presentation Template"; nametemplate=%s.otp; priority=9 + +# OpenOffice.org 1.0 +application/vnd.sun.xml.impress; soffice --nologo --impress %s; edit=soffice --nologo --impress %s; test=test -n "$DISPLAY"; description="OpenOffice.org Presentation"; nametemplate=%s.sxi; priority=8 +application/vnd.sun.xml.impress.template; soffice --nologo --impress %s; edit=soffice --nologo --impress %s; test=test -n "$DISPLAY"; description="OpenOffice.org Presentation Template"; nametemplate=%s.sti; priority=8 + +# +### + diff --git a/debian/libreoffice-impress-nogui.ucf b/debian/libreoffice-impress-nogui.ucf new file mode 100644 index 00000000000..9a356136427 --- /dev/null +++ b/debian/libreoffice-impress-nogui.ucf @@ -0,0 +1 @@ +/usr/lib/libreoffice/share/.registry/impress.xcd /etc/libreoffice/registry/impress.xcd diff --git a/debian/libreoffice-impress.bug-control b/debian/libreoffice-impress.bug-control new file mode 100644 index 00000000000..116fcdbd609 --- /dev/null +++ b/debian/libreoffice-impress.bug-control @@ -0,0 +1 @@ +report-with: libreoffice-core libreoffice-draw fglrx-glx ia32-fglrx-glx nvidia-glx nvidia-glx-legacy diff --git a/debian/libreoffice-impress.lintian-overrides b/debian/libreoffice-impress.lintian-overrides new file mode 100644 index 00000000000..5df0b376ef9 --- /dev/null +++ b/debian/libreoffice-impress.lintian-overrides @@ -0,0 +1 @@ +libreoffice-impress: desktop-command-not-in-package usr/share/applications/libreoffice-impress.desktop libreoffice diff --git a/debian/libreoffice-impress.maintscript b/debian/libreoffice-impress.maintscript new file mode 100644 index 00000000000..06608cf8296 --- /dev/null +++ b/debian/libreoffice-impress.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-impress /usr/share/doc/libreoffice-core 1:6.4.0~alpha1~git20191013 diff --git a/debian/libreoffice-impress.manpages b/debian/libreoffice-impress.manpages new file mode 100644 index 00000000000..60ab514ba8f --- /dev/null +++ b/debian/libreoffice-impress.manpages @@ -0,0 +1 @@ +debian/tmp/usr/share/man/man1/loimpress.1.gz diff --git a/debian/libreoffice-impress.mime b/debian/libreoffice-impress.mime new file mode 100644 index 00000000000..ed8a11fd90b --- /dev/null +++ b/debian/libreoffice-impress.mime @@ -0,0 +1,25 @@ +### +# shared-mime-info + +# ECMA Office Open XML (Microsoft Office 2007) +application/vnd.ms-powerpoint.presentation.macroEnabled.12; soffice --nologo --impress %s; edit=soffice --nologo --impress %s; test=test -n "$DISPLAY"; description="Office Open XML Presentation with Macros Enabled"; nametemplate=%s.pptm; priority=3 +application/vnd.ms-powerpoint.slideshow.macroEnabled.12; soffice --nologo --impress %s; edit=soffice --nologo --impress %s; test=test -n "$DISPLAY"; description="Office Open XML Presentation Slide Show with Macros Enabled"; nametemplate=%s.ppsm; priority=3 +application/vnd.ms-powerpoint.template.macroEnabled.12; soffice --nologo --impress %s; edit=soffice --nologo --impress %s; test=test -n "$DISPLAY"; description="Office Open XML Presentation Template with Macros Enabled"; nametemplate=%s.potm; priority=3 +application/vnd.openxmlformats-officedocument.presentationml.presentation; soffice --nologo --impress %s; edit=soffice --nologo --impress %s; test=test -n "$DISPLAY"; description="Office Open XML Presentation"; nametemplate=%s.pptx; priority=3 +application/vnd.openxmlformats-officedocument.presentationml.slideshow; soffice --nologo --impress %s; edit=soffice --nologo --impress %s; test=test -n "$DISPLAY"; description="Office Open XML Presentation Slide Show"; nametemplate=%s.ppsx; priority=3 +application/vnd.openxmlformats-officedocument.presentationml.template; soffice --nologo --impress %s; edit=soffice --nologo --impress %s; test=test -n "$DISPLAY"; description="Office Open XML Presentation Template"; nametemplate=%s.potx; priority=3 + +# Microsoft PowerPoint +application/vnd.ms-powerpoint; soffice --nologo --impress %s; edit=soffice --nologo --impress %s; test=test -n "$DISPLAY"; description="Microsoft PowerPoint Document"; nametemplate=%s.ppt; priority=3 + +# OASIS OpenDocument Format +application/vnd.oasis.opendocument.presentation; soffice --nologo --impress %s; edit=soffice --nologo --impress %s; print=soffice --nologo --impress -p %s; test=test -n "$DISPLAY"; description="OpenDocument Presentation"; nametemplate=%s.odp; priority=9 +application/vnd.oasis.opendocument.presentation-template; soffice --nologo --impress %s; edit=soffice --nologo --impress %s; print=soffice --nologo --impress -p %s; test=test -n "$DISPLAY"; description="OpenDocument Presentation Template"; nametemplate=%s.otp; priority=9 + +# OpenOffice.org 1.0 +application/vnd.sun.xml.impress; soffice --nologo --impress %s; edit=soffice --nologo --impress %s; test=test -n "$DISPLAY"; description="OpenOffice.org Presentation"; nametemplate=%s.sxi; priority=8 +application/vnd.sun.xml.impress.template; soffice --nologo --impress %s; edit=soffice --nologo --impress %s; test=test -n "$DISPLAY"; description="OpenOffice.org Presentation Template"; nametemplate=%s.sti; priority=8 + +# +### + diff --git a/debian/libreoffice-impress.ucf b/debian/libreoffice-impress.ucf new file mode 100644 index 00000000000..a2680a010db --- /dev/null +++ b/debian/libreoffice-impress.ucf @@ -0,0 +1,2 @@ +/usr/lib/libreoffice/share/.registry/impress.xcd /etc/libreoffice/registry/impress.xcd +/usr/lib/libreoffice/share/.registry/ogltrans.xcd /etc/libreoffice/registry/ogltrans.xcd diff --git a/debian/libreoffice-java-common.maintscript b/debian/libreoffice-java-common.maintscript new file mode 100644 index 00000000000..38517c7819f --- /dev/null +++ b/debian/libreoffice-java-common.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-java-common /usr/share/doc/libreoffice-common 1:6.4.0~alpha1~git20191013 diff --git a/debian/libreoffice-kde5.maintscript b/debian/libreoffice-kde5.maintscript new file mode 100644 index 00000000000..1711748cc1c --- /dev/null +++ b/debian/libreoffice-kde5.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-kde5 /usr/share/doc/libreoffice-core 1:6.4.0~alpha1~git20191013 diff --git a/debian/libreoffice-kf5.maintscript b/debian/libreoffice-kf5.maintscript new file mode 100644 index 00000000000..37dbb42031e --- /dev/null +++ b/debian/libreoffice-kf5.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-kf5 /usr/share/doc/libreoffice-core 1:6.4.0~alpha1~git20191013 diff --git a/debian/libreoffice-l10n-af.maintscript b/debian/libreoffice-l10n-af.maintscript new file mode 100644 index 00000000000..525bb4cbe5b --- /dev/null +++ b/debian/libreoffice-l10n-af.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-af /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-am.maintscript b/debian/libreoffice-l10n-am.maintscript new file mode 100644 index 00000000000..2df6ddb2a11 --- /dev/null +++ b/debian/libreoffice-l10n-am.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-am /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-ar.maintscript b/debian/libreoffice-l10n-ar.maintscript new file mode 100644 index 00000000000..da522cadfaf --- /dev/null +++ b/debian/libreoffice-l10n-ar.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-ar /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-as.maintscript b/debian/libreoffice-l10n-as.maintscript new file mode 100644 index 00000000000..926ab90bf80 --- /dev/null +++ b/debian/libreoffice-l10n-as.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-as /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-ast.maintscript b/debian/libreoffice-l10n-ast.maintscript new file mode 100644 index 00000000000..df6ea667a14 --- /dev/null +++ b/debian/libreoffice-l10n-ast.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-ast /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-be.maintscript b/debian/libreoffice-l10n-be.maintscript new file mode 100644 index 00000000000..53b4bd4f20c --- /dev/null +++ b/debian/libreoffice-l10n-be.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-be /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-bg.maintscript b/debian/libreoffice-l10n-bg.maintscript new file mode 100644 index 00000000000..e8ba2180efa --- /dev/null +++ b/debian/libreoffice-l10n-bg.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-bg /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-bn.maintscript b/debian/libreoffice-l10n-bn.maintscript new file mode 100644 index 00000000000..78da9606611 --- /dev/null +++ b/debian/libreoffice-l10n-bn.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-bn /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-br.maintscript b/debian/libreoffice-l10n-br.maintscript new file mode 100644 index 00000000000..d92f24031e2 --- /dev/null +++ b/debian/libreoffice-l10n-br.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-br /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-bs.maintscript b/debian/libreoffice-l10n-bs.maintscript new file mode 100644 index 00000000000..1178e5a468f --- /dev/null +++ b/debian/libreoffice-l10n-bs.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-bs /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-ca.maintscript b/debian/libreoffice-l10n-ca.maintscript new file mode 100644 index 00000000000..471887d422d --- /dev/null +++ b/debian/libreoffice-l10n-ca.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-ca /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-cs.maintscript b/debian/libreoffice-l10n-cs.maintscript new file mode 100644 index 00000000000..29d0c0ab488 --- /dev/null +++ b/debian/libreoffice-l10n-cs.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-cs /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-cy.maintscript b/debian/libreoffice-l10n-cy.maintscript new file mode 100644 index 00000000000..3b30f967db0 --- /dev/null +++ b/debian/libreoffice-l10n-cy.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-cy /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-da.maintscript b/debian/libreoffice-l10n-da.maintscript new file mode 100644 index 00000000000..3cbf1d478ed --- /dev/null +++ b/debian/libreoffice-l10n-da.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-da /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-de.maintscript b/debian/libreoffice-l10n-de.maintscript new file mode 100644 index 00000000000..68063de7be6 --- /dev/null +++ b/debian/libreoffice-l10n-de.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-de /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-dz.maintscript b/debian/libreoffice-l10n-dz.maintscript new file mode 100644 index 00000000000..76c519778f7 --- /dev/null +++ b/debian/libreoffice-l10n-dz.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-dz /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-el.maintscript b/debian/libreoffice-l10n-el.maintscript new file mode 100644 index 00000000000..f9f850b3806 --- /dev/null +++ b/debian/libreoffice-l10n-el.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-el /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-en-gb.maintscript b/debian/libreoffice-l10n-en-gb.maintscript new file mode 100644 index 00000000000..f0ecabcb91a --- /dev/null +++ b/debian/libreoffice-l10n-en-gb.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-en-gb /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-en-us.maintscript b/debian/libreoffice-l10n-en-us.maintscript new file mode 100644 index 00000000000..edba2604b30 --- /dev/null +++ b/debian/libreoffice-l10n-en-us.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-en-us /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-en-za.maintscript b/debian/libreoffice-l10n-en-za.maintscript new file mode 100644 index 00000000000..1897e7b1ebd --- /dev/null +++ b/debian/libreoffice-l10n-en-za.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-en-za /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-eo.maintscript b/debian/libreoffice-l10n-eo.maintscript new file mode 100644 index 00000000000..67345012c76 --- /dev/null +++ b/debian/libreoffice-l10n-eo.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-eo /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-es.maintscript b/debian/libreoffice-l10n-es.maintscript new file mode 100644 index 00000000000..e3287c665bf --- /dev/null +++ b/debian/libreoffice-l10n-es.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-es /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-et.maintscript b/debian/libreoffice-l10n-et.maintscript new file mode 100644 index 00000000000..c3e25bb4085 --- /dev/null +++ b/debian/libreoffice-l10n-et.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-et /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-eu.maintscript b/debian/libreoffice-l10n-eu.maintscript new file mode 100644 index 00000000000..a503c6d2430 --- /dev/null +++ b/debian/libreoffice-l10n-eu.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-eu /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-fa.maintscript b/debian/libreoffice-l10n-fa.maintscript new file mode 100644 index 00000000000..4b7029651ff --- /dev/null +++ b/debian/libreoffice-l10n-fa.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-fa /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-fi.maintscript b/debian/libreoffice-l10n-fi.maintscript new file mode 100644 index 00000000000..cf6d4494e40 --- /dev/null +++ b/debian/libreoffice-l10n-fi.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-fi /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-fr.maintscript b/debian/libreoffice-l10n-fr.maintscript new file mode 100644 index 00000000000..6d3134977e7 --- /dev/null +++ b/debian/libreoffice-l10n-fr.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-fr /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-ga.maintscript b/debian/libreoffice-l10n-ga.maintscript new file mode 100644 index 00000000000..165629c369a --- /dev/null +++ b/debian/libreoffice-l10n-ga.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-ga /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-gd.maintscript b/debian/libreoffice-l10n-gd.maintscript new file mode 100644 index 00000000000..4748b698bdd --- /dev/null +++ b/debian/libreoffice-l10n-gd.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-gd /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-gl.maintscript b/debian/libreoffice-l10n-gl.maintscript new file mode 100644 index 00000000000..4abfef89e38 --- /dev/null +++ b/debian/libreoffice-l10n-gl.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-gl /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-gu.maintscript b/debian/libreoffice-l10n-gu.maintscript new file mode 100644 index 00000000000..d28f9b66835 --- /dev/null +++ b/debian/libreoffice-l10n-gu.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-gu /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-gug.maintscript b/debian/libreoffice-l10n-gug.maintscript new file mode 100644 index 00000000000..22caeda6f2a --- /dev/null +++ b/debian/libreoffice-l10n-gug.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-gug /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-he.maintscript b/debian/libreoffice-l10n-he.maintscript new file mode 100644 index 00000000000..48c588cb7f3 --- /dev/null +++ b/debian/libreoffice-l10n-he.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-he /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-hi.maintscript b/debian/libreoffice-l10n-hi.maintscript new file mode 100644 index 00000000000..c1aafd373c4 --- /dev/null +++ b/debian/libreoffice-l10n-hi.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-hi /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-hr.maintscript b/debian/libreoffice-l10n-hr.maintscript new file mode 100644 index 00000000000..7924ca0526a --- /dev/null +++ b/debian/libreoffice-l10n-hr.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-hr /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-hu.maintscript b/debian/libreoffice-l10n-hu.maintscript new file mode 100644 index 00000000000..042765e9d1a --- /dev/null +++ b/debian/libreoffice-l10n-hu.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-hu /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-id.maintscript b/debian/libreoffice-l10n-id.maintscript new file mode 100644 index 00000000000..e18551b2567 --- /dev/null +++ b/debian/libreoffice-l10n-id.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-id /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-in.lintian-overrides b/debian/libreoffice-l10n-in.lintian-overrides new file mode 100644 index 00000000000..5b67277e05e --- /dev/null +++ b/debian/libreoffice-l10n-in.lintian-overrides @@ -0,0 +1,2 @@ +# this is a metapackage, so actually "metapackages" is correct, IMHO +libreoffice-l10n-in: wrong-section-according-to-package-name libreoffice-l10n-in => localization diff --git a/debian/libreoffice-l10n-in.maintscript b/debian/libreoffice-l10n-in.maintscript new file mode 100644 index 00000000000..230d48c463b --- /dev/null +++ b/debian/libreoffice-l10n-in.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-in /usr/share/doc/libreoffice-common 1:6.4.0-1 diff --git a/debian/libreoffice-l10n-is.maintscript b/debian/libreoffice-l10n-is.maintscript new file mode 100644 index 00000000000..3631a6a5e29 --- /dev/null +++ b/debian/libreoffice-l10n-is.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-is /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-it.maintscript b/debian/libreoffice-l10n-it.maintscript new file mode 100644 index 00000000000..18be5b42753 --- /dev/null +++ b/debian/libreoffice-l10n-it.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-it /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-ja.maintscript b/debian/libreoffice-l10n-ja.maintscript new file mode 100644 index 00000000000..7ce61040abf --- /dev/null +++ b/debian/libreoffice-l10n-ja.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-ja /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-ka.maintscript b/debian/libreoffice-l10n-ka.maintscript new file mode 100644 index 00000000000..869811523d3 --- /dev/null +++ b/debian/libreoffice-l10n-ka.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-ka /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-kk.maintscript b/debian/libreoffice-l10n-kk.maintscript new file mode 100644 index 00000000000..b749dd7befa --- /dev/null +++ b/debian/libreoffice-l10n-kk.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-kk /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-km.maintscript b/debian/libreoffice-l10n-km.maintscript new file mode 100644 index 00000000000..30a3839251c --- /dev/null +++ b/debian/libreoffice-l10n-km.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-km /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-kmr.maintscript b/debian/libreoffice-l10n-kmr.maintscript new file mode 100644 index 00000000000..d7405d3c537 --- /dev/null +++ b/debian/libreoffice-l10n-kmr.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-kmr /usr/share/doc/libreoffice-common 1:6.4.0-1 diff --git a/debian/libreoffice-l10n-kn.maintscript b/debian/libreoffice-l10n-kn.maintscript new file mode 100644 index 00000000000..6d4a37380e2 --- /dev/null +++ b/debian/libreoffice-l10n-kn.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-kn /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-ko.maintscript b/debian/libreoffice-l10n-ko.maintscript new file mode 100644 index 00000000000..2054fa9e9c3 --- /dev/null +++ b/debian/libreoffice-l10n-ko.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-ko /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-lt.maintscript b/debian/libreoffice-l10n-lt.maintscript new file mode 100644 index 00000000000..1cac226ffe1 --- /dev/null +++ b/debian/libreoffice-l10n-lt.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-lt /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-lv.maintscript b/debian/libreoffice-l10n-lv.maintscript new file mode 100644 index 00000000000..7df01156315 --- /dev/null +++ b/debian/libreoffice-l10n-lv.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-lv /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-mk.maintscript b/debian/libreoffice-l10n-mk.maintscript new file mode 100644 index 00000000000..597b3b75b39 --- /dev/null +++ b/debian/libreoffice-l10n-mk.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-mk /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-ml.maintscript b/debian/libreoffice-l10n-ml.maintscript new file mode 100644 index 00000000000..1c377d55840 --- /dev/null +++ b/debian/libreoffice-l10n-ml.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-ml /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-mn.maintscript b/debian/libreoffice-l10n-mn.maintscript new file mode 100644 index 00000000000..d1a6d0eb918 --- /dev/null +++ b/debian/libreoffice-l10n-mn.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-mn /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-mr.maintscript b/debian/libreoffice-l10n-mr.maintscript new file mode 100644 index 00000000000..e2c755e9261 --- /dev/null +++ b/debian/libreoffice-l10n-mr.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-mr /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-nb.maintscript b/debian/libreoffice-l10n-nb.maintscript new file mode 100644 index 00000000000..db282443662 --- /dev/null +++ b/debian/libreoffice-l10n-nb.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-nb /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-ne.maintscript b/debian/libreoffice-l10n-ne.maintscript new file mode 100644 index 00000000000..464ae4b6596 --- /dev/null +++ b/debian/libreoffice-l10n-ne.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-ne /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-nl.maintscript b/debian/libreoffice-l10n-nl.maintscript new file mode 100644 index 00000000000..700d4976abc --- /dev/null +++ b/debian/libreoffice-l10n-nl.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-nl /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-nn.maintscript b/debian/libreoffice-l10n-nn.maintscript new file mode 100644 index 00000000000..b5f2d1700a6 --- /dev/null +++ b/debian/libreoffice-l10n-nn.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-nn /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-nr.maintscript b/debian/libreoffice-l10n-nr.maintscript new file mode 100644 index 00000000000..b619763e618 --- /dev/null +++ b/debian/libreoffice-l10n-nr.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-nr /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-nso.maintscript b/debian/libreoffice-l10n-nso.maintscript new file mode 100644 index 00000000000..bb4394ed373 --- /dev/null +++ b/debian/libreoffice-l10n-nso.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-nso /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-oc.maintscript b/debian/libreoffice-l10n-oc.maintscript new file mode 100644 index 00000000000..b71f2f337b0 --- /dev/null +++ b/debian/libreoffice-l10n-oc.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-oc /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-om.maintscript b/debian/libreoffice-l10n-om.maintscript new file mode 100644 index 00000000000..976dc254be2 --- /dev/null +++ b/debian/libreoffice-l10n-om.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-om /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-or.maintscript b/debian/libreoffice-l10n-or.maintscript new file mode 100644 index 00000000000..b3b20c55b04 --- /dev/null +++ b/debian/libreoffice-l10n-or.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-or /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-pa-in.maintscript b/debian/libreoffice-l10n-pa-in.maintscript new file mode 100644 index 00000000000..3cf7b3bfb58 --- /dev/null +++ b/debian/libreoffice-l10n-pa-in.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-pa-in /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-pl.maintscript b/debian/libreoffice-l10n-pl.maintscript new file mode 100644 index 00000000000..08b60dc449d --- /dev/null +++ b/debian/libreoffice-l10n-pl.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-pl /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-pt-br.maintscript b/debian/libreoffice-l10n-pt-br.maintscript new file mode 100644 index 00000000000..f7541ad333e --- /dev/null +++ b/debian/libreoffice-l10n-pt-br.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-pt-br /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-pt.maintscript b/debian/libreoffice-l10n-pt.maintscript new file mode 100644 index 00000000000..fb7c10cd21c --- /dev/null +++ b/debian/libreoffice-l10n-pt.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-pt /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-ro.maintscript b/debian/libreoffice-l10n-ro.maintscript new file mode 100644 index 00000000000..0d5acb33b06 --- /dev/null +++ b/debian/libreoffice-l10n-ro.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-ro /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-ru.maintscript b/debian/libreoffice-l10n-ru.maintscript new file mode 100644 index 00000000000..1956e1c32f4 --- /dev/null +++ b/debian/libreoffice-l10n-ru.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-ru /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-rw.maintscript b/debian/libreoffice-l10n-rw.maintscript new file mode 100644 index 00000000000..545193530b2 --- /dev/null +++ b/debian/libreoffice-l10n-rw.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-rw /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-si.maintscript b/debian/libreoffice-l10n-si.maintscript new file mode 100644 index 00000000000..092ada5e4e9 --- /dev/null +++ b/debian/libreoffice-l10n-si.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-si /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-sk.maintscript b/debian/libreoffice-l10n-sk.maintscript new file mode 100644 index 00000000000..f2913ab5acf --- /dev/null +++ b/debian/libreoffice-l10n-sk.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-sk /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-sl.maintscript b/debian/libreoffice-l10n-sl.maintscript new file mode 100644 index 00000000000..301770cf62b --- /dev/null +++ b/debian/libreoffice-l10n-sl.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-sl /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-sr.maintscript b/debian/libreoffice-l10n-sr.maintscript new file mode 100644 index 00000000000..761543ff8e5 --- /dev/null +++ b/debian/libreoffice-l10n-sr.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-sr /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-ss.maintscript b/debian/libreoffice-l10n-ss.maintscript new file mode 100644 index 00000000000..349d0a7839a --- /dev/null +++ b/debian/libreoffice-l10n-ss.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-ss /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-st.maintscript b/debian/libreoffice-l10n-st.maintscript new file mode 100644 index 00000000000..e5a9f05ee59 --- /dev/null +++ b/debian/libreoffice-l10n-st.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-st /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-sv.maintscript b/debian/libreoffice-l10n-sv.maintscript new file mode 100644 index 00000000000..0f6f76c0f9b --- /dev/null +++ b/debian/libreoffice-l10n-sv.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-sv /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-ta.maintscript b/debian/libreoffice-l10n-ta.maintscript new file mode 100644 index 00000000000..799d8537247 --- /dev/null +++ b/debian/libreoffice-l10n-ta.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-ta /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-te.maintscript b/debian/libreoffice-l10n-te.maintscript new file mode 100644 index 00000000000..ed90e6e43ac --- /dev/null +++ b/debian/libreoffice-l10n-te.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-te /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-tg.maintscript b/debian/libreoffice-l10n-tg.maintscript new file mode 100644 index 00000000000..6c51ccf65be --- /dev/null +++ b/debian/libreoffice-l10n-tg.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-tg /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-th.maintscript b/debian/libreoffice-l10n-th.maintscript new file mode 100644 index 00000000000..fa87878f140 --- /dev/null +++ b/debian/libreoffice-l10n-th.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-th /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-tn.maintscript b/debian/libreoffice-l10n-tn.maintscript new file mode 100644 index 00000000000..b64f5ded3c4 --- /dev/null +++ b/debian/libreoffice-l10n-tn.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-tn /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-tr.maintscript b/debian/libreoffice-l10n-tr.maintscript new file mode 100644 index 00000000000..b41b6e9ae04 --- /dev/null +++ b/debian/libreoffice-l10n-tr.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-tr /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-ts.maintscript b/debian/libreoffice-l10n-ts.maintscript new file mode 100644 index 00000000000..b6596f519d2 --- /dev/null +++ b/debian/libreoffice-l10n-ts.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-ts /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-ug.maintscript b/debian/libreoffice-l10n-ug.maintscript new file mode 100644 index 00000000000..7a295b33fa2 --- /dev/null +++ b/debian/libreoffice-l10n-ug.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-ug /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-uk.maintscript b/debian/libreoffice-l10n-uk.maintscript new file mode 100644 index 00000000000..2436b0da19e --- /dev/null +++ b/debian/libreoffice-l10n-uk.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-uk /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-uz.maintscript b/debian/libreoffice-l10n-uz.maintscript new file mode 100644 index 00000000000..bf8c49dd17b --- /dev/null +++ b/debian/libreoffice-l10n-uz.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-uz /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-ve.maintscript b/debian/libreoffice-l10n-ve.maintscript new file mode 100644 index 00000000000..1c772524a52 --- /dev/null +++ b/debian/libreoffice-l10n-ve.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-ve /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-vi.maintscript b/debian/libreoffice-l10n-vi.maintscript new file mode 100644 index 00000000000..0d15db97c40 --- /dev/null +++ b/debian/libreoffice-l10n-vi.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-vi /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-xh.maintscript b/debian/libreoffice-l10n-xh.maintscript new file mode 100644 index 00000000000..3803ac4ffca --- /dev/null +++ b/debian/libreoffice-l10n-xh.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-xh /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-za.lintian-overrides b/debian/libreoffice-l10n-za.lintian-overrides new file mode 100644 index 00000000000..3c1bc8861b3 --- /dev/null +++ b/debian/libreoffice-l10n-za.lintian-overrides @@ -0,0 +1,2 @@ +# this is a metapackage, so actually "metapackages" is correct, IMHO +libreoffice-l10n-za: wrong-section-according-to-package-name libreoffice-l10n-za => localization diff --git a/debian/libreoffice-l10n-za.maintscript b/debian/libreoffice-l10n-za.maintscript new file mode 100644 index 00000000000..8a568e69e61 --- /dev/null +++ b/debian/libreoffice-l10n-za.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-za /usr/share/doc/libreoffice-common 1:6.4.0-1 diff --git a/debian/libreoffice-l10n-zh-cn.maintscript b/debian/libreoffice-l10n-zh-cn.maintscript new file mode 100644 index 00000000000..a74dbb38dd1 --- /dev/null +++ b/debian/libreoffice-l10n-zh-cn.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-zh-cn /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-zh-tw.maintscript b/debian/libreoffice-l10n-zh-tw.maintscript new file mode 100644 index 00000000000..e2b741c2661 --- /dev/null +++ b/debian/libreoffice-l10n-zh-tw.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-zh-tw /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n-zu.maintscript b/debian/libreoffice-l10n-zu.maintscript new file mode 100644 index 00000000000..d796b050006 --- /dev/null +++ b/debian/libreoffice-l10n-zu.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-l10n-zu /usr/share/doc/libreoffice-common 1:6.4.0~rc1~git20191209 diff --git a/debian/libreoffice-l10n.ucf.in b/debian/libreoffice-l10n.ucf.in new file mode 100644 index 00000000000..ed228509b74 --- /dev/null +++ b/debian/libreoffice-l10n.ucf.in @@ -0,0 +1,3 @@ +/usr/lib/libreoffice/share/.registry/Langpack-@ISO@.xcd /etc/libreoffice/registry/Langpack-@ISO@.xcd +/usr/lib/libreoffice/share/.registry/res/fcfg_langpack_@ISO@.xcd /etc/libreoffice/registry/res/fcfg_langpack_@ISO@.xcd +/usr/lib/libreoffice/share/.registry/res/registry_@ISO@.xcd /etc/libreoffice/registry/res/registry_@ISO@.xcd diff --git a/debian/libreoffice-librelogo.ucf b/debian/libreoffice-librelogo.ucf new file mode 100644 index 00000000000..e2300cf795d --- /dev/null +++ b/debian/libreoffice-librelogo.ucf @@ -0,0 +1 @@ +/usr/lib/libreoffice/share/.registry/librelogo.xcd /etc/libreoffice/registry/librelogo.xcd diff --git a/debian/libreoffice-math-nogui.bug-control b/debian/libreoffice-math-nogui.bug-control new file mode 100644 index 00000000000..1ac405f9788 --- /dev/null +++ b/debian/libreoffice-math-nogui.bug-control @@ -0,0 +1 @@ +report-with: libreoffice-core diff --git a/debian/libreoffice-math-nogui.mime b/debian/libreoffice-math-nogui.mime new file mode 100644 index 00000000000..ea648287795 --- /dev/null +++ b/debian/libreoffice-math-nogui.mime @@ -0,0 +1,14 @@ +### +# shared-mime-info + +# Generic +text/mathml; soffice --nologo --math %s; edit=soffice --nologo --math %s; test=test -n "$DISPLAY"; description="MathML Formula"; nametemplate=%s.mml; priority=3 + +# OASIS OpenDocument Format +application/vnd.oasis.opendocument.formula; soffice --nologo --math %s; edit=soffice --nologo --math %s; print=soffice --nologo --math -p %s; test=test -n "$DISPLAY"; description="OpenDocument Formula"; nametemplate=%s.odf; priority=9 + +# OpenOffice.org 1.0 +application/vnd.sun.xml.math; soffice --nologo --math %s; edit=soffice --nologo --math %s; test=test -n "$DISPLAY"; description="OpenOffice.org Formula"; nametemplate=%s.sxm; priority=8 + +# +### diff --git a/debian/libreoffice-math-nogui.ucf b/debian/libreoffice-math-nogui.ucf new file mode 100644 index 00000000000..3ee48a87f1c --- /dev/null +++ b/debian/libreoffice-math-nogui.ucf @@ -0,0 +1 @@ +/usr/lib/libreoffice/share/.registry/math.xcd /etc/libreoffice/registry/math.xcd diff --git a/debian/libreoffice-math.bug-control b/debian/libreoffice-math.bug-control new file mode 100644 index 00000000000..1ac405f9788 --- /dev/null +++ b/debian/libreoffice-math.bug-control @@ -0,0 +1 @@ +report-with: libreoffice-core diff --git a/debian/libreoffice-math.lintian-overrides b/debian/libreoffice-math.lintian-overrides new file mode 100644 index 00000000000..bf3665b50c3 --- /dev/null +++ b/debian/libreoffice-math.lintian-overrides @@ -0,0 +1 @@ +libreoffice-math: desktop-command-not-in-package usr/share/applications/libreoffice-math.desktop libreoffice diff --git a/debian/libreoffice-math.maintscript b/debian/libreoffice-math.maintscript new file mode 100644 index 00000000000..9dbb1675652 --- /dev/null +++ b/debian/libreoffice-math.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-math /usr/share/doc/libreoffice-core 1:6.4.0~alpha1~git20191013 diff --git a/debian/libreoffice-math.manpages b/debian/libreoffice-math.manpages new file mode 100644 index 00000000000..6798b1e6b4e --- /dev/null +++ b/debian/libreoffice-math.manpages @@ -0,0 +1 @@ +debian/tmp/usr/share/man/man1/lomath.1.gz diff --git a/debian/libreoffice-math.mime b/debian/libreoffice-math.mime new file mode 100644 index 00000000000..ea648287795 --- /dev/null +++ b/debian/libreoffice-math.mime @@ -0,0 +1,14 @@ +### +# shared-mime-info + +# Generic +text/mathml; soffice --nologo --math %s; edit=soffice --nologo --math %s; test=test -n "$DISPLAY"; description="MathML Formula"; nametemplate=%s.mml; priority=3 + +# OASIS OpenDocument Format +application/vnd.oasis.opendocument.formula; soffice --nologo --math %s; edit=soffice --nologo --math %s; print=soffice --nologo --math -p %s; test=test -n "$DISPLAY"; description="OpenDocument Formula"; nametemplate=%s.odf; priority=9 + +# OpenOffice.org 1.0 +application/vnd.sun.xml.math; soffice --nologo --math %s; edit=soffice --nologo --math %s; test=test -n "$DISPLAY"; description="OpenOffice.org Formula"; nametemplate=%s.sxm; priority=8 + +# +### diff --git a/debian/libreoffice-math.ucf b/debian/libreoffice-math.ucf new file mode 100644 index 00000000000..3ee48a87f1c --- /dev/null +++ b/debian/libreoffice-math.ucf @@ -0,0 +1 @@ +/usr/lib/libreoffice/share/.registry/math.xcd /etc/libreoffice/registry/math.xcd diff --git a/debian/libreoffice-mysql-connector.maintscript b/debian/libreoffice-mysql-connector.maintscript new file mode 100644 index 00000000000..92715c940b7 --- /dev/null +++ b/debian/libreoffice-mysql-connector.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-mysql-connector /usr/share/doc/libreoffice-core 1:6.4.0~alpha1~git20191013 diff --git a/debian/libreoffice-nlpsolver.bug-script.in b/debian/libreoffice-nlpsolver.bug-script.in new file mode 100755 index 00000000000..84085335315 --- /dev/null +++ b/debian/libreoffice-nlpsolver.bug-script.in @@ -0,0 +1,2 @@ +#!/bin/sh +/usr/lib/libreoffice/program/unopkg list --bundled com.sun.star.comp.Calc.NLPSolver >&3 diff --git a/debian/libreoffice-nlpsolver.lintian-overrides b/debian/libreoffice-nlpsolver.lintian-overrides new file mode 100644 index 00000000000..447d371403f --- /dev/null +++ b/debian/libreoffice-nlpsolver.lintian-overrides @@ -0,0 +1 @@ +libreoffice-nlpsolver: jar-not-in-usr-share usr/lib/libreoffice/share/extensions/nlpsolver/help/*/help.jar diff --git a/debian/libreoffice-officebean.maintscript b/debian/libreoffice-officebean.maintscript new file mode 100644 index 00000000000..eec3d3bc150 --- /dev/null +++ b/debian/libreoffice-officebean.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-officebean /usr/share/doc/libreoffice-core 1:6.4.0~alpha1~git20191013 diff --git a/debian/libreoffice-plasma.maintscript b/debian/libreoffice-plasma.maintscript new file mode 100644 index 00000000000..8c7e556f54b --- /dev/null +++ b/debian/libreoffice-plasma.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-plasma /usr/share/doc/libreoffice-core 1:6.4.0~alpha1~git20191013 diff --git a/debian/libreoffice-qt5.maintscript b/debian/libreoffice-qt5.maintscript new file mode 100644 index 00000000000..4e11d0bcdc7 --- /dev/null +++ b/debian/libreoffice-qt5.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-qt5 /usr/share/doc/libreoffice-core 1:6.4.0~alpha1~git20191013 diff --git a/debian/libreoffice-report-builder-bin.maintscript b/debian/libreoffice-report-builder-bin.maintscript new file mode 100644 index 00000000000..c31cc3b6c40 --- /dev/null +++ b/debian/libreoffice-report-builder-bin.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-report-builder-bin /usr/share/doc/libreoffice-core 1:6.4.0~alpha1~git20191013 diff --git a/debian/libreoffice-report-builder.bug-control b/debian/libreoffice-report-builder.bug-control new file mode 100644 index 00000000000..48ef942e313 --- /dev/null +++ b/debian/libreoffice-report-builder.bug-control @@ -0,0 +1 @@ +report-with: libreoffice-base diff --git a/debian/libreoffice-report-builder.maintscript b/debian/libreoffice-report-builder.maintscript new file mode 100644 index 00000000000..d2d3e3371e3 --- /dev/null +++ b/debian/libreoffice-report-builder.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-report-builder /usr/share/doc/libreoffice-common 1:6.4.0~alpha1~git20191013 diff --git a/debian/libreoffice-report-builder.ucf b/debian/libreoffice-report-builder.ucf new file mode 100644 index 00000000000..60247c8f4aa --- /dev/null +++ b/debian/libreoffice-report-builder.ucf @@ -0,0 +1 @@ +/usr/lib/libreoffice/share/.registry/reportbuilder.xcd /etc/libreoffice/registry/reportbuilder.xcd diff --git a/debian/libreoffice-script-provider-bsh.maintscript b/debian/libreoffice-script-provider-bsh.maintscript new file mode 100644 index 00000000000..0c4d00fde2f --- /dev/null +++ b/debian/libreoffice-script-provider-bsh.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-script-provider-bsh /usr/share/doc/libreoffice-common 1:6.4.0~alpha1~git20191013 diff --git a/debian/libreoffice-script-provider-js.maintscript b/debian/libreoffice-script-provider-js.maintscript new file mode 100644 index 00000000000..db3fd3c0191 --- /dev/null +++ b/debian/libreoffice-script-provider-js.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-script-provider-js /usr/share/doc/libreoffice-common 1:6.4.0~alpha1~git20191013 diff --git a/debian/libreoffice-script-provider-python.bug-control b/debian/libreoffice-script-provider-python.bug-control new file mode 100644 index 00000000000..38da481c1f2 --- /dev/null +++ b/debian/libreoffice-script-provider-python.bug-control @@ -0,0 +1 @@ +report-with: python-uno python3-uno diff --git a/debian/libreoffice-script-provider-python.maintscript b/debian/libreoffice-script-provider-python.maintscript new file mode 100644 index 00000000000..64f0371e035 --- /dev/null +++ b/debian/libreoffice-script-provider-python.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-script-provider-python /usr/share/doc/libreoffice-common 1:6.4.0~alpha1~git20191013 diff --git a/debian/libreoffice-sdbc-firebird.NEWS b/debian/libreoffice-sdbc-firebird.NEWS new file mode 100644 index 00000000000..00d810308fa --- /dev/null +++ b/debian/libreoffice-sdbc-firebird.NEWS @@ -0,0 +1,21 @@ +libreoffice (1:5.3.0~alpha1-1) experimental; urgency=low + + * LibreOffice switched from Firebird 2.5 to Firebird 3. Unfortunately + the format used by the Firebird 2.5 code (fdb - the native on-disk format) + is NOT compatible with the "new" one (the archive format). LibreOffice 5.3 + can NOT read older .odbs having .fdb embedded. + + Some future firebird version might have a way to convert itself/make LO + able to convert but until then you need to convert manually as follows: + + You need the gbak tool from firebird2.5: + https://packages.debian.org/search?searchon=contents&keywords=gbak&mode=exactfilename&suite=oldstable&arch=any + + Then execute: + unzip -d oldFirebird.odb temp; + gbak -b temp/database/firebird.fdb temp/database/firebird.fbk; + rm temp/database/firebird.fdb + zip -FSr oldFirebird.odb temp; + rm -r temp; + + -- Rene Engelhard Mon, 28 Nov 2016 10:27:15 +0200 diff --git a/debian/libreoffice-sdbc-firebird.maintscript b/debian/libreoffice-sdbc-firebird.maintscript new file mode 100644 index 00000000000..b59864812c9 --- /dev/null +++ b/debian/libreoffice-sdbc-firebird.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-sdbc-firebird /usr/share/doc/libreoffice-core 1:6.4.0~alpha1~git20191013 diff --git a/debian/libreoffice-sdbc-hsqldb.maintscript b/debian/libreoffice-sdbc-hsqldb.maintscript new file mode 100644 index 00000000000..007b4a273f1 --- /dev/null +++ b/debian/libreoffice-sdbc-hsqldb.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-sdbc-hsqldb /usr/share/doc/libreoffice-core 1:6.4.0~alpha1~git20191013 diff --git a/debian/libreoffice-sdbc-mysql.maintscript b/debian/libreoffice-sdbc-mysql.maintscript new file mode 100644 index 00000000000..7e4102688b0 --- /dev/null +++ b/debian/libreoffice-sdbc-mysql.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-sdbc-mysql /usr/share/doc/libreoffice-core 1:6.4.0~alpha1~git20191013 diff --git a/debian/libreoffice-sdbc-postgresql.maintscript b/debian/libreoffice-sdbc-postgresql.maintscript new file mode 100644 index 00000000000..923b4b4248d --- /dev/null +++ b/debian/libreoffice-sdbc-postgresql.maintscript @@ -0,0 +1,2 @@ +symlink_to_dir /usr/share/doc/libreoffice-sdbc-postgresql /usr/share/doc/libreoffice-core 1:6.4.0~alpha1~git20191013 +rm_conffile /etc/libreoffice/postgresql-sdbc.ini 1:6.4.0~alpha1~git20191027 diff --git a/debian/libreoffice-sdbc-postgresql.ucf b/debian/libreoffice-sdbc-postgresql.ucf new file mode 100644 index 00000000000..81b5d510f2c --- /dev/null +++ b/debian/libreoffice-sdbc-postgresql.ucf @@ -0,0 +1 @@ +/usr/lib/libreoffice/share/.registry/postgresql.xcd /etc/libreoffice/registry/postgresql.xcd diff --git a/debian/libreoffice-style-breeze.maintscript b/debian/libreoffice-style-breeze.maintscript new file mode 100644 index 00000000000..a124622c3fa --- /dev/null +++ b/debian/libreoffice-style-breeze.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-style-breeze /usr/share/doc/libreoffice-common 1:6.4.0~alpha1~git20191013 diff --git a/debian/libreoffice-style-colibre.maintscript b/debian/libreoffice-style-colibre.maintscript new file mode 100644 index 00000000000..26f3ed60c10 --- /dev/null +++ b/debian/libreoffice-style-colibre.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-style-colibre /usr/share/doc/libreoffice-common 1:6.4.0~alpha1~git20191013 diff --git a/debian/libreoffice-style-elementary.maintscript b/debian/libreoffice-style-elementary.maintscript new file mode 100644 index 00000000000..82d78895a5f --- /dev/null +++ b/debian/libreoffice-style-elementary.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-style-elementary /usr/share/doc/libreoffice-common 1:6.4.0~alpha1~git20191013 diff --git a/debian/libreoffice-style-karasa-jaga.maintscript b/debian/libreoffice-style-karasa-jaga.maintscript new file mode 100644 index 00000000000..c3e34cfbbee --- /dev/null +++ b/debian/libreoffice-style-karasa-jaga.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-style-karasa-jaga /usr/share/doc/libreoffice-common 1:6.4.0~alpha1~git20191013 diff --git a/debian/libreoffice-style-sifr.maintscript b/debian/libreoffice-style-sifr.maintscript new file mode 100644 index 00000000000..ff95171c6e5 --- /dev/null +++ b/debian/libreoffice-style-sifr.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-style-sifr /usr/share/doc/libreoffice-common 1:6.4.0~alpha1~git20191013 diff --git a/debian/libreoffice-style-tango.maintscript b/debian/libreoffice-style-tango.maintscript new file mode 100644 index 00000000000..886e586861f --- /dev/null +++ b/debian/libreoffice-style-tango.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-style-tango /usr/share/doc/libreoffice-common 1:6.4.0~alpha1~git20191013 diff --git a/debian/libreoffice-subsequentcheckbase.maintscript b/debian/libreoffice-subsequentcheckbase.maintscript new file mode 100644 index 00000000000..e4f4547d183 --- /dev/null +++ b/debian/libreoffice-subsequentcheckbase.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-subsequentcheckbase /usr/share/doc/libreoffice-common 1:6.4.0~alpha1~git20191013 diff --git a/debian/libreoffice-wiki-publisher.bug-script.in b/debian/libreoffice-wiki-publisher.bug-script.in new file mode 100755 index 00000000000..9497e5ca079 --- /dev/null +++ b/debian/libreoffice-wiki-publisher.bug-script.in @@ -0,0 +1,2 @@ +#!/bin/sh +/usr/lib/libreoffice/program/unopkg list --bundled com.sun.wiki-publisher >&3 diff --git a/debian/libreoffice-wiki-publisher.lintian-overrides b/debian/libreoffice-wiki-publisher.lintian-overrides new file mode 100644 index 00000000000..82dc8202233 --- /dev/null +++ b/debian/libreoffice-wiki-publisher.lintian-overrides @@ -0,0 +1 @@ +libreoffice-wiki-publisher: jar-not-in-usr-share usr/lib/libreoffice/share/extensions/wiki-publisher/help/*/help.jar diff --git a/debian/libreoffice-writer-nogui.bug-control b/debian/libreoffice-writer-nogui.bug-control new file mode 100644 index 00000000000..1ac405f9788 --- /dev/null +++ b/debian/libreoffice-writer-nogui.bug-control @@ -0,0 +1 @@ +report-with: libreoffice-core diff --git a/debian/libreoffice-writer-nogui.mime b/debian/libreoffice-writer-nogui.mime new file mode 100644 index 00000000000..fb38a25029d --- /dev/null +++ b/debian/libreoffice-writer-nogui.mime @@ -0,0 +1,37 @@ +### +# shared-mime-info + +# Generic +application/rtf; soffice --nologo --writer %s; edit=soffice --nologo --writer %s; test=test -n "$DISPLAY"; description="Rich Text Format"; nametemplate=%s.rtf; priority=3 +application/x-extension-txt; soffice --nologo --writer %s; edit=soffice --nologo --writer %s; test=test -n "$DISPLAY"; description="Plain Text Document"; nametemplate=%s.txt; priority=3 +application/x-t602; soffice --nologo --writer %s; edit=soffice --nologo --writer %s; test=test -n "$DISPLAY"; description="T602 Document"; nametemplate=%s.602; priority=3 + +# Corel WordPerfect +application/vnd.wordperfect; soffice --nologo --writer %s; edit=soffice --nologo --writer %s; test=test -n "$DISPLAY"; description="WordPerfect Document"; nametemplate=%s.wp; priority=3 + +# ECMA Office Open XML (Microsoft Office 2007) +application/vnd.ms-word.document.macroEnabled.12; soffice --nologo --writer %s; edit=soffice --nologo --writer %s; test=test -n "$DISPLAY"; description="Office Open XML Document with Macros Enabled"; nametemplate=%s.docm; priority=3 +application/vnd.ms-word.template.macroEnabled.12; soffice --nologo --writer %s; edit=soffice --nologo --writer %s; test=test -n "$DISPLAY"; description="Office Open XML Document Template with Macros Enabled"; nametemplate=%s.dotm; priority=3 +application/vnd.openxmlformats-officedocument.wordprocessingml.document; soffice --nologo --writer %s; edit=soffice --nologo --writer %s; test=test -n "$DISPLAY"; description="Office Open XML Document"; nametemplate=%s.docx; priority=3 +application/vnd.openxmlformats-officedocument.wordprocessingml.template; soffice --nologo --writer %s; edit=soffice --nologo --writer %s; test=test -n "$DISPLAY"; description="Office Open XML Document Template"; nametemplate=%s.dotx; priority=3 + +# Microsoft Word +application/msword; soffice --nologo --writer %s; edit=soffice --nologo --writer %s; test=test -n "$DISPLAY"; description="Microsoft Word Document"; nametemplate=%s.doc; priority=3 + +# Microsoft Works +application/vnd.ms-works; soffice --nologo --writer %s; edit=soffice --nologo --writer %s; test=test -n "$DISPLAY"; description="Microsoft Works Document"; nametemplate=%s.wps; priority=3 + +# OASIS OpenDocument Format +application/vnd.oasis.opendocument.text; soffice --nologo --writer %s; edit=soffice --nologo --writer %s; print=soffice --nologo --writer -p %s; test=test -n "$DISPLAY"; description="OpenDocument Text Document"; nametemplate=%s.odt; priority=9 +application/vnd.oasis.opendocument.text-master; soffice --nologo --global %s; edit=soffice --nologo --writer %s; print=soffice --nologo --writer -p %s; test=test -n "$DISPLAY"; description="OpenDocument Master Document"; nametemplate=%s.odm; priority=9 +application/vnd.oasis.opendocument.text-template; soffice --nologo --writer %s; edit=soffice --nologo --writer %s; print=soffice --nologo --writer -p %s; test=test -n "$DISPLAY"; description="OpenDocument Text Document Template"; nametemplate=%s.ott; priority=9 +application/vnd.oasis.opendocument.text-web; soffice --nologo --web %s; edit=soffice --nologo --web %s; print=soffice --nologo --web -p %s; test=test -n "$DISPLAY"; description="OpenDocument HTML Document Template"; nametemplate=%s.oth; priority=9 + +# OpenOffice.org 1.0 +application/vnd.sun.xml.writer; soffice --nologo --writer %s; edit=soffice --nologo --writer %s; description="OpenOffice.org Text Document"; nametemplate=%s.sxw; priority=8 +application/vnd.sun.xml.writer.global; soffice --nologo --global %s; edit=soffice --nologo --writer %s; description="OpenOffice.org Master Document"; nametemplate=%s.sxg; priority=8 +application/vnd.sun.xml.writer.template; soffice --nologo --writer %s; edit=soffice --nologo --writer %s; description="OpenOffice.org Text Document Template"; nametemplate=%s.stw; priority=8 + +# +### + diff --git a/debian/libreoffice-writer-nogui.ucf b/debian/libreoffice-writer-nogui.ucf new file mode 100644 index 00000000000..1b9239ce8f3 --- /dev/null +++ b/debian/libreoffice-writer-nogui.ucf @@ -0,0 +1 @@ +/usr/lib/libreoffice/share/.registry/writer.xcd /etc/libreoffice/registry/writer.xcd diff --git a/debian/libreoffice-writer.bug-control b/debian/libreoffice-writer.bug-control new file mode 100644 index 00000000000..1ac405f9788 --- /dev/null +++ b/debian/libreoffice-writer.bug-control @@ -0,0 +1 @@ +report-with: libreoffice-core diff --git a/debian/libreoffice-writer.lintian-overrides b/debian/libreoffice-writer.lintian-overrides new file mode 100644 index 00000000000..08563077e14 --- /dev/null +++ b/debian/libreoffice-writer.lintian-overrides @@ -0,0 +1 @@ +libreoffice-writer: desktop-command-not-in-package usr/share/applications/libreoffice-writer.desktop libreoffice diff --git a/debian/libreoffice-writer.maintscript b/debian/libreoffice-writer.maintscript new file mode 100644 index 00000000000..829e8be5d3d --- /dev/null +++ b/debian/libreoffice-writer.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreoffice-writer /usr/share/doc/libreoffice-core 1:6.4.0~alpha1~git20191013 diff --git a/debian/libreoffice-writer.manpages b/debian/libreoffice-writer.manpages new file mode 100644 index 00000000000..53c4e248a63 --- /dev/null +++ b/debian/libreoffice-writer.manpages @@ -0,0 +1,3 @@ +debian/tmp/usr/share/man/man1/loweb.1.gz +debian/tmp/usr/share/man/man1/lowriter.1.gz + diff --git a/debian/libreoffice-writer.mime b/debian/libreoffice-writer.mime new file mode 100644 index 00000000000..fb38a25029d --- /dev/null +++ b/debian/libreoffice-writer.mime @@ -0,0 +1,37 @@ +### +# shared-mime-info + +# Generic +application/rtf; soffice --nologo --writer %s; edit=soffice --nologo --writer %s; test=test -n "$DISPLAY"; description="Rich Text Format"; nametemplate=%s.rtf; priority=3 +application/x-extension-txt; soffice --nologo --writer %s; edit=soffice --nologo --writer %s; test=test -n "$DISPLAY"; description="Plain Text Document"; nametemplate=%s.txt; priority=3 +application/x-t602; soffice --nologo --writer %s; edit=soffice --nologo --writer %s; test=test -n "$DISPLAY"; description="T602 Document"; nametemplate=%s.602; priority=3 + +# Corel WordPerfect +application/vnd.wordperfect; soffice --nologo --writer %s; edit=soffice --nologo --writer %s; test=test -n "$DISPLAY"; description="WordPerfect Document"; nametemplate=%s.wp; priority=3 + +# ECMA Office Open XML (Microsoft Office 2007) +application/vnd.ms-word.document.macroEnabled.12; soffice --nologo --writer %s; edit=soffice --nologo --writer %s; test=test -n "$DISPLAY"; description="Office Open XML Document with Macros Enabled"; nametemplate=%s.docm; priority=3 +application/vnd.ms-word.template.macroEnabled.12; soffice --nologo --writer %s; edit=soffice --nologo --writer %s; test=test -n "$DISPLAY"; description="Office Open XML Document Template with Macros Enabled"; nametemplate=%s.dotm; priority=3 +application/vnd.openxmlformats-officedocument.wordprocessingml.document; soffice --nologo --writer %s; edit=soffice --nologo --writer %s; test=test -n "$DISPLAY"; description="Office Open XML Document"; nametemplate=%s.docx; priority=3 +application/vnd.openxmlformats-officedocument.wordprocessingml.template; soffice --nologo --writer %s; edit=soffice --nologo --writer %s; test=test -n "$DISPLAY"; description="Office Open XML Document Template"; nametemplate=%s.dotx; priority=3 + +# Microsoft Word +application/msword; soffice --nologo --writer %s; edit=soffice --nologo --writer %s; test=test -n "$DISPLAY"; description="Microsoft Word Document"; nametemplate=%s.doc; priority=3 + +# Microsoft Works +application/vnd.ms-works; soffice --nologo --writer %s; edit=soffice --nologo --writer %s; test=test -n "$DISPLAY"; description="Microsoft Works Document"; nametemplate=%s.wps; priority=3 + +# OASIS OpenDocument Format +application/vnd.oasis.opendocument.text; soffice --nologo --writer %s; edit=soffice --nologo --writer %s; print=soffice --nologo --writer -p %s; test=test -n "$DISPLAY"; description="OpenDocument Text Document"; nametemplate=%s.odt; priority=9 +application/vnd.oasis.opendocument.text-master; soffice --nologo --global %s; edit=soffice --nologo --writer %s; print=soffice --nologo --writer -p %s; test=test -n "$DISPLAY"; description="OpenDocument Master Document"; nametemplate=%s.odm; priority=9 +application/vnd.oasis.opendocument.text-template; soffice --nologo --writer %s; edit=soffice --nologo --writer %s; print=soffice --nologo --writer -p %s; test=test -n "$DISPLAY"; description="OpenDocument Text Document Template"; nametemplate=%s.ott; priority=9 +application/vnd.oasis.opendocument.text-web; soffice --nologo --web %s; edit=soffice --nologo --web %s; print=soffice --nologo --web -p %s; test=test -n "$DISPLAY"; description="OpenDocument HTML Document Template"; nametemplate=%s.oth; priority=9 + +# OpenOffice.org 1.0 +application/vnd.sun.xml.writer; soffice --nologo --writer %s; edit=soffice --nologo --writer %s; description="OpenOffice.org Text Document"; nametemplate=%s.sxw; priority=8 +application/vnd.sun.xml.writer.global; soffice --nologo --global %s; edit=soffice --nologo --writer %s; description="OpenOffice.org Master Document"; nametemplate=%s.sxg; priority=8 +application/vnd.sun.xml.writer.template; soffice --nologo --writer %s; edit=soffice --nologo --writer %s; description="OpenOffice.org Text Document Template"; nametemplate=%s.stw; priority=8 + +# +### + diff --git a/debian/libreoffice-writer.ucf b/debian/libreoffice-writer.ucf new file mode 100644 index 00000000000..1b9239ce8f3 --- /dev/null +++ b/debian/libreoffice-writer.ucf @@ -0,0 +1 @@ +/usr/lib/libreoffice/share/.registry/writer.xcd /etc/libreoffice/registry/writer.xcd diff --git a/debian/libreoffice.bug-control b/debian/libreoffice.bug-control new file mode 100644 index 00000000000..21ad6ad79a4 --- /dev/null +++ b/debian/libreoffice.bug-control @@ -0,0 +1,2 @@ +report-with: libreoffice-core libreoffice-writer libreoffice-calc libreoffice-base libreoffice-draw libreoffice-impress libreoffice-math + diff --git a/debian/libreofficekit-data.maintscript b/debian/libreofficekit-data.maintscript new file mode 100644 index 00000000000..3c2a9168289 --- /dev/null +++ b/debian/libreofficekit-data.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/libreofficekit-data /usr/share/doc/libreoffice-common 1:6.4.0~alpha1~git20191013 diff --git a/debian/libreofficekit-dev.docs b/debian/libreofficekit-dev.docs new file mode 100644 index 00000000000..d9f2643255b --- /dev/null +++ b/debian/libreofficekit-dev.docs @@ -0,0 +1 @@ +libreofficekit/README diff --git a/debian/libridl-java.lintian-overrides b/debian/libridl-java.lintian-overrides new file mode 100644 index 00000000000..73d383acd5e --- /dev/null +++ b/debian/libridl-java.lintian-overrides @@ -0,0 +1 @@ +libridl-java: codeless-jar usr/share/java/ridl-*.jar diff --git a/debian/libridl-java.poms b/debian/libridl-java.poms new file mode 100644 index 00000000000..40880baf584 --- /dev/null +++ b/debian/libridl-java.poms @@ -0,0 +1,28 @@ +# List of POM files for the package +# Format of this file is: +# [option]* +# where option can be: +# --ignore: ignore this POM and its artifact if any +# --ignore-pom: don't install the POM. To use on POM files that are created +# temporarily for certain artifacts such as Javadoc jars. [mh_install, mh_installpoms] +# --no-parent: remove the tag from the POM +# --package=: an alternative package to use when installing this POM +# and its artifact +# --has-package-version: to indicate that the original version of the POM is the same as the upstream part +# of the version for the package. +# --keep-elements=: a list of XML elements to keep in the POM +# during a clean operation with mh_cleanpom or mh_installpom +# --artifact=: path to the build artifact associated with this POM, +# it will be installed when using the command mh_install. [mh_install] +# --java-lib: install the jar into /usr/share/java to comply with Debian +# packaging guidelines +# --usj-name=: name to use when installing the library in /usr/share/java +# --usj-version=: version to use when installing the library in /usr/share/java +# --no-usj-versionless: don't install the versionless link in /usr/share/java +# --dest-jar=: the destination for the real jar. +# It will be installed with mh_install. [mh_install] +# --classifier=: Optional, the classifier for the jar. Empty by default. +# --site-xml=: Optional, the location for site.xml if it needs to be installed. +# Empty by default. [mh_install] +# +debian/pom.ridl.xml --no-parent --has-package-version diff --git a/debian/libuno-cppu3.symbols b/debian/libuno-cppu3.symbols new file mode 100644 index 00000000000..ff5b936500b --- /dev/null +++ b/debian/libuno-cppu3.symbols @@ -0,0 +1,9 @@ +libuno_cppu.so.3 libuno-cppu3 #MINVER# + (symver)UDK_3_0_0 1.4.0 + (symver)UDK_3.1 1.4.0 + (symver)UDK_3.2 1.4.0 + (symver)UDK_3.3 1.4.0 + (symver)LIBO_UDK_4.4 4.4.0~alpha +# add new stuff BELOW this line +# and note that the stuff above HAS NO epoch but the +# below HAS diff --git a/debian/libuno-cppuhelpergcc3-3.lintian-overrides b/debian/libuno-cppuhelpergcc3-3.lintian-overrides new file mode 100644 index 00000000000..569c47cfd4c --- /dev/null +++ b/debian/libuno-cppuhelpergcc3-3.lintian-overrides @@ -0,0 +1 @@ +libuno-cppuhelpergcc3-3: symbols-declares-dependency-on-other-package uno-libs-private diff --git a/debian/libuno-cppuhelpergcc3-3.symbols b/debian/libuno-cppuhelpergcc3-3.symbols new file mode 100644 index 00000000000..41510b3e80c --- /dev/null +++ b/debian/libuno-cppuhelpergcc3-3.symbols @@ -0,0 +1,15 @@ +libuno_cppuhelpergcc3.so.3 libuno-cppuhelpergcc3-3 #MINVER#, uno-libs-private + (symver)UDK_3_0_0 1.4.0 + (symver)UDK_3.1 1.4.0 + (symver)UDK_3.2 1.4.0 + (symver)UDK_3.3 1.4.0 + (symver)UDK_3.4 1.4.0 + (symver)UDK_3.5 1.4.0 + (symver)UDK_3.6 1.7.0 + (symver)UDK_3.7 3.4.0 + (symver)UDK_3.8 3.5.0~beta + (symver)LIBO_UDK_3.9 4.0.0~alpha + (symver)LIBO_UDK_5.3 5.3.0~alpha +# add new stuff BELOW this line +# and note that the stuff above HAS NO epoch but the +# below HAS diff --git a/debian/libuno-purpenvhelpergcc3-3.symbols b/debian/libuno-purpenvhelpergcc3-3.symbols new file mode 100644 index 00000000000..a6e7f57f0c7 --- /dev/null +++ b/debian/libuno-purpenvhelpergcc3-3.symbols @@ -0,0 +1,5 @@ +libuno_purpenvhelpergcc3.so.3 libuno-purpenvhelpergcc3-3 #MINVER# + (symver)UDK_3_0_0 1.4.0 +# add new stuff BELOW this line +# and note that the stuff above HAS NO epoch but the +# below HAS diff --git a/debian/libuno-sal3.symbols b/debian/libuno-sal3.symbols new file mode 100644 index 00000000000..60ee56aa7b9 --- /dev/null +++ b/debian/libuno-sal3.symbols @@ -0,0 +1,38 @@ +libuno_sal.so.3 libuno-sal3 #MINVER# + (symver)UDK_3_0_0 1.4.0 + (symver)UDK_3.1 1.4.0 + (symver)UDK_3.2 1.4.0 + (symver)UDK_3.3 1.4.0 + (symver)UDK_3.4 1.4.0 + (symver)UDK_3.5 1.4.0 + (symver)UDK_3.6 1.4.0 + (symver)UDK_3.7 1.4.0 + (symver)UDK_3.8 1.4.0 + (symver)UDK_3.9 1.5.0 + (symver)UDK_3.10 1.6.0 + UDK_3.11@UDK_3.11 1.7.0+LibO3.3.0~beta3 + osl_clearEnvironment@UDK_3.11 1.7.0+LibO3.3.0~beta3 + osl_setEnvironment@UDK_3.11 1.7.0+LibO3.3.0~beta3 + (symver)UDK_3.11 1.8.0 + (symver)PRIVATE_1.0 3.3.0~ + (symver)PRIVATE_1.1 3.3.0~ + (symver)LIBO_UDK_3.5 3.5.0~beta + (symver)PRIVATE_1.2 3.5.0~beta + (symver)PRIVATE_textenc.1 3.6.0~beta + (symver)LIBO_UDK_3.6 4.0.0~alpha + (symver)LIBO_UDK_4.0 4.0.0~beta + (symver)LIBO_UDK_4.1 4.1.0~alpha + (symver)LIBO_UDK_4.2 4.2.0~rc1 + (symver)LIBO_UDK_4.3 4.3.0~alpha + (symver)LIBO_UDK_5.0 5.0.0~alpha + (symver)LIBO_UDK_5.1 5.1.0~alpha + (symver)LIBO_UDK_5.2 5.2.0~alpha + (symver)LIBO_UDK_5.3 5.3.0~alpha + (symver)LIBO_UDK_6.2 6.2.0~alpha + (symver)PRIVATE_1.3 5.4.0~alpha + (symver)PRIVATE_1.4 6.0.0~alpha + (symver)PRIVATE_1.5 6.1.0~alpha + (symver)PRIVATE_1.6 6.4.0~beta +# add new stuff BELOW this line +# and note that the stuff above HAS NO epoch but the +# below HAS diff --git a/debian/libuno-salhelpergcc3-3.symbols b/debian/libuno-salhelpergcc3-3.symbols new file mode 100644 index 00000000000..e57ccbff6bc --- /dev/null +++ b/debian/libuno-salhelpergcc3-3.symbols @@ -0,0 +1,7 @@ +libuno_salhelpergcc3.so.3 libuno-salhelpergcc3-3 #MINVER# + (symver)UDK_3_0_0 1.4.0 + (symver)UDK_3.1 1.4.0 + (symver)LIBO_UDK_3.6 3.6.0~beta +# add new stuff BELOW this line +# and note that the stuff above HAS NO epoch but the +# below HAS diff --git a/debian/libunoil-java.lintian-overrides b/debian/libunoil-java.lintian-overrides new file mode 100644 index 00000000000..3c5ae462fc2 --- /dev/null +++ b/debian/libunoil-java.lintian-overrides @@ -0,0 +1 @@ +libunoil-java: codeless-jar usr/share/java/unoil-*.jar diff --git a/debian/libunoil-java.poms b/debian/libunoil-java.poms new file mode 100644 index 00000000000..fcc4eec6e4c --- /dev/null +++ b/debian/libunoil-java.poms @@ -0,0 +1,28 @@ +# List of POM files for the package +# Format of this file is: +# [option]* +# where option can be: +# --ignore: ignore this POM and its artifact if any +# --ignore-pom: don't install the POM. To use on POM files that are created +# temporarily for certain artifacts such as Javadoc jars. [mh_install, mh_installpoms] +# --no-parent: remove the tag from the POM +# --package=: an alternative package to use when installing this POM +# and its artifact +# --has-package-version: to indicate that the original version of the POM is the same as the upstream part +# of the version for the package. +# --keep-elements=: a list of XML elements to keep in the POM +# during a clean operation with mh_cleanpom or mh_installpom +# --artifact=: path to the build artifact associated with this POM, +# it will be installed when using the command mh_install. [mh_install] +# --java-lib: install the jar into /usr/share/java to comply with Debian +# packaging guidelines +# --usj-name=: name to use when installing the library in /usr/share/java +# --usj-version=: version to use when installing the library in /usr/share/java +# --no-usj-versionless: don't install the versionless link in /usr/share/java +# --dest-jar=: the destination for the real jar. +# It will be installed with mh_install. [mh_install] +# --classifier=: Optional, the classifier for the jar. Empty by default. +# --site-xml=: Optional, the location for site.xml if it needs to be installed. +# Empty by default. [mh_install] +# +debian/pom.unoil.xml --no-parent --has-package-version diff --git a/debian/libunoloader-java.poms b/debian/libunoloader-java.poms new file mode 100644 index 00000000000..e89019b4b1f --- /dev/null +++ b/debian/libunoloader-java.poms @@ -0,0 +1,28 @@ +# List of POM files for the package +# Format of this file is: +# [option]* +# where option can be: +# --ignore: ignore this POM and its artifact if any +# --ignore-pom: don't install the POM. To use on POM files that are created +# temporarily for certain artifacts such as Javadoc jars. [mh_install, mh_installpoms] +# --no-parent: remove the tag from the POM +# --package=: an alternative package to use when installing this POM +# and its artifact +# --has-package-version: to indicate that the original version of the POM is the same as the upstream part +# of the version for the package. +# --keep-elements=: a list of XML elements to keep in the POM +# during a clean operation with mh_cleanpom or mh_installpom +# --artifact=: path to the build artifact associated with this POM, +# it will be installed when using the command mh_install. [mh_install] +# --java-lib: install the jar into /usr/share/java to comply with Debian +# packaging guidelines +# --usj-name=: name to use when installing the library in /usr/share/java +# --usj-version=: version to use when installing the library in /usr/share/java +# --no-usj-versionless: don't install the versionless link in /usr/share/java +# --dest-jar=: the destination for the real jar. +# It will be installed with mh_install. [mh_install] +# --classifier=: Optional, the classifier for the jar. Empty by default. +# --site-xml=: Optional, the location for site.xml if it needs to be installed. +# Empty by default. [mh_install] +# +debian/pom.unoloader.xml --no-parent --has-package-version diff --git a/debian/patches/0001-CVE-2022-26305-compare-authors-using-Thumbprint.patch b/debian/patches/0001-CVE-2022-26305-compare-authors-using-Thumbprint.patch new file mode 100644 index 00000000000..e02b110f8fd --- /dev/null +++ b/debian/patches/0001-CVE-2022-26305-compare-authors-using-Thumbprint.patch @@ -0,0 +1,63 @@ +From 77f30ada1156ca1e1357776fea8e9dc113f6898d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Thu, 3 Mar 2022 14:22:37 +0000 +Subject: [PATCH 1/4] CVE-2022-26305 compare authors using Thumbprint + +Change-Id: I338f58eb07cbf0a3d13a7dafdaddac09252a8546 +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130929 +Tested-by: Jenkins +Reviewed-by: Miklos Vajna +(cherry picked from commit 65442205b5b274ad309308162f150f8d41648f72) +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130866 +Reviewed-by: Michael Stahl +(cherry picked from commit a7aaa78acea4c1d51283c2fce54ff9f5339026f8) +--- + .../component/documentdigitalsignatures.cxx | 23 +++++++++++++++---- + 1 file changed, 19 insertions(+), 4 deletions(-) + +diff --git a/xmlsecurity/source/component/documentdigitalsignatures.cxx b/xmlsecurity/source/component/documentdigitalsignatures.cxx +index b9066ea92cac..5a21c8421bec 100644 +--- a/xmlsecurity/source/component/documentdigitalsignatures.cxx ++++ b/xmlsecurity/source/component/documentdigitalsignatures.cxx +@@ -19,9 +19,10 @@ + + #include + +-#include ++#include + #include + #include ++#include + #include + #include + #include +@@ -666,9 +667,23 @@ sal_Bool DocumentDigitalSignatures::isAuthorTrusted( + Sequence< SvtSecurityOptions::Certificate > aTrustedAuthors = SvtSecurityOptions().GetTrustedAuthors(); + + return std::any_of(aTrustedAuthors.begin(), aTrustedAuthors.end(), +- [&xAuthor, &sSerialNum](const SvtSecurityOptions::Certificate& rAuthor) { +- return xmlsecurity::EqualDistinguishedNames(rAuthor[0], xAuthor->getIssuerName()) +- && ( rAuthor[1] == sSerialNum ); ++ [this, &xAuthor, &sSerialNum](const SvtSecurityOptions::Certificate& rAuthor) { ++ if (!xmlsecurity::EqualDistinguishedNames(rAuthor[0], xAuthor->getIssuerName())) ++ return false; ++ if (rAuthor[1] != sSerialNum) ++ return false; ++ ++ DocumentSignatureManager aSignatureManager(mxCtx, {}); ++ if (!aSignatureManager.init()) ++ return false; ++ uno::Reference xCert = aSignatureManager.getSecurityEnvironment()->createCertificateFromAscii(rAuthor[2]); ++ ++ auto pAuthor = dynamic_cast(xAuthor.get()); ++ auto pCert = dynamic_cast(xCert.get()); ++ if (pAuthor && pCert) ++ return pCert->getSHA256Thumbprint() == pAuthor->getSHA256Thumbprint(); ++ ++ return xCert->getSHA1Thumbprint() == xAuthor->getSHA1Thumbprint(); + }); + } + +-- +2.37.1 + diff --git a/debian/patches/0002-CVE-2022-26307-make-hash-encoding-match-decoding.patch b/debian/patches/0002-CVE-2022-26307-make-hash-encoding-match-decoding.patch new file mode 100644 index 00000000000..d56b5ea04d6 --- /dev/null +++ b/debian/patches/0002-CVE-2022-26307-make-hash-encoding-match-decoding.patch @@ -0,0 +1,183 @@ +From 780c42cdd8006dc60e281be2fe6566f101e909bc Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Mon, 21 Mar 2022 20:58:34 +0000 +Subject: [PATCH 2/4] CVE-2022-26307 make hash encoding match decoding + +Seeing as old versions of the hash may be in the users config, add a +StorageVersion field to the office config Passwords section which +defaults to 0 to indicate the old hash is in use. + +Try the old varient when StorageVersion is 0. When a new encoded master +password it set write StorageVersion of 1 to indicate a new hash is in +use and use the new style when StorageVersion is 1. + +Change-Id: I3174c37a5891bfc849984e0ec5c2c392b9c6e7b1 +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132080 +Tested-by: Jenkins +Reviewed-by: Stephan Bergmann +(cherry picked from commit e890f54dbac57f3ab5acf4fbd31222095d3e8ab6) +--- + .../schema/org/openoffice/Office/Common.xcs | 6 +++ + .../passwordcontainer/passwordcontainer.cxx | 45 +++++++++++++++++-- + .../passwordcontainer/passwordcontainer.hxx | 6 +++ + uui/source/iahndl-authentication.cxx | 5 ++- + 4 files changed, 57 insertions(+), 5 deletions(-) + +diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs +index 9097c23c3c6a..922efc33cca7 100644 +--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs ++++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs +@@ -942,6 +942,12 @@ + + false + ++ ++ ++ Specifies what version of encoding scheme the password container uses. ++ ++ 0 ++ + + + Specifies if there is a valid master password. +diff --git a/svl/source/passwordcontainer/passwordcontainer.cxx b/svl/source/passwordcontainer/passwordcontainer.cxx +index 51fb129cddb1..b674844f91d3 100644 +--- a/svl/source/passwordcontainer/passwordcontainer.cxx ++++ b/svl/source/passwordcontainer/passwordcontainer.cxx +@@ -17,7 +17,6 @@ + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +- + #include "passwordcontainer.hxx" + + #include +@@ -259,6 +258,23 @@ bool StorageItem::useStorage() + return aResult; + } + ++sal_Int32 StorageItem::getStorageVersion() ++{ ++ Sequence aNodeNames { "StorageVersion" }; ++ ++ Sequence< Any > aPropertyValues = ConfigItem::GetProperties( aNodeNames ); ++ ++ if( aPropertyValues.getLength() != aNodeNames.getLength() ) ++ { ++ OSL_FAIL( "Problems during reading" ); ++ return 0; ++ } ++ ++ sal_Int32 nResult = 0; ++ aPropertyValues[0] >>= nResult; ++ ++ return nResult; ++} + + bool StorageItem::getEncodedMP( OUString& aResult ) + { +@@ -291,15 +307,17 @@ bool StorageItem::getEncodedMP( OUString& aResult ) + + void StorageItem::setEncodedMP( const OUString& aEncoded, bool bAcceptEmpty ) + { +- Sequence< OUString > sendNames(2); +- Sequence< uno::Any > sendVals(2); ++ Sequence< OUString > sendNames(3); ++ Sequence< uno::Any > sendVals(3); + + sendNames[0] = "HasMaster"; + sendNames[1] = "Master"; ++ sendNames[2] = "StorageVersion"; + + bool bHasMaster = ( !aEncoded.isEmpty() || bAcceptEmpty ); + sendVals[0] <<= bHasMaster; + sendVals[1] <<= aEncoded; ++ sendVals[2] <<= nCurrentStorageVersion; + + ConfigItem::SetModified(); + ConfigItem::PutProperties( sendNames, sendVals ); +@@ -800,6 +818,18 @@ OUString PasswordContainer::RequestPasswordFromUser( PasswordRequestMode aRMode, + return aResult; + } + ++// Mangle the key to match an old bug ++static OUString ReencodeAsOldHash(const OUString& rPass) ++{ ++ OUStringBuffer aBuffer; ++ for (int ind = 0; ind < RTL_DIGEST_LENGTH_MD5; ++ind) ++ { ++ unsigned char i = static_cast(rPass.copy(ind * 2, 2).toUInt32(16)); ++ aBuffer.append(static_cast< sal_Unicode >('a' + (i >> 4))); ++ aBuffer.append(static_cast< sal_Unicode >('a' + (i & 15))); ++ } ++ return aBuffer.makeStringAndClear(); ++} + + OUString const & PasswordContainer::GetMasterPassword( const Reference< XInteractionHandler >& aHandler ) + { +@@ -838,6 +868,9 @@ OUString const & PasswordContainer::GetMasterPassword( const Reference< XInterac + } + else + { ++ if (m_pStorageFile->getStorageVersion() == 0) ++ aPass = ReencodeAsOldHash(aPass); ++ + std::vector< OUString > aRM( DecodePasswords( aEncodedMP, aPass, aRMode ) ); + if( aRM.empty() || aPass != aRM[0] ) + { +@@ -1042,6 +1075,12 @@ sal_Bool SAL_CALL PasswordContainer::authorizateWithMasterPassword( const uno::R + + do { + aPass = RequestPasswordFromUser( aRMode, xTmpHandler ); ++ ++ if (!aPass.isEmpty() && m_pStorageFile->getStorageVersion() == 0) ++ { ++ aPass = ReencodeAsOldHash(aPass); ++ } ++ + bResult = ( !aPass.isEmpty() && aPass == m_aMasterPasswd ); + aRMode = PasswordRequestMode_PASSWORD_REENTER; // further questions with error notification + } while( !bResult && !aPass.isEmpty() ); +diff --git a/svl/source/passwordcontainer/passwordcontainer.hxx b/svl/source/passwordcontainer/passwordcontainer.hxx +index 46ffec888602..bf43b5903602 100644 +--- a/svl/source/passwordcontainer/passwordcontainer.hxx ++++ b/svl/source/passwordcontainer/passwordcontainer.hxx +@@ -168,6 +168,10 @@ public: + typedef ::std::pair< const OUString, ::std::vector< NamePassRecord > > PairUrlRecord; + typedef ::std::map< OUString, ::std::vector< NamePassRecord > > PassMap; + ++// org.openoffice.Office.Common/Passwords/StorageVersion bump if details of ++// how password details are saved changes. Enables migration from previous ++// schemes. ++constexpr sal_Int32 nCurrentStorageVersion = 1; + + class PasswordContainer; + +@@ -195,6 +195,8 @@ + void remove( const OUString& url, const OUString& rec ); + void clear(); + ++ sal_Int32 getStorageVersion(); ++ + bool getEncodedMP( OUString& aResult ); + void setEncodedMP( const OUString& aResult, bool bAcceptEnmpty = false ); + void setUseStorage( bool bUse ); +diff --git a/uui/source/iahndl-authentication.cxx b/uui/source/iahndl-authentication.cxx +index ad975d3f9ae7..951f0b8a1c6b 100644 +--- a/uui/source/iahndl-authentication.cxx ++++ b/uui/source/iahndl-authentication.cxx +@@ -436,8 +436,9 @@ executeMasterPasswordDialog( + OUStringBuffer aBuffer; + for (sal_uInt8 i : aKey) + { +- aBuffer.append(static_cast< sal_Unicode >('a' + (i >> 4))); +- aBuffer.append(static_cast< sal_Unicode >('a' + (i & 15))); ++ // match PasswordContainer::DecodePasswords aMasterPasswd.copy(index * 2, 2).toUInt32(16)); ++ aBuffer.append(OUString::number(i >> 4, 16)); ++ aBuffer.append(OUString::number(i & 15, 16)); + } + rInfo.SetPassword(aBuffer.makeStringAndClear()); + } +-- +2.37.1 + diff --git a/debian/patches/0003-CVE-2022-26306-add-Initialization-Vectors-to-passwor.patch b/debian/patches/0003-CVE-2022-26306-add-Initialization-Vectors-to-passwor.patch new file mode 100644 index 00000000000..b65b3530cf4 --- /dev/null +++ b/debian/patches/0003-CVE-2022-26306-add-Initialization-Vectors-to-passwor.patch @@ -0,0 +1,583 @@ +From e809625c2ca9f0c026aab9b5c2d13ced628c13e9 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Tue, 22 Mar 2022 17:22:22 +0000 +Subject: [PATCH 3/4] CVE-2022-26306 add Initialization Vectors to password + storage + +old ones default to the current all zero case and continue to work +as before + +Change-Id: I6fe3b02fafcce1b5e7133e77e76a5118177d77af +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131974 +Tested-by: Jenkins +Reviewed-by: Michael Stahl +(cherry picked from commit 192fa1e3bfc6269f2ebb91716471485a56074aea) +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132306 +Reviewed-by: Thorsten Behrens +(cherry picked from commit ab77587ec300f5c30084471000663c46ddf25dad) +--- + .../schema/org/openoffice/Office/Common.xcs | 10 ++ + .../passwordcontainer/passwordcontainer.cxx | 127 ++++++++++++------ + .../passwordcontainer/passwordcontainer.hxx | 63 +++++++-- + 3 files changed, 151 insertions(+), 49 deletions(-) + +diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs +index 922efc33cca7..8d87d00d5369 100644 +--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs ++++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs +@@ -27,6 +27,11 @@ + + Contains a container for passwords. + ++ ++ ++ Contains an initialization vector for the password encryption. ++ ++ + + + Contains a password encoded with the master password. +@@ -954,6 +959,11 @@ + + false + ++ ++ ++ Contains an initialization vector for the master password encryption. ++ ++ + + + Contains the master password encrypted by itself. +diff --git a/svl/source/passwordcontainer/passwordcontainer.cxx b/svl/source/passwordcontainer/passwordcontainer.cxx +index b674844f91d3..ef79470a2cb6 100644 +--- a/svl/source/passwordcontainer/passwordcontainer.cxx ++++ b/svl/source/passwordcontainer/passwordcontainer.cxx +@@ -181,15 +181,18 @@ PassMap StorageItem::getInfo() + + Sequence< OUString > aNodeNames = ConfigItem::GetNodeNames( "Store" ); + sal_Int32 aNodeCount = aNodeNames.getLength(); +- Sequence< OUString > aPropNames( aNodeCount ); ++ Sequence< OUString > aPropNames( aNodeCount * 2); + + std::transform(aNodeNames.begin(), aNodeNames.end(), aPropNames.begin(), + [](const OUString& rName) -> OUString { + return "Store/Passwordstorage['" + rName + "']/Password"; }); ++ std::transform(aNodeNames.begin(), aNodeNames.end(), aPropNames.getArray() + aNodeCount, ++ [](const OUString& rName) -> OUString { ++ return "Store/Passwordstorage['" + rName + "']/InitializationVector"; }); + + Sequence< Any > aPropertyValues = ConfigItem::GetProperties( aPropNames ); + +- if( aPropertyValues.getLength() != aNodeCount ) ++ if( aPropertyValues.getLength() != aNodeCount * 2) + { + OSL_FAIL( "Problems during reading" ); + return aResult; +@@ -205,14 +208,16 @@ PassMap StorageItem::getInfo() + OUString aName = aUrlUsr[1]; + + OUString aEPasswd; ++ OUString aIV; + aPropertyValues[aNodeInd] >>= aEPasswd; ++ aPropertyValues[aNodeInd + aNodeCount] >>= aIV; + + PassMap::iterator aIter = aResult.find( aUrl ); + if( aIter != aResult.end() ) +- aIter->second.emplace_back( aName, aEPasswd ); ++ aIter->second.emplace_back( aName, aEPasswd, aIV ); + else + { +- NamePassRecord aNewRecord( aName, aEPasswd ); ++ NamePassRecord aNewRecord( aName, aEPasswd, aIV ); + std::vector< NamePassRecord > listToAdd( 1, aNewRecord ); + + aResult.insert( PairUrlRecord( aUrl, listToAdd ) ); +@@ -276,17 +281,19 @@ sal_Int32 StorageItem::getStorageVersion() + return nResult; + } + +-bool StorageItem::getEncodedMP( OUString& aResult ) ++bool StorageItem::getEncodedMP( OUString& aResult, OUString& aResultIV ) + { + if( hasEncoded ) + { + aResult = mEncoded; ++ aResultIV = mEncodedIV; + return true; + } + +- Sequence< OUString > aNodeNames( 2 ); ++ Sequence< OUString > aNodeNames( 3 ); + aNodeNames[0] = "HasMaster"; + aNodeNames[1] = "Master"; ++ aNodeNames[2] = "MasterInitializationVector"; + + Sequence< Any > aPropertyValues = ConfigItem::GetProperties( aNodeNames ); + +@@ -298,32 +305,37 @@ bool StorageItem::getEncodedMP( OUString& aResult ) + + aPropertyValues[0] >>= hasEncoded; + aPropertyValues[1] >>= mEncoded; ++ aPropertyValues[2] >>= mEncodedIV; + + aResult = mEncoded; ++ aResultIV = mEncodedIV; + + return hasEncoded; + } + + +-void StorageItem::setEncodedMP( const OUString& aEncoded, bool bAcceptEmpty ) ++void StorageItem::setEncodedMP( const OUString& aEncoded, const OUString& aEncodedIV, bool bAcceptEmpty ) + { +- Sequence< OUString > sendNames(3); +- Sequence< uno::Any > sendVals(3); ++ Sequence< OUString > sendNames(4); ++ Sequence< uno::Any > sendVals(4); + + sendNames[0] = "HasMaster"; + sendNames[1] = "Master"; +- sendNames[2] = "StorageVersion"; ++ sendNames[2] = "MasterInitializationVector"; ++ sendNames[3] = "StorageVersion"; + + bool bHasMaster = ( !aEncoded.isEmpty() || bAcceptEmpty ); + sendVals[0] <<= bHasMaster; + sendVals[1] <<= aEncoded; +- sendVals[2] <<= nCurrentStorageVersion; ++ sendVals[2] <<= aEncodedIV; ++ sendVals[3] <<= nCurrentStorageVersion; + + ConfigItem::SetModified(); + ConfigItem::PutProperties( sendNames, sendVals ); + + hasEncoded = bHasMaster; + mEncoded = aEncoded; ++ mEncodedIV = aEncodedIV; + } + + +@@ -359,11 +371,13 @@ void StorageItem::update( const OUString& aURL, const NamePassRecord& aRecord ) + forIndex.push_back( aURL ); + forIndex.push_back( aRecord.GetUserName() ); + +- Sequence< beans::PropertyValue > sendSeq(1); ++ Sequence< beans::PropertyValue > sendSeq(2); + +- sendSeq[0].Name = "Store/Passwordstorage['" + createIndex( forIndex ) + "']/Password"; ++ sendSeq[0].Name = "Store/Passwordstorage['" + createIndex( forIndex ) + "']/InitializationVector"; ++ sendSeq[0].Value <<= aRecord.GetPersistentIV(); + +- sendSeq[0].Value <<= aRecord.GetPersPasswords(); ++ sendSeq[1].Name = "Store/Passwordstorage['" + createIndex( forIndex ) + "']/Password"; ++ sendSeq[1].Value <<= aRecord.GetPersPasswords(); + + ConfigItem::SetModified(); + ConfigItem::SetSetProperties( "Store", sendSeq ); +@@ -424,7 +438,7 @@ void SAL_CALL PasswordContainer::disposing( const EventObject& ) + } + } + +-std::vector< OUString > PasswordContainer::DecodePasswords( const OUString& aLine, const OUString& aMasterPasswd, css::task::PasswordRequestMode mode ) ++std::vector< OUString > PasswordContainer::DecodePasswords( const OUString& aLine, const OUString& aIV, const OUString& aMasterPasswd, css::task::PasswordRequestMode mode ) + { + if( !aMasterPasswd.isEmpty() ) + { +@@ -439,9 +453,16 @@ std::vector< OUString > PasswordContainer::DecodePasswords( const OUString& aLin + for( int ind = 0; ind < RTL_DIGEST_LENGTH_MD5; ind++ ) + code[ ind ] = static_cast(aMasterPasswd.copy( ind*2, 2 ).toUInt32(16)); + ++ unsigned char iv[RTL_DIGEST_LENGTH_MD5] = {0}; ++ if (!aIV.isEmpty()) ++ { ++ for( int ind = 0; ind < RTL_DIGEST_LENGTH_MD5; ind++ ) ++ iv[ ind ] = static_cast(aIV.copy( ind*2, 2 ).toUInt32(16)); ++ } ++ + rtlCipherError result = rtl_cipher_init ( + aDecoder, rtl_Cipher_DirectionDecode, +- code, RTL_DIGEST_LENGTH_MD5, nullptr, 0 ); ++ code, RTL_DIGEST_LENGTH_MD5, iv, RTL_DIGEST_LENGTH_MD5 ); + + if( result == rtl_Cipher_E_None ) + { +@@ -474,7 +495,7 @@ std::vector< OUString > PasswordContainer::DecodePasswords( const OUString& aLin + "Can't decode!", css::uno::Reference(), mode); + } + +-OUString PasswordContainer::EncodePasswords(const std::vector< OUString >& lines, const OUString& aMasterPasswd ) ++OUString PasswordContainer::EncodePasswords(const std::vector< OUString >& lines, const OUString& aIV, const OUString& aMasterPasswd) + { + if( !aMasterPasswd.isEmpty() ) + { +@@ -491,9 +512,16 @@ OUString PasswordContainer::EncodePasswords(const std::vector< OUString >& lines + for( int ind = 0; ind < RTL_DIGEST_LENGTH_MD5; ind++ ) + code[ ind ] = static_cast(aMasterPasswd.copy( ind*2, 2 ).toUInt32(16)); + ++ unsigned char iv[RTL_DIGEST_LENGTH_MD5] = {0}; ++ if (!aIV.isEmpty()) ++ { ++ for( int ind = 0; ind < RTL_DIGEST_LENGTH_MD5; ind++ ) ++ iv[ ind ] = static_cast(aIV.copy( ind*2, 2 ).toUInt32(16)); ++ } ++ + rtlCipherError result = rtl_cipher_init ( + aEncoder, rtl_Cipher_DirectionEncode, +- code, RTL_DIGEST_LENGTH_MD5, nullptr, 0 ); ++ code, RTL_DIGEST_LENGTH_MD5, iv, RTL_DIGEST_LENGTH_MD5 ); + + if( result == rtl_Cipher_E_None ) + { +@@ -561,7 +589,7 @@ void PasswordContainer::UpdateVector( const OUString& aURL, std::vector< NamePas + + if( aRecord.HasPasswords( PERSISTENT_RECORD ) ) + { +- aNPIter.SetPersPasswords( aRecord.GetPersPasswords() ); ++ aNPIter.SetPersPasswords( aRecord.GetPersPasswords(), aRecord.GetPersistentIV() ); + + if( writeFile ) + { +@@ -594,7 +622,8 @@ UserRecord PasswordContainer::CopyToUserRecord( const NamePassRecord& aRecord, b + { + try + { +- ::std::vector< OUString > aDecodedPasswords = DecodePasswords( aRecord.GetPersPasswords(), GetMasterPassword( aHandler ), css::task::PasswordRequestMode_PASSWORD_ENTER ); ++ ::std::vector< OUString > aDecodedPasswords = DecodePasswords( aRecord.GetPersPasswords(), aRecord.GetPersistentIV(), ++ GetMasterPassword( aHandler ), css::task::PasswordRequestMode_PASSWORD_ENTER ); + aPasswords.insert( aPasswords.end(), aDecodedPasswords.begin(), aDecodedPasswords.end() ); + } + catch( NoMasterException& ) +@@ -639,6 +668,19 @@ void SAL_CALL PasswordContainer::addPersistent( const OUString& Url, const OUStr + PrivateAdd( Url, UserName, Passwords, PERSISTENT_RECORD, aHandler ); + } + ++OUString PasswordContainer::createIV() ++{ ++ rtlRandomPool randomPool = mRandomPool.get(); ++ unsigned char iv[RTL_DIGEST_LENGTH_MD5]; ++ rtl_random_getBytes(randomPool, iv, RTL_DIGEST_LENGTH_MD5); ++ OUStringBuffer aBuffer; ++ for (sal_uInt8 i : iv) ++ { ++ aBuffer.append(OUString::number(i >> 4, 16)); ++ aBuffer.append(OUString::number(i & 15, 16)); ++ } ++ return aBuffer.makeStringAndClear(); ++} + + void PasswordContainer::PrivateAdd( const OUString& Url, const OUString& UserName, const Sequence< OUString >& Passwords, char Mode, const Reference< XInteractionHandler >& aHandler ) + { +@@ -646,7 +688,11 @@ void PasswordContainer::PrivateAdd( const OUString& Url, const OUString& UserNam + ::std::vector< OUString > aStorePass = comphelper::sequenceToContainer< std::vector >( Passwords ); + + if( Mode == PERSISTENT_RECORD ) +- aRecord.SetPersPasswords( EncodePasswords( aStorePass, GetMasterPassword( aHandler ) ) ); ++ { ++ OUString sIV = createIV(); ++ OUString sEncodedPasswords = EncodePasswords( aStorePass, sIV, GetMasterPassword( aHandler ) ); ++ aRecord.SetPersPasswords( sEncodedPasswords, sIV ); ++ } + else if( Mode == MEMORY_RECORD ) + aRecord.SetMemPasswords( aStorePass ); + else +@@ -839,10 +885,10 @@ OUString const & PasswordContainer::GetMasterPassword( const Reference< XInterac + + if( m_aMasterPasswd.isEmpty() && aHandler.is() ) + { +- OUString aEncodedMP; ++ OUString aEncodedMP, aEncodedMPIV; + bool bDefaultPassword = false; + +- if( !m_pStorageFile->getEncodedMP( aEncodedMP ) ) ++ if( !m_pStorageFile->getEncodedMP( aEncodedMP, aEncodedMPIV ) ) + aRMode = PasswordRequestMode_PASSWORD_CREATE; + else if ( aEncodedMP.isEmpty() ) + { +@@ -864,14 +910,15 @@ OUString const & PasswordContainer::GetMasterPassword( const Reference< XInterac + m_aMasterPasswd = aPass; + std::vector< OUString > aMaster( 1, m_aMasterPasswd ); + +- m_pStorageFile->setEncodedMP( EncodePasswords( aMaster, m_aMasterPasswd ) ); ++ OUString sIV = createIV(); ++ m_pStorageFile->setEncodedMP( EncodePasswords( aMaster, sIV, m_aMasterPasswd ), sIV ); + } + else + { + if (m_pStorageFile->getStorageVersion() == 0) + aPass = ReencodeAsOldHash(aPass); + +- std::vector< OUString > aRM( DecodePasswords( aEncodedMP, aPass, aRMode ) ); ++ std::vector< OUString > aRM( DecodePasswords( aEncodedMP, aEncodedMPIV, aPass, aRMode ) ); + if( aRM.empty() || aPass != aRM[0] ) + { + bAskAgain = true; +@@ -1028,7 +1075,8 @@ Sequence< UrlRecord > SAL_CALL PasswordContainer::getAllPersistent( const Refere + { + sal_Int32 oldLen = aUsers.getLength(); + aUsers.realloc( oldLen + 1 ); +- aUsers[ oldLen ] = UserRecord( aNP.GetUserName(), comphelper::containerToSequence( DecodePasswords( aNP.GetPersPasswords(), GetMasterPassword( xHandler ), css::task::PasswordRequestMode_PASSWORD_ENTER ) ) ); ++ aUsers[ oldLen ] = UserRecord( aNP.GetUserName(), comphelper::containerToSequence( DecodePasswords( aNP.GetPersPasswords(), aNP.GetPersistentIV(), ++ GetMasterPassword( xHandler ), css::task::PasswordRequestMode_PASSWORD_ENTER ) ) ); + } + + if( aUsers.hasElements() ) +@@ -1045,12 +1093,12 @@ Sequence< UrlRecord > SAL_CALL PasswordContainer::getAllPersistent( const Refere + sal_Bool SAL_CALL PasswordContainer::authorizateWithMasterPassword( const uno::Reference< task::XInteractionHandler >& xHandler ) + { + bool bResult = false; +- OUString aEncodedMP; ++ OUString aEncodedMP, aEncodedMPIV; + uno::Reference< task::XInteractionHandler > xTmpHandler = xHandler; + ::osl::MutexGuard aGuard( mMutex ); + + // the method should fail if there is no master password +- if( m_pStorageFile && m_pStorageFile->useStorage() && m_pStorageFile->getEncodedMP( aEncodedMP ) ) ++ if( m_pStorageFile && m_pStorageFile->useStorage() && m_pStorageFile->getEncodedMP( aEncodedMP, aEncodedMPIV ) ) + { + if ( aEncodedMP.isEmpty() ) + { +@@ -1118,8 +1166,8 @@ sal_Bool SAL_CALL PasswordContainer::changeMasterPassword( const uno::Reference< + + bool bCanChangePassword = true; + // if there is already a stored master password it should be entered by the user before the change happen +- OUString aEncodedMP; +- if( !m_aMasterPasswd.isEmpty() || m_pStorageFile->getEncodedMP( aEncodedMP ) ) ++ OUString aEncodedMP, aEncodedMPIV; ++ if( !m_aMasterPasswd.isEmpty() || m_pStorageFile->getEncodedMP( aEncodedMP, aEncodedMPIV ) ) + bCanChangePassword = authorizateWithMasterPassword( xTmpHandler ); + + if ( bCanChangePassword ) +@@ -1138,7 +1186,8 @@ sal_Bool SAL_CALL PasswordContainer::changeMasterPassword( const uno::Reference< + // store the new master password + m_aMasterPasswd = aPass; + std::vector< OUString > aMaster( 1, m_aMasterPasswd ); +- m_pStorageFile->setEncodedMP( EncodePasswords( aMaster, m_aMasterPasswd ) ); ++ OUString aIV = createIV(); ++ m_pStorageFile->setEncodedMP( EncodePasswords( aMaster, aIV, m_aMasterPasswd ), aIV ); + + // store all the entries with the new password + for ( const auto& rURL : aPersistent ) +@@ -1163,7 +1212,7 @@ void SAL_CALL PasswordContainer::removeMasterPassword() + if ( m_pStorageFile ) + { + m_aMasterPasswd.clear(); +- m_pStorageFile->setEncodedMP( OUString() ); // let the master password be removed from configuration ++ m_pStorageFile->setEncodedMP( OUString(), OUString() ); // let the master password be removed from configuration + } + } + +@@ -1174,8 +1223,8 @@ sal_Bool SAL_CALL PasswordContainer::hasMasterPassword( ) + if ( !m_pStorageFile ) + throw uno::RuntimeException(); + +- OUString aEncodedMP; +- return ( m_pStorageFile->useStorage() && m_pStorageFile->getEncodedMP( aEncodedMP ) ); ++ OUString aEncodedMP, aEncodedMPIV; ++ return ( m_pStorageFile->useStorage() && m_pStorageFile->getEncodedMP( aEncodedMP, aEncodedMPIV ) ); + } + + sal_Bool SAL_CALL PasswordContainer::allowPersistentStoring( sal_Bool bAllow ) +@@ -1222,8 +1271,8 @@ sal_Bool SAL_CALL PasswordContainer::useDefaultMasterPassword( const uno::Refere + + bool bCanChangePassword = true; + // if there is already a stored nondefault master password it should be entered by the user before the change happen +- OUString aEncodedMP; +- if( m_pStorageFile->getEncodedMP( aEncodedMP ) && !aEncodedMP.isEmpty() ) ++ OUString aEncodedMP, aEncodedMPIV; ++ if( m_pStorageFile->getEncodedMP( aEncodedMP, aEncodedMPIV ) && !aEncodedMP.isEmpty() ) + bCanChangePassword = authorizateWithMasterPassword( xTmpHandler ); + + if ( bCanChangePassword ) +@@ -1240,7 +1289,7 @@ sal_Bool SAL_CALL PasswordContainer::useDefaultMasterPassword( const uno::Refere + + // store the empty string to flag the default master password + m_aMasterPasswd = aPass; +- m_pStorageFile->setEncodedMP( OUString(), true ); ++ m_pStorageFile->setEncodedMP( OUString(), OUString(), true ); + + // store all the entries with the new password + for ( const auto& rURL : aPersistent ) +@@ -1264,8 +1313,8 @@ sal_Bool SAL_CALL PasswordContainer::isDefaultMasterPasswordUsed() + if ( !m_pStorageFile ) + throw uno::RuntimeException(); + +- OUString aEncodedMP; +- return ( m_pStorageFile->useStorage() && m_pStorageFile->getEncodedMP( aEncodedMP ) && aEncodedMP.isEmpty() ); ++ OUString aEncodedMP, aEncodedMPIV; ++ return ( m_pStorageFile->useStorage() && m_pStorageFile->getEncodedMP( aEncodedMP, aEncodedMPIV ) && aEncodedMP.isEmpty() ); + } + + +diff --git a/svl/source/passwordcontainer/passwordcontainer.hxx b/svl/source/passwordcontainer/passwordcontainer.hxx +index bf43b5903602..0454437b9dc2 100644 +--- a/svl/source/passwordcontainer/passwordcontainer.hxx ++++ b/svl/source/passwordcontainer/passwordcontainer.hxx +@@ -34,6 +34,7 @@ + #include + #include + ++#include + #include + #include + +@@ -52,11 +53,12 @@ class NamePassRecord + ::std::vector< OUString > m_aMemPass; + + // persistent passwords are encrypted in one string +- bool m_bHasPersPass; ++ bool m_bHasPersPass; + OUString m_aPersPass; ++ OUString m_aPersistentIV; + + void InitArrays( bool bHasMemoryList, const ::std::vector< OUString >& aMemoryList, +- bool bHasPersistentList, const OUString& aPersistentList ) ++ bool bHasPersistentList, const OUString& aPersistentList, const OUString& aPersistentIV ) + { + m_bHasMemPass = bHasMemoryList; + if ( bHasMemoryList ) +@@ -64,7 +66,10 @@ class NamePassRecord + + m_bHasPersPass = bHasPersistentList; + if ( bHasPersistentList ) ++ { + m_aPersPass = aPersistentList; ++ m_aPersistentIV = aPersistentIV; ++ } + } + + public: +@@ -76,11 +81,12 @@ public: + { + } + +- NamePassRecord( const OUString& aName, const OUString& aPersistentList ) ++ NamePassRecord( const OUString& aName, const OUString& aPersistentList, const OUString& aPersistentIV ) + : m_aName( aName ) + , m_bHasMemPass( false ) + , m_bHasPersPass( true ) + , m_aPersPass( aPersistentList ) ++ , m_aPersistentIV( aPersistentIV ) + { + } + +@@ -89,7 +95,8 @@ public: + , m_bHasMemPass( false ) + , m_bHasPersPass( false ) + { +- InitArrays( aRecord.m_bHasMemPass, aRecord.m_aMemPass, aRecord.m_bHasPersPass, aRecord.m_aPersPass ); ++ InitArrays( aRecord.m_bHasMemPass, aRecord.m_aMemPass, ++ aRecord.m_bHasPersPass, aRecord.m_aPersPass, aRecord.m_aPersistentIV ); + } + + NamePassRecord& operator=( const NamePassRecord& aRecord ) +@@ -100,7 +107,9 @@ public: + + m_aMemPass.clear(); + m_aPersPass.clear(); +- InitArrays( aRecord.m_bHasMemPass, aRecord.m_aMemPass, aRecord.m_bHasPersPass, aRecord.m_aPersPass ); ++ m_aPersistentIV.clear(); ++ InitArrays( aRecord.m_bHasMemPass, aRecord.m_aMemPass, ++ aRecord.m_bHasPersPass, aRecord.m_aPersPass, aRecord.m_aPersistentIV ); + } + return *this; + } +@@ -136,15 +145,24 @@ public: + return OUString(); + } + ++ OUString GetPersistentIV() const ++ { ++ if ( m_bHasPersPass ) ++ return m_aPersistentIV; ++ ++ return OUString(); ++ } ++ + void SetMemPasswords( const ::std::vector< OUString >& aMemList ) + { + m_aMemPass = aMemList; + m_bHasMemPass = true; + } + +- void SetPersPasswords( const OUString& aPersList ) ++ void SetPersPasswords( const OUString& aPersList, const OUString& aPersIV ) + { + m_aPersPass = aPersList; ++ m_aPersistentIV = aPersIV; + m_bHasPersPass = true; + } + +@@ -159,6 +177,7 @@ public: + { + m_bHasPersPass = false; + m_aPersPass.clear(); ++ m_aPersistentIV.clear(); + } + } + +@@ -182,6 +201,7 @@ private: + PasswordContainer* mainCont; + bool hasEncoded; + OUString mEncoded; ++ OUString mEncodedIV; + + virtual void ImplCommit() override; + +@@ -201,8 +201,8 @@ + + sal_Int32 getStorageVersion(); + +- bool getEncodedMP( OUString& aResult ); +- void setEncodedMP( const OUString& aResult, bool bAcceptEnmpty = false ); ++ bool getEncodedMP( OUString& aResult, OUString& aResultIV ); ++ void setEncodedMP( const OUString& aResult, const OUString& aResultIV, bool bAcceptEmpty = false ); + void setUseStorage( bool bUse ); + bool useStorage(); + +@@ -224,6 +244,29 @@ private: + css::uno::Reference< css::lang::XComponent > mComponent; + SysCredentialsConfig mUrlContainer; + ++ class RandomPool ++ { ++ private: ++ rtlRandomPool m_aRandomPool; ++ public: ++ RandomPool() : m_aRandomPool(rtl_random_createPool()) ++ { ++ } ++ rtlRandomPool get() ++ { ++ return m_aRandomPool; ++ } ++ ~RandomPool() ++ { ++ // Clean up random pool memory ++ rtl_random_destroyPool(m_aRandomPool); ++ } ++ }; ++ ++ RandomPool mRandomPool; ++ ++ OUString createIV(); ++ + /// @throws css::uno::RuntimeException + css::uno::Sequence< css::task::UserRecord > CopyToUserRecordSequence( + const ::std::vector< NamePassRecord >& original, +@@ -274,10 +317,10 @@ css::task::UrlRecord find( + const css::uno::Reference< css::task::XInteractionHandler >& Handler ); + + /// @throws css::uno::RuntimeException +- static ::std::vector< OUString > DecodePasswords( const OUString& aLine, const OUString& aMasterPassword, css::task::PasswordRequestMode mode ); ++ static ::std::vector< OUString > DecodePasswords( const OUString& aLine, const OUString& aIV, const OUString& aMasterPassword, css::task::PasswordRequestMode mode ); + + /// @throws css::uno::RuntimeException +- static OUString EncodePasswords(const std::vector< OUString >& lines, const OUString& aMasterPassword ); ++ static OUString EncodePasswords(const std::vector< OUString >& lines, const OUString& aIV, const OUString& aMasterPassword ); + + public: + PasswordContainer( const css::uno::Reference< css::lang::XMultiServiceFactory >& ); +-- +2.37.1 + diff --git a/debian/patches/0004-CVE-2022-2630-6-7-add-infobar-to-prompt-to-refresh-t.patch b/debian/patches/0004-CVE-2022-2630-6-7-add-infobar-to-prompt-to-refresh-t.patch new file mode 100644 index 00000000000..fd02eb7bb6e --- /dev/null +++ b/debian/patches/0004-CVE-2022-2630-6-7-add-infobar-to-prompt-to-refresh-t.patch @@ -0,0 +1,117 @@ +From 4cfd591942e4cfd3efc416bfac8e46e3580d37ba Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Wed, 23 Mar 2022 13:03:30 +0000 +Subject: add infobar to prompt to refresh to replace old format + +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131976 +Tested-by: Jenkins +Reviewed-by: Michael Stahl +(cherry picked from commit bbd196ff82bda9f66b4ba32a412f10cefe6da60e) +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132307 +Reviewed-by: Sophie Gautier +Reviewed-by: Christian Lohmaier +(cherry picked from commit c5d01b11db3c83cb4a89d3b388d78e20dd3990b5) + +Change-Id: Id99cbf2b50a4ebf289dae6fc67e22e20afcda35b +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133906 +Tested-by: Michael Stahl +Reviewed-by: Michael Stahl +--- + include/sfx2/strings.hrc | 2 ++ + include/sfx2/viewfrm.hxx | 1 + + sfx2/source/view/viewfrm.cxx | 40 ++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 43 insertions(+) + +diff --git a/include/sfx2/strings.hrc b/include/sfx2/strings.hrc +index 1f21f0a0f186..1db36e733c0c 100644 +--- a/include/sfx2/strings.hrc ++++ b/include/sfx2/strings.hrc +@@ -297,6 +297,8 @@ + #define STR_SIGNATURE_NOTVALIDATED_PARTIAL_OK NC_("STR_SIGNATURE_NOTVALIDATED_PARTIAL_OK", "The certificate could not be validated and the document is only partially signed.") + #define STR_SIGNATURE_OK NC_("STR_SIGNATURE_OK", "This document is digitally signed and the signature is valid.") + #define STR_SIGNATURE_SHOW NC_("STR_SIGNATURE_SHOW", "Show Signatures") ++#define STR_REFRESH_MASTER_PASSWORD NC_("STR_REFRESH_MASTER_PASSWORD", "The master password is stored in an outdated format, you should refresh it") ++#define STR_REFRESH_PASSWORD NC_("STR_REFRESH_PASSWORD", "Refresh Password") + + #define STR_CLOSE_PANE NC_("STR_CLOSE_PANE", "Close Pane") + #define STR_SFX_DOCK NC_("STR_SFX_DOCK", "Dock") +diff --git a/include/sfx2/viewfrm.hxx b/include/sfx2/viewfrm.hxx +index fe336ba5f091..cc6a7dae7047 100644 +--- a/include/sfx2/viewfrm.hxx ++++ b/include/sfx2/viewfrm.hxx +@@ -61,6 +61,7 @@ protected: + DECL_LINK(WhatsNewHandler, Button*, void); + DECL_LINK(SwitchReadOnlyHandler, Button*, void); + DECL_LINK(SignDocumentHandler, Button*, void); ++ DECL_DLLPRIVATE_LINK(RefreshMasterPasswordHdl, Button*, void); + SAL_DLLPRIVATE void KillDispatcher_Impl(); + + virtual ~SfxViewFrame() override; +diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx +index 5a64599e5894..86e7d51bbfea 100644 +--- a/sfx2/source/view/viewfrm.cxx ++++ b/sfx2/source/view/viewfrm.cxx +@@ -32,6 +32,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -1390,6 +1391,24 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) + batch->commit(); + } + ++ if (officecfg::Office::Common::Passwords::HasMaster::get() && ++ officecfg::Office::Common::Passwords::StorageVersion::get() == 0) ++ { ++ // master password stored in deprecated format ++ VclPtr pOldMasterPasswordInfoBar = ++ AppendInfoBar("oldmasterpassword", "", ++ SfxResId(STR_REFRESH_MASTER_PASSWORD), InfobarType::DANGER, false); ++ if (pOldMasterPasswordInfoBar) ++ { ++ VclPtrInstance const xBtn(&GetWindow()); ++ xBtn->SetText(SfxResId(STR_REFRESH_PASSWORD)); ++ xBtn->SetSizePixel(xBtn->GetOptimalSize()); ++ xBtn->SetClickHdl(LINK(this, ++ SfxViewFrame, RefreshMasterPasswordHdl)); ++ pOldMasterPasswordInfoBar->addButton(xBtn); ++ } ++ } ++ + // read-only infobar if necessary + const SfxViewShell *pVSh; + const SfxShell *pFSh; +@@ -1565,6 +1584,27 @@ IMPL_LINK_NOARG(SfxViewFrame, SignDocumentHandler, Button*, void) + GetDispatcher()->Execute(SID_SIGNATURE); + } + ++IMPL_LINK_NOARG(SfxViewFrame, RefreshMasterPasswordHdl, Button*, void) ++{ ++ bool bChanged = false; ++ try ++ { ++ Reference< task::XPasswordContainer2 > xMasterPasswd( ++ task::PasswordContainer::create(comphelper::getProcessComponentContext())); ++ ++ css::uno::Reference xFrame = GetFrame().GetFrameInterface(); ++ css::uno::Reference xContainerWindow = xFrame->getContainerWindow(); ++ ++ uno::Reference xTmpHandler(task::InteractionHandler::createWithParent(comphelper::getProcessComponentContext(), ++ xContainerWindow)); ++ bChanged = xMasterPasswd->changeMasterPassword(xTmpHandler); ++ } ++ catch (const Exception&) ++ {} ++ if (bChanged) ++ RemoveInfoBar(u"oldmasterpassword"); ++} ++ + void SfxViewFrame::Construct_Impl( SfxObjectShell *pObjSh ) + { + m_pImpl->bResizeInToOut = true; +-- +cgit v1.2.1 + diff --git a/debian/patches/CVE-2023-2255.diff b/debian/patches/CVE-2023-2255.diff new file mode 100644 index 00000000000..4edfe0cdba8 --- /dev/null +++ b/debian/patches/CVE-2023-2255.diff @@ -0,0 +1,943 @@ +From 683e4de0de8dde7c5570c67cbd2bae17b6d7f0e0 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Tue, 11 Apr 2023 10:13:37 +0100 +Subject: set Referer on loading IFrames + +so tools, options, security, options, +"block any links from document not..." +applies to their contents. + +Change-Id: I04839aea6b07a4a76ac147a85045939ccd9c3c79 +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150225 +Tested-by: Jenkins +Reviewed-by: Stephan Bergmann +--- + sfx2/source/doc/iframe.cxx | 13 ++++++++++--- + 1 file changed, 10 insertions(+), 3 deletions(-) + +From 49a554471cddc3e52ae381f864e689fe4a8c6131 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Thu, 13 Apr 2023 11:31:17 +0100 +Subject: put floating frames under managed links control +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +like we do for sections and ole objects that link to their content + +individual commits in trunk are: + +extract a OCommonEmbeddedObject::SetInplaceActiveState for reuse + +no behaviour change intended + +Change-Id: Ia1d12aa5c9afdc1347f6d4364bc6a0b7f41ee168 +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150341 +Tested-by: Caolán McNamara +Reviewed-by: Caolán McNamara +(cherry picked from commit 183e34a3f8c429c0698951e24c17844e416a3825) + +use parent window as dialog parent + +it makes no odds, but is more convenient for upcoming modification + +Change-Id: Ibc5333b137d2da089b3b701ff615c6ddf43063d0 +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150342 +Tested-by: Caolán McNamara +Reviewed-by: Caolán McNamara +(cherry picked from commit f93edf343658abd489bde3639d2ffaefd50c0f99) + +adjust IFrameObject so it could reuse mxFrame for a reload of content + +Change-Id: I7eec3132a23faafd9a2878215a0a117a67bc9bf2 +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150343 +Tested-by: Caolán McNamara +Reviewed-by: Caolán McNamara +(cherry picked from commit 3a727d26fd9eb6fa140bc3f5cadf3db079d42206) + +query getUserAllowsLinkUpdate for the case of content in a floating frame + +similarly to how it works for the more common "normal" embedded objects + +Change-Id: I83e38dfa2f84907c2de9680e91f779d34864a9ad +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149971 +Tested-by: Jenkins +Reviewed-by: Caolán McNamara +(cherry picked from commit 52aa46468531918eabfa2031dedf50377ae72cf7) + +add a route to get writer Floating Frame links under 'manage links' + +Change-Id: If90ff71d6a96342574799312f764badaf97980eb +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150349 +Tested-by: Jenkins +Reviewed-by: Caolán McNamara +(cherry picked from commit 8b8a2844addbd262befb1a2d193dfb590dfa20be) + +allow SvxOle2Shape::resetModifiedState to survive having no SdrObject + +Change-Id: Iea059262c124e3f44249e49b4189732310d28156 +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150538 +Tested-by: Jenkins +Reviewed-by: Caolán McNamara +(cherry picked from commit 02379929bd0e1d1676635f0ca1920422702ebb7c) + +create the FloatingFrameShape in a separate step to inserting it + +this is derived from the path taken by the AddShape(const OUString&) +function for this case. No change in behavior is intended. + +Change-Id: Id09ae0c65a55a37743ad7c184070fb8dd97d8a7f +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150526 +Tested-by: Jenkins +Reviewed-by: Caolán McNamara +(cherry picked from commit bafec47847a0b9697b3bbe9358e53f8118af3024) + +add a route to get calc Floating Frame links under 'manage links' + +much harder than writer because the organization and ordering +of properties and object activation etc is different. + +This ended up ugly, but functions. + +We set FrameURL before AddShape, we have to do it again later because it +gets cleared when the SdrOle2Obj is attached to the XShape. But we want +FrameURL to exist when AddShape triggers SetPersistName which itself +triggers SdrOle2Obj::CheckFileLink_Impl and at that point we want to +know what URL will end up being used. So bodge this by setting FrameURL +to the temp pre-SdrOle2Obj attached properties and we can smuggle it +eventually into SdrOle2Obj::SetPersistName at the right point after +PersistName is set but before SdrOle2Obj::CheckFileLink_Impl is called +in order to inform the link manager that this is an IFrame that links to +a URL + +Change-Id: I67fc199fef9e67fa12ca7873f0fe12137aa16d8f +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150539 +Tested-by: Jenkins +Reviewed-by: Caolán McNamara +(cherry picked from commit 07179a5a5bd00f34acfa8a3f260dd834ae003c63) +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150753 +Reviewed-by: Michael Stahl +--- + embeddedobj/source/commonembedding/embedobj.cxx | 60 ++++++------ + .../source/commonembedding/specialobject.cxx | 9 ++ + embeddedobj/source/inc/commonembobj.hxx | 3 + + embeddedobj/source/inc/specialobject.hxx | 6 ++ + include/svx/svdoole2.hxx | 17 +++- + include/svx/unoshape.hxx | 2 + + sc/source/ui/docshell/documentlinkmgr.cxx | 9 +- + sfx2/source/doc/iframe.cxx | 55 +++++++---- + svx/source/svdraw/svdoole2.cxx | 104 +++++++++++++++++---- + svx/source/unodraw/shapeimpl.hxx | 5 + + svx/source/unodraw/unoshap4.cxx | 23 ++++- + sw/inc/ndole.hxx | 4 +- + sw/source/core/ole/ndole.cxx | 89 ++++++++++++++++-- + xmloff/source/draw/ximpshap.cxx | 29 +++++- + xmloff/source/draw/ximpshap.hxx | 2 + + 15 files changed, 331 insertions(+), 86 deletions(-) + +From 26a8966b07f6335450ddbf4b0f5d5206db43bcbf Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Thu, 20 Apr 2023 20:58:21 +0100 +Subject: assume IFrame script/macro support isn't needed + +seems undocumented at least + +Change-Id: I316e4f4f25ddb7cf6b7bac4d856a721b987207a3 +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151019 +Tested-by: Jenkins +Reviewed-by: Xisco Fauli +--- + sfx2/source/doc/iframe.cxx | 15 ++++----------- + sfx2/source/inc/eventsupplier.hxx | 1 + + 2 files changed, 5 insertions(+), 11 deletions(-) + +diff -urN libreoffice-7-0-4.old/embeddedobj/source/commonembedding/embedobj.cxx libreoffice-7-0-4/embeddedobj/source/commonembedding/embedobj.cxx +--- libreoffice-7-0-4.old/embeddedobj/source/commonembedding/embedobj.cxx 2023-05-24 17:17:08.688721561 +0200 ++++ libreoffice-7-0-4/embeddedobj/source/commonembedding/embedobj.cxx 2023-05-24 17:24:13.613547961 +0200 +@@ -155,6 +155,37 @@ + rGuard.reset(); + } + ++void OCommonEmbeddedObject::SetInplaceActiveState() ++{ ++ if ( !m_xClientSite.is() ) ++ throw embed::WrongStateException( "client site not set, yet", *this ); ++ ++ uno::Reference< embed::XInplaceClient > xInplaceClient( m_xClientSite, uno::UNO_QUERY ); ++ if ( !xInplaceClient.is() || !xInplaceClient->canInplaceActivate() ) ++ throw embed::WrongStateException(); //TODO: can't activate inplace ++ xInplaceClient->activatingInplace(); ++ ++ uno::Reference< embed::XWindowSupplier > xClientWindowSupplier( xInplaceClient, uno::UNO_QUERY_THROW ); ++ ++ m_xClientWindow = xClientWindowSupplier->getWindow(); ++ m_aOwnRectangle = xInplaceClient->getPlacement(); ++ m_aClipRectangle = xInplaceClient->getClipRectangle(); ++ awt::Rectangle aRectangleToShow = GetRectangleInterception( m_aOwnRectangle, m_aClipRectangle ); ++ ++ // create own window based on the client window ++ // place and resize the window according to the rectangles ++ uno::Reference< awt::XWindowPeer > xClientWindowPeer( m_xClientWindow, uno::UNO_QUERY_THROW ); ++ ++ // dispatch provider may not be provided ++ uno::Reference< frame::XDispatchProvider > xContainerDP = xInplaceClient->getInplaceDispatchProvider(); ++ bool bOk = m_xDocHolder->ShowInplace( xClientWindowPeer, aRectangleToShow, xContainerDP ); ++ m_nObjectState = embed::EmbedStates::INPLACE_ACTIVE; ++ if ( !bOk ) ++ { ++ SwitchStateTo_Impl( embed::EmbedStates::RUNNING ); ++ throw embed::WrongStateException(); //TODO: can't activate inplace ++ } ++} + + void OCommonEmbeddedObject::SwitchStateTo_Impl( sal_Int32 nNextState ) + { +@@ -228,34 +259,7 @@ + { + if ( nNextState == embed::EmbedStates::INPLACE_ACTIVE ) + { +- if ( !m_xClientSite.is() ) +- throw embed::WrongStateException( "client site not set, yet", *this ); +- +- uno::Reference< embed::XInplaceClient > xInplaceClient( m_xClientSite, uno::UNO_QUERY ); +- if ( !xInplaceClient.is() || !xInplaceClient->canInplaceActivate() ) +- throw embed::WrongStateException(); //TODO: can't activate inplace +- xInplaceClient->activatingInplace(); +- +- uno::Reference< embed::XWindowSupplier > xClientWindowSupplier( xInplaceClient, uno::UNO_QUERY_THROW ); +- +- m_xClientWindow = xClientWindowSupplier->getWindow(); +- m_aOwnRectangle = xInplaceClient->getPlacement(); +- m_aClipRectangle = xInplaceClient->getClipRectangle(); +- awt::Rectangle aRectangleToShow = GetRectangleInterception( m_aOwnRectangle, m_aClipRectangle ); +- +- // create own window based on the client window +- // place and resize the window according to the rectangles +- uno::Reference< awt::XWindowPeer > xClientWindowPeer( m_xClientWindow, uno::UNO_QUERY_THROW ); +- +- // dispatch provider may not be provided +- uno::Reference< frame::XDispatchProvider > xContainerDP = xInplaceClient->getInplaceDispatchProvider(); +- bool bOk = m_xDocHolder->ShowInplace( xClientWindowPeer, aRectangleToShow, xContainerDP ); +- m_nObjectState = nNextState; +- if ( !bOk ) +- { +- SwitchStateTo_Impl( embed::EmbedStates::RUNNING ); +- throw embed::WrongStateException(); //TODO: can't activate inplace +- } ++ SetInplaceActiveState(); + } + else if ( nNextState == embed::EmbedStates::ACTIVE ) + { +diff -urN libreoffice-7-0-4.old/embeddedobj/source/commonembedding/specialobject.cxx libreoffice-7-0-4/embeddedobj/source/commonembedding/specialobject.cxx +--- libreoffice-7-0-4.old/embeddedobj/source/commonembedding/specialobject.cxx 2023-05-24 17:17:08.688721561 +0200 ++++ libreoffice-7-0-4/embeddedobj/source/commonembedding/specialobject.cxx 2023-05-24 17:24:13.613547961 +0200 +@@ -47,6 +47,7 @@ + uno::Any aReturn = ::cppu::queryInterface( rType, + static_cast< embed::XEmbeddedObject* >( this ), + static_cast< embed::XInplaceObject* >( this ), ++ static_cast< embed::XCommonEmbedPersist* >( static_cast< embed::XEmbedPersist* >( this ) ), + static_cast< embed::XVisualObject* >( this ), + static_cast< embed::XClassifiedObject* >( this ), + static_cast< embed::XComponentSupplier* >( this ), +@@ -160,4 +161,12 @@ + OCommonEmbeddedObject::doVerb( nVerbID ); + } + ++void SAL_CALL OSpecialEmbeddedObject::reload( ++ const uno::Sequence< beans::PropertyValue >&, ++ const uno::Sequence< beans::PropertyValue >&) ++{ ++ // Allow IFrames to reload their content ++ SetInplaceActiveState(); ++} ++ + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ +diff -urN libreoffice-7-0-4.old/embeddedobj/source/inc/commonembobj.hxx libreoffice-7-0-4/embeddedobj/source/inc/commonembobj.hxx +--- libreoffice-7-0-4.old/embeddedobj/source/inc/commonembobj.hxx 2023-05-24 17:17:08.688721561 +0200 ++++ libreoffice-7-0-4/embeddedobj/source/inc/commonembobj.hxx 2023-05-24 17:24:13.613547961 +0200 +@@ -227,6 +227,9 @@ + const css::uno::Sequence< css::beans::PropertyValue >& lArguments, + const css::uno::Sequence< css::beans::PropertyValue >& lObjArgs ); + ++protected: ++ void SetInplaceActiveState(); ++ + public: + OCommonEmbeddedObject( + const css::uno::Reference< css::uno::XComponentContext >& rxContext, +diff -urN libreoffice-7-0-4.old/embeddedobj/source/inc/specialobject.hxx libreoffice-7-0-4/embeddedobj/source/inc/specialobject.hxx +--- libreoffice-7-0-4.old/embeddedobj/source/inc/specialobject.hxx 2023-05-24 17:17:08.688721561 +0200 ++++ libreoffice-7-0-4/embeddedobj/source/inc/specialobject.hxx 2023-05-24 17:24:13.613547961 +0200 +@@ -48,6 +48,12 @@ + virtual void SAL_CALL changeState( sal_Int32 nNewState ) override; + + virtual void SAL_CALL doVerb( sal_Int32 nVerbID ) override; ++ ++// XCommonEmbedPersist ++ ++ virtual void SAL_CALL reload( ++ const css::uno::Sequence< css::beans::PropertyValue >& lArguments, ++ const css::uno::Sequence< css::beans::PropertyValue >& lObjArgs ) override; + }; + + #endif +diff -urN libreoffice-7-0-4.old/include/svx/svdoole2.hxx libreoffice-7-0-4/include/svx/svdoole2.hxx +--- libreoffice-7-0-4.old/include/svx/svdoole2.hxx 2023-05-24 17:17:08.688721561 +0200 ++++ libreoffice-7-0-4/include/svx/svdoole2.hxx 2023-05-24 17:24:13.613547961 +0200 +@@ -42,6 +42,7 @@ + namespace svt { class EmbeddedObjectRef; } + + class SdrOle2ObjImpl; ++class SvxOle2Shape; + + class SVXCORE_DLLPUBLIC SdrOle2Obj : public SdrRectObj + { +@@ -49,7 +50,7 @@ + std::unique_ptr mpImpl; + + private: +- SVX_DLLPRIVATE void Connect_Impl(); ++ SVX_DLLPRIVATE void Connect_Impl(SvxOle2Shape* pCreator = nullptr); + SVX_DLLPRIVATE void Disconnect_Impl(); + SVX_DLLPRIVATE void AddListeners_Impl(); + SVX_DLLPRIVATE void RemoveListeners_Impl(); +@@ -105,7 +106,7 @@ + // OLE object has got a separate PersistName member now; + // !!! use ::SetPersistName( ... ) only, if you know what you do !!! + const OUString& GetPersistName() const; +- void SetPersistName( const OUString& rPersistName ); ++ void SetPersistName( const OUString& rPersistName, SvxOle2Shape* pCreator = nullptr ); + + // One can add an application name to a SdrOle2Obj, which can be queried for + // later on (SD needs this for presentation objects). +@@ -153,7 +154,7 @@ + sal_Int64 nAspect ); + static bool Unload( const css::uno::Reference< css::embed::XEmbeddedObject >& xObj, sal_Int64 nAspect ); + bool Unload(); +- void Connect(); ++ void Connect(SvxOle2Shape* pCreator = nullptr); + void Disconnect(); + void ObjectLoaded(); + +@@ -200,6 +201,16 @@ + void Connect() { GetRealObject(); } + }; + ++class SVXCORE_DLLPUBLIC SdrIFrameLink final : public sfx2::SvBaseLink ++{ ++ SdrOle2Obj* m_pObject; ++ ++public: ++ explicit SdrIFrameLink(SdrOle2Obj* pObject); ++ virtual ::sfx2::SvBaseLink::UpdateResult DataChanged( ++ const OUString& rMimeType, const css::uno::Any & rValue ) override; ++}; ++ + #endif // INCLUDED_SVX_SVDOOLE2_HXX + + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ +diff -urN libreoffice-7-0-4.old/include/svx/unoshape.hxx libreoffice-7-0-4/include/svx/unoshape.hxx +--- libreoffice-7-0-4.old/include/svx/unoshape.hxx 2023-05-24 17:17:08.688721561 +0200 ++++ libreoffice-7-0-4/include/svx/unoshape.hxx 2023-05-24 17:24:13.613547961 +0200 +@@ -607,6 +607,8 @@ + bool createObject( const SvGlobalName &aClassName ); + + void createLink( const OUString& aLinkURL ); ++ ++ virtual OUString GetAndClearInitialFrameURL(); + }; + + +diff -urN libreoffice-7-0-4.old/sc/source/ui/docshell/documentlinkmgr.cxx libreoffice-7-0-4/sc/source/ui/docshell/documentlinkmgr.cxx +--- libreoffice-7-0-4.old/sc/source/ui/docshell/documentlinkmgr.cxx 2023-05-24 17:17:08.692721562 +0200 ++++ libreoffice-7-0-4/sc/source/ui/docshell/documentlinkmgr.cxx 2023-05-24 17:24:13.613547961 +0200 +@@ -142,7 +142,7 @@ + sfx2::SvBaseLink* pBase = rLink.get(); + if (bDde && dynamic_cast(pBase)) + return true; +- if (bOle && dynamic_cast(pBase)) ++ if (bOle && (dynamic_cast(pBase) || dynamic_cast(pBase))) + return true; + if (bWebService && dynamic_cast(pBase)) + return true; +@@ -173,6 +173,13 @@ + continue; + } + ++ SdrIFrameLink* pIFrameLink = dynamic_cast(pBase); ++ if (pIFrameLink) ++ { ++ pIFrameLink->Update(); ++ continue; ++ } ++ + ScWebServiceLink* pWebserviceLink = dynamic_cast(pBase); + if (pWebserviceLink) + { +diff -urN libreoffice-7-0-4.old/sfx2/source/doc/iframe.cxx libreoffice-7-0-4/sfx2/source/doc/iframe.cxx +--- libreoffice-7-0-4.old/sfx2/source/doc/iframe.cxx 2023-05-24 17:17:38.000000000 +0200 ++++ libreoffice-7-0-4/sfx2/source/doc/iframe.cxx 2023-05-24 17:26:40.329719103 +0200 +@@ -33,10 +33,12 @@ + #include + #include + ++#include + #include + #include + #include + #include ++#include + #include + #include + #include +@@ -164,41 +166,57 @@ + uno::Reference < util::XURLTransformer > xTrans( util::URLTransformer::create( mxContext ) ); + xTrans->parseStrict( aTargetURL ); + +- if (INetURLObject(aTargetURL.Complete).GetProtocol() == INetProtocol::Macro) ++ INetURLObject aURLObject(aTargetURL.Complete); ++ if (aURLObject.GetProtocol() == INetProtocol::Macro || aURLObject.isSchemeEqualTo(u"vnd.sun.star.script")) ++ return false; ++ ++ uno::Reference xParentFrame = xFrame->getCreator(); ++ SfxObjectShell* pDoc = SfxMacroLoader::GetObjectShell(xParentFrame); ++ ++ bool bUpdateAllowed(true); ++ if (pDoc) ++ { ++ comphelper::EmbeddedObjectContainer& rEmbeddedObjectContainer = pDoc->getEmbeddedObjectContainer(); ++ bUpdateAllowed = rEmbeddedObjectContainer.getUserAllowsLinkUpdate(); ++ } ++ if (!bUpdateAllowed) ++ return false; ++ ++ OUString sReferer; ++ if (pDoc && pDoc->HasName()) ++ sReferer = pDoc->GetMedium()->GetName(); ++ ++ uno::Reference xParentWindow(xFrame->getContainerWindow()); ++ ++ if (!mxFrame.is()) + { +- uno::Reference xParentFrame = xFrame->getCreator(); +- SfxObjectShell* pDoc = SfxMacroLoader::GetObjectShell(xParentFrame); +- if (pDoc && !pDoc->AdjustMacroMode()) +- return false; ++ VclPtr pParent = VCLUnoHelper::GetWindow(xParentWindow); ++ VclPtr pWin = VclPtr::Create( pParent, maFrmDescr.IsFrameBorderOn() ); ++ pWin->SetSizePixel( pParent->GetOutputSizePixel() ); ++ pWin->SetBackground(); ++ pWin->Show(); ++ ++ uno::Reference < awt::XWindow > xWindow( pWin->GetComponentInterface(), uno::UNO_QUERY ); ++ xFrame->setComponent( xWindow, uno::Reference < frame::XController >() ); ++ ++ // we must destroy the IFrame before the parent is destroyed ++ xWindow->addEventListener( this ); ++ ++ mxFrame = frame::Frame::create( mxContext ); ++ uno::Reference < awt::XWindow > xWin( pWin->GetComponentInterface(), uno::UNO_QUERY ); ++ mxFrame->initialize( xWin ); ++ mxFrame->setName( maFrmDescr.GetName() ); ++ ++ uno::Reference < frame::XFramesSupplier > xFramesSupplier( xFrame, uno::UNO_QUERY ); ++ if ( xFramesSupplier.is() ) ++ mxFrame->setCreator( xFramesSupplier ); + } + +- DBG_ASSERT( !mxFrame.is(), "Frame already existing!" ); +- VclPtr pParent = VCLUnoHelper::GetWindow( xFrame->getContainerWindow() ); +- VclPtr pWin = VclPtr::Create( pParent, maFrmDescr.IsFrameBorderOn() ); +- pWin->SetSizePixel( pParent->GetOutputSizePixel() ); +- pWin->SetBackground(); +- pWin->Show(); +- +- uno::Reference < awt::XWindow > xWindow( pWin->GetComponentInterface(), uno::UNO_QUERY ); +- xFrame->setComponent( xWindow, uno::Reference < frame::XController >() ); +- +- // we must destroy the IFrame before the parent is destroyed +- xWindow->addEventListener( this ); +- +- mxFrame = frame::Frame::create( mxContext ); +- uno::Reference < awt::XWindow > xWin( pWin->GetComponentInterface(), uno::UNO_QUERY ); +- mxFrame->initialize( xWin ); +- mxFrame->setName( maFrmDescr.GetName() ); +- +- uno::Reference < frame::XFramesSupplier > xFramesSupplier( xFrame, uno::UNO_QUERY ); +- if ( xFramesSupplier.is() ) +- mxFrame->setCreator( xFramesSupplier ); +- +- uno::Sequence < beans::PropertyValue > aProps(2); +- aProps[0].Name = "PluginMode"; +- aProps[0].Value <<= sal_Int16(2); +- aProps[1].Name = "ReadOnly"; +- aProps[1].Value <<= true; ++ uno::Sequence < beans::PropertyValue > aProps{ ++ comphelper::makePropertyValue("PluginMode", sal_Int16(2)), ++ comphelper::makePropertyValue("ReadOnly", true), ++ comphelper::makePropertyValue("Referer", sReferer) ++ }; + uno::Reference < frame::XDispatch > xDisp = mxFrame->queryDispatch( aTargetURL, "_self", 0 ); + if ( xDisp.is() ) + xDisp->dispatch( aTargetURL, aProps ); +diff -urN libreoffice-7-0-4.old/svx/source/svdraw/svdoole2.cxx libreoffice-7-0-4/svx/source/svdraw/svdoole2.cxx +--- libreoffice-7-0-4.old/svx/source/svdraw/svdoole2.cxx 2023-05-24 17:17:08.692721562 +0200 ++++ libreoffice-7-0-4/svx/source/svdraw/svdoole2.cxx 2023-05-24 17:24:13.613547961 +0200 +@@ -67,6 +67,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -591,6 +592,35 @@ + SvBaseLink::Closed(); + } + ++SdrIFrameLink::SdrIFrameLink(SdrOle2Obj* pObject) ++ : ::sfx2::SvBaseLink(::SfxLinkUpdateMode::ONCALL, SotClipboardFormatId::SVXB) ++ , m_pObject(pObject) ++{ ++ SetSynchron( false ); ++} ++ ++::sfx2::SvBaseLink::UpdateResult SdrIFrameLink::DataChanged( ++ const OUString&, const uno::Any& ) ++{ ++ uno::Reference xObject = m_pObject->GetObjRef(); ++ uno::Reference xPersObj(xObject, uno::UNO_QUERY); ++ if (xPersObj.is()) ++ { ++ // let the IFrameObject reload the link ++ try ++ { ++ xPersObj->reload(uno::Sequence(), uno::Sequence()); ++ } ++ catch (const uno::Exception&) ++ { ++ } ++ ++ m_pObject->SetChanged(); ++ } ++ ++ return SUCCESS; ++} ++ + class SdrOle2ObjImpl + { + public: +@@ -608,7 +638,7 @@ + bool mbLoadingOLEObjectFailed:1; // New local var to avoid repeated loading if load of OLE2 fails + bool mbConnected:1; + +- SdrEmbedObjectLink* mpObjectLink; ++ sfx2::SvBaseLink* mpObjectLink; + OUString maLinkURL; + + rtl::Reference mxModifyListener; +@@ -808,7 +838,7 @@ + return !mpImpl->mxObjRef.is(); + } + +-void SdrOle2Obj::Connect() ++void SdrOle2Obj::Connect(SvxOle2Shape* pCreator) + { + if( IsEmptyPresObj() ) + return; +@@ -821,7 +851,7 @@ + return; + } + +- Connect_Impl(); ++ Connect_Impl(pCreator); + AddListeners_Impl(); + } + +@@ -920,24 +950,51 @@ + { + try + { +- uno::Reference< embed::XLinkageSupport > xLinkSupport( mpImpl->mxObjRef.GetObject(), uno::UNO_QUERY ); ++ uno::Reference xObject = mpImpl->mxObjRef.GetObject(); ++ if (!xObject) ++ return; ++ ++ bool bIFrame = false; ++ ++ OUString aLinkURL; ++ uno::Reference xLinkSupport(xObject, uno::UNO_QUERY); ++ if (xLinkSupport) ++ { ++ if (xLinkSupport->isLink()) ++ aLinkURL = xLinkSupport->getLinkURL(); ++ } ++ else ++ { ++ // get IFrame (Floating Frames) listed and updatable from the ++ // manage links dialog ++ SvGlobalName aClassId(xObject->getClassID()); ++ if (aClassId == SvGlobalName(SO3_IFRAME_CLASSID)) ++ { ++ uno::Reference xSet(xObject->getComponent(), uno::UNO_QUERY); ++ if (xSet.is()) ++ xSet->getPropertyValue("FrameURL") >>= aLinkURL; ++ bIFrame = true; ++ } ++ } + +- if ( xLinkSupport.is() && xLinkSupport->isLink() ) ++ if (!aLinkURL.isEmpty()) // this is a file link so the model link manager should handle it + { +- OUString aLinkURL = xLinkSupport->getLinkURL(); ++ sfx2::LinkManager* pLinkManager(getSdrModelFromSdrObject().GetLinkManager()); + +- if ( !aLinkURL.isEmpty() ) ++ if ( pLinkManager ) + { +- // this is a file link so the model link manager should handle it +- sfx2::LinkManager* pLinkManager(getSdrModelFromSdrObject().GetLinkManager()); +- +- if ( pLinkManager ) ++ SdrEmbedObjectLink* pEmbedObjectLink = nullptr; ++ if (!bIFrame) + { +- mpImpl->mpObjectLink = new SdrEmbedObjectLink( this ); +- mpImpl->maLinkURL = aLinkURL; +- pLinkManager->InsertFileLink( *mpImpl->mpObjectLink, sfx2::SvBaseLinkObjectType::ClientOle, aLinkURL ); +- mpImpl->mpObjectLink->Connect(); ++ pEmbedObjectLink = new SdrEmbedObjectLink(this); ++ mpImpl->mpObjectLink = pEmbedObjectLink; + } ++ else ++ mpImpl->mpObjectLink = new SdrIFrameLink(this); ++ mpImpl->maLinkURL = aLinkURL; ++ pLinkManager->InsertFileLink( *mpImpl->mpObjectLink, sfx2::SvBaseLinkObjectType::ClientOle, aLinkURL ); ++ if (pEmbedObjectLink) ++ pEmbedObjectLink->Connect(); + } + } + } +@@ -948,7 +1005,7 @@ + } + } + +-void SdrOle2Obj::Connect_Impl() ++void SdrOle2Obj::Connect_Impl(SvxOle2Shape* pCreator) + { + if(!mpImpl->aPersistName.isEmpty() ) + { +@@ -988,6 +1045,17 @@ + } + } + ++ if (pCreator) ++ { ++ OUString sFrameURL(pCreator->GetAndClearInitialFrameURL()); ++ if (!sFrameURL.isEmpty() && svt::EmbeddedObjectRef::TryRunningState(mpImpl->mxObjRef.GetObject())) ++ { ++ uno::Reference xSet(mpImpl->mxObjRef->getComponent(), uno::UNO_QUERY); ++ if (xSet.is()) ++ xSet->setPropertyValue("FrameURL", uno::Any(sFrameURL)); ++ } ++ } ++ + if ( mpImpl->mxObjRef.is() ) + { + if ( !mpImpl->mxLightClient.is() ) +@@ -1301,14 +1369,14 @@ + return createSdrGrafObjReplacement(false); + } + +-void SdrOle2Obj::SetPersistName( const OUString& rPersistName ) ++void SdrOle2Obj::SetPersistName( const OUString& rPersistName, SvxOle2Shape* pCreator ) + { + DBG_ASSERT( mpImpl->aPersistName.isEmpty(), "Persist name changed!"); + + mpImpl->aPersistName = rPersistName; + mpImpl->mbLoadingOLEObjectFailed = false; + +- Connect(); ++ Connect(pCreator); + SetChanged(); + } + +diff -urN libreoffice-7-0-4.old/svx/source/unodraw/shapeimpl.hxx libreoffice-7-0-4/svx/source/unodraw/shapeimpl.hxx +--- libreoffice-7-0-4.old/svx/source/unodraw/shapeimpl.hxx 2023-05-24 17:17:08.692721562 +0200 ++++ libreoffice-7-0-4/svx/source/unodraw/shapeimpl.hxx 2023-05-24 17:24:13.613547961 +0200 +@@ -64,8 +64,11 @@ + + virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage ) override; + }; ++ + class SvxFrameShape : public SvxOle2Shape + { ++private: ++ OUString m_sInitialFrameURL; + protected: + // override these for special property handling in subcasses. Return true if property is handled + virtual bool setPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const css::uno::Any& rValue ) override; +@@ -82,6 +85,8 @@ + virtual void SAL_CALL setPropertyValues( const css::uno::Sequence< OUString >& aPropertyNames, const css::uno::Sequence< css::uno::Any >& aValues ) override; + + virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage ) override; ++ ++ virtual OUString GetAndClearInitialFrameURL() override; + }; + + +diff -urN libreoffice-7-0-4.old/svx/source/unodraw/unoshap4.cxx libreoffice-7-0-4/svx/source/unodraw/unoshap4.cxx +--- libreoffice-7-0-4.old/svx/source/unodraw/unoshap4.cxx 2023-05-24 17:17:08.692721562 +0200 ++++ libreoffice-7-0-4/svx/source/unodraw/unoshap4.cxx 2023-05-24 17:24:13.613547961 +0200 +@@ -174,7 +174,7 @@ + #else + pOle = static_cast(GetSdrObject()); + #endif +- pOle->SetPersistName( aPersistName ); ++ pOle->SetPersistName( aPersistName, this ); + return true; + } + break; +@@ -495,10 +495,11 @@ + + void SvxOle2Shape::resetModifiedState() + { +- ::comphelper::IEmbeddedHelper* pPersist = GetSdrObject()->getSdrModelFromSdrObject().GetPersist(); ++ SdrObject* pObject = GetSdrObject(); ++ ::comphelper::IEmbeddedHelper* pPersist = pObject ? pObject->getSdrModelFromSdrObject().GetPersist() : nullptr; + if( pPersist && !pPersist->isEnableSetModified() ) + { +- SdrOle2Obj* pOle = dynamic_cast< SdrOle2Obj* >( GetSdrObject() ); ++ SdrOle2Obj* pOle = dynamic_cast< SdrOle2Obj* >(pObject); + if( pOle && !pOle->IsEmpty() ) + { + uno::Reference < util::XModifiable > xMod( pOle->GetObjRef(), uno::UNO_QUERY ); +@@ -548,6 +549,11 @@ + return aClassName; + } + ++OUString SvxOle2Shape::GetAndClearInitialFrameURL() ++{ ++ return OUString(); ++} ++ + SvxAppletShape::SvxAppletShape(SdrObject* pObject) + : SvxOle2Shape( pObject, getSvxMapProvider().GetMap(SVXMAP_APPLET), getSvxMapProvider().GetPropertySet(SVXMAP_APPLET, SdrObject::GetGlobalDrawObjectItemPool()) ) + { +@@ -701,8 +707,19 @@ + { + } + ++OUString SvxFrameShape::GetAndClearInitialFrameURL() ++{ ++ OUString sRet(m_sInitialFrameURL); ++ m_sInitialFrameURL.clear(); ++ return sRet; ++} ++ + void SvxFrameShape::Create( SdrObject* pNewObj, SvxDrawPage* pNewPage ) + { ++ uno::Reference xSet(static_cast(this), uno::UNO_QUERY); ++ if (xSet) ++ xSet->getPropertyValue("FrameURL") >>= m_sInitialFrameURL; ++ + SvxShape::Create( pNewObj, pNewPage ); + const SvGlobalName aIFrameClassId( SO3_IFRAME_CLASSID ); + createObject(aIFrameClassId); +diff -urN libreoffice-7-0-4.old/sw/inc/ndole.hxx libreoffice-7-0-4/sw/inc/ndole.hxx +--- libreoffice-7-0-4.old/sw/inc/ndole.hxx 2023-05-24 17:17:08.692721562 +0200 ++++ libreoffice-7-0-4/sw/inc/ndole.hxx 2023-05-24 17:24:13.613547961 +0200 +@@ -28,7 +28,7 @@ + class SwDoc; + class SwOLENode; + class SwOLEListener_Impl; +-class SwEmbedObjectLink; ++namespace sfx2 { class SvBaseLink; } + class DeflateData; + + class SW_DLLPUBLIC SwOLEObj +@@ -90,7 +90,7 @@ + bool mbOLESizeInvalid; /**< Should be considered at SwDoc::PrtOLENotify + (e.g. copied). Is not persistent. */ + +- SwEmbedObjectLink* mpObjectLink; ++ sfx2::SvBaseLink* mpObjectLink; + OUString maLinkURL; + + SwOLENode( const SwNodeIndex &rWhere, +diff -urN libreoffice-7-0-4.old/sw/source/core/ole/ndole.cxx libreoffice-7-0-4/sw/source/core/ole/ndole.cxx +--- libreoffice-7-0-4.old/sw/source/core/ole/ndole.cxx 2023-05-24 17:17:08.692721562 +0200 ++++ libreoffice-7-0-4/sw/source/core/ole/ndole.cxx 2023-05-24 17:24:13.613547961 +0200 +@@ -146,6 +146,8 @@ + // TODO/LATER: actually SwEmbedObjectLink should be used here, but because different objects are used to control + // embedded object different link objects with the same functionality had to be implemented + ++namespace { ++ + class SwEmbedObjectLink : public sfx2::SvBaseLink + { + SwOLENode* pOleNode; +@@ -208,6 +210,44 @@ + SvBaseLink::Closed(); + } + ++class SwIFrameLink : public sfx2::SvBaseLink ++{ ++ SwOLENode* m_pOleNode; ++ ++public: ++ explicit SwIFrameLink(SwOLENode* pNode) ++ : ::sfx2::SvBaseLink(::SfxLinkUpdateMode::ONCALL, SotClipboardFormatId::SVXB) ++ , m_pOleNode(pNode) ++ { ++ SetSynchron( false ); ++ } ++ ++ ::sfx2::SvBaseLink::UpdateResult DataChanged( ++ const OUString&, const uno::Any& ) ++ { ++ uno::Reference xObject = m_pOleNode->GetOLEObj().GetOleRef(); ++ uno::Reference xPersObj(xObject, uno::UNO_QUERY); ++ if (xPersObj.is()) ++ { ++ // let the IFrameObject reload the link ++ try ++ { ++ xPersObj->reload(uno::Sequence(), uno::Sequence()); ++ } ++ catch (const uno::Exception&) ++ { ++ } ++ ++ m_pOleNode->SetChanged(); ++ } ++ ++ return SUCCESS; ++ } ++ ++}; ++ ++} ++ + SwOLENode::SwOLENode( const SwNodeIndex &rWhere, + const svt::EmbeddedObjectRef& xObj, + SwGrfFormatColl *pGrfColl, +@@ -605,18 +645,49 @@ + { + try + { +- uno::Reference< embed::XLinkageSupport > xLinkSupport( maOLEObj.m_xOLERef.GetObject(), uno::UNO_QUERY_THROW ); +- if ( xLinkSupport->isLink() ) ++ uno::Reference xObject = maOLEObj.m_xOLERef.GetObject(); ++ if (!xObject) ++ return; ++ ++ bool bIFrame = false; ++ ++ OUString aLinkURL; ++ uno::Reference xLinkSupport(xObject, uno::UNO_QUERY); ++ if (xLinkSupport) ++ { ++ if (xLinkSupport->isLink()) ++ aLinkURL = xLinkSupport->getLinkURL(); ++ } ++ else ++ { ++ // get IFrame (Floating Frames) listed and updatable from the ++ // manage links dialog ++ SvGlobalName aClassId(xObject->getClassID()); ++ if (aClassId == SvGlobalName(SO3_IFRAME_CLASSID)) ++ { ++ uno::Reference xSet(xObject->getComponent(), uno::UNO_QUERY); ++ if (xSet.is()) ++ xSet->getPropertyValue("FrameURL") >>= aLinkURL; ++ bIFrame = true; ++ } ++ } ++ ++ if (!aLinkURL.isEmpty()) // this is a file link so the model link manager should handle it + { +- const OUString aLinkURL = xLinkSupport->getLinkURL(); +- if ( !aLinkURL.isEmpty() ) ++ SwEmbedObjectLink* pEmbedObjectLink = nullptr; ++ if (!bIFrame) ++ { ++ pEmbedObjectLink = new SwEmbedObjectLink(this); ++ mpObjectLink = pEmbedObjectLink; ++ } ++ else + { +- // this is a file link so the model link manager should handle it +- mpObjectLink = new SwEmbedObjectLink( this ); +- maLinkURL = aLinkURL; +- GetDoc()->getIDocumentLinksAdministration().GetLinkManager().InsertFileLink( *mpObjectLink, sfx2::SvBaseLinkObjectType::ClientOle, aLinkURL ); +- mpObjectLink->Connect(); ++ mpObjectLink = new SwIFrameLink(this); + } ++ maLinkURL = aLinkURL; ++ GetDoc()->getIDocumentLinksAdministration().GetLinkManager().InsertFileLink( *mpObjectLink, sfx2::SvBaseLinkObjectType::ClientOle, aLinkURL ); ++ if (pEmbedObjectLink) ++ pEmbedObjectLink->Connect(); + } + } + catch( uno::Exception& ) +diff -urN libreoffice-7-0-4.old/xmloff/source/draw/ximpshap.cxx libreoffice-7-0-4/xmloff/source/draw/ximpshap.cxx +--- libreoffice-7-0-4.old/xmloff/source/draw/ximpshap.cxx 2023-05-24 17:17:38.000000000 +0200 ++++ libreoffice-7-0-4/xmloff/source/draw/ximpshap.cxx 2023-05-24 17:26:15.413109472 +0200 +@@ -3245,9 +3245,35 @@ + { + } + ++uno::Reference SdXMLFloatingFrameShapeContext::CreateFloatingFrameShape() const ++{ ++ uno::Reference xServiceFact(GetImport().GetModel(), uno::UNO_QUERY); ++ if (!xServiceFact.is()) ++ return nullptr; ++ uno::Reference xShape( ++ xServiceFact->createInstance("com.sun.star.drawing.FrameShape"), uno::UNO_QUERY); ++ return xShape; ++} ++ + void SdXMLFloatingFrameShapeContext::StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& ) + { +- AddShape("com.sun.star.drawing.FrameShape"); ++ uno::Reference xShape(SdXMLFloatingFrameShapeContext::CreateFloatingFrameShape()); ++ ++ uno::Reference< beans::XPropertySet > xProps(xShape, uno::UNO_QUERY); ++ // set FrameURL before AddShape, we have to do it again later because it ++ // gets cleared when the SdrOle2Obj is attached to the XShape. But we want ++ // FrameURL to exist when AddShape triggers SetPersistName which itself ++ // triggers SdrOle2Obj::CheckFileLink_Impl and at that point we want to ++ // know what URL will end up being used. So bodge this by setting FrameURL ++ // to the temp pre-SdrOle2Obj attached properties and we can smuggle it ++ // eventually into SdrOle2Obj::SetPersistName at the right point after ++ // PersistName is set but before SdrOle2Obj::CheckFileLink_Impl is called ++ // in order to inform the link manager that this is an IFrame that links to ++ // a URL ++ if (xProps && !maHref.isEmpty()) ++ xProps->setPropertyValue("FrameURL", Any(maHref)); ++ ++ AddShape(xShape); + + if( mxShape.is() ) + { +@@ -3256,7 +3282,6 @@ + // set pos, size, shear and rotate + SetTransformation(); + +- uno::Reference< beans::XPropertySet > xProps( mxShape, uno::UNO_QUERY ); + if( xProps.is() ) + { + if( !maFrameName.isEmpty() ) +diff -urN libreoffice-7-0-4.old/xmloff/source/draw/ximpshap.hxx libreoffice-7-0-4/xmloff/source/draw/ximpshap.hxx +--- libreoffice-7-0-4.old/xmloff/source/draw/ximpshap.hxx 2023-05-24 17:17:08.692721562 +0200 ++++ libreoffice-7-0-4/xmloff/source/draw/ximpshap.hxx 2023-05-24 17:24:13.613547961 +0200 +@@ -513,6 +513,8 @@ + OUString maFrameName; + OUString maHref; + ++ css::uno::Reference CreateFloatingFrameShape() const; ++ + public: + + SdXMLFloatingFrameShapeContext( SvXMLImport& rImport, sal_uInt16 nPrfx, diff --git a/debian/patches/CVE-2024-12425.patch b/debian/patches/CVE-2024-12425.patch new file mode 100644 index 00000000000..2a351522c89 --- /dev/null +++ b/debian/patches/CVE-2024-12425.patch @@ -0,0 +1,59 @@ +From 02e3aea1b2cfa3c686aab10721f9a89ecc382732 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Fri, 8 Nov 2024 16:51:47 +0000 +Subject: [PATCH] be conservative on allowed temp font names + +Change-Id: Iefdc1a8c9b4c7e8c08c84f747f8287ac3c419839 +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176236 +Reviewed-by: Michael Stahl +Tested-by: Jenkins +(cherry picked from commit f761d098e9a0960554aa4fc02f84a711b50a1cff) + +origin: https://github.com/LibreOffice/core/commit/02e3aea1b2cfa3c686aab10721f9a89ecc382732 +bug: https://www.libreoffice.org/about-us/security/advisories/cve-2024-12425 +bug-gerrit: https://gerrit.libreoffice.org/c/core/+/176236 +--- + vcl/source/gdi/embeddedfontshelper.cxx | 16 ++++++++++++---- + 1 file changed, 12 insertions(+), 4 deletions(-) + +Index: libreoffice/vcl/source/gdi/embeddedfontshelper.cxx +=================================================================== +--- libreoffice.orig/vcl/source/gdi/embeddedfontshelper.cxx ++++ libreoffice/vcl/source/gdi/embeddedfontshelper.cxx +@@ -17,6 +17,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -188,10 +189,6 @@ void EmbeddedFontsHelper::activateFonts( + + OUString EmbeddedFontsHelper::fileUrlForTemporaryFont( const OUString& fontName, const char* extra ) + { +- OUString path = "${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE( "bootstrap") "::UserInstallation}"; +- rtl::Bootstrap::expandMacros( path ); +- path += "/user/temp/embeddedfonts/fromdocs/"; +- osl::Directory::createPath( path ); + OUString filename = fontName; + static int uniqueCounter = 0; + if( strcmp( extra, "?" ) == 0 ) +@@ -199,6 +196,17 @@ OUString EmbeddedFontsHelper::fileUrlFor + else + filename += OStringToOUString( extra, RTL_TEXTENCODING_ASCII_US ); + filename += ".ttf"; // TODO is it always ttf? ++ ++ if (!::comphelper::OStorageHelper::IsValidZipEntryFileName(filename, false)) ++ { ++ SAL_WARN( "vcl.fonts", "Cannot use filename: " << filename << " for temporary font"); ++ filename = "font" + OUString::number(uniqueCounter++) + ".ttf"; ++ } ++ ++ OUString path = "${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE( "bootstrap") "::UserInstallation}"; ++ rtl::Bootstrap::expandMacros( path ); ++ path += "/user/temp/embeddedfonts/fromdocs/"; ++ osl::Directory::createPath( path ); + return path + filename; + } + diff --git a/debian/patches/CVE-2024-12426_1.patch b/debian/patches/CVE-2024-12426_1.patch new file mode 100644 index 00000000000..d432f2f79ff --- /dev/null +++ b/debian/patches/CVE-2024-12426_1.patch @@ -0,0 +1,218 @@ +From a32a6301e4ba0c979f5a6b593062749654f3c320 Mon Sep 17 00:00:00 2001 +From: Stephan Bergmann +Date: Tue, 11 Jun 2024 14:15:47 +0200 +Subject: [PATCH] Some missing "block untrusted referer links" for form + controls + +...where "Referer" is now passed in as an additional property, so that the +relevant objects can decide whether to obtain graphics while loading a document + +Change-Id: Ie3dabc574861713212b906a0d7793f438a7d50a8 +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168674 +Tested-by: Jenkins +Reviewed-by: Stephan Bergmann +(cherry picked from commit dc01a6e7efd3e4c41287dc10c7ea1fdfa1ab5cb5) + +[backport] +Prepare CVE-2024-12426 fixes + +origin: https://github.com/LibreOffice/core/commit/a32a6301e4ba0c979f5a6b593062749654f3c320 +--- + forms/source/component/ImageControl.cxx | 7 +++++++ + forms/source/component/clickableimage.cxx | 9 +++++++-- + include/toolkit/controls/unocontrols.hxx | 2 +- + include/toolkit/helper/property.hxx | 1 + + toolkit/source/awt/vclxwindows.cxx | 1 + + toolkit/source/controls/dialogcontrol.cxx | 4 ++-- + toolkit/source/controls/unocontrols.cxx | 13 +++++++++---- + toolkit/source/helper/property.cxx | 2 ++ + xmloff/source/forms/elementimport.cxx | 9 +++++++++ + 9 files changed, 39 insertions(+), 9 deletions(-) + +Index: libreoffice/forms/source/component/ImageControl.cxx +=================================================================== +--- libreoffice.orig/forms/source/component/ImageControl.cxx ++++ libreoffice/forms/source/component/ImageControl.cxx +@@ -51,6 +51,7 @@ + #include + #include + #include ++#include + #include + #include + +@@ -389,6 +390,12 @@ void OImageControlModel::read(const Refe + + bool OImageControlModel::impl_updateStreamForURL_lck( const OUString& _rURL, ValueChangeInstigator _eInstigator ) + { ++ OUString referer; ++ getPropertyValue("Referer") >>= referer; ++ if (SvtSecurityOptions().isUntrustedReferer(referer)) { ++ return false; ++ } ++ + // create a stream for the image specified by the URL + std::unique_ptr< SvStream > pImageStream; + Reference< XInputStream > xImageStream; +Index: libreoffice/forms/source/component/clickableimage.cxx +=================================================================== +--- libreoffice.orig/forms/source/component/clickableimage.cxx ++++ libreoffice/forms/source/component/clickableimage.cxx +@@ -46,6 +46,7 @@ + #include + #include + #include ++#include + #define LOCAL_URL_PREFIX '#' + + +@@ -763,8 +764,12 @@ namespace frm + + m_bProdStarted = false; + +- // Kick off download (caution: can be synchronous). +- m_pMedium->Download(LINK(this, OClickableImageBaseModel, DownloadDoneLink)); ++ OUString referer; ++ getPropertyValue("Referer") >>= referer; ++ if (!SvtSecurityOptions().isUntrustedReferer(referer)) { ++ // Kick off download (caution: can be synchronous). ++ m_pMedium->Download(LINK(this, OClickableImageBaseModel, DownloadDoneLink)); ++ } + } + else + { +Index: libreoffice/include/toolkit/controls/unocontrols.hxx +=================================================================== +--- libreoffice.orig/include/toolkit/controls/unocontrols.hxx ++++ libreoffice/include/toolkit/controls/unocontrols.hxx +@@ -69,7 +69,7 @@ public: + // appropriately ( e.g. NULL if non GraphicObject scheme ) or a valid + // object if the rURL points to a valid object + static css::uno::Reference< css::graphic::XGraphic > getGraphicAndGraphicObjectFromURL_nothrow( css::uno::Reference< css::graphic::XGraphicObject >& xOutGraphicObject, const OUString& _rURL ); +- static css::uno::Reference< css::graphic::XGraphic > getGraphicFromURL_nothrow( const OUString& _rURL ); ++ static css::uno::Reference< css::graphic::XGraphic > getGraphicFromURL_nothrow( const OUString& _rURL, OUString const & referer ); + + }; + +Index: libreoffice/include/toolkit/helper/property.hxx +=================================================================== +--- libreoffice.orig/include/toolkit/helper/property.hxx ++++ libreoffice/include/toolkit/helper/property.hxx +@@ -208,6 +208,7 @@ namespace uno { + #define BASEPROPERTY_ACTIVE_SEL_TEXT_COLOR 167 + #define BASEPROPERTY_INACTIVE_SEL_TEXT_COLOR 168 + #define BASEPROPERTY_TYPEDITEMLIST 169 // AnySequence ++#define BASEPROPERTY_REFERER 172 + + + // These properties are not bound, they are always extracted from the BASEPROPERTY_FONTDESCRIPTOR property +Index: libreoffice/toolkit/source/awt/vclxwindows.cxx +=================================================================== +--- libreoffice.orig/toolkit/source/awt/vclxwindows.cxx ++++ libreoffice/toolkit/source/awt/vclxwindows.cxx +@@ -209,6 +209,7 @@ namespace toolkit + + void VCLXGraphicControl::ImplGetPropertyIds( std::vector< sal_uInt16 > &rIds ) + { ++ PushPropertyIds(rIds, BASEPROPERTY_REFERER, 0); + VCLXWindow::ImplGetPropertyIds( rIds ); + } + +Index: libreoffice/toolkit/source/controls/dialogcontrol.cxx +=================================================================== +--- libreoffice.orig/toolkit/source/controls/dialogcontrol.cxx ++++ libreoffice/toolkit/source/controls/dialogcontrol.cxx +@@ -410,7 +410,7 @@ void UnoDialogControl::PrepareWindowDesc + ( !aImageURL.isEmpty() )) + { + OUString absoluteUrl = getPhysicalLocation(ImplGetPropertyValue(PROPERTY_DIALOGSOURCEURL), uno::makeAny(aImageURL)); +- xGraphic = ImageHelper::getGraphicFromURL_nothrow( absoluteUrl ); ++ xGraphic = ImageHelper::getGraphicFromURL_nothrow( absoluteUrl, "" ); + ImplSetPropertyValue( PROPERTY_GRAPHIC, uno::makeAny( xGraphic ), true ); + } + } +@@ -623,7 +623,7 @@ void UnoDialogControl::ImplModelProperti + ( !aImageURL.isEmpty() )) + { + OUString absoluteUrl = getPhysicalLocation(ImplGetPropertyValue(GetPropertyName(BASEPROPERTY_DIALOGSOURCEURL)), uno::makeAny(aImageURL)); +- xGraphic = ImageHelper::getGraphicFromURL_nothrow( absoluteUrl ); ++ xGraphic = ImageHelper::getGraphicFromURL_nothrow( absoluteUrl, "" ); + } + ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_GRAPHIC), uno::makeAny( xGraphic ), true ); + break; +Index: libreoffice/toolkit/source/controls/unocontrols.cxx +=================================================================== +--- libreoffice.orig/toolkit/source/controls/unocontrols.cxx ++++ libreoffice/toolkit/source/controls/unocontrols.cxx +@@ -34,6 +34,7 @@ + #include + #include + #include ++#include + + // for introspection + #include +@@ -60,14 +61,14 @@ uno::Reference< graphic::XGraphic > + ImageHelper::getGraphicAndGraphicObjectFromURL_nothrow( uno::Reference< graphic::XGraphicObject >& xOutGraphicObj, const OUString& _rURL ) + { + xOutGraphicObj = nullptr; +- return ImageHelper::getGraphicFromURL_nothrow( _rURL ); ++ return ImageHelper::getGraphicFromURL_nothrow( _rURL, "" ); + } + + css::uno::Reference< css::graphic::XGraphic > +-ImageHelper::getGraphicFromURL_nothrow( const OUString& _rURL ) ++ImageHelper::getGraphicFromURL_nothrow( const OUString& _rURL, OUString const & referer ) + { + uno::Reference< graphic::XGraphic > xGraphic; +- if ( _rURL.isEmpty() ) ++ if ( _rURL.isEmpty() || SvtSecurityOptions().isUntrustedReferer(referer) ) + return xGraphic; + + try +@@ -609,7 +610,11 @@ void SAL_CALL GraphicControlModel::setFa + mbAdjustingGraphic = true; + OUString sImageURL; + OSL_VERIFY( rValue >>= sImageURL ); +- setDependentFastPropertyValue( BASEPROPERTY_GRAPHIC, uno::makeAny( ImageHelper::getGraphicFromURL_nothrow( sImageURL ) ) ); ++ css::uno::Any any; ++ getFastPropertyValue(any, BASEPROPERTY_REFERER); ++ OUString referer; ++ any >>= referer; ++ setDependentFastPropertyValue( BASEPROPERTY_GRAPHIC, uno::makeAny( ImageHelper::getGraphicFromURL_nothrow( sImageURL, referer ) ) ); + mbAdjustingGraphic = false; + } + break; +Index: libreoffice/toolkit/source/helper/property.cxx +=================================================================== +--- libreoffice.orig/toolkit/source/helper/property.cxx ++++ libreoffice/toolkit/source/helper/property.cxx +@@ -267,6 +267,8 @@ static ImplPropertyInfo* ImplGetProperty + DECL_PROP_3 ( "InactiveSelectionBackgroundColor", INACTIVE_SEL_BACKGROUND_COLOR, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ), + DECL_PROP_3 ( "ActiveSelectionTextColor", ACTIVE_SEL_TEXT_COLOR, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ), + DECL_PROP_3 ( "InactiveSelectionTextColor", INACTIVE_SEL_TEXT_COLOR, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ), ++ ++ DECL_PROP_2("Referer", REFERER, OUString, BOUND, MAYBEVOID), + }; + rElementCount = SAL_N_ELEMENTS(aImplPropertyInfos); + return aImplPropertyInfos; +Index: libreoffice/xmloff/source/forms/elementimport.cxx +=================================================================== +--- libreoffice.orig/xmloff/source/forms/elementimport.cxx ++++ libreoffice/xmloff/source/forms/elementimport.cxx +@@ -558,6 +558,15 @@ namespace xmloff + OSL_ENSURE(xPure.is(), + OStringBuffer("OElementImport::createElement: service factory gave me no object (service name: ").append(OUStringToOString(m_sServiceName, RTL_TEXTENCODING_ASCII_US)).append(")!").getStr()); + xReturn.set(xPure, UNO_QUERY); ++ if (auto const props = Reference(xPure, css::uno::UNO_QUERY)) ++ { ++ try { ++ props->setPropertyValue( ++ "Referer", css::uno::Any(m_rFormImport.getGlobalContext().GetBaseURL())); ++ } catch (css::uno::Exception &) { ++ TOOLS_INFO_EXCEPTION("xmloff.forms", "setPropertyValue Referer failed"); ++ } ++ } + } + else + OSL_FAIL("OElementImport::createElement: no service name to create an element!"); diff --git a/debian/patches/CVE-2024-12426_2.patch b/debian/patches/CVE-2024-12426_2.patch new file mode 100644 index 00000000000..c92834da5a0 --- /dev/null +++ b/debian/patches/CVE-2024-12426_2.patch @@ -0,0 +1,237 @@ +From a22d185ef7d141676e8a4db15471bfe6d283cb8c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Fri, 15 Nov 2024 12:30:39 +0000 +Subject: [PATCH] consider VndSunStarExpand an exotic protocol + +and generally don't bother with it when fetching data +from urls + +Change-Id: I51a2601c6fb7d6c32f9e2d1286ee0d3b05b370b9 +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176797 +Tested-by: Jenkins +Reviewed-by: Michael Stahl +(cherry picked from commit d6c89af2598e866aa9cb4fa3600691fb558befdb) + +origin: https://github.com/LibreOffice/core/commit/a22d185ef7d141676e8a4db15471bfe6d283cb8c +bug: https://www.libreoffice.org/about-us/security/advisories/cve-2024-12426 +--- + avmedia/source/viewer/mediawindow_impl.cxx | 11 +++++++---- + editeng/source/items/frmitems.cxx | 9 +++++++-- + embeddedobj/source/commonembedding/persistence.cxx | 8 ++++++++ + forms/source/component/ImageControl.cxx | 2 +- + forms/source/component/clickableimage.cxx | 2 +- + sfx2/source/appl/linkmgr2.cxx | 5 ++++- + sw/source/filter/html/htmlgrin.cxx | 3 ++- + toolkit/source/controls/unocontrols.cxx | 3 ++- + tools/source/fsys/urlobj.cxx | 1 + + unotools/source/misc/mediadescriptor.cxx | 3 +++ + vcl/source/filter/graphicfilter.cxx | 8 +++++++- + 11 files changed, 43 insertions(+), 12 deletions(-) + +Index: libreoffice/avmedia/source/viewer/mediawindow_impl.cxx +=================================================================== +--- libreoffice.orig/avmedia/source/viewer/mediawindow_impl.cxx ++++ libreoffice/avmedia/source/viewer/mediawindow_impl.cxx +@@ -168,16 +168,19 @@ void MediaWindowImpl::dispose() + + uno::Reference MediaWindowImpl::createPlayer(const OUString& rURL, const OUString& rReferer, const OUString* pMimeType) + { +- uno::Reference xPlayer; +- + if( rURL.isEmpty() ) +- return xPlayer; ++ return nullptr; + + if (SvtSecurityOptions().isUntrustedReferer(rReferer)) + { +- return xPlayer; ++ return nullptr; + } + ++ if (INetURLObject(rURL).IsExoticProtocol()) ++ return nullptr; ++ ++ uno::Reference xPlayer; ++ + if (!pMimeType || *pMimeType == AVMEDIA_MIMETYPE_COMMON) + { + uno::Reference xContext(::comphelper::getProcessComponentContext()); +Index: libreoffice/editeng/source/items/frmitems.cxx +=================================================================== +--- libreoffice.orig/editeng/source/items/frmitems.cxx ++++ libreoffice/editeng/source/items/frmitems.cxx +@@ -3118,6 +3118,13 @@ const GraphicObject* SvxBrushItem::GetGr + return nullptr; + } + ++ INetURLObject aGraphicURL( maStrLink ); ++ if (aGraphicURL.IsExoticProtocol()) ++ { ++ SAL_WARN("editeng", "Ignore exotic protocol: " << maStrLink); ++ return nullptr; ++ } ++ + // tdf#94088 prepare graphic and state + Graphic aGraphic; + bool bGraphicLoaded = false; +@@ -3138,8 +3145,6 @@ const GraphicObject* SvxBrushItem::GetGr + // a 'data:' scheme url and try to load that (embedded graphics) + if(!bGraphicLoaded) + { +- INetURLObject aGraphicURL( maStrLink ); +- + if( INetProtocol::Data == aGraphicURL.GetProtocol() ) + { + std::unique_ptr const xMemStream(aGraphicURL.getData()); +Index: libreoffice/embeddedobj/source/commonembedding/persistence.cxx +=================================================================== +--- libreoffice.orig/embeddedobj/source/commonembedding/persistence.cxx ++++ libreoffice/embeddedobj/source/commonembedding/persistence.cxx +@@ -51,6 +51,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -369,6 +370,13 @@ uno::Reference< util::XCloseable > OComm + + sal_Int32 nLen = 2; + uno::Sequence< beans::PropertyValue > aArgs( nLen ); ++ ++ if (INetURLObject(m_aLinkURL).IsExoticProtocol()) ++ { ++ SAL_WARN("embeddedobj.common", "Ignore exotic protocol: " << m_aLinkURL); ++ return nullptr; ++ } ++ + aArgs[0].Name = "URL"; + aArgs[0].Value <<= m_aLinkURL; + aArgs[1].Name = "FilterName"; +Index: libreoffice/forms/source/component/ImageControl.cxx +=================================================================== +--- libreoffice.orig/forms/source/component/ImageControl.cxx ++++ libreoffice/forms/source/component/ImageControl.cxx +@@ -392,7 +392,7 @@ bool OImageControlModel::impl_updateStre + { + OUString referer; + getPropertyValue("Referer") >>= referer; +- if (SvtSecurityOptions().isUntrustedReferer(referer)) { ++ if (SvtSecurityOptions().isUntrustedReferer(referer) || INetURLObject(_rURL).IsExoticProtocol()) { + return false; + } + +Index: libreoffice/forms/source/component/clickableimage.cxx +=================================================================== +--- libreoffice.orig/forms/source/component/clickableimage.cxx ++++ libreoffice/forms/source/component/clickableimage.cxx +@@ -743,7 +743,7 @@ namespace frm + + // the SfxMedium is not allowed to be created with an invalid URL, so we have to check this first + INetURLObject aUrl(rURL); +- if (INetProtocol::NotValid == aUrl.GetProtocol()) ++ if (INetProtocol::NotValid == aUrl.GetProtocol() || aUrl.IsExoticProtocol()) + // we treat an invalid URL like we would treat no URL + return; + +Index: libreoffice/sfx2/source/appl/linkmgr2.cxx +=================================================================== +--- libreoffice.orig/sfx2/source/appl/linkmgr2.cxx ++++ libreoffice/sfx2/source/appl/linkmgr2.cxx +@@ -524,8 +524,11 @@ bool LinkManager::GetGraphicFromAny(cons + sReferer = sh->GetMedium()->GetName(); + + OUString sURL = rValue.get(); +- if (!SvtSecurityOptions().isUntrustedReferer(sReferer)) ++ if (!SvtSecurityOptions().isUntrustedReferer(sReferer) && ++ !INetURLObject(sURL).IsExoticProtocol()) ++ { + rGraphic = vcl::graphic::loadFromURL(sURL, pParentWin); ++ } + if (rGraphic.IsNone()) + rGraphic.SetDefaultType(); + rGraphic.setOriginURL(sURL); +Index: libreoffice/sw/source/filter/html/htmlgrin.cxx +=================================================================== +--- libreoffice.orig/sw/source/filter/html/htmlgrin.cxx ++++ libreoffice/sw/source/filter/html/htmlgrin.cxx +@@ -642,7 +642,8 @@ IMAGE_SETEVENT: + + // bPercentWidth / bPercentHeight means we have a percent size. If that's not the case and we have no + // size from nWidth / nHeight either, then inspect the image header. +- if ((!bPercentWidth && !nWidth) && (!bPercentHeight && !nHeight) && allowAccessLink(*m_xDoc)) ++ if ((!bPercentWidth && !nWidth) && (!bPercentHeight && !nHeight) && allowAccessLink(*m_xDoc) && ++ !aGraphicURL.IsExoticProtocol()) + { + GraphicDescriptor aDescriptor(aGraphicURL); + if (aDescriptor.Detect(/*bExtendedInfo=*/true)) +Index: libreoffice/toolkit/source/controls/unocontrols.cxx +=================================================================== +--- libreoffice.orig/toolkit/source/controls/unocontrols.cxx ++++ libreoffice/toolkit/source/controls/unocontrols.cxx +@@ -33,6 +33,7 @@ + #include + #include + #include ++#include + #include + #include + +@@ -68,7 +69,7 @@ css::uno::Reference< css::graphic::XGrap + ImageHelper::getGraphicFromURL_nothrow( const OUString& _rURL, OUString const & referer ) + { + uno::Reference< graphic::XGraphic > xGraphic; +- if ( _rURL.isEmpty() || SvtSecurityOptions().isUntrustedReferer(referer) ) ++ if ( _rURL.isEmpty() || SvtSecurityOptions().isUntrustedReferer(referer) || INetURLObject(_rURL).IsExoticProtocol()) + return xGraphic; + + try +Index: libreoffice/tools/source/fsys/urlobj.cxx +=================================================================== +--- libreoffice.orig/tools/source/fsys/urlobj.cxx ++++ libreoffice/tools/source/fsys/urlobj.cxx +@@ -4765,6 +4765,7 @@ bool INetURLObject::IsExoticProtocol() c + return m_eScheme == INetProtocol::Slot || + m_eScheme == INetProtocol::Macro || + m_eScheme == INetProtocol::Uno || ++ m_eScheme == INetProtocol::VndSunStarExpand || + isSchemeEqualTo(u"vnd.sun.star.script") || + isSchemeEqualTo(u"service"); + } +Index: libreoffice/unotools/source/misc/mediadescriptor.cxx +=================================================================== +--- libreoffice.orig/unotools/source/misc/mediadescriptor.cxx ++++ libreoffice/unotools/source/misc/mediadescriptor.cxx +@@ -601,6 +601,9 @@ bool MediaDescriptor::impl_openStreamWit + /*-----------------------------------------------*/ + bool MediaDescriptor::impl_openStreamWithURL( const OUString& sURL, bool bLockFile ) + { ++ if (INetURLObject(sURL).IsExoticProtocol()) ++ return false; ++ + OUString referer(getUnpackedValueOrDefault(PROP_REFERRER(), OUString())); + if (SvtSecurityOptions().isUntrustedReferer(referer)) { + return false; +Index: libreoffice/vcl/source/filter/graphicfilter.cxx +=================================================================== +--- libreoffice.orig/vcl/source/filter/graphicfilter.cxx ++++ libreoffice/vcl/source/filter/graphicfilter.cxx +@@ -967,10 +967,16 @@ ErrCode GraphicFilter::CanImportGraphic( + ErrCode GraphicFilter::ImportGraphic( Graphic& rGraphic, const INetURLObject& rPath, + sal_uInt16 nFormat, sal_uInt16 * pDeterminedFormat, GraphicFilterImportFlags nImportFlags ) + { +- ErrCode nRetValue = ERRCODE_GRFILTER_FORMATERROR; + SAL_WARN_IF( rPath.GetProtocol() == INetProtocol::NotValid, "vcl.filter", "GraphicFilter::ImportGraphic() : ProtType == INetProtocol::NotValid" ); + + OUString aMainUrl( rPath.GetMainURL( INetURLObject::DecodeMechanism::NONE ) ); ++ if (rPath.IsExoticProtocol()) ++ { ++ SAL_WARN("vcl.filter", "GraphicFilter::ImportGraphic(), ignore exotic protocol: " << aMainUrl); ++ return ERRCODE_GRFILTER_FORMATERROR; ++ } ++ ++ ErrCode nRetValue = ERRCODE_GRFILTER_FORMATERROR; + std::unique_ptr xStream(::utl::UcbStreamHelper::CreateStream( aMainUrl, StreamMode::READ | StreamMode::SHARE_DENYNONE )); + if (xStream) + { diff --git a/debian/patches/CVE-2024-12426_3.patch b/debian/patches/CVE-2024-12426_3.patch new file mode 100644 index 00000000000..2240c67d203 --- /dev/null +++ b/debian/patches/CVE-2024-12426_3.patch @@ -0,0 +1,55 @@ +From 4915889ab56bc946264c257391ba6eeedfdfad95 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Fri, 6 Dec 2024 14:41:19 +0000 +Subject: [PATCH] look at 'embedded' protocols too +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Change-Id: Ie99f5f5a390639bdc69397c831e0a32594a5030c +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177981 +Tested-by: Jenkins +Reviewed-by: Caolán McNamara +(cherry picked from commit 59891cd3985469bc44dbd05c9fc704eeb07f0c78) +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177987 +Reviewed-by: Stephan Bergmann +(cherry picked from commit b63aa51c55244ee67410201fa5e7c003427b1009) + +origin: https://github.com/LibreOffice/core/commit/4915889ab56bc946264c257391ba6eeedfdfad95 +bug: https://www.libreoffice.org/about-us/security/advisories/cve-2024-12426 +--- + tools/source/fsys/urlobj.cxx | 21 +++++++++++++++------ + 1 file changed, 15 insertions(+), 6 deletions(-) + +Index: libreoffice/tools/source/fsys/urlobj.cxx +=================================================================== +--- libreoffice.orig/tools/source/fsys/urlobj.cxx ++++ libreoffice/tools/source/fsys/urlobj.cxx +@@ -4762,12 +4762,21 @@ OUString INetURLObject::CutExtension() + + bool INetURLObject::IsExoticProtocol() const + { +- return m_eScheme == INetProtocol::Slot || +- m_eScheme == INetProtocol::Macro || +- m_eScheme == INetProtocol::Uno || +- m_eScheme == INetProtocol::VndSunStarExpand || +- isSchemeEqualTo(u"vnd.sun.star.script") || +- isSchemeEqualTo(u"service"); ++ if (m_eScheme == INetProtocol::Slot || ++ m_eScheme == INetProtocol::Macro || ++ m_eScheme == INetProtocol::Uno || ++ m_eScheme == INetProtocol::VndSunStarExpand || ++ isSchemeEqualTo(u"vnd.sun.star.script") || ++ isSchemeEqualTo(u"service")) ++ { ++ return true; ++ } ++ if (isSchemeEqualTo(u"vnd.sun.star.pkg") || isSchemeEqualTo(u"vnd.sun.star.zip")) ++ { ++ OUString sPayloadURL = GetURLPath(INetURLObject::DecodeMechanism::WithCharset); ++ return sPayloadURL.startsWith(u"//") && INetURLObject(sPayloadURL.subView(2)).IsExoticProtocol(); ++ } ++ return false; + } + + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/debian/patches/CVE-2024-12426_4.patch b/debian/patches/CVE-2024-12426_4.patch new file mode 100644 index 00000000000..ee479b8414b --- /dev/null +++ b/debian/patches/CVE-2024-12426_4.patch @@ -0,0 +1,111 @@ +From eab0da77dfb4a54d14968eb72532e045bfffa0fb Mon Sep 17 00:00:00 2001 +From: Stephan Bergmann +Date: Sat, 7 Dec 2024 17:36:22 +0100 +Subject: [PATCH] Fix check for further exotic protocols + +...that were added in 59891cd3985469bc44dbd05c9fc704eeb07f0c78 "look at +'embedded' protocols for protocols that support them" + +Change-Id: I42836d6fd27cd99e39ab07e626053f002a2651f5 +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178047 +Tested-by: Jenkins +Reviewed-by: Stephan Bergmann +(cherry picked from commit 8075798b22f2188530f57b8747589923bfd419ef) + +origin: https://github.com/LibreOffice/core/commit/eab0da77dfb4a54d14968eb72532e045bfffa0fb +--- + tools/qa/cppunit/test_urlobj.cxx | 44 ++++++++++++++++++++++++++++++++ + tools/source/fsys/urlobj.cxx | 17 +++++++++--- + 2 files changed, 58 insertions(+), 3 deletions(-) + +Index: libreoffice/tools/qa/cppunit/test_urlobj.cxx +=================================================================== +--- libreoffice.orig/tools/qa/cppunit/test_urlobj.cxx ++++ libreoffice/tools/qa/cppunit/test_urlobj.cxx +@@ -294,6 +294,49 @@ namespace tools_urlobj + obj.GetMainURL(INetURLObject::DecodeMechanism::NONE)); + } + ++ void testIsExoticProtocol() { ++ { ++ INetURLObject url(u"vnd.sun.star.pkg://slot%3A0"); ++ CPPUNIT_ASSERT_EQUAL(INetProtocol::VndSunStarPkg, url.GetProtocol()); ++ CPPUNIT_ASSERT(url.IsExoticProtocol()); ++ } ++ { ++ INetURLObject url(u"vnd.sun.star.pkg://vnd.sun.star.pkg%3A%2F%2Fslot%253A0"); ++ CPPUNIT_ASSERT_EQUAL(INetProtocol::VndSunStarPkg, url.GetProtocol()); ++ CPPUNIT_ASSERT(url.IsExoticProtocol()); ++ } ++ { ++ INetURLObject url(u"vnd.sun.star.pkg://http%3A%2F%2Fexample.net"); ++ CPPUNIT_ASSERT_EQUAL(INetProtocol::VndSunStarPkg, url.GetProtocol()); ++ CPPUNIT_ASSERT(!url.IsExoticProtocol()); ++ } ++ { ++ INetURLObject url(u"vnd.sun.star.zip://slot%3A0"); ++ CPPUNIT_ASSERT_EQUAL(INetProtocol::Generic, url.GetProtocol()); ++ CPPUNIT_ASSERT(url.IsExoticProtocol()); ++ } ++ { ++ INetURLObject url(u"vnd.sun.star.zip://slot%3A0/foo"); ++ CPPUNIT_ASSERT_EQUAL(INetProtocol::Generic, url.GetProtocol()); ++ CPPUNIT_ASSERT(url.IsExoticProtocol()); ++ } ++ { ++ INetURLObject url(u"vnd.sun.star.zip://slot%3A0?foo"); ++ CPPUNIT_ASSERT_EQUAL(INetProtocol::Generic, url.GetProtocol()); ++ CPPUNIT_ASSERT(url.IsExoticProtocol()); ++ } ++ { ++ INetURLObject url(u"vnd.sun.star.zip://slot%3A0#foo"); ++ CPPUNIT_ASSERT_EQUAL(INetProtocol::Generic, url.GetProtocol()); ++ CPPUNIT_ASSERT(url.IsExoticProtocol()); ++ } ++ { ++ INetURLObject url(u"vnd.sun.star.zip://http%3A%2F%2Fexample.net"); ++ CPPUNIT_ASSERT_EQUAL(INetProtocol::Generic, url.GetProtocol()); ++ CPPUNIT_ASSERT(!url.IsExoticProtocol()); ++ } ++ } ++ + // Change the following lines only, if you add, remove or rename + // member functions of the current class, + // because these macros are need by auto register mechanism. +@@ -308,6 +351,7 @@ namespace tools_urlobj + CPPUNIT_TEST( urlobjTest_isAnyKnownWebDAVScheme ); + CPPUNIT_TEST( testSetName ); + CPPUNIT_TEST( testSetExtension ); ++ CPPUNIT_TEST( testIsExoticProtocol ); + CPPUNIT_TEST_SUITE_END( ); + }; // class createPool + +Index: libreoffice/tools/source/fsys/urlobj.cxx +=================================================================== +--- libreoffice.orig/tools/source/fsys/urlobj.cxx ++++ libreoffice/tools/source/fsys/urlobj.cxx +@@ -4771,10 +4771,21 @@ bool INetURLObject::IsExoticProtocol() c + { + return true; + } +- if (isSchemeEqualTo(u"vnd.sun.star.pkg") || isSchemeEqualTo(u"vnd.sun.star.zip")) ++ if (m_eScheme == INetProtocol::VndSunStarPkg) { ++ return INetURLObject(GetHost(INetURLObject::DecodeMechanism::WithCharset)) ++ .IsExoticProtocol(); ++ } ++ if (isSchemeEqualTo(u"vnd.sun.star.zip")) + { +- OUString sPayloadURL = GetURLPath(INetURLObject::DecodeMechanism::WithCharset); +- return sPayloadURL.startsWith(u"//") && INetURLObject(sPayloadURL.subView(2)).IsExoticProtocol(); ++ OUString sPayloadURL = GetURLPath(INetURLObject::DecodeMechanism::NONE); ++ if (!sPayloadURL.startsWith(u"//")) { ++ return false; ++ } ++ auto const find = [&sPayloadURL](auto c) { ++ auto const n = sPayloadURL.indexOf(c, 2); ++ return n == -1 ? sPayloadURL.getLength() : n; ++ }; ++ return INetURLObject(decode(sPayloadURL.copy(2, std::min(find('/'), find('?')) - 2), INetURLObject::DecodeMechanism::WithCharset)).IsExoticProtocol(); + } + return false; + } diff --git a/debian/patches/CVE-2025-1080.patch b/debian/patches/CVE-2025-1080.patch new file mode 100644 index 00000000000..60138e5dd1f --- /dev/null +++ b/debian/patches/CVE-2025-1080.patch @@ -0,0 +1,32 @@ +From: =?utf-8?q?Caol=C3=A1n_McNamara?= +Date: Thu, 30 Jan 2025 20:37:38 +0000 +Subject: Filter out more unwanted command URIs + +Change-Id: I24c95d73b4fee89bdf044d5dd6efc9cd89627c54 +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181016 +Tested-by: Jenkins +Reviewed-by: Xisco Fauli + +Reviewed-By: Daniel Leidert +Origin: https://git.libreoffice.org/core/+/7105fb698f897ddb38bd60315444c07356689e14%5E%21 +Bug: https://www.libreoffice.org/about-us/security/advisories/cve-2025-1080 +Bug: https://github.com/advisories/ghsa-gcgr-r4x5-w79r +Bug-Debian-Security: https://security-tracker.debian.org/tracker/CVE-2025-1080 +Bug-Freexian-Security: https://deb.freexian.com/extended-lts/tracker/CVE-2025-1080 +--- + desktop/source/app/cmdlineargs.cxx | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/desktop/source/app/cmdlineargs.cxx b/desktop/source/app/cmdlineargs.cxx +index 54cc7f8..417de02 100644 +--- a/desktop/source/app/cmdlineargs.cxx ++++ b/desktop/source/app/cmdlineargs.cxx +@@ -168,7 +168,7 @@ CommandLineEvent CheckOfficeURI(/* in,out */ OUString& arg, CommandLineEvent cur + if (nURIlen < 0) + nURIlen = rest2.getLength(); + auto const uri = rest2.copy(0, nURIlen); +- if (INetURLObject(uri).GetProtocol() == INetProtocol::Macro) { ++ if (INetURLObject(uri).IsExoticProtocol()) { + // Let the "Open" machinery process the full command URI (leading to failure, by intention, + // as the "Open" machinery does not know about those command URI schemes): + curEvt = CommandLineEvent::Open; diff --git a/debian/patches/CVE-2025-2866.patch b/debian/patches/CVE-2025-2866.patch new file mode 100644 index 00000000000..17663eb8380 --- /dev/null +++ b/debian/patches/CVE-2025-2866.patch @@ -0,0 +1,134 @@ +From: =?utf-8?q?Juraj_=C5=A0arinay?= +Date: Thu, 6 Mar 2025 16:44:01 +0100 +Subject: [PATCH] Improve adbe.pkcs7.sha1 signature verification + +For PDF signatures with SubFilter == adbe.pkcs7.sha1, we only +compared hash values and never actually checked SignatureValue +within SignerInfo. + +Fix bugs introduced by 055fd58711d57af4d96214aebd71b713303d5527 and +e58ed17e35989350afe3e9fd77b24515df782eac by verifying the actual +(public-key) signature after the hash values compare equal. + +Change-Id: I5fa3d60df214cc5efedd1c0eba6cf1b9faf05360 +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183059 +Reviewed-by: Miklos Vajna +Tested-by: Jenkins +(cherry picked from commit 9f687b06fc25156a2a3f4d688b56542612995aa9) + +Reviewed-By: Daniel Leidert +Origin: https://git.libreoffice.org/core/+/9f687b06fc25156a2a3f4d688b56542612995aa9%5E%21 +Bug: https://www.libreoffice.org/about-us/security/advisories/cve-2025-2866 +Bug: https://github.com/advisories/GHSA-22mj-r7hq-f9h2 +Bug-Debian-Security: https://security-tracker.debian.org/tracker/CVE-2025-2866 +Bug-Freexian-Security: https://deb.freexian.com/extended-lts/tracker/CVE-2025-2866 +--- + svl/source/crypto/cryptosign.cxx | 54 +++++++++++++++++++++++----------------- + 1 file changed, 31 insertions(+), 23 deletions(-) + +diff --git a/svl/source/crypto/cryptosign.cxx b/svl/source/crypto/cryptosign.cxx +index a015f00..1ab990b 100644 +--- a/svl/source/crypto/cryptosign.cxx ++++ b/svl/source/crypto/cryptosign.cxx +@@ -2151,23 +2151,30 @@ bool Signing::Verify(const std::vector& aData, + if (pAttribute) + rInformation.bHasSigningCertificate = true; + ++ SECItem aSignedDigestItem {siBuffer, nullptr, 0}; ++ + SECItem* pContentInfoContentData = pCMSSignedData->contentInfo.content.data; + if (bNonDetached && pContentInfoContentData && pContentInfoContentData->data) + { + // Not a detached signature. +- if (!std::memcmp(pActualResultBuffer, pContentInfoContentData->data, nMaxResultLen) && nActualResultLen == pContentInfoContentData->len) +- rInformation.nStatus = xml::crypto::SecurityOperationStatus_OPERATION_SUCCEEDED; ++ if (nActualResultLen == pContentInfoContentData->len && ++ !std::memcmp(pActualResultBuffer, pContentInfoContentData->data, nMaxResultLen) && ++ HASH_HashBuf(eHashType, pActualResultBuffer, pContentInfoContentData->data, nActualResultLen) == SECSuccess) ++ { ++ aSignedDigestItem.data = pActualResultBuffer; ++ aSignedDigestItem.len = nActualResultLen; ++ } + } + else + { + // Detached, the usual case. +- SECItem aActualResultItem; +- aActualResultItem.data = pActualResultBuffer; +- aActualResultItem.len = nActualResultLen; +- if (NSS_CMSSignerInfo_Verify(pCMSSignerInfo, &aActualResultItem, nullptr) == SECSuccess) +- rInformation.nStatus = xml::crypto::SecurityOperationStatus_OPERATION_SUCCEEDED; ++ aSignedDigestItem.data = pActualResultBuffer; ++ aSignedDigestItem.len = nActualResultLen; + } + ++ if (aSignedDigestItem.data && NSS_CMSSignerInfo_Verify(pCMSSignerInfo, &aSignedDigestItem, nullptr) == SECSuccess) ++ rInformation.nStatus = xml::crypto::SecurityOperationStatus_OPERATION_SUCCEEDED; ++ + // Everything went fine + PORT_Free(pActualResultBuffer); + HASH_Destroy(pHASHContext); +@@ -2198,19 +2205,21 @@ bool Signing::Verify(const std::vector& aData, + return false; + } + +- // Update the message with the content blob. +- if (!CryptMsgUpdate(hMsg, aData.data(), aData.size(), FALSE)) ++ if (!bNonDetached) + { +- SAL_WARN("svl.crypto", "ValidateSignature, CryptMsgUpdate() for the content failed: " << WindowsErrorString(GetLastError())); +- return false; +- } ++ // Update the message with the content blob. ++ if (!CryptMsgUpdate(hMsg, aData.data(), aData.size(), FALSE)) ++ { ++ SAL_WARN("svl.crypto", "ValidateSignature, CryptMsgUpdate() for the content failed: " << WindowsErrorString(GetLastError())); ++ return false; ++ } + +- if (!CryptMsgUpdate(hMsg, nullptr, 0, TRUE)) +- { +- SAL_WARN("svl.crypto", "ValidateSignature, CryptMsgUpdate() for the last content failed: " << WindowsErrorString(GetLastError())); +- return false; ++ if (!CryptMsgUpdate(hMsg, nullptr, 0, TRUE)) ++ { ++ SAL_WARN("svl.crypto", "ValidateSignature, CryptMsgUpdate() for the last content failed: " << WindowsErrorString(GetLastError())); ++ return false; ++ } + } +- + // Get the CRYPT_ALGORITHM_IDENTIFIER from the message. + DWORD nDigestID = 0; + if (!CryptMsgGetParam(hMsg, CMSG_SIGNER_HASH_ALGORITHM_PARAM, 0, nullptr, &nDigestID)) +@@ -2286,6 +2295,8 @@ bool Signing::Verify(const std::vector& aData, + rInformation.X509Datas.emplace_back(temp); + } + ++ std::vector aContentParam; ++ + if (bNonDetached) + { + // Not a detached signature. +@@ -2296,19 +2307,16 @@ bool Signing::Verify(const std::vector& aData, + return false; + } + +- std::vector aContentParam(nContentParam); ++ aContentParam.resize(nContentParam); + if (!CryptMsgGetParam(hMsg, CMSG_CONTENT_PARAM, 0, aContentParam.data(), &nContentParam)) + { + SAL_WARN("svl.crypto", "ValidateSignature: CryptMsgGetParam() failed"); + return false; + } +- +- if (VerifyNonDetachedSignature(aData, aContentParam)) +- rInformation.nStatus = xml::crypto::SecurityOperationStatus_OPERATION_SUCCEEDED; + } +- else ++ ++ if (!bNonDetached || VerifyNonDetachedSignature(aData, aContentParam)) + { +- // Detached, the usual case. + // Use the CERT_INFO from the signer certificate to verify the signature. + if (CryptMsgControl(hMsg, 0, CMSG_CTRL_VERIFY_SIGNATURE, pSignerCertContext->pCertInfo)) + rInformation.nStatus = xml::crypto::SecurityOperationStatus_OPERATION_SUCCEEDED; diff --git a/debian/patches/DisableTestThatFail.patch b/debian/patches/DisableTestThatFail.patch new file mode 100644 index 00000000000..21caf494723 --- /dev/null +++ b/debian/patches/DisableTestThatFail.patch @@ -0,0 +1,56 @@ +Subject: Disable test that fail on pbuilder +author: Bastien Roucariès + +> osl_Profile::oldtests::test_profile finished in: 1ms +> (anonymous namespace)::Test::test finished in: 0ms +> osl_File.cxx:269:Assertion +> Test name: osl_FileBase::SystemPath_FileURL::getSystemPathFromFileURL_005 +> assertion failed +> - Expression: (osl::FileBase::E_None == nError) || (nError == +> osl::FileBase::E_NOENT) +> - In deleteTestDirectory function: remove Directory +> file:///tmp/?????????zhgb18030 +> +> Failures !!! + +Remove this test that fail on pbuilder but not on sbuild + +Index: libreoffice/sal/qa/osl/file/osl_File.cxx +=================================================================== +--- libreoffice.orig/sal/qa/osl/file/osl_File.cxx ++++ libreoffice/sal/qa/osl/file/osl_File.cxx +@@ -611,7 +611,7 @@ namespace osl_FileBase + void getSystemPathFromFileURL_001_91(); + void getSystemPathFromFileURL_001_92(); + void getSystemPathFromFileURL_004(); +- void getSystemPathFromFileURL_005(); ++ //void getSystemPathFromFileURL_005(); + + // test case for getFileURLFromSystemPath + void getFileURLFromSystemPath_001(); +@@ -644,7 +644,7 @@ namespace osl_FileBase + CPPUNIT_TEST(getSystemPathFromFileURL_001_91); + CPPUNIT_TEST(getSystemPathFromFileURL_001_92); + CPPUNIT_TEST(getSystemPathFromFileURL_004); +- CPPUNIT_TEST(getSystemPathFromFileURL_005); ++ //CPPUNIT_TEST(getSystemPathFromFileURL_005); + CPPUNIT_TEST(getFileURLFromSystemPath_001); + CPPUNIT_TEST(getFileURLFromSystemPath_002); + CPPUNIT_TEST(getFileURLFromSystemPath_003); +@@ -981,6 +981,7 @@ namespace osl_FileBase + } + + // CJK characters case ++ /* + void SystemPath_FileURL::getSystemPathFromFileURL_005() + { + OUString aUStr; +@@ -1002,7 +1003,7 @@ namespace osl_FileBase + + CPPUNIT_ASSERT_EQUAL_MESSAGE(sError.getStr(), osl::FileBase::E_None, nError); + CPPUNIT_ASSERT_MESSAGE(sError.getStr(), bOk); +- } ++ }*/ + + void SystemPath_FileURL::getFileURLFromSystemPath_001() + { diff --git a/debian/patches/ZDI-CAN-17859.diff b/debian/patches/ZDI-CAN-17859.diff new file mode 100644 index 00000000000..9b668c4b3df --- /dev/null +++ b/debian/patches/ZDI-CAN-17859.diff @@ -0,0 +1,290 @@ +From e36986a3a7f448722961bde79691fb2f225c48ea Mon Sep 17 00:00:00 2001 +From: Stephan Bergmann +Date: Tue, 30 Aug 2022 14:04:52 +0200 +Subject: These commands are always URLs already + +Conflicts: + wizards/source/scriptforge/SF_Session.xba + +Change-Id: I5083765c879689d7f933bbe00ad70bb68e635a21 +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139042 +Tested-by: Jean-Pierre Ledure +Tested-by: Jenkins +Reviewed-by: Stephan Bergmann +--- + wizards/source/access2base/DoCmd.xba | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/wizards/source/access2base/DoCmd.xba b/wizards/source/access2base/DoCmd.xba +index 27b0d74be34f..26755a8d901d 100644 +--- a/wizards/source/access2base/DoCmd.xba ++++ b/wizards/source/access2base/DoCmd.xba +@@ -2655,7 +2655,7 @@ Private Sub _ShellExecute(sCommand As String) + + Dim oShell As Object + Set oShell = createUnoService("com.sun.star.system.SystemShellExecute") +- oShell.execute(sCommand, "" , com.sun.star.system.SystemShellExecuteFlags.DEFAULTS) ++ oShell.execute(sCommand, "" , com.sun.star.system.SystemShellExecuteFlags.URIS_ONLY) + + End Sub ' _ShellExecute V0.8.5 + +-- +cgit v1.2.1 + +From 7c299586526c29875d2d1438c95580c18835c99b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Tue, 30 Aug 2022 17:01:08 +0100 +Subject: check IFrame "FrameURL" target + +similiar to + +commit b3edf85e0fe6ca03dc26e1bf531be82193bc9627 +Date: Wed Aug 7 17:37:11 2019 +0100 + + warn on load when a document binds an event to a macro + +Conflicts: + sfx2/source/doc/iframe.cxx + sw/source/filter/html/htmlplug.cxx + sw/source/filter/xml/xmltexti.cxx + +Change-Id: Iea888b1c083d2dc69ec322309ac9ae8c5e5eb315 +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139059 +Tested-by: Jenkins +Reviewed-by: Stephan Bergmann +--- + sfx2/source/appl/macroloader.cxx | 9 +++++++-- + sfx2/source/doc/iframe.cxx | 20 +++++++++++++++----- + sfx2/source/inc/macroloader.hxx | 2 ++ + sw/source/filter/html/htmlplug.cxx | 7 ++++++- + sw/source/filter/xml/xmltexti.cxx | 9 +++++++-- + 5 files changed, 37 insertions(+), 10 deletions(-) + +diff --git a/sfx2/source/appl/macroloader.cxx b/sfx2/source/appl/macroloader.cxx +index 98e036e0a7ea..b50d1e63c789 100644 +--- a/sfx2/source/appl/macroloader.cxx ++++ b/sfx2/source/appl/macroloader.cxx +@@ -68,10 +68,10 @@ css::uno::Sequence SAL_CALL SfxMacroLoader::getSupportedServiceNames() + return { "com.sun.star.frame.ProtocolHandler" }; + } + +-SfxObjectShell* SfxMacroLoader::GetObjectShell_Impl() ++SfxObjectShell* SfxMacroLoader::GetObjectShell(const Reference & xFrame) + { + SfxObjectShell* pDocShell = nullptr; +- Reference < XFrame > xFrame( m_xFrame.get(), UNO_QUERY ); ++ + if ( xFrame.is() ) + { + SfxFrame* pFrame=nullptr; +@@ -96,6 +96,11 @@ SfxObjectShell* SfxMacroLoader::GetObjectShell_Impl() + return pDocShell; + } + ++SfxObjectShell* SfxMacroLoader::GetObjectShell_Impl() ++{ ++ Reference < XFrame > xFrame( m_xFrame.get(), UNO_QUERY ); ++ return SfxMacroLoader::GetObjectShell(xFrame); ++} + + uno::Reference SAL_CALL SfxMacroLoader::queryDispatch( + const util::URL& aURL , +diff --git a/sfx2/source/doc/iframe.cxx b/sfx2/source/doc/iframe.cxx +index 8b1271545dfb..aea851894286 100644 +--- a/sfx2/source/doc/iframe.cxx ++++ b/sfx2/source/doc/iframe.cxx +@@ -38,10 +38,12 @@ + #include + #include + #include ++#include + #include + #include + #include + #include ++#include + + using namespace ::com::sun::star; + +@@ -159,6 +161,19 @@ sal_Bool SAL_CALL IFrameObject::load( + { + if ( SvtMiscOptions().IsPluginsEnabled() ) + { ++ util::URL aTargetURL; ++ aTargetURL.Complete = maFrmDescr.GetURL().GetMainURL( INetURLObject::DecodeMechanism::NONE ); ++ uno::Reference < util::XURLTransformer > xTrans( util::URLTransformer::create( mxContext ) ); ++ xTrans->parseStrict( aTargetURL ); ++ ++ if (INetURLObject(aTargetURL.Complete).GetProtocol() == INetProtocol::Macro) ++ { ++ uno::Reference xParentFrame = xFrame->getCreator(); ++ SfxObjectShell* pDoc = SfxMacroLoader::GetObjectShell(xParentFrame); ++ if (pDoc && !pDoc->AdjustMacroMode()) ++ return false; ++ } ++ + DBG_ASSERT( !mxFrame.is(), "Frame already existing!" ); + VclPtr pParent = VCLUnoHelper::GetWindow( xFrame->getContainerWindow() ); + VclPtr pWin = VclPtr::Create( pParent, maFrmDescr.IsFrameBorderOn() ); +@@ -181,11 +196,6 @@ sal_Bool SAL_CALL IFrameObject::load( + if ( xFramesSupplier.is() ) + mxFrame->setCreator( xFramesSupplier ); + +- util::URL aTargetURL; +- aTargetURL.Complete = maFrmDescr.GetURL().GetMainURL( INetURLObject::DecodeMechanism::NONE ); +- uno::Reference < util::XURLTransformer > xTrans( util::URLTransformer::create( mxContext ) ); +- xTrans->parseStrict( aTargetURL ); +- + uno::Sequence < beans::PropertyValue > aProps(2); + aProps[0].Name = "PluginMode"; + aProps[0].Value <<= sal_Int16(2); +diff --git a/sfx2/source/inc/macroloader.hxx b/sfx2/source/inc/macroloader.hxx +index 9e1dfba18ed0..b3e7a5ec1abc 100644 +--- a/sfx2/source/inc/macroloader.hxx ++++ b/sfx2/source/inc/macroloader.hxx +@@ -82,6 +82,8 @@ public: + virtual void SAL_CALL addStatusListener( const css::uno::Reference< css::frame::XStatusListener >& xControl, const css::util::URL& aURL ) override; + + virtual void SAL_CALL removeStatusListener( const css::uno::Reference< css::frame::XStatusListener >& xControl, const css::util::URL& aURL ) override; ++ ++ static SfxObjectShell* GetObjectShell(const css::uno::Reference& xFrame); + }; + + #endif +diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx +index a0da671de733..eb707040adb2 100644 +--- a/sw/source/filter/html/htmlplug.cxx ++++ b/sw/source/filter/html/htmlplug.cxx +@@ -1087,7 +1087,12 @@ void SwHTMLParser::InsertFloatingFrame() + bool bHasBorder = aFrameDesc.HasFrameBorder(); + Size aMargin = aFrameDesc.GetMargin(); + +- xSet->setPropertyValue("FrameURL", uno::makeAny( aFrameDesc.GetURL().GetMainURL( INetURLObject::DecodeMechanism::NONE ) ) ); ++ OUString sHRef = aFrameDesc.GetURL().GetMainURL( INetURLObject::DecodeMechanism::NONE ); ++ ++ if (INetURLObject(sHRef).GetProtocol() == INetProtocol::Macro) ++ NotifyMacroEventRead(); ++ ++ xSet->setPropertyValue("FrameURL", uno::makeAny( sHRef ) ); + xSet->setPropertyValue("FrameName", uno::makeAny( aName ) ); + + if ( eScroll == ScrollingMode::Auto ) +diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx +index 788bec5c2d47..169cbdc1534d 100644 +--- a/sw/source/filter/xml/xmltexti.cxx ++++ b/sw/source/filter/xml/xmltexti.cxx +@@ -853,9 +853,14 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertFloatingFra + uno::Reference < beans::XPropertySet > xSet( xObj->getComponent(), uno::UNO_QUERY ); + if ( xSet.is() ) + { ++ OUString sHRef = URIHelper::SmartRel2Abs( ++ INetURLObject( GetXMLImport().GetBaseURL() ), rHRef ); ++ ++ if (INetURLObject(sHRef).GetProtocol() == INetProtocol::Macro) ++ GetXMLImport().NotifyMacroEventRead(); ++ + xSet->setPropertyValue("FrameURL", +- makeAny( URIHelper::SmartRel2Abs( +- INetURLObject( GetXMLImport().GetBaseURL() ), rHRef ) ) ); ++ makeAny( sHRef ) ); + + xSet->setPropertyValue("FrameName", + makeAny( rName ) ); +-- +cgit v1.2.1 + +From 2f7e7dbebb28123b1e608c30af6cc335e7b5ed2f Mon Sep 17 00:00:00 2001 +From: Stephan Bergmann +Date: Thu, 1 Sep 2022 17:33:51 +0200 +Subject: Filter out unwanted command URIs + +Conflicts: + desktop/source/app/cmdlineargs.cxx + +Change-Id: I0b7e5329af8cc053d14d5c60ec14fe7f364ef993 +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139225 +Tested-by: Jenkins +Reviewed-by: Stephan Bergmann +--- + desktop/source/app/cmdlineargs.cxx | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/desktop/source/app/cmdlineargs.cxx b/desktop/source/app/cmdlineargs.cxx +index 381147cd534e..f004f4b179dd 100644 +--- a/desktop/source/app/cmdlineargs.cxx ++++ b/desktop/source/app/cmdlineargs.cxx +@@ -28,6 +28,7 @@ + #include "cmdlineargs.hxx" + #include + #include ++#include + #include + #include + #include +@@ -169,7 +170,14 @@ CommandLineEvent CheckOfficeURI(/* in,out */ OUString& arg, CommandLineEvent cur + } + if (nURIlen < 0) + nURIlen = rest2.getLength(); +- arg = rest2.copy(0, nURIlen); ++ auto const uri = rest2.copy(0, nURIlen); ++ if (INetURLObject(uri).GetProtocol() == INetProtocol::Macro) { ++ // Let the "Open" machinery process the full command URI (leading to failure, by intention, ++ // as the "Open" machinery does not know about those command URI schemes): ++ curEvt = CommandLineEvent::Open; ++ } else { ++ arg = uri; ++ } + return curEvt; + } + +-- +cgit v1.2.1 + +From 46216a79f440dc972724bb243396b295267530ce Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Tue, 6 Sep 2022 11:38:55 +0100 +Subject: check impress/calc IFrame "FrameURL" target +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +similar to + +commit c7450d0b9d02c64ae3da467d329040787039767e +Date: Tue Aug 30 17:01:08 2022 +0100 + + check IFrame "FrameURL" target + +Change-Id: Ibf28c29acb4476830431d02772f3ecd4b23a6a27 +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139480 +Tested-by: Jenkins +Reviewed-by: Caolán McNamara +--- + xmloff/source/draw/ximpshap.cxx | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx +index af0bfc1a7ef0..94ac8532b6c9 100644 +--- a/xmloff/source/draw/ximpshap.cxx ++++ b/xmloff/source/draw/ximpshap.cxx +@@ -90,6 +90,7 @@ + #include + #include + #include ++#include + #include + #include + +@@ -3265,6 +3265,9 @@ void SdXMLFloatingFrameShapeContext::StartElement( const css::uno::Reference< cs + + if( !maHref.isEmpty() ) + { ++ if (INetURLObject(maHref).GetProtocol() == INetProtocol::Macro) ++ GetImport().NotifyMacroEventRead(); ++ + xProps->setPropertyValue("FrameURL", Any(maHref) ); + } + } +-- +cgit v1.2.1 + diff --git a/debian/patches/add-access2base-doc.diff b/debian/patches/add-access2base-doc.diff new file mode 100644 index 00000000000..4ad71786207 Binary files /dev/null and b/debian/patches/add-access2base-doc.diff differ diff --git a/debian/patches/add-notify-for-script-use.diff b/debian/patches/add-notify-for-script-use.diff new file mode 100644 index 00000000000..6d5b4f04244 --- /dev/null +++ b/debian/patches/add-notify-for-script-use.diff @@ -0,0 +1,27 @@ +From 8b2402b16df185119c91222b33ff1b8d55e0afe4 Mon Sep 17 00:00:00 2001 +From: Caolán McNamara +Date: Wed, 27 Mar 2024 17:07:20 +0000 +Subject: add notify for script use + +Change-Id: I84af197cec7755f6803a578e1e21c03966ad5f3e +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165412 +Tested-by: Jenkins +Reviewed-by: Xisco Fauli +--- + xmloff/source/draw/eventimp.cxx | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/xmloff/source/draw/eventimp.cxx b/xmloff/source/draw/eventimp.cxx +index 2b8921ee27fa..2a6ce1fa2381 100644 +--- a/xmloff/source/draw/eventimp.cxx ++++ b/xmloff/source/draw/eventimp.cxx +@@ -210,6 +210,9 @@ SdXMLEventContext::SdXMLEventContext( SvXMLImport& rImp, + + if( maData.mbValid ) + maData.mbValid = !sEventName.isEmpty(); ++ ++ if (!maData.msMacroName.isEmpty()) ++ rImp.NotifyMacroEventRead(); + } + + SvXMLImportContextRef SdXMLEventContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList>& xAttrList ) diff --git a/debian/patches/apparmor-allow-java.security.diff b/debian/patches/apparmor-allow-java.security.diff new file mode 100644 index 00000000000..e4b8ae6eae1 --- /dev/null +++ b/debian/patches/apparmor-allow-java.security.diff @@ -0,0 +1,14 @@ +diff --git a/sysui/desktop/apparmor/program.soffice.bin b/sysui/desktop/apparmor/program.soffice.bin +index 2fc7fd6b5735..3fd82b08431e 100644 +--- a/sysui/desktop/apparmor/program.soffice.bin ++++ b/sysui/desktop/apparmor/program.soffice.bin +@@ -144,6 +144,9 @@ profile libreoffice-soffice INSTDIR-program/soffice.bin { + /usr/lib{,32,64}/jvm/** r, + /usr/lib{,32,64}/jvm/**/jre/bin/java mix, + /usr/lib{,32,64}/jvm/**/bin/java mix, ++ # should be included in the jvm/** above but there it is ++ # a symlink, so apparmor still doesn't allow it... ++ /etc/java-??-openjdk/security/java.security r, + INSTDIR-** rw, + INSTDIR-**.so m, + INSTDIR-program/soffice.bin mix, diff --git a/debian/patches/apparmor-cleanups.diff b/debian/patches/apparmor-cleanups.diff new file mode 100644 index 00000000000..c4b17e9954b --- /dev/null +++ b/debian/patches/apparmor-cleanups.diff @@ -0,0 +1,105 @@ +From b3c157faeb945fd689fcc8561a520d9e611a7419 Mon Sep 17 00:00:00 2001 +From: Vincas Dargis +Date: Sat, 4 Aug 2018 17:40:05 +0300 +Subject: [PATCH] apparmor: use dri-enumerate abstraction + +Remove backported rule and use new dri-enumerate abstraction instead. +dri-enumerate is available in AppArmor 2.13, which recently migrated +into Debian Buster. + +Change-Id: I64919edc1882f7bc1e65cfb94686464c5350f699 +--- + sysui/desktop/apparmor/program.soffice.bin | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sysui/desktop/apparmor/program.soffice.bin b/sysui/desktop/apparmor/program.soffice.bin +index 2fc7fd6b5735..33ad6f933ef6 100644 +--- a/sysui/desktop/apparmor/program.soffice.bin ++++ b/sysui/desktop/apparmor/program.soffice.bin +@@ -82,6 +82,7 @@ profile libreoffice-soffice INSTDIR-program/soffice.bin { + #include + #include + #include ++ #include + #include + #include + #include +@@ -179,7 +179,6 @@ profile libreoffice-soffice INSTDIR-program/soffice.bin { + #Likely moving to abstractions in the future + owner @{HOME}/.icons/*/cursors/* r, + /etc/fstab r, # Solid::DeviceNotifier::instance() TODO: deny? +- /sys/devices/pci[0-9]*/**/{device,subsystem_device,subsystem_vendor,uevent,vendor} r, # for libdrm + /usr/share/*-fonts/conf.avail/*.conf r, + /usr/share/fonts-config/conf.avail/*.conf r, + /{,var/}run/udev/data/+usb:* r, # Solid::Device::listFromQuery() + +From 5054f7067cc5ee43933893b682e02540fce043b4 Mon Sep 17 00:00:00 2001 +From: Rene Engelhard +Date: Sat, 20 Jun 2020 15:33:34 +0200 +Subject: deb#962903 #include to allow /tmp/something/* + +Change-Id: I6377db152ededc4d46ba7bbbaa9bc66210964e18 +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96770 +Tested-by: Jenkins +Reviewed-by: Thorsten Behrens +--- + sysui/desktop/apparmor/program.senddoc | 4 ++-- + sysui/desktop/apparmor/program.soffice.bin | 3 ++- + sysui/desktop/apparmor/program.xpdfimport | 5 ++--- + 3 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/sysui/desktop/apparmor/program.senddoc b/sysui/desktop/apparmor/program.senddoc +index d659ec9b98b3..969130f4ea90 100644 +--- a/sysui/desktop/apparmor/program.senddoc ++++ b/sysui/desktop/apparmor/program.senddoc +@@ -17,8 +17,8 @@ + profile libreoffice-senddoc INSTDIR-program/senddoc { + #include + +- owner /tmp/lu** rw, #makes files like luRRRRR.tmp/lubRRRR.tmp where R is random +- #Note, usually it's lub or luc, don't know why. ++ #include ++ + /{usr/,}bin/sh rmix, + /{usr/,}bin/bash rmix, + /{usr/,}bin/dash rmix, +diff --git a/sysui/desktop/apparmor/program.soffice.bin b/sysui/desktop/apparmor/program.soffice.bin +index 212eb7c62b15..42053db2abef 100644 +--- a/sysui/desktop/apparmor/program.soffice.bin ++++ b/sysui/desktop/apparmor/program.soffice.bin +@@ -92,6 +92,8 @@ profile libreoffice-soffice INSTDIR-program/soffice.bin { + #include + #include + ++ #include ++ + #List directories for file browser + / r, + /**/ r, +@@ -116,7 +118,6 @@ profile libreoffice-soffice INSTDIR-program/soffice.bin { + owner @{HOME}/.config/soffice.binrc.lock rwk, + owner @{HOME}/.cache/fontconfig/** rw, + owner @{HOME}/.config/gtk-???/bookmarks r, #Make bookmarks work +- owner /tmp/psp[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]* rw, #/tmp/psp1534203998 (printing to file) + + owner /{,var/}run/user/*/dconf/user rw, + owner @{HOME}/.config/dconf/user r, +diff --git a/sysui/desktop/apparmor/program.xpdfimport b/sysui/desktop/apparmor/program.xpdfimport +index efe10dce020d..f8bfbfe8fa49 100644 +--- a/sysui/desktop/apparmor/program.xpdfimport ++++ b/sysui/desktop/apparmor/program.xpdfimport +@@ -17,9 +17,8 @@ + profile libreoffice-xpdfimport INSTDIR-program/xpdfimport { + #include + +- owner /tmp/* r, #Seems to need to read file created with pattern /tmp/RRRRRR +- owner /tmp/lu** rw, #makes files like luRRRRR.tmp/lubRRRR.tmp where R is random +- #Note, usually it's lub or luc, don't know why. ++ #include ++ + /usr/share/poppler/** r, + /usr/share/libreoffice/share/config/* r, + owner @{HOME}/.config/libreoffice{,dev}/?/user/uno_packages/cache/log.txt rw, +-- +cgit v1.2.1 + diff --git a/debian/patches/apparmor-complain.diff b/debian/patches/apparmor-complain.diff new file mode 100644 index 00000000000..8f96fd3046b --- /dev/null +++ b/debian/patches/apparmor-complain.diff @@ -0,0 +1,26 @@ +diff --git a/sysui/desktop/apparmor/program.oosplash b/sysui/desktop/apparmor/program.oosplash +index fef54b7ee384..9dde31a63615 100644 +--- a/sysui/desktop/apparmor/program.oosplash ++++ b/sysui/desktop/apparmor/program.oosplash +@@ -12,7 +12,7 @@ + + #include + +-profile libreoffice-oopslash INSTDIR-program/oosplash { ++profile libreoffice-oopslash INSTDIR-program/oosplash flags=(complain) { + #include + #include + +diff --git a/sysui/desktop/apparmor/program.soffice.bin b/sysui/desktop/apparmor/program.soffice.bin +index b4baeab8f5ee..7861c9eac9bd 100644 +--- a/sysui/desktop/apparmor/program.soffice.bin ++++ b/sysui/desktop/apparmor/program.soffice.bin +@@ -60,7 +60,7 @@ + + #include + +-profile libreoffice-soffice INSTDIR-program/soffice.bin { ++profile libreoffice-soffice INSTDIR-program/soffice.bin flags=(complain) { + #include + + #include diff --git a/debian/patches/apparmor-mesa.diff b/debian/patches/apparmor-mesa.diff new file mode 100644 index 00000000000..dd6dd20a633 --- /dev/null +++ b/debian/patches/apparmor-mesa.diff @@ -0,0 +1,10 @@ +--- a/sysui/desktop/apparmor/program.soffice.bin-old 2018-11-09 23:04:59.858704214 +0100 ++++ b/sysui/desktop/apparmor/program.soffice.bin 2018-11-09 23:05:28.050949237 +0100 +@@ -87,6 +87,7 @@ + #include + #include + #include ++ #include + #include + #include + #include diff --git a/debian/patches/apparmor-opencl.diff b/debian/patches/apparmor-opencl.diff new file mode 100644 index 00000000000..462f376bca1 --- /dev/null +++ b/debian/patches/apparmor-opencl.diff @@ -0,0 +1,20 @@ +apparmor: Add opencl support + +AppArmor in Debian Buster now has OpenCL abstractions. + +Include OpenCL abstractions to fix OpenCL usage in Calc. +Index: libreoffice-6.1.4/sysui/desktop/apparmor/program.soffice.bin +=================================================================== +--- libreoffice-6.1.4.orig/sysui/desktop/apparmor/program.soffice.bin 2019-01-14 19:29:25.000000000 +0200 ++++ libreoffice-6.1.4/sysui/desktop/apparmor/program.soffice.bin 2019-01-16 18:43:17.051781559 +0200 +@@ -98,6 +98,10 @@ + + #include + ++ #include ++ #include ++ #include ++ + #List directories for file browser + / r, + /**/ r, diff --git a/debian/patches/apparmor-updates.diff b/debian/patches/apparmor-updates.diff new file mode 100644 index 00000000000..1f71f8d143c --- /dev/null +++ b/debian/patches/apparmor-updates.diff @@ -0,0 +1,13 @@ +diff --git a/sysui/desktop/apparmor/program.soffice.bin b/sysui/desktop/apparmor/program.soffice.bin +index 42053db2abef..83bd9d11f93c 100644 +--- a/sysui/desktop/apparmor/program.soffice.bin ++++ b/sysui/desktop/apparmor/program.soffice.bin +@@ -101,7 +101,7 @@ profile libreoffice-soffice INSTDIR-program/soffice.bin { + owner @{libo_user_dirs}/**/ rw, #allow creating directories that we own + owner @{libo_user_dirs}/**~lock.* rw, #lock file support + owner @{libo_user_dirs}/**.@{libreoffice_ext} rwk, #Open files rw with the right exts +- owner @{libo_user_dirs}/{,**/}lu??????????{,?}.tmp rwk, #Temporary file used when saving ++ owner @{libo_user_dirs}/{,**/}lu???????????{,?}.tmp rwk, #Temporary file used when saving + owner @{libo_user_dirs}/{,**/}.directory r, #Read directory settings on KDE + + # Settings diff --git a/debian/patches/appstream-ignore-startcenter.diff b/debian/patches/appstream-ignore-startcenter.diff new file mode 100644 index 00000000000..4251d649299 --- /dev/null +++ b/debian/patches/appstream-ignore-startcenter.diff @@ -0,0 +1,10 @@ +--- a/sysui/desktop/menus/startcenter.desktop ++++ b/sysui/desktop/menus/startcenter.desktop +@@ -31,6 +31,7 @@ StartupNotify=true + X-GIO-NoFuse=true + StartupWMClass=libreoffice-startcenter + X-KDE-Protocols=file,http,ftp,webdav,webdavs ++X-AppStream-Ignore=True + + ##Define Actions + Actions=Writer;Calc;Impress;Draw;Base;Math; diff --git a/debian/patches/avoid-empty-java.class.path.diff b/debian/patches/avoid-empty-java.class.path.diff new file mode 100644 index 00000000000..2f52512696a --- /dev/null +++ b/debian/patches/avoid-empty-java.class.path.diff @@ -0,0 +1,90 @@ +From 5e8f64e50f97d39e83a3358697be14db03566878 Mon Sep 17 00:00:00 2001 +From: Stephan Bergmann +Date: Mon, 21 Feb 2022 11:55:21 +0100 +Subject: Avoid unnecessary empty -Djava.class.path= + +Change-Id: Idcfe7321077b60381c0273910b1faeb444ef1fd8 +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130242 +Tested-by: Jenkins +Reviewed-by: Stephan Bergmann +--- + jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx | 16 +++++++++++++--- + jvmfwk/source/framework.cxx | 8 ++++++-- + jvmfwk/source/fwkbase.cxx | 3 +++ + 3 files changed, 22 insertions(+), 5 deletions(-) + +diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx +index 29de226211f1..e55b914edf13 100644 +--- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx ++++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx +@@ -712,17 +712,22 @@ javaPluginError jfw_plugin_startJavaVirtualMachine( + // all versions below 1.5.1 + options.emplace_back("abort", reinterpret_cast(abort_handler)); + bool hasStackSize = false; ++#ifdef UNX ++ // Until java 1.5 we need to put a plugin.jar or javaplugin.jar (<1.4.2) ++ // in the class path in order to have applet support: ++ OString sAddPath = getPluginJarPath(pInfo->sVendor, pInfo->sLocation,pInfo->sVersion); ++#endif + for (int i = 0; i < cOptions; i++) + { + OString opt(arOptions[i].optionString); + #ifdef UNX +- // Until java 1.5 we need to put a plugin.jar or javaplugin.jar (<1.4.2) +- // in the class path in order to have applet support: + if (opt.startsWith("-Djava.class.path=")) + { +- OString sAddPath = getPluginJarPath(pInfo->sVendor, pInfo->sLocation,pInfo->sVersion); + if (!sAddPath.isEmpty()) ++ { + opt += OStringChar(SAL_PATHSEPARATOR) + sAddPath; ++ sAddPath.clear(); ++ } + } + #endif + if (opt == "-Xint") { +@@ -767,6 +772,11 @@ javaPluginError jfw_plugin_startJavaVirtualMachine( + } + #endif + } ++#ifdef UNX ++ if (!sAddPath.isEmpty()) { ++ options.emplace_back("-Djava.class.path=" + sAddPath, nullptr); ++ } ++#endif + + std::unique_ptr sarOptions(new JavaVMOption[options.size()]); + for (std::vector + ++ ++ ++ EUR ++ ++ ++ HRK ++ ++ ++ 7.53450 ++ ++ + + + +diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx +index 31c42a4b728a..67fcd9f787f8 100644 +--- a/sc/source/core/tool/interpr2.cxx ++++ b/sc/source/core/tool/interpr2.cxx +@@ -3235,7 +3235,8 @@ static bool lclConvertMoney( const OUString& aSearchUnit, double& rfRate, int& r + { "SKK", 30.1260, 2 }, + { "EEK", 15.6466, 2 }, + { "LVL", 0.702804, 2 }, +- { "LTL", 3.45280, 2 } ++ { "LTL", 3.45280, 2 }, ++ { "HRK", 7.53450, 2 } + }; + + for (const auto & i : aConvertTable) +-- +cgit v1.2.1 + +From b1a2f727ca99ecd3402d4b051b99cbfd24266e59 Mon Sep 17 00:00:00 2001 +From: Eike Rathke +Date: Fri, 22 Jul 2022 22:17:11 +0200 +Subject: Related: tdf#150011 Add HRK Croatian Kuna to Euro conversion wizard + +Maybe just for completeness, it's removed from menu but might be +callable as macro. + +Change-Id: Iade0be845186d3deb2f00f4aaa230c0b344cea72 +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137372 +Reviewed-by: Eike Rathke +Tested-by: Jenkins +--- + wizards/source/euro/Init.xba | 16 ++++++++++++++++ + wizards/source/resources/resources_en_US.properties | 1 + + 2 files changed, 17 insertions(+) + +diff --git a/wizards/source/euro/Init.xba b/wizards/source/euro/Init.xba +index 623a0a53be46..9f56c503a347 100644 +--- a/wizards/source/euro/Init.xba ++++ b/wizards/source/euro/Init.xba +@@ -89,6 +89,7 @@ Public sCurrSLOVAK as String + Public sCurrESTONIAN as String + Public sCurrLATVIAN as String + Public sCurrLITHUANIAN as String ++Public sCurrCROATIAN as String + + Public sPrgsRETRIEVAL as String + Public sPrgsCONVERTING as String +@@ -214,6 +215,7 @@ Dim LocWorkPath as String + sCurrESTONIAN = GetResText("CURRENCIES_16") + sCurrLATVIAN = GetResText("CURRENCIES_17") + sCurrLITHUANIAN = GetResText("CURRENCIES_18") ++ sCurrCROATIAN = GetResText("CURRENCIES_19") + .cmdCancel.Label = sCANCEL + .cmdHelp.Label = sHELP + .cmdBack.Label = GetResText("STEP_ZERO_2") +@@ -393,6 +395,11 @@ Sub InitializeLanguages() + LangIDValue(18,0,1) = "LT" + LangIDValue(18,0,2) = "-427" + ++' CURRENCIES_CROATIAN ++ LangIDValue(19,0,0) = "hr" ++ LangIDValue(19,0,1) = "HR" ++ LangIDValue(19,0,2) = "-41A" ++ + End Sub + + +@@ -572,6 +579,15 @@ Dim i as Integer + CurrValue(18,4) = "Lt" + CurrValue(18,5) = "LTL" + ++ CurrValue(19,0) = sCurrCROATIAN ++ ' real conversion rate ++ CurrValue(19,1) = 7.53450 ++ ' rounded conversion rate ++ CurrValue(19,2) = 7.5 ++ CurrValue(19,3) = "kn" ++ CurrValue(19,4) = "kn" ++ CurrValue(19,5) = "HRK" ++ + i = -1 + CurrSymbolList(0) = "" + CurrSymbolList(1) = "" +diff --git a/wizards/source/resources/resources_en_US.properties b/wizards/source/resources/resources_en_US.properties +index 32f9104e97e0..8649b2500e6a 100644 +--- a/wizards/source/resources/resources_en_US.properties ++++ b/wizards/source/resources/resources_en_US.properties +@@ -448,6 +448,7 @@ CURRENCIES_15=Slovak Koruna + CURRENCIES_16=Estonian Kroon + CURRENCIES_17=Latvian Lats + CURRENCIES_18=Lithuanian Litas ++CURRENCIES_19=Croatian Kuna + STEP_LASTPAGE_0=Progress + STEP_LASTPAGE_1=Retrieving the relevant documents... + STEP_LASTPAGE_2=Converting the documents... +-- +cgit v1.2.1 + diff --git a/debian/patches/ignore-LO-special-purpose-hyperlinks-per-default.diff b/debian/patches/ignore-LO-special-purpose-hyperlinks-per-default.diff new file mode 100644 index 00000000000..1c7a7edb5f8 --- /dev/null +++ b/debian/patches/ignore-LO-special-purpose-hyperlinks-per-default.diff @@ -0,0 +1,237 @@ +From f9c43426ab2941d240213a50bf67d70d85e3f060 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Fri, 3 Nov 2023 17:26:25 +0000 +Subject: default to ignoring libreoffice special-purpose protocols in calc + hyperlink +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Change-Id: Ib9f62be3acc05f24ca234dec0fec21e24579e9de +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158911 +Tested-by: Jenkins +Tested-by: Caolán McNamara +Reviewed-by: Caolán McNamara +(cherry picked from commit b6062623b4d69c79e90e9365ac7c5e7f11986793) +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159045 +Reviewed-by: Eike Rathke +(cherry picked from commit 672716d09c54cb6fdd59baa7da4b8393cf104cd2) +--- + dbaccess/source/core/dataaccess/ModelImpl.cxx | 3 ++- + include/sfx2/docmacromode.hxx | 4 ++- + include/sfx2/objsh.hxx | 3 +++ + include/sfx2/strings.hrc | 1 + + sc/source/core/data/global.cxx | 35 ++++++++++++++++++++++++++- + sfx2/source/doc/docmacromode.cxx | 8 ++++-- + sfx2/source/doc/objmisc.cxx | 8 +++++- + sfx2/source/doc/objxtor.cxx | 1 + + sfx2/source/inc/objshimp.hxx | 3 ++- + 9 files changed, 59 insertions(+), 7 deletions(-) + +diff --git a/dbaccess/source/core/dataaccess/ModelImpl.cxx b/dbaccess/source/core/dataaccess/ModelImpl.cxx +index 21e45033ea4f..20e77a97cc8e 100644 +--- a/dbaccess/source/core/dataaccess/ModelImpl.cxx ++++ b/dbaccess/source/core/dataaccess/ModelImpl.cxx +@@ -1142,7 +1142,8 @@ bool ODatabaseModelImpl::checkMacrosOnLoading() + { + Reference< XInteractionHandler > xInteraction; + xInteraction = m_aMediaDescriptor.getOrDefault( "InteractionHandler", xInteraction ); +- return m_aMacroMode.checkMacrosOnLoading( xInteraction ); ++ const bool bHasMacros = m_aMacroMode.hasMacros(); ++ return m_aMacroMode.checkMacrosOnLoading(xInteraction, false /*HasValidContentSignature*/, bHasMacros); + } + + void ODatabaseModelImpl::resetMacroExecutionMode() +diff --git a/include/sfx2/docmacromode.hxx b/include/sfx2/docmacromode.hxx +index bd4f13fb016c..0cfca92db308 100644 +--- a/include/sfx2/docmacromode.hxx ++++ b/include/sfx2/docmacromode.hxx +@@ -261,6 +261,8 @@ namespace sfx2 + */ + static bool storageHasMacros( const css::uno::Reference< css::embed::XStorage >& _rxStorage ); + ++ bool hasMacros() const; ++ + static bool containerHasBasicMacros( const css::uno::Reference< css::script::XLibraryContainer >& xContainter ); + /** checks the macro execution mode while loading the document. + +@@ -288,7 +290,7 @@ namespace sfx2 + bool + checkMacrosOnLoading( + const css::uno::Reference< css::task::XInteractionHandler >& _rxInteraction, +- bool bHasValidContentSignature = false ++ bool bHasValidContentSignature, bool bHasMacros + ); + + private: +diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx +index 2a56ebe88e07..43df4605fe1d 100644 +--- a/include/sfx2/objsh.hxx ++++ b/include/sfx2/objsh.hxx +@@ -418,6 +418,9 @@ public: + void SetMacroCallsSeenWhileLoading(); + bool GetMacroCallsSeenWhileLoading() const; + ++ // true if the document had macros (or similar) on load to trigger warning user ++ bool GetHadCheckedMacrosOnLoad() const; ++ + const css::uno::Sequence< css::beans::PropertyValue >& GetModifyPasswordInfo() const; + bool SetModifyPasswordInfo( const css::uno::Sequence< css::beans::PropertyValue >& aInfo ); + +diff --git a/include/sfx2/strings.hrc b/include/sfx2/strings.hrc +index 1db36e733c0c..29950ba68ca1 100644 +--- a/include/sfx2/strings.hrc ++++ b/include/sfx2/strings.hrc +@@ -103,6 +103,7 @@ + #define STR_GB NC_("STR_GB", "GB") + #define STR_QUERY_LASTVERSION NC_("STR_QUERY_LASTVERSION", "Cancel all changes?") + #define STR_NO_WEBBROWSER_FOUND NC_("STR_NO_WEBBROWSER_FOUND", "Opening \"$(ARG1)\" failed with error code $(ARG2) and message: \"$(ARG3)\"\nMaybe no web browser could be found on your system. In that case, please check your Desktop Preferences or install a web browser (for example, Firefox) in the default location requested during the browser installation.") ++#define STR_DANGEROUS_TO_OPEN NC_("STR_DANGEROUS_TO_OPEN", "It might be dangerous to open \"$(ARG1)\".\nDo you really want to open it?") + #define STR_NO_ABS_URI_REF NC_("STR_NO_ABS_URI_REF", "\"$(ARG1)\" is not an absolute URL that can be passed to an external application to open it.") + #define STR_GID_INTERN NC_("STR_GID_INTERN", "Internal") + #define STR_GID_APPLICATION NC_("STR_GID_APPLICATION", "Application") +diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx +index 050fd823b4ee..9696f7d9414d 100644 +--- a/sc/source/core/data/global.cxx ++++ b/sc/source/core/data/global.cxx +@@ -26,7 +26,9 @@ + #include + #include + #include ++#include + #include ++#include + #include + #include + #include +@@ -37,6 +39,8 @@ + #include + #include + #include ++#include ++#include + #include + #include + #include +@@ -789,7 +793,7 @@ void ScGlobal::OpenURL(const OUString& rURL, const OUString& rTarget, bool bIgno + + OUString aUrlName( rURL ); + SfxViewFrame* pFrame = nullptr; +- const SfxObjectShell* pObjShell = nullptr; ++ SfxObjectShell* pObjShell = nullptr; + OUString aReferName; + if ( pScActiveViewShell ) + { +@@ -823,6 +827,35 @@ void ScGlobal::OpenURL(const OUString& rURL, const OUString& rTarget, bool bIgno + aUrlName = aNewUrlName; + } + ++ if (INetURLObject(aUrlName).IsExoticProtocol()) ++ { ++ // Default to ignoring exotic protocols ++ bool bAllow = false; ++ if (pObjShell) ++ { ++ // If the document had macros when loaded then follow the allowed macro-mode ++ if (pObjShell->GetHadCheckedMacrosOnLoad()) ++ bAllow = pObjShell->AdjustMacroMode(); ++ else // otherwise ask the user, defaulting to cancel ++ { ++ assert(pFrame && "if we have pObjShell we have pFrame"); ++ //Reuse URITools::onOpenURI warning string ++ std::unique_ptr xQueryBox(Application::CreateMessageDialog(pFrame->GetWindow().GetFrameWeld(), ++ VclMessageType::Warning, VclButtonsType::YesNo, ++ SfxResId(STR_DANGEROUS_TO_OPEN))); ++ xQueryBox->set_primary_text(xQueryBox->get_primary_text().replaceFirst("$(ARG1)", ++ INetURLObject::decode(aUrlName, INetURLObject::DecodeMechanism::Unambiguous))); ++ xQueryBox->set_default_response(RET_NO); ++ bAllow = xQueryBox->run() == RET_YES; ++ } ++ } ++ if (!bAllow) ++ { ++ SAL_WARN("sc", "ScGlobal::OpenURL ignoring: " << aUrlName); ++ return; ++ } ++ } ++ + SfxStringItem aUrl( SID_FILE_NAME, aUrlName ); + SfxStringItem aTarget( SID_TARGETNAME, rTarget ); + if ( nScClickMouseModifier & KEY_SHIFT ) // control-click -> into new window +diff --git a/sfx2/source/doc/docmacromode.cxx b/sfx2/source/doc/docmacromode.cxx +index 4d15ad30cb01..50782c3cd1b2 100644 +--- a/sfx2/source/doc/docmacromode.cxx ++++ b/sfx2/source/doc/docmacromode.cxx +@@ -458,8 +458,12 @@ namespace sfx2 + return bHasMacros; + } + ++ bool DocumentMacroMode::hasMacros() const ++ { ++ return m_xData->m_rDocumentAccess.documentStorageHasMacros() || hasMacroLibrary() || m_xData->m_rDocumentAccess.macroCallsSeenWhileLoading(); ++ } + +- bool DocumentMacroMode::checkMacrosOnLoading( const Reference< XInteractionHandler >& rxInteraction, bool bHasValidContentSignature ) ++ bool DocumentMacroMode::checkMacrosOnLoading( const Reference< XInteractionHandler >& rxInteraction, bool bHasValidContentSignature, bool bHasMacros ) + { + bool bAllow = false; + if ( SvtSecurityOptions().IsMacroDisabled() ) +@@ -469,7 +473,7 @@ namespace sfx2 + } + else + { +- if (m_xData->m_rDocumentAccess.documentStorageHasMacros() || hasMacroLibrary() || m_xData->m_rDocumentAccess.macroCallsSeenWhileLoading()) ++ if (bHasMacros) + { + if (m_xData->m_rDocumentAccess.macroCallsSeenWhileLoading()) + m_bNeedsContentSigned = true; +diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx +index f71358b568fa..c7418ef127fd 100644 +--- a/sfx2/source/doc/objmisc.cxx ++++ b/sfx2/source/doc/objmisc.cxx +@@ -954,9 +954,15 @@ void SfxObjectShell::CheckSecurityOnLoading_Impl() + + // check macro security + const bool bHasValidContentSignature = HasValidSignatures(); +- pImpl->aMacroMode.checkMacrosOnLoading( xInteraction, bHasValidContentSignature ); ++ const bool bHasMacros = pImpl->aMacroMode.hasMacros(); ++ pImpl->aMacroMode.checkMacrosOnLoading( xInteraction, bHasValidContentSignature, bHasMacros ); ++ pImpl->m_bHadCheckedMacrosOnLoad = bHasMacros; + } + ++bool SfxObjectShell::GetHadCheckedMacrosOnLoad() const ++{ ++ return pImpl->m_bHadCheckedMacrosOnLoad; ++} + + void SfxObjectShell::CheckEncryption_Impl( const uno::Reference< task::XInteractionHandler >& xHandler ) + { +diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx +index 510c35daf59f..a707bb7c4a27 100644 +--- a/sfx2/source/doc/objxtor.cxx ++++ b/sfx2/source/doc/objxtor.cxx +@@ -237,6 +237,7 @@ SfxObjectShell_Impl::SfxObjectShell_Impl( SfxObjectShell& _rDocShell ) + ,m_bAllowShareControlFileClean( true ) + ,m_bConfigOptionsChecked( false ) + ,m_bMacroCallsSeenWhileLoading( false ) ++ ,m_bHadCheckedMacrosOnLoad( false ) + ,lErr(ERRCODE_NONE) + ,nEventId ( SfxEventHintId::NONE ) + ,nLoadedFlags ( SfxLoadedFlags::ALL ) +diff --git a/sfx2/source/inc/objshimp.hxx b/sfx2/source/inc/objshimp.hxx +index 3d7b0b69c945..4afdd706d05e 100644 +--- a/sfx2/source/inc/objshimp.hxx ++++ b/sfx2/source/inc/objshimp.hxx +@@ -91,7 +91,8 @@ struct SfxObjectShell_Impl : public ::sfx2::IMacroDocumentAccess + m_bSharedXMLFlag:1, // whether the document should be edited in shared mode + m_bAllowShareControlFileClean:1, // whether the flag should be stored in xml file + m_bConfigOptionsChecked:1, // whether or not the user options are checked after the Options dialog is closed. +- m_bMacroCallsSeenWhileLoading:1; // whether or not the user options are checked after the Options dialog is closed. ++ m_bMacroCallsSeenWhileLoading:1, // whether or not macro calls were seen when loading document. ++ m_bHadCheckedMacrosOnLoad:1; // if document contained macros (or calls) when loaded + + IndexBitSet aBitSet; + ErrCode lErr; +-- +cgit v1.2.1 + diff --git a/debian/patches/improve-macro-checks.diff b/debian/patches/improve-macro-checks.diff new file mode 100644 index 00000000000..920b2fb1786 --- /dev/null +++ b/debian/patches/improve-macro-checks.diff @@ -0,0 +1,145 @@ +diff --git a/include/sfx2/docmacromode.hxx b/include/sfx2/docmacromode.hxx +index 9533518bee9d..aa120240688e 100644 +--- a/include/sfx2/docmacromode.hxx ++++ b/include/sfx2/docmacromode.hxx +@@ -220,7 +220,8 @@ namespace sfx2 + if and only if macro execution in this document is allowed. + */ + bool adjustMacroMode( +- const css::uno::Reference< css::task::XInteractionHandler >& _rxInteraction ++ const css::uno::Reference< css::task::XInteractionHandler >& _rxInteraction, ++ bool bHasValidContentSignature = false + ); + + /** determines whether macro execution is disallowed +@@ -286,11 +287,13 @@ namespace sfx2 + */ + bool + checkMacrosOnLoading( +- const css::uno::Reference< css::task::XInteractionHandler >& _rxInteraction ++ const css::uno::Reference< css::task::XInteractionHandler >& _rxInteraction, ++ bool bHasValidContentSignature = false + ); + + private: + std::shared_ptr< DocumentMacroMode_Data > m_xData; ++ bool m_bNeedsContentSigned; + }; + + +diff --git a/include/svtools/sfxecode.hxx b/include/svtools/sfxecode.hxx +index a57c6b9e966f..fe6f26dc3623 100644 +--- a/include/svtools/sfxecode.hxx ++++ b/include/svtools/sfxecode.hxx +@@ -36,6 +36,7 @@ class ErrCode; + #define ERRCODE_SFX_CANTCREATEBACKUP ErrCode(ErrCodeArea::Sfx, ErrCodeClass::Create, 50) + #define ERRCODE_SFX_MACROS_SUPPORT_DISABLED ErrCode(WarningFlag::Yes, ErrCodeArea::Sfx, ErrCodeClass::NONE, 51) + #define ERRCODE_SFX_DOCUMENT_MACRO_DISABLED ErrCode(WarningFlag::Yes, ErrCodeArea::Sfx, ErrCodeClass::NONE, 52) ++#define ERRCODE_SFX_DOCUMENT_MACRO_DISABLED_CONTENT_UNSIGNED ErrCode(WarningFlag::Yes, ErrCodeArea::Sfx, ErrCodeClass::NONE, 53) + #define ERRCODE_SFX_SHARED_NOPASSWORDCHANGE ErrCode(WarningFlag::Yes, ErrCodeArea::Sfx, ErrCodeClass::NONE, 54) + #define ERRCODE_SFX_INCOMPLETE_ENCRYPTION ErrCode(WarningFlag::Yes, ErrCodeArea::Sfx, ErrCodeClass::NONE, 55) + #define ERRCODE_SFX_DOCUMENT_MACRO_DISABLED_MAC \ +diff --git a/sfx2/source/doc/docmacromode.cxx b/sfx2/source/doc/docmacromode.cxx +index bbb3b629de2b..c49f7cec00c6 100644 +--- a/sfx2/source/doc/docmacromode.cxx ++++ b/sfx2/source/doc/docmacromode.cxx +@@ -111,6 +111,10 @@ namespace sfx2 + #endif + } + ++ void lcl_showMacrosDisabledUnsignedContentError( const Reference< XInteractionHandler >& rxHandler, bool& rbAlreadyShown ) ++ { ++ lcl_showGeneralSfxErrorOnce( rxHandler, ERRCODE_SFX_DOCUMENT_MACRO_DISABLED_CONTENT_UNSIGNED, rbAlreadyShown ); ++ } + + bool lcl_showMacroWarning( const Reference< XInteractionHandler >& rxHandler, + const OUString& rDocumentLocation ) +@@ -123,7 +127,8 @@ namespace sfx2 + + //= DocumentMacroMode + DocumentMacroMode::DocumentMacroMode( IMacroDocumentAccess& rDocumentAccess ) +- :m_xData( std::make_shared( rDocumentAccess ) ) ++ :m_xData( std::make_shared( rDocumentAccess ) ), ++ m_bNeedsContentSigned(false) + { + } + +@@ -139,7 +144,7 @@ namespace sfx2 + return false; + } + +- bool DocumentMacroMode::adjustMacroMode( const Reference< XInteractionHandler >& rxInteraction ) ++ bool DocumentMacroMode::adjustMacroMode( const Reference< XInteractionHandler >& rxInteraction, bool bHasValidContentSignature ) + { + sal_uInt16 nMacroExecutionMode = m_xData->m_rDocumentAccess.getCurrentMacroExecMode(); + +@@ -237,6 +242,14 @@ namespace sfx2 + lcl_showDocumentMacrosDisabledError(rxInteraction, m_xData->m_bDocMacroDisabledMessageShown); + return disallowMacroExecution(); + } ++ else if ( m_xData->m_rDocumentAccess.macroCallsSeenWhileLoading() && ++ bHasTrustedMacroSignature && ++ !bHasValidContentSignature) ++ { ++ // When macros are signed, and the document has events which call macros, the document content needs to be signed too. ++ lcl_showMacrosDisabledUnsignedContentError(rxInteraction, m_xData->m_bDocMacroDisabledMessageShown); ++ return disallowMacroExecution(); ++ } + else if ( bHasTrustedMacroSignature ) + { + // there is trusted macro signature, allow macro execution +@@ -391,7 +404,7 @@ namespace sfx2 + } + + +- bool DocumentMacroMode::checkMacrosOnLoading( const Reference< XInteractionHandler >& rxInteraction ) ++ bool DocumentMacroMode::checkMacrosOnLoading( const Reference< XInteractionHandler >& rxInteraction, bool bHasValidContentSignature ) + { + bool bAllow = false; + if ( SvtSecurityOptions().IsMacroDisabled() ) +@@ -403,7 +416,9 @@ namespace sfx2 + { + if (m_xData->m_rDocumentAccess.documentStorageHasMacros() || hasMacroLibrary() || m_xData->m_rDocumentAccess.macroCallsSeenWhileLoading()) + { +- bAllow = adjustMacroMode( rxInteraction ); ++ if (m_xData->m_rDocumentAccess.macroCallsSeenWhileLoading()) ++ m_bNeedsContentSigned = true; ++ bAllow = adjustMacroMode( rxInteraction, bHasValidContentSignature ); + } + else if ( !isMacroExecutionDisallowed() ) + { +diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx +index 81fcb4027535..5148ed0c62b6 100644 +--- a/sfx2/source/doc/objmisc.cxx ++++ b/sfx2/source/doc/objmisc.cxx +@@ -942,7 +942,8 @@ void SfxObjectShell::CheckSecurityOnLoading_Impl() + CheckEncryption_Impl( xInteraction ); + + // check macro security +- pImpl->aMacroMode.checkMacrosOnLoading( xInteraction ); ++ const bool bHasValidContentSignature = HasValidSignatures(); ++ pImpl->aMacroMode.checkMacrosOnLoading( xInteraction, bHasValidContentSignature ); + } + + +@@ -1598,7 +1599,7 @@ bool SfxObjectShell::AdjustMacroMode() + + CheckEncryption_Impl( xInteraction ); + +- return pImpl->aMacroMode.adjustMacroMode( xInteraction ); ++ return pImpl->aMacroMode.adjustMacroMode( xInteraction, true /*TODO*/ ); + } + + vcl::Window* SfxObjectShell::GetDialogParent( SfxMedium const * pLoadingMedium ) +diff --git a/svtools/inc/errtxt.hrc b/svtools/inc/errtxt.hrc +index 9847148d4c3d..009badd70b54 100644 +--- a/svtools/inc/errtxt.hrc ++++ b/svtools/inc/errtxt.hrc +@@ -119,6 +119,7 @@ const ErrMsgCode RID_ERRHDL[] = + { NC_("RID_ERRHDL", "The maximum number of documents that can be opened at the same time has been reached. You need to close one or more documents before you can open a new document."), ERRCODE_SFX_NOMOREDOCUMENTSALLOWED }, + { NC_("RID_ERRHDL", "Could not create backup copy.") , ERRCODE_SFX_CANTCREATEBACKUP }, + { NC_("RID_ERRHDL", "An attempt was made to execute a macro.\nFor security reasons, macro support is disabled."), ERRCODE_SFX_MACROS_SUPPORT_DISABLED }, ++ { NC_("RID_ERRHDL", "Execution of macros is disabled. Macros are signed, but the document (containing document events) is not signed."), ERRCODE_SFX_DOCUMENT_MACRO_DISABLED_CONTENT_UNSIGNED }, + { NC_("RID_ERRHDL", "This document contains macros.\n\nMacros may contain viruses. Execution of macros is disabled due to the current macro security setting in %PRODUCTNAME - Preferences - %PRODUCTNAME - Security.\n\nTherefore, some functionality may not be available.") , ERRCODE_SFX_DOCUMENT_MACRO_DISABLED_MAC }, + { NC_("RID_ERRHDL", "This document contains macros.\n\nMacros may contain viruses. Execution of macros is disabled due to the current macro security setting in Tools - Options - %PRODUCTNAME - Security.\n\nTherefore, some functionality may not be available.") , ERRCODE_SFX_DOCUMENT_MACRO_DISABLED }, + { NC_("RID_ERRHDL", "The encrypted document contains unexpected non-encrypted streams.\n\nThis could be the result of document manipulation.\n\nWe recommend that you do not trust the content of the current document.\nExecution of macros is disabled for this document.\n ") , ERRCODE_SFX_INCOMPLETE_ENCRYPTION }, diff --git a/debian/patches/install-fixes.diff b/debian/patches/install-fixes.diff new file mode 100644 index 00000000000..891bb321c78 --- /dev/null +++ b/debian/patches/install-fixes.diff @@ -0,0 +1,166 @@ +diff --git a/bin/distro-install-file-lists b/bin/distro-install-file-lists +index eaabf9c..c1b1ec6 100755 +--- libreoffice-3.5.0/bin/distro-install-file-lists ++++ libreoffice-3.5.0/bin/distro-install-file-lists +@@ -8,6 +8,8 @@ + exit 1 + fi + ++export OOO_VENDOR=Debian ++ + BUILDDIR=`pwd` + FILELISTSDIR="$BUILDDIR/file-lists" + +@@ -351,152 +351,6 @@ if test "z$OOO_VENDOR" != "zDebian" ; then + remove_duplicity_from_flists common_list.txt lang_bg_list.txt $INSTALLDIR/presets/config/styles.sod + # the British fixes can be removed after the issue #54113 is fixed + remove_duplicity_from_flists common_list.txt lang_en-GB_list.txt $INSTALLDIR/presets/config/standard.sog +- +-else +- +- echo "Creating package directories..." +- +- test -d pkg && rm -r pkg || : +- +- # Create package tree (needed by Debian's dpkg) +- # create_package_directory +- create_package_directory() +- { +- listfile=$1 +- directory="$2" +- perl -nl \ +- -e " if(/^%dir (.*)/) +- {system('mkdir', '-p', '-m', '755', \"$directory\".\$1);} +- else +- {rename('./'.\$_, \"$directory\".\$_);} +- " \ +- $listfile +- } +- +- create_package_directory gid_Module_Root_Ure_Hidden pkg/ure +- +- create_package_directory gid_Module_Root pkg/libreoffice-common +- create_package_directory gid_Module_Root_Brand pkg/libreoffice-common +- create_package_directory gid_Module_Root_Files_Images pkg/libreoffice-common +- create_package_directory gid_Module_Oo_Linguistic pkg/libreoffice-common +- create_package_directory gid_Module_Optional_Xsltfiltersamples pkg/libreoffice-common +- create_package_directory gid_Module_Optional_Grfflt pkg/libreoffice-draw +- create_package_directory gid_Module_Prg_Calc_Bin pkg/libreoffice-calc +- create_package_directory gid_Module_Prg_Math_Bin pkg/libreoffice-math +- create_package_directory gid_Module_Prg_Draw_Bin pkg/libreoffice-draw +- create_package_directory gid_Module_Prg_Wrt_Bin pkg/libreoffice-writer +- create_package_directory gid_Module_Prg_Impress_Bin pkg/libreoffice-impress +- create_package_directory gid_Module_Prg_Base_Bin pkg/libreoffice-base +- create_package_directory gid_Module_Brand_Prg_Calc pkg/libreoffice-calc +- create_package_directory gid_Module_Brand_Prg_Math pkg/libreoffice-math +- create_package_directory gid_Module_Brand_Prg_Draw pkg/libreoffice-draw +- create_package_directory gid_Module_Brand_Prg_Wrt pkg/libreoffice-writer +- create_package_directory gid_Module_Brand_Prg_Impress pkg/libreoffice-impress +- create_package_directory gid_Module_Brand_Prg_Base pkg/libreoffice-base +- create_package_directory gid_Module_Pyuno pkg/python-uno +- create_package_directory gid_Module_Optional_Gnome pkg/libreoffice-gnome +- +- create_package_directory gid_Module_Root_Files_2 pkg/libreoffice-common +- create_package_directory gid_Module_Root_Files_3 pkg/libreoffice-common +- create_package_directory gid_Module_Root_Files_4 pkg/libreoffice-common +- create_package_directory gid_Module_Root_Files_5 pkg/libreoffice-common +- create_package_directory gid_Module_Root_Files_6 pkg/libreoffice-common +- create_package_directory gid_Module_Root_Files_7 pkg/libreoffice-common +- if [ -e gid_Module_Optional_Pymailmerge ]; then +- create_package_directory gid_Module_Optional_Pymailmerge pkg/libreoffice-emailmerge +- else # post m26 +- mkdir -p pkg/libreoffice-emailmerge/$INSTALLDIR/program +- mv pkg/libreoffice-common/$INSTALLDIR/program/mailmerge.py \ +- pkg/libreoffice-emailmerge/$INSTALLDIR/program/mailmerge.py +- fi +- create_package_directory gid_Module_Optional_OGLTrans pkg/libreoffice-ogltrans +- +- create_package_directory gid_Module_Root_SDK pkg/libreoffice-dev +- +- for l in `echo $WITH_LANG_LIST`; do +- for p in Impress Draw Math Calc Base Writer; do +- create_package_directory gid_Module_Langpack_${p}_`echo $l | sed -e s/-/_/g` pkg/libreoffice-l10n-$l +- done +- create_package_directory gid_Module_Langpack_Basis_`echo $l | sed -e s/-/_/g` pkg/libreoffice-l10n-$l +- create_package_directory gid_Module_Langpack_Brand_`echo $l | sed -e s/-/_/g` pkg/libreoffice-l10n-$l +- create_package_directory gid_Module_Langpack_Resource_`echo $l | sed -e s/-/_/g` pkg/libreoffice-l10n-$l +- create_package_directory gid_Module_Helppack_Help_`echo $l | sed -e s/-/_/g` pkg/libreoffice-help-$l +- +- # some help files are in _Langpack_{Writer,Impress,...}_ +- # move them from -l10n to -help +- if [ "$l" = "en-US" ]; then d=en; else d=$l; fi +- mv pkg/libreoffice-l10n-$l/$INSTALLDIR/help/$d/* \ +- pkg/libreoffice-help-$l/$INSTALLDIR/help/$d && \ +- rmdir pkg/libreoffice-l10n-$l/$INSTALLDIR/help/$d +- done +- +- # move_wrappers [...] +- move_wrappers() +- { +- directory=$1 +- shift +- mkdir -m755 -p "$directory"/usr/bin +- while test -n "$1"; do +- mv usr/*bin/"$1$BINSUFFIX" "$directory"/usr/bin +- shift +- done +- } +- move_wrappers pkg/libreoffice-common soffice unopkg +- if test "$COMPAT_OOWRAPPERS" = "YES" ; then +- move_wrappers pkg/libreoffice-common ooffice oofromtemplate +- move_wrappers pkg/libreoffice-base oobase +- move_wrappers pkg/libreoffice-writer oowriter ooweb +- move_wrappers pkg/libreoffice-calc oocalc +- move_wrappers pkg/libreoffice-impress ooimpress +- move_wrappers pkg/libreoffice-math oomath +- move_wrappers pkg/libreoffice-draw oodraw +- fi +- move_wrappers pkg/libreoffice-common libreoffice lofromtemplate +- move_wrappers pkg/libreoffice-base lobase +- move_wrappers pkg/libreoffice-writer lowriter loweb +- move_wrappers pkg/libreoffice-calc localc +- move_wrappers pkg/libreoffice-impress loimpress +- move_wrappers pkg/libreoffice-math lomath +- move_wrappers pkg/libreoffice-draw lodraw +- +- # Move all libraries, binaries, *.rdb from -common to -core +- for d in $INSTALLDIR/program $INSTALLDIR/program; do \ +- if [ ! -d $DESTDIR/pkg/libreoffice-core/$d ]; then \ +- mkdir -p $DESTDIR/pkg/libreoffice-core/$d; \ +- fi && +- ( cd pkg/libreoffice-common/$d +- find -maxdepth 1 \ +- -regex '\./\(.*\.so.*\|.*\.bin\|pagein\|msfontextract\|.*\.rdb\|javaldx\|uri-encode\)' \ +- -exec mv {} $DESTDIR/pkg/libreoffice-core/$d \; +- ); \ +- done +- +- # install additional ooo-build scripts & misc stuff +- mkdir -p pkg/libreoffice-common/usr/share/man/man1 +- if test "$COMPAT_OOWRAPPERS" = "YES" ; then +- mv usr/share/man/man1/openoffice$BINSUFFIX.1 \ +- pkg/libreoffice-common/usr/share/man/man1 +- fi +- mv usr/share/man/man1/libreoffice$BINSUFFIX.1 \ +- pkg/libreoffice-common/usr/share/man/man1 +- mkdir -p pkg/libreoffice-common/etc/bash_completion.d +- if test "$COMPAT_OOWRAPPERS" = "YES" ; then +- mv etc/bash_completion.d/ooffice$BINSUFFIX.sh \ +- pkg/libreoffice-common/etc/bash_completion.d +- fi +- mv etc/bash_completion.d/libreoffice$BINSUFFIX.sh \ +- pkg/libreoffice-common/etc/bash_completion.d +- mv .$INSTALLDIR/program/java-set-classpath \ +- pkg/libreoffice-common/$INSTALLDIR/program +- if echo $WITH_LANG_LIST | grep -q en-US; then +- for i in forms/resume.ott officorr/project-proposal.ott; do \ +- mkdir -p pkg/libreoffice-common/$INSTALLDIR/share/template/en-US/`dirname $i`; \ +- mv .$INSTALLDIR/share/template/en-US/$i \ +- pkg/libreoffice-common/$INSTALLDIR/share/template/en-US/$i; \ +- done; \ +- fi +- # Warn for any remaining files +- find . -path './pkg' -prune -o -not -name 'gid_Module_*' -not -type d -exec echo "File not packaged: {}" \; + fi + + # mark the config files diff --git a/debian/patches/javadoc-optional.diff b/debian/patches/javadoc-optional.diff new file mode 100644 index 00000000000..704ae20ec56 --- /dev/null +++ b/debian/patches/javadoc-optional.diff @@ -0,0 +1,153 @@ +Gemeinsame Unterverzeichnisse: odk-old/config und odk/config. +Gemeinsame Unterverzeichnisse: odk-old/docs und odk/docs. +Gemeinsame Unterverzeichnisse: odk-old/examples und odk/examples. +diff --git a/odk/Module_odk.mk b/odk/Module_odk.mk +index 32bdfc1..a174932 100644 +--- a/odk/Module_odk.mk ++++ b/odk/Module_odk.mk +@@ -43,11 +43,13 @@ ifneq ($(ENABLE_JAVA),) + $(eval $(call gb_Module_add_targets,odk,\ + $(if $(and $(BUILD_UNOWINREG),$(filter GCC,$(COM))),CustomTarget_unowinreg)\ + CustomTarget_classes \ +- CustomTarget_javadoc \ +- GeneratedPackage_odk_javadoc \ + GeneratedPackage_uno_loader_classes \ + $(if $(filter WNT,$(OS)),Library_unowinreg) \ + Package_unowinreg \ ++ $(if $(JAVADOC),\ ++ CustomTarget_javadoc \ ++ GeneratedPackage_odk_javadoc \ ++ ) \ + )) + endif + +Gemeinsame Unterverzeichnisse: odk-old/pack und odk/pack. +Gemeinsame Unterverzeichnisse: odk-old/qa und odk/qa. +Gemeinsame Unterverzeichnisse: odk-old/settings und odk/settings. +Gemeinsame Unterverzeichnisse: odk-old/source und odk/source. +Gemeinsame Unterverzeichnisse: odk-old/util und odk/util. +--- a/configure.ac-old 2013-05-27 18:32:42.187305241 +0200 ++++ b/configure.ac 2013-05-27 18:44:29.131286710 +0200 +@@ -2057,6 +2057,18 @@ AC_ARG_WITH(doxygen, + documentation. Not relevant in the --disable-odk case.]), + ,with_doxygen=yes) + ++AC_ARG_WITH( ++ [javadoc], ++ AS_HELP_STRING( ++ [--with-javadoc], ++ [Specifies the javadoc executable to use when generating ODK Java ++ documentation. --without-javadoc disables generation of ODK Java ++ documentation. Not relevant in the --disable-odk case.]) ++ [ ++ Usage: --with-javadoc= ++ ],, ++ [with_javadoc=yes]) ++ + AC_ARG_WITH(visual-studio, + AS_HELP_STRING([--with-visual-studio=<2019>], + [Specify which Visual Studio version to use in case several are +@@ -6290,34 +6302,44 @@ + dnl =================================================================== + dnl Checks for javadoc + dnl =================================================================== +-if test "$ENABLE_JAVA" != ""; then ++if test "$ENABLE_JAVA" != "" -a "$enable_odk" != no; then + if test -z "$with_jdk_home"; then + AC_PATH_PROG(JAVADOC, javadoc) + else +- _javadoc_path="$with_jdk_home/bin/javadoc" +- dnl Check if there is a javadoc at all. +- if test -x "$_javadoc_path"; then +- JAVADOC=$_javadoc_path +- else +- AC_PATH_PROG(JAVADOC, javadoc) +- fi +- fi +- if test -z "$JAVADOC"; then +- AC_MSG_ERROR([$_javadoc_path not found set with_jdk_home]) +- fi +- if test "$build_os" = "cygwin"; then +- if test x`echo "$JAVADOC" | $GREP -i '\.exe$'` = x; then +- JAVADOC="${JAVADOC}.exe" +- fi +- JAVADOC=`win_short_path_for_make "$JAVADOC"` +- fi ++ if test "$with_javadoc" = "yes"; then ++ _javadoc_path="$with_jdk_home/bin/javadoc" ++ dnl Check if there is a javadoc at all. ++ if test -x "$_javadoc_path"; then ++ JAVADOC=$_javadoc_path ++ else ++ AC_PATH_PROG(JAVADOC, javadoc) ++ fi ++ if test -z "$JAVADOC"; then ++ AC_MSG_ERROR([$_javadoc_path not found set with_jdk_home]) ++ fi ++ if test "$build_os" = "cygwin"; then ++ if test x`echo "$JAVADOC" | $GREP -i '\.exe$'` = x; then ++ JAVADOC="${JAVADOC}.exe" ++ fi ++ JAVADOC=`win_short_path_for_make "$JAVADOC"` ++ fi + +- if test `$JAVADOC --version 2>&1 | $GREP -c "gjdoc"` -gt 0; then +- JAVADOCISGJDOC="yes" ++ if test `$JAVADOC --version 2>&1 | $GREP -c "gjdoc"` -gt 0; then ++ JAVADOCISGJDOC="yes" ++ fi ++ else ++ unset JAVADOC ++ fi + fi ++else ++ unset JAVADOC + fi + AC_SUBST(JAVADOCISGJDOC) + ++if test "$JAVADOCISGJDOC" = "yes"; then ++ unset JAVADOC ++fi ++ + if test "$ENABLE_JAVA" != ""; then + # check if JAVA_HOME was (maybe incorrectly?) set automatically to /usr + if test "$JAVA_HOME" = "/usr" -a "x$with_jdk_home" = "x"; then +diff --git a/odk/CustomTarget_check.mk b/odk/CustomTarget_check.mk +index a9b542d..707829a 100644 +--- a/odk/CustomTarget_check.mk ++++ b/odk/CustomTarget_check.mk +@@ -35,7 +35,7 @@ $(call gb_CustomTarget_get_workdir,odk/check)/checkbin : \ + $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,odk_config_win)) \ + $(call gb_Package_get_target,odk_docs) \ + $(call gb_Package_get_target,odk_html) \ +- $(if $(ENABLE_JAVA),$(call gb_GeneratedPackage_get_target,odk_javadoc)) \ ++ $(if $(JAVADOC),$(call gb_GeneratedPackage_get_target,odk_javadoc)) \ + $(call gb_Package_get_target,odk_settings) \ + $(call gb_Package_get_target,odk_settings_generated) \ + $(if $(ENABLE_JAVA),$(call gb_Package_get_target,odk_unowinreg)) +diff --git a/odk/util/check.pl b/odk/util/check.pl +index 899b42c..2c7a780 100644 +--- a/odk/util/check.pl ++++ b/odk/util/check.pl +@@ -188,7 +188,7 @@ if (-d "$SdkDir") { + # improvement required + my $solar_java = $ENV{"ENABLE_JAVA"}; + my $JDK = $ENV{"JDK"}; +- if (defined($solar_java) && $solar_java ne "" && (!defined($JDK) || $JDK ne "gcj")) { ++ if (defined($solar_java) && $solar_java ne "" && $ENV{"JAVADOC"} ne "") { + print "check java docu: "; + if (check_dir("docs/java/ref")) { + if (!check_file("docs/java/ref/index.html")) { +diff --git a/Repository.mk b/Repository.mk +index 5f2654b..471210f 100644 +--- a/Repository.mk ++++ b/Repository.mk +@@ -834,7 +841,7 @@ $(eval $(call gb_Helper_register_packages_for_install,sdk,\ + offapi_idl \ + udkapi_idl \ + $(if $(ENABLE_JAVA), \ +- odk_javadoc \ ++ $(if $(JAVADOC),odk_javadoc) \ + odk_uno_loader_classes \ + odk_unowinreg \ + ) \ diff --git a/debian/patches/jdbc-driver-classpaths.diff b/debian/patches/jdbc-driver-classpaths.diff new file mode 100644 index 00000000000..8f4a1660e75 --- /dev/null +++ b/debian/patches/jdbc-driver-classpaths.diff @@ -0,0 +1,35 @@ +diff --git a/officecfg/registry/data/org/openoffice/Office/DataAccess.xcu b/officecfg/registry/data/org/openoffice/Office/DataAccess.xcu +index 9be30a2..59c87cb 100644 +--- a/officecfg/registry/data/org/openoffice/Office/DataAccess.xcu ++++ b/officecfg/registry/data/org/openoffice/Office/DataAccess.xcu +@@ -147,6 +147,30 @@ + + + ++ ++ ++ ++ ++ file:///usr/share/java/mariadb-java-client.jar ++ ++ ++ ++ ++ file:///usr/share/java/mysql.jar ++ ++ ++ ++ ++ file:///usr/share/java/posgresql.jar ++ ++ ++ ++ ++ file:///usr/share/java/jtds.jar ++ ++ ++ ++ + + + diff --git a/debian/patches/jurt-soffice-location.diff b/debian/patches/jurt-soffice-location.diff new file mode 100644 index 00000000000..aa334d8ea4d --- /dev/null +++ b/debian/patches/jurt-soffice-location.diff @@ -0,0 +1,20 @@ +commit b71107fb12e3c3125e0cb62c5a4f6636a80c6408 +Author: Bjoern Michaelsen +AuthorDate: Tue Jun 7 11:52:37 2011 +0200 +Commit: Bjoern Michaelsen +CommitDate: Tue Jun 7 11:52:37 2011 +0200 + + on debian-based systems, we know where our soffice binary is + +diff --git a/jurt/com/sun/star/lib/util/NativeLibraryLoader.java b/jurt/com/sun/star/lib/util/NativeLibraryLoader.jav +index da22980..36664ca 100644 +--- libreoffice-3.5.0/ridljar/com/sun/star/lib/util/NativeLibraryLoader.java ++++ libreoffice-3.5.0/ridljar/com/sun/star/lib/util/NativeLibraryLoader.java +@@ -111,6 +111,8 @@ public final class NativeLibraryLoader { + } + } + } ++ if (name.equals("soffice")) ++ return new File("/usr/lib/libreoffice/program/soffice"); + return null; + } diff --git a/debian/patches/liborcus-0.16.diff b/debian/patches/liborcus-0.16.diff new file mode 100644 index 00000000000..a544ec7ca35 --- /dev/null +++ b/debian/patches/liborcus-0.16.diff @@ -0,0 +1,1255 @@ +From 109ed8f775dddfede012d56d078abd70b45490c0 Mon Sep 17 00:00:00 2001 +From: Kohei Yoshida +Date: Wed, 9 Sep 2020 21:23:48 -0400 +Subject: Upgrade liborcus to 0.16.0. + +Change-Id: Iae29fb26417dfc161698a81bee84e81545969065 +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102502 +Tested-by: Jenkins +Reviewed-by: Kohei Yoshida +--- + RepositoryExternal.mk | 4 +- + configure.ac | 2 +- + download.lst | 4 +- + ...1-Mark-all-untentionally-unused-variables.patch | 376 +++++++++++++++++++++ + external/liborcus/ExternalPackage_liborcus.mk | 8 +- + external/liborcus/ExternalProject_liborcus.mk | 4 +- + external/liborcus/Library_orcus-parser.mk | 1 + + external/liborcus/Library_orcus.mk | 4 + + external/liborcus/UnpackedTarball_liborcus.mk | 1 + + external/liborcus/libtool.patch.0 | 10 +- + external/liborcus/windows-constants-hack.patch | 2 +- + sc/source/filter/inc/orcusinterface.hxx | 21 +- + sc/source/filter/orcus/interface.cxx | 82 +++-- + sc/source/filter/orcus/xmlcontext.cxx | 7 +- + sc/source/ui/xmlsource/xmlsourcedlg.cxx | 6 +- + 15 files changed, 480 insertions(+), 52 deletions(-) + create mode 100644 external/liborcus/0001-Mark-all-untentionally-unused-variables.patch + +diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk +index d9fa980d7f24..1f0a91de142a 100644 +--- a/RepositoryExternal.mk ++++ b/RepositoryExternal.mk +@@ -3270,7 +3270,7 @@ $(call gb_LinkTarget_set_include,$(1),\ + ) + + $(call gb_LinkTarget_add_libs,$(1),\ +- -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs -lorcus-0.15 \ ++ -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs -lorcus-0.16 \ + ) + + $(if $(SYSTEM_BOOST), \ +@@ -3289,7 +3289,7 @@ $(call gb_LinkTarget_set_include,$(1),\ + ) + + $(call gb_LinkTarget_add_libs,$(1),\ +- -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs -lorcus-parser-0.15 \ ++ -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs -lorcus-parser-0.16 \ + ) + + endef +diff --git a/configure.ac b/configure.ac +index 8e8d5eb662d9..06398bfa99a7 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -10126,7 +10126,7 @@ AC_SUBST(ENABLE_FUZZERS) + dnl =================================================================== + dnl Orcus + dnl =================================================================== +-libo_CHECK_SYSTEM_MODULE([orcus],[ORCUS],[liborcus-0.15 >= 0.15.0]) ++libo_CHECK_SYSTEM_MODULE([orcus],[ORCUS],[liborcus-0.16 >= 0.16.0]) + if test "$with_system_orcus" != "yes"; then + if test "$SYSTEM_BOOST" = "TRUE"; then + # =========================================================== +diff --git a/download.lst b/download.lst +index ee4ba8a1c83b..345ddd19537b 100644 +--- a/download.lst ++++ b/download.lst +@@ -206,8 +206,8 @@ export OPENLDAP_SHA256SUM := cdd6cffdebcd95161a73305ec13fc7a78e9707b46ca9f84fb89 + export OPENLDAP_TARBALL := openldap-2.4.45.tgz + export OPENSSL_SHA256SUM := 14cb464efe7ac6b54799b34456bd69558a749a4931ecfd9cf9f71d7881cac7bc + export OPENSSL_TARBALL := openssl-1.0.2t.tar.gz +-export ORCUS_SHA256SUM := cfb2aa60825f2a78589ed030c07f46a1ee16ef8a2d1bf2279192fbc1ae5a5f61 +-export ORCUS_TARBALL := liborcus-0.15.4.tar.bz2 ++export ORCUS_SHA256SUM := 854c6ec167ace59baa2984e175bac7b5b2af91bfde4bb10d2088b87a51ed76ec ++export ORCUS_TARBALL := liborcus-0.16.0.tar.bz2 + export OWNCLOUD_ANDROID_LIB_SHA256SUM := b18b3e3ef7fae6a79b62f2bb43cc47a5346b6330f6a383dc4be34439aca5e9fb + export OWNCLOUD_ANDROID_LIB_TARBALL := owncloud-android-library-0.9.4-no-binary-deps.tar.gz + export PAGEMAKER_SHA256SUM := 66adacd705a7d19895e08eac46d1e851332adf2e736c566bef1164e7a442519d +diff --git a/external/liborcus/0001-Mark-all-untentionally-unused-variables.patch b/external/liborcus/0001-Mark-all-untentionally-unused-variables.patch +new file mode 100644 +index 000000000000..b0f6a572aff7 +--- /dev/null ++++ b/external/liborcus/0001-Mark-all-untentionally-unused-variables.patch +@@ -0,0 +1,376 @@ ++From 6d34c41b661a9e8dddf6d08bf1f3c1fd4f5581da Mon Sep 17 00:00:00 2001 ++From: Kohei Yoshida ++Date: Fri, 11 Sep 2020 21:39:09 -0400 ++Subject: [PATCH] Mark all untentionally unused variables. ++ ++--- ++ include/orcus/css_parser.hpp | 70 ++++++++++++++++++++++++------ ++ include/orcus/csv_parser.hpp | 5 ++- ++ include/orcus/json_parser.hpp | 15 +++++-- ++ include/orcus/sax_parser.hpp | 35 ++++++++++++--- ++ include/orcus/sax_token_parser.hpp | 20 +++++++-- ++ include/orcus/yaml_parser.hpp | 10 ++++- ++ 6 files changed, 124 insertions(+), 31 deletions(-) ++ ++diff --git a/include/orcus/css_parser.hpp b/include/orcus/css_parser.hpp ++index cdfae5e0..3e96980b 100644 ++--- a/include/orcus/css_parser.hpp +++++ b/include/orcus/css_parser.hpp ++@@ -31,23 +31,44 @@ namespace orcus { ++ class css_handler ++ { ++ public: ++- void at_rule_name(const char* p, size_t n) {} +++ void at_rule_name(const char* p, size_t n) +++ { +++ (void)p; (void)n; +++ } ++ ++- void simple_selector_type(const char* p, size_t n) {} +++ void simple_selector_type(const char* p, size_t n) +++ { +++ (void)p; (void)n; +++ } ++ ++- void simple_selector_class(const char* p, size_t n) {} +++ void simple_selector_class(const char* p, size_t n) +++ { +++ (void)p; (void)n; +++ } ++ ++- void simple_selector_pseudo_element(orcus::css::pseudo_element_t pe) {} +++ void simple_selector_pseudo_element(orcus::css::pseudo_element_t pe) +++ { +++ (void)pe; +++ } ++ ++- void simple_selector_pseudo_class(orcus::css::pseudo_class_t pc) {} +++ void simple_selector_pseudo_class(orcus::css::pseudo_class_t pc) +++ { +++ (void)pc; +++ } ++ ++- void simple_selector_id(const char* p, size_t n) {} +++ void simple_selector_id(const char* p, size_t n) +++ { +++ (void)p; (void)n; +++ } ++ ++ void end_simple_selector() {} ++ ++ void end_selector() {} ++ ++- void combinator(orcus::css::combinator_t combinator) {} +++ void combinator(orcus::css::combinator_t combinator) +++ { +++ (void)combinator; +++ } ++ ++ /** ++ * Called at each property name. ++@@ -55,7 +76,10 @@ public: ++ * @param p pointer to the char-array containing the property name string. ++ * @param n length of the property name string. ++ */ ++- void property_name(const char* p, size_t n) {} +++ void property_name(const char* p, size_t n) +++ { +++ (void)p; (void)n; +++ } ++ ++ /** ++ * Called at each ordinary property value string. ++@@ -63,7 +87,10 @@ public: ++ * @param p pointer to the char-array containing the value string. ++ * @param n length of the value string. ++ */ ++- void value(const char* p, size_t n) {} +++ void value(const char* p, size_t n) +++ { +++ (void)p; (void)n; +++ } ++ ++ /** ++ * Called at each RGB color value of a property. ++@@ -72,7 +99,10 @@ public: ++ * @param green value of green (0-255) ++ * @param blue value of blue (0-255) ++ */ ++- void rgb(uint8_t red, uint8_t green, uint8_t blue) {} +++ void rgb(uint8_t red, uint8_t green, uint8_t blue) +++ { +++ (void)red; (void)green; (void)blue; +++ } ++ ++ /** ++ * Called at each RGB color value of a property with alpha transparency ++@@ -83,7 +113,10 @@ public: ++ * @param blue value of blue (0-255) ++ * @param alpha alpha transparency value ++ */ ++- void rgba(uint8_t red, uint8_t green, uint8_t blue, double alpha) {} +++ void rgba(uint8_t red, uint8_t green, uint8_t blue, double alpha) +++ { +++ (void)red; (void)green; (void)blue; (void)alpha; +++ } ++ ++ /** ++ * Called at each HSL color value of a property. ++@@ -92,7 +125,10 @@ public: ++ * @param sat saturation ++ * @param light lightness ++ */ ++- void hsl(uint8_t hue, uint8_t sat, uint8_t light) {} +++ void hsl(uint8_t hue, uint8_t sat, uint8_t light) +++ { +++ (void)hue; (void)sat; (void)light; +++ } ++ ++ /** ++ * Called at each HSL color value of a property with alpha transparency ++@@ -103,7 +139,10 @@ public: ++ * @param light lightness ++ * @param alpha alpha value ++ */ ++- void hsla(uint8_t hue, uint8_t sat, uint8_t light, double alpha) {} +++ void hsla(uint8_t hue, uint8_t sat, uint8_t light, double alpha) +++ { +++ (void)hue; (void)sat; (void)light; (void)alpha; +++ } ++ ++ /** ++ * Called at each URL value of a property. ++@@ -111,7 +150,10 @@ public: ++ * @param p pointer to the char-array containing the URL value string. ++ * @param n length of the URL value string. ++ */ ++- void url(const char* p, size_t n) {} +++ void url(const char* p, size_t n) +++ { +++ (void)p; (void)n; +++ } ++ ++ /** ++ * Called when the parsing begins. ++diff --git a/include/orcus/csv_parser.hpp b/include/orcus/csv_parser.hpp ++index a873b0f2..27b4f924 100644 ++--- a/include/orcus/csv_parser.hpp +++++ b/include/orcus/csv_parser.hpp ++@@ -47,7 +47,10 @@ public: ++ * the text content is guaranteed to be valid so long as ++ * the original CSV stream content is valid. ++ */ ++- void cell(const char* p, size_t n, bool transient) {} +++ void cell(const char* p, size_t n, bool transient) +++ { +++ (void)p; (void)n; (void)transient; +++ } ++ }; ++ ++ template ++diff --git a/include/orcus/json_parser.hpp b/include/orcus/json_parser.hpp ++index 51a3d7cc..ef22b3a8 100644 ++--- a/include/orcus/json_parser.hpp +++++ b/include/orcus/json_parser.hpp ++@@ -54,7 +54,10 @@ public: ++ * pointer points to somewhere in the JSON stream being ++ * parsed. ++ */ ++- void object_key(const char* p, size_t len, bool transient) {} +++ void object_key(const char* p, size_t len, bool transient) +++ { +++ (void)p; (void)len; (void)transient; +++ } ++ ++ /** ++ * Called when the closing curly brace of an object is encountered. ++@@ -87,14 +90,20 @@ public: ++ * pointer points to somewhere in the JSON stream being ++ * parsed. ++ */ ++- void string(const char* p, size_t len, bool transient) {} +++ void string(const char* p, size_t len, bool transient) +++ { +++ (void)p; (void)len; (void)transient; +++ } ++ ++ /** ++ * Called when a numeric value is encountered. ++ * ++ * @param val numeric value. ++ */ ++- void number(double val) {} +++ void number(double val) +++ { +++ (void)val; +++ } ++ }; ++ ++ /** ++diff --git a/include/orcus/sax_parser.hpp b/include/orcus/sax_parser.hpp ++index 73c17d06..3b21bfdf 100644 ++--- a/include/orcus/sax_parser.hpp +++++ b/include/orcus/sax_parser.hpp ++@@ -30,7 +30,10 @@ public: ++ * ++ * @param param struct containing doctype declaration data. ++ */ ++- void doctype(const orcus::sax::doctype_declaration& param) {} +++ void doctype(const orcus::sax::doctype_declaration& param) +++ { +++ (void)param; +++ } ++ ++ /** ++ * Called when <?... is encountered, where the '...' may be an ++@@ -39,28 +42,40 @@ public: ++ * ++ * @param decl name of the identifier. ++ */ ++- void start_declaration(const orcus::pstring& decl) {} +++ void start_declaration(const orcus::pstring& decl) +++ { +++ (void)decl; +++ } ++ ++ /** ++ * Called when the closing tag (>) of a <?... ?> is encountered. ++ * ++ * @param decl name of the identifier. ++ */ ++- void end_declaration(const orcus::pstring& decl) {} +++ void end_declaration(const orcus::pstring& decl) +++ { +++ (void)decl; +++ } ++ ++ /** ++ * Called at the start of each element. ++ * ++ * @param elem information of the element being parsed. ++ */ ++- void start_element(const orcus::sax::parser_element& elem) {} +++ void start_element(const orcus::sax::parser_element& elem) +++ { +++ (void)elem; +++ } ++ ++ /** ++ * Called at the end of each element. ++ * ++ * @param elem information of the element being parsed. ++ */ ++- void end_element(const orcus::sax::parser_element& elem) {} +++ void end_element(const orcus::sax::parser_element& elem) +++ { +++ (void)elem; +++ } ++ ++ /** ++ * Called when a segment of a text content is parsed. Each text content ++@@ -76,7 +91,10 @@ public: ++ * a non-text value or be interned within the scope of ++ * the callback. ++ */ ++- void characters(const orcus::pstring& val, bool transient) {} +++ void characters(const orcus::pstring& val, bool transient) +++ { +++ (void)val; (void)transient; +++ } ++ ++ /** ++ * Called upon parsing of an attribute of an element. Note that when ++@@ -86,7 +104,10 @@ public: ++ * ++ * @param attr struct containing attribute information. ++ */ ++- void attribute(const orcus::sax::parser_attribute& attr) {} +++ void attribute(const orcus::sax::parser_attribute& attr) +++ { +++ (void)attr; +++ } ++ }; ++ ++ /** ++diff --git a/include/orcus/sax_token_parser.hpp b/include/orcus/sax_token_parser.hpp ++index 1452bc27..6b1b1de4 100644 ++--- a/include/orcus/sax_token_parser.hpp +++++ b/include/orcus/sax_token_parser.hpp ++@@ -71,7 +71,10 @@ public: ++ * ++ * @param decl struct containing the attributes of the XML declaration. ++ */ ++- void declaration(const orcus::xml_declaration_t& decl) {} +++ void declaration(const orcus::xml_declaration_t& decl) +++ { +++ (void)decl; +++ } ++ ++ /** ++ * Called at the start of each element. ++@@ -79,7 +82,10 @@ public: ++ * @param elem struct containing the element's information as well as all ++ * the attributes that belong to the element. ++ */ ++- void start_element(const orcus::xml_token_element_t& elem) {} +++ void start_element(const orcus::xml_token_element_t& elem) +++ { +++ (void)elem; +++ } ++ ++ /** ++ * Called at the end of each element. ++@@ -87,7 +93,10 @@ public: ++ * @param elem struct containing the element's information as well as all ++ * the attributes that belong to the element. ++ */ ++- void end_element(const orcus::xml_token_element_t& elem) {} +++ void end_element(const orcus::xml_token_element_t& elem) +++ { +++ (void)elem; +++ } ++ ++ /** ++ * Called when a segment of a text content is parsed. Each text content ++@@ -103,7 +112,10 @@ public: ++ * a non-text value or be interned within the scope of ++ * the callback. ++ */ ++- void characters(const orcus::pstring& val, bool transient) {} +++ void characters(const orcus::pstring& val, bool transient) +++ { +++ (void)val; (void)transient; +++ } ++ }; ++ ++ /** ++diff --git a/include/orcus/yaml_parser.hpp b/include/orcus/yaml_parser.hpp ++index 797ebbec..8d16fbc7 100644 ++--- a/include/orcus/yaml_parser.hpp +++++ b/include/orcus/yaml_parser.hpp ++@@ -72,14 +72,20 @@ public: ++ * @param p pointer to the first character of the string value. ++ * @param len length of the string value. ++ */ ++- void string(const char* p, size_t n) {} +++ void string(const char* p, size_t n) +++ { +++ (void)p; (void)n; +++ } ++ ++ /** ++ * Called when a numeric value is encountered. ++ * ++ * @param val numeric value. ++ */ ++- void number(double val) {} +++ void number(double val) +++ { +++ (void)val; +++ } ++ ++ /** ++ * Called when a boolean 'true' keyword is encountered. ++-- ++2.25.1 ++ +diff --git a/external/liborcus/ExternalPackage_liborcus.mk b/external/liborcus/ExternalPackage_liborcus.mk +index 21dd1bfb1ce5..747691809d2e 100644 +--- a/external/liborcus/ExternalPackage_liborcus.mk ++++ b/external/liborcus/ExternalPackage_liborcus.mk +@@ -12,11 +12,11 @@ $(eval $(call gb_ExternalPackage_ExternalPackage,liborcus,liborcus)) + $(eval $(call gb_ExternalPackage_use_external_project,liborcus,liborcus)) + + ifeq ($(OS),MACOSX) +-$(eval $(call gb_ExternalPackage_add_file,liborcus,$(LIBO_LIB_FOLDER)/liborcus-0.15.0.dylib,src/liborcus/.libs/liborcus-0.15.0.dylib)) +-$(eval $(call gb_ExternalPackage_add_file,liborcus,$(LIBO_LIB_FOLDER)/liborcus-parser-0.15.0.dylib,src/parser/.libs/liborcus-parser-0.15.0.dylib)) ++$(eval $(call gb_ExternalPackage_add_file,liborcus,$(LIBO_LIB_FOLDER)/liborcus-0.16.0.dylib,src/liborcus/.libs/liborcus-0.16.0.dylib)) ++$(eval $(call gb_ExternalPackage_add_file,liborcus,$(LIBO_LIB_FOLDER)/liborcus-parser-0.16.0.dylib,src/parser/.libs/liborcus-parser-0.16.0.dylib)) + else ifeq ($(DISABLE_DYNLOADING),) +-$(eval $(call gb_ExternalPackage_add_file,liborcus,$(LIBO_LIB_FOLDER)/liborcus-0.15.so.0,src/liborcus/.libs/liborcus-0.15.so.0.0.0)) +-$(eval $(call gb_ExternalPackage_add_file,liborcus,$(LIBO_LIB_FOLDER)/liborcus-parser-0.15.so.0,src/parser/.libs/liborcus-parser-0.15.so.0.0.0)) ++$(eval $(call gb_ExternalPackage_add_file,liborcus,$(LIBO_LIB_FOLDER)/liborcus-0.16.so.0,src/liborcus/.libs/liborcus-0.16.so.0.0.0)) ++$(eval $(call gb_ExternalPackage_add_file,liborcus,$(LIBO_LIB_FOLDER)/liborcus-parser-0.16.so.0,src/parser/.libs/liborcus-parser-0.16.so.0.0.0)) + endif + + # vim: set noet sw=4 ts=4: +diff --git a/external/liborcus/ExternalProject_liborcus.mk b/external/liborcus/ExternalProject_liborcus.mk +index 136fa538397e..c2a8cdcbe4a3 100644 +--- a/external/liborcus/ExternalProject_liborcus.mk ++++ b/external/liborcus/ExternalProject_liborcus.mk +@@ -123,8 +123,8 @@ $(call gb_ExternalProject_get_state_target,liborcus,build) : + $(MAKE) \ + $(if $(filter MACOSX,$(OS)),\ + && $(PERL) $(SRCDIR)/solenv/bin/macosx-change-install-names.pl shl OOO \ +- $(EXTERNAL_WORKDIR)/src/liborcus/.libs/liborcus-0.15.0.dylib \ +- $(EXTERNAL_WORKDIR)/src/parser/.libs/liborcus-parser-0.15.0.dylib \ ++ $(EXTERNAL_WORKDIR)/src/liborcus/.libs/liborcus-0.16.0.dylib \ ++ $(EXTERNAL_WORKDIR)/src/parser/.libs/liborcus-parser-0.16.0.dylib \ + ) \ + ) + $(call gb_Trace_EndRange,liborcus,EXTERNAL) +diff --git a/external/liborcus/Library_orcus-parser.mk b/external/liborcus/Library_orcus-parser.mk +index d3cbddbb8cec..4e46591b98fe 100644 +--- a/external/liborcus/Library_orcus-parser.mk ++++ b/external/liborcus/Library_orcus-parser.mk +@@ -63,6 +63,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,orcus-parser,\ + UnpackedTarball/liborcus/src/parser/tokens \ + UnpackedTarball/liborcus/src/parser/types \ + UnpackedTarball/liborcus/src/parser/xml_namespace \ ++ UnpackedTarball/liborcus/src/parser/xml_writer \ + UnpackedTarball/liborcus/src/parser/yaml_parser_base \ + UnpackedTarball/liborcus/src/parser/zip_archive \ + UnpackedTarball/liborcus/src/parser/zip_archive_stream \ +diff --git a/external/liborcus/Library_orcus.mk b/external/liborcus/Library_orcus.mk +index ea99e7509fbf..0a0ca582882a 100644 +--- a/external/liborcus/Library_orcus.mk ++++ b/external/liborcus/Library_orcus.mk +@@ -85,6 +85,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,orcus,\ + UnpackedTarball/liborcus/src/liborcus/odf_tokens \ + UnpackedTarball/liborcus/src/liborcus/ods_content_xml_context \ + UnpackedTarball/liborcus/src/liborcus/ods_content_xml_handler \ ++ UnpackedTarball/liborcus/src/liborcus/ods_dde_links_context \ + UnpackedTarball/liborcus/src/liborcus/ods_session_data \ + UnpackedTarball/liborcus/src/liborcus/ooxml_content_types \ + UnpackedTarball/liborcus/src/liborcus/ooxml_global \ +@@ -103,6 +104,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,orcus,\ + UnpackedTarball/liborcus/src/liborcus/orcus_xls_xml \ + UnpackedTarball/liborcus/src/liborcus/orcus_xlsx \ + UnpackedTarball/liborcus/src/liborcus/orcus_xml \ ++ UnpackedTarball/liborcus/src/liborcus/orcus_xml_impl \ + UnpackedTarball/liborcus/src/liborcus/orcus_xml_map_def \ + UnpackedTarball/liborcus/src/liborcus/session_context \ + UnpackedTarball/liborcus/src/liborcus/spreadsheet_iface_util \ +@@ -134,7 +136,9 @@ $(eval $(call gb_Library_add_generated_exception_objects,orcus,\ + UnpackedTarball/liborcus/src/liborcus/xml_simple_stream_handler \ + UnpackedTarball/liborcus/src/liborcus/xml_stream_handler \ + UnpackedTarball/liborcus/src/liborcus/xml_stream_parser \ ++ UnpackedTarball/liborcus/src/liborcus/xml_structure_mapper \ + UnpackedTarball/liborcus/src/liborcus/xml_structure_tree \ ++ UnpackedTarball/liborcus/src/liborcus/xpath_parser \ + UnpackedTarball/liborcus/src/liborcus/yaml_document_tree \ + )) + +diff --git a/external/liborcus/UnpackedTarball_liborcus.mk b/external/liborcus/UnpackedTarball_liborcus.mk +index e5e33b0b1249..4736dbccab4b 100644 +--- a/external/liborcus/UnpackedTarball_liborcus.mk ++++ b/external/liborcus/UnpackedTarball_liborcus.mk +@@ -20,6 +20,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,liborcus,\ + external/liborcus/gcc9.patch.0 \ + external/liborcus/libtool.patch.0 \ + external/liborcus/fix-pch.patch.0 \ ++ external/liborcus/0001-Mark-all-untentionally-unused-variables.patch \ + )) + + ifeq ($(OS),WNT) +diff --git a/external/liborcus/libtool.patch.0 b/external/liborcus/libtool.patch.0 +index aa6ffa908ec3..663dbd8099d7 100644 +--- a/external/liborcus/libtool.patch.0 ++++ b/external/liborcus/libtool.patch.0 +@@ -1,11 +1,11 @@ +---- ltmain.sh.sav 2018-09-14 23:47:13.000000000 +0200 +-+++ ltmain.sh 2019-05-05 23:11:30.406904472 +0200 +-@@ -7278,7 +7278,7 @@ func_mode_link () ++--- ltmain.sh.orig 2020-09-09 21:20:23.069433984 -0400 +++++ ltmain.sh 2020-09-09 21:27:13.168073996 -0400 ++@@ -7373,7 +7373,7 @@ + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ + -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ + -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ +-- -specs=*|-fsanitize=*) +-+ -specs=*|-fsanitize=*|-fuse-ld=*) ++- -specs=*|-fsanitize=*|-fuse-ld=*|-static-*|-fcilkplus) +++ -specs=*|-fsanitize=*|-fuse-ld=*|-static-*|-fcilkplus) + func_quote_for_eval "$arg" + arg=$func_quote_for_eval_result + func_append compile_command " $arg" +diff --git a/external/liborcus/windows-constants-hack.patch b/external/liborcus/windows-constants-hack.patch +index 876bc1688a31..51aabfa1fb47 100644 +--- a/external/liborcus/windows-constants-hack.patch ++++ b/external/liborcus/windows-constants-hack.patch +@@ -8,7 +8,7 @@ index ae571f5..539ce18 100644 + + -#include "constants.inl" + +#define ORCUS_MAJOR_VERSION 0 +-+#define ORCUS_MINOR_VERSION 11 +++#define ORCUS_MINOR_VERSION 16 + +#define ORCUS_MICRO_VERSION 0 + + namespace orcus { +diff --git a/sc/source/filter/inc/orcusinterface.hxx b/sc/source/filter/inc/orcusinterface.hxx +index b298c711d234..00aea6764957 100644 +--- a/sc/source/filter/inc/orcusinterface.hxx ++++ b/sc/source/filter/inc/orcusinterface.hxx +@@ -62,6 +62,11 @@ public: + { + return mnTextEncoding; + } ++ ++ ScDocumentImport& getDoc() const ++ { ++ return mrDoc; ++ } + }; + + class ScOrcusRefResolver : public orcus::spreadsheet::iface::import_reference_resolver +@@ -71,20 +76,28 @@ class ScOrcusRefResolver : public orcus::spreadsheet::iface::import_reference_re + public: + ScOrcusRefResolver( const ScOrcusGlobalSettings& rGS ); + +- orcus::spreadsheet::address_t resolve_address(const char* p, size_t n) override; +- orcus::spreadsheet::range_t resolve_range(const char* p, size_t n) override; ++ orcus::spreadsheet::src_address_t resolve_address(const char* p, size_t n) override; ++ orcus::spreadsheet::src_range_t resolve_range(const char* p, size_t n) override; + }; + + class ScOrcusNamedExpression : public orcus::spreadsheet::iface::import_named_expression + { + ScDocumentImport& mrDoc; + const ScOrcusGlobalSettings& mrGlobalSettings; +- SCTAB mnTab; //< negative if global, else >= 0 for sheet-local named expressions. ++ ScAddress maBasePos; ++ OUString maName; ++ OUString maExpr; ++ const SCTAB mnTab; //< negative if global, else >= 0 for sheet-local named expressions. + + public: + ScOrcusNamedExpression( ScDocumentImport& rDoc, const ScOrcusGlobalSettings& rGS, SCTAB nTab = -1 ); + +- virtual void define_name(const char* p_name, size_t n_name, const char* p_exp, size_t n_exp) override; ++ void reset(); ++ ++ virtual void set_base_position(const orcus::spreadsheet::src_address_t& pos) override; ++ virtual void set_named_expression(const char* p_name, size_t n_name, const char* p_exp, size_t n_exp) override; ++ virtual void set_named_range(const char* p_name, size_t n_name, const char* p_range, size_t n_range) override; ++ virtual void commit() override; + }; + + class ScOrcusSharedStrings : public orcus::spreadsheet::iface::import_shared_strings +diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx +index 220f7ce057f9..aa96eb21d405 100644 +--- a/sc/source/filter/orcus/interface.cxx ++++ b/sc/source/filter/orcus/interface.cxx +@@ -46,6 +46,7 @@ + #include + + #include ++#include + + using namespace com::sun::star; + +@@ -158,51 +159,54 @@ orcus::spreadsheet::formula_grammar_t ScOrcusGlobalSettings::get_default_formula + ScOrcusRefResolver::ScOrcusRefResolver( const ScOrcusGlobalSettings& rGS ) : + mrGlobalSettings(rGS) {} + +-os::address_t ScOrcusRefResolver::resolve_address(const char* p, size_t n) ++os::src_address_t ScOrcusRefResolver::resolve_address(const char* p, size_t n) + { + OUString aStr(p, n, mrGlobalSettings.getTextEncoding()); + + ScAddress aAddr; +- aAddr.Parse(aStr, nullptr, ++ aAddr.Parse(aStr, &mrGlobalSettings.getDoc().getDoc(), + formula::FormulaGrammar::extractRefConvention( + mrGlobalSettings.getCalcGrammar())); + +- os::address_t ret; +- ret.column = 0; +- ret.row = 0; +- +- if (aAddr.IsValid()) ++ if (!aAddr.IsValid()) + { +- ret.column = aAddr.Col(); +- ret.row = aAddr.Row(); ++ std::ostringstream os; ++ os << "'" << std::string(p, n) << "' is not a valid address expression."; ++ throw orcus::invalid_arg_error(os.str()); + } + ++ os::src_address_t ret; ++ ret.sheet = aAddr.Tab(); ++ ret.column = aAddr.Col(); ++ ret.row = aAddr.Row(); ++ + return ret; + } + +-os::range_t ScOrcusRefResolver::resolve_range(const char* p, size_t n) ++os::src_range_t ScOrcusRefResolver::resolve_range(const char* p, size_t n) + { + OUString aStr(p, n, mrGlobalSettings.getTextEncoding()); + + ScRange aRange; +- aRange.Parse(aStr, nullptr, ++ aRange.Parse(aStr, &mrGlobalSettings.getDoc().getDoc(), + formula::FormulaGrammar::extractRefConvention( + mrGlobalSettings.getCalcGrammar())); + +- os::range_t ret; +- ret.first.column = 0; +- ret.first.row = 0; +- ret.last.column = 0; +- ret.last.row = 0; +- +- if (aRange.IsValid()) ++ if (!aRange.IsValid()) + { +- ret.first.column = aRange.aStart.Col(); +- ret.first.row = aRange.aStart.Row(); +- ret.last.column = aRange.aEnd.Col(); +- ret.last.row = aRange.aEnd.Row(); ++ std::ostringstream os; ++ os << "'" << std::string(p, n) << "' is not a valid range expression."; ++ throw orcus::invalid_arg_error(os.str()); + } + ++ os::src_range_t ret; ++ ret.first.sheet = aRange.aStart.Tab(); ++ ret.first.column = aRange.aStart.Col(); ++ ret.first.row = aRange.aStart.Row(); ++ ret.last.sheet = aRange.aEnd.Tab(); ++ ret.last.column = aRange.aEnd.Col(); ++ ret.last.row = aRange.aEnd.Row(); ++ + return ret; + } + +@@ -210,20 +214,46 @@ ScOrcusNamedExpression::ScOrcusNamedExpression( + ScDocumentImport& rDoc, const ScOrcusGlobalSettings& rGS, SCTAB nTab ) : + mrDoc(rDoc), mrGlobalSettings(rGS), mnTab(nTab) {} + +-void ScOrcusNamedExpression::define_name(const char* p_name, size_t n_name, const char* p_exp, size_t n_exp) ++void ScOrcusNamedExpression::reset() ++{ ++ maBasePos.SetTab(0); ++ maBasePos.SetCol(0); ++ maBasePos.SetRow(0); ++ maName.clear(); ++ maExpr.clear(); ++} ++ ++void ScOrcusNamedExpression::set_base_position(const orcus::spreadsheet::src_address_t& pos) ++{ ++ maBasePos.SetTab(pos.sheet); ++ maBasePos.SetCol(pos.column); ++ maBasePos.SetRow(pos.row); ++} ++ ++void ScOrcusNamedExpression::set_named_expression(const char* p_name, size_t n_name, const char* p_exp, size_t n_exp) ++{ ++ maName = OUString(p_name, n_name, mrGlobalSettings.getTextEncoding()); ++ maExpr = OUString(p_exp, n_exp, mrGlobalSettings.getTextEncoding()); ++} ++ ++void ScOrcusNamedExpression::set_named_range(const char* /*p_name*/, size_t /*n_name*/, const char* /*p_range*/, size_t /*n_range*/) + { +- OUString aName(p_name, n_name, mrGlobalSettings.getTextEncoding()); +- OUString aExpr(p_exp, n_exp, mrGlobalSettings.getTextEncoding()); ++ throw std::runtime_error("ScOrcusNamedExpression::set_named_range not implemented yet."); ++} + ++void ScOrcusNamedExpression::commit() ++{ + ScRangeName* pNames = mnTab >= 0 ? mrDoc.getDoc().GetRangeName(mnTab) : mrDoc.getDoc().GetRangeName(); + if (!pNames) + return; + + ScRangeData* pRange = new ScRangeData( +- &mrDoc.getDoc(), aName, aExpr, ScAddress(), ScRangeData::Type::Name, ++ &mrDoc.getDoc(), maName, maExpr, maBasePos, ScRangeData::Type::Name, + mrGlobalSettings.getCalcGrammar()); + + pNames->insert(pRange, false); ++ ++ reset(); // make sure to reset the state for the next run. + } + + ScOrcusFactory::CellStoreToken::CellStoreToken(const ScAddress& rPos, Type eType) +diff --git a/sc/source/filter/orcus/xmlcontext.cxx b/sc/source/filter/orcus/xmlcontext.cxx +index f886dd555a66..1f3ee58220a0 100644 +--- a/sc/source/filter/orcus/xmlcontext.cxx ++++ b/sc/source/filter/orcus/xmlcontext.cxx +@@ -89,10 +89,9 @@ void populateTree( + rTreeCtrl.set_image(*xEntry, rParam.maImgElementRepeat, -1); + } + +- orcus::xml_structure_tree::entity_names_type aNames; ++ orcus::xml_structure_tree::entity_names_type aNames = rWalker.get_attributes(); + + // Insert attributes. +- rWalker.get_attributes(aNames); + for (const orcus::xml_structure_tree::entity_name& rAttrName : aNames) + { + OUString sAttr(toString(rAttrName, rWalker)); +@@ -106,7 +105,7 @@ void populateTree( + rTreeCtrl.set_image(*xAttr, rParam.maImgAttribute, -1); + } + +- rWalker.get_children(aNames); ++ aNames = rWalker.get_children(); + + // Non-leaf if it has child elements, leaf otherwise. + rEntryData.mbLeafNode = aNames.empty(); +@@ -266,7 +265,7 @@ void ScOrcusXMLContextImpl::importXML(const ScOrcusImportXMLParam& rParam) + std::for_each(rLink.maFieldPaths.begin(), rLink.maFieldPaths.end(), + [&filter](const OString& rFieldPath) + { +- filter.append_field_link(rFieldPath.getStr()); ++ filter.append_field_link(rFieldPath.getStr(), orcus::pstring()); + } + ); + +diff --git a/sc/source/ui/xmlsource/xmlsourcedlg.cxx b/sc/source/ui/xmlsource/xmlsourcedlg.cxx +index 1eb2e4b06077..167ecae315ae 100644 +--- a/sc/source/ui/xmlsource/xmlsourcedlg.cxx ++++ b/sc/source/ui/xmlsource/xmlsourcedlg.cxx +@@ -49,8 +49,12 @@ OUString getXPath( + if (pData) + rNamespaces.push_back(pData->mnNamespaceID); + ++ // element separator is '/' whereas attribute separator is '/@' in xpath. + aBuf.insert(0, rTree.get_text(*xEntry, 0)); +- aBuf.insert(0, isAttribute(rTree, *xEntry) ? '@' : '/'); ++ if (isAttribute(rTree, *xEntry)) ++ aBuf.insert(0, "/@"); ++ else ++ aBuf.insert(0, '/'); + } + while (rTree.iter_parent(*xEntry)); + +-- +cgit v1.2.1 + +From 1821dde6601193cc0ddf87fc020de708544d9700 Mon Sep 17 00:00:00 2001 +From: Kohei Yoshida +Date: Mon, 28 Sep 2020 16:19:54 -0400 +Subject: Update liborcus to 0.16.1. + +Change-Id: I27e87278545c1d41381b1ab8a49f6f6a07681bfb +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103590 +Tested-by: Jenkins +Reviewed-by: Kohei Yoshida +--- + download.lst | 4 +- + ...1-Mark-all-untentionally-unused-variables.patch | 376 --------------------- + external/liborcus/UnpackedTarball_liborcus.mk | 1 - + 3 files changed, 2 insertions(+), 379 deletions(-) + delete mode 100644 external/liborcus/0001-Mark-all-untentionally-unused-variables.patch + +diff --git a/download.lst b/download.lst +index a4782bb2b9ef..48af3c5e9198 100644 +--- a/download.lst ++++ b/download.lst +@@ -206,8 +206,8 @@ export OPENLDAP_SHA256SUM := cdd6cffdebcd95161a73305ec13fc7a78e9707b46ca9f84fb89 + export OPENLDAP_TARBALL := openldap-2.4.45.tgz + export OPENSSL_SHA256SUM := 14cb464efe7ac6b54799b34456bd69558a749a4931ecfd9cf9f71d7881cac7bc + export OPENSSL_TARBALL := openssl-1.0.2t.tar.gz +-export ORCUS_SHA256SUM := 854c6ec167ace59baa2984e175bac7b5b2af91bfde4bb10d2088b87a51ed76ec +-export ORCUS_TARBALL := liborcus-0.16.0.tar.bz2 ++export ORCUS_SHA256SUM := c700d1325f744104d9fca0d5a019434901e9d51a16eedfb05792f90a298587a4 ++export ORCUS_TARBALL := liborcus-0.16.1.tar.bz2 + export OWNCLOUD_ANDROID_LIB_SHA256SUM := b18b3e3ef7fae6a79b62f2bb43cc47a5346b6330f6a383dc4be34439aca5e9fb + export OWNCLOUD_ANDROID_LIB_TARBALL := owncloud-android-library-0.9.4-no-binary-deps.tar.gz + export PAGEMAKER_SHA256SUM := 66adacd705a7d19895e08eac46d1e851332adf2e736c566bef1164e7a442519d +diff --git a/external/liborcus/0001-Mark-all-untentionally-unused-variables.patch b/external/liborcus/0001-Mark-all-untentionally-unused-variables.patch +deleted file mode 100644 +index b0f6a572aff7..000000000000 +--- a/external/liborcus/0001-Mark-all-untentionally-unused-variables.patch ++++ /dev/null +@@ -1,376 +0,0 @@ +-From 6d34c41b661a9e8dddf6d08bf1f3c1fd4f5581da Mon Sep 17 00:00:00 2001 +-From: Kohei Yoshida +-Date: Fri, 11 Sep 2020 21:39:09 -0400 +-Subject: [PATCH] Mark all untentionally unused variables. +- +---- +- include/orcus/css_parser.hpp | 70 ++++++++++++++++++++++++------ +- include/orcus/csv_parser.hpp | 5 ++- +- include/orcus/json_parser.hpp | 15 +++++-- +- include/orcus/sax_parser.hpp | 35 ++++++++++++--- +- include/orcus/sax_token_parser.hpp | 20 +++++++-- +- include/orcus/yaml_parser.hpp | 10 ++++- +- 6 files changed, 124 insertions(+), 31 deletions(-) +- +-diff --git a/include/orcus/css_parser.hpp b/include/orcus/css_parser.hpp +-index cdfae5e0..3e96980b 100644 +---- a/include/orcus/css_parser.hpp +-+++ b/include/orcus/css_parser.hpp +-@@ -31,23 +31,44 @@ namespace orcus { +- class css_handler +- { +- public: +-- void at_rule_name(const char* p, size_t n) {} +-+ void at_rule_name(const char* p, size_t n) +-+ { +-+ (void)p; (void)n; +-+ } +- +-- void simple_selector_type(const char* p, size_t n) {} +-+ void simple_selector_type(const char* p, size_t n) +-+ { +-+ (void)p; (void)n; +-+ } +- +-- void simple_selector_class(const char* p, size_t n) {} +-+ void simple_selector_class(const char* p, size_t n) +-+ { +-+ (void)p; (void)n; +-+ } +- +-- void simple_selector_pseudo_element(orcus::css::pseudo_element_t pe) {} +-+ void simple_selector_pseudo_element(orcus::css::pseudo_element_t pe) +-+ { +-+ (void)pe; +-+ } +- +-- void simple_selector_pseudo_class(orcus::css::pseudo_class_t pc) {} +-+ void simple_selector_pseudo_class(orcus::css::pseudo_class_t pc) +-+ { +-+ (void)pc; +-+ } +- +-- void simple_selector_id(const char* p, size_t n) {} +-+ void simple_selector_id(const char* p, size_t n) +-+ { +-+ (void)p; (void)n; +-+ } +- +- void end_simple_selector() {} +- +- void end_selector() {} +- +-- void combinator(orcus::css::combinator_t combinator) {} +-+ void combinator(orcus::css::combinator_t combinator) +-+ { +-+ (void)combinator; +-+ } +- +- /** +- * Called at each property name. +-@@ -55,7 +76,10 @@ public: +- * @param p pointer to the char-array containing the property name string. +- * @param n length of the property name string. +- */ +-- void property_name(const char* p, size_t n) {} +-+ void property_name(const char* p, size_t n) +-+ { +-+ (void)p; (void)n; +-+ } +- +- /** +- * Called at each ordinary property value string. +-@@ -63,7 +87,10 @@ public: +- * @param p pointer to the char-array containing the value string. +- * @param n length of the value string. +- */ +-- void value(const char* p, size_t n) {} +-+ void value(const char* p, size_t n) +-+ { +-+ (void)p; (void)n; +-+ } +- +- /** +- * Called at each RGB color value of a property. +-@@ -72,7 +99,10 @@ public: +- * @param green value of green (0-255) +- * @param blue value of blue (0-255) +- */ +-- void rgb(uint8_t red, uint8_t green, uint8_t blue) {} +-+ void rgb(uint8_t red, uint8_t green, uint8_t blue) +-+ { +-+ (void)red; (void)green; (void)blue; +-+ } +- +- /** +- * Called at each RGB color value of a property with alpha transparency +-@@ -83,7 +113,10 @@ public: +- * @param blue value of blue (0-255) +- * @param alpha alpha transparency value +- */ +-- void rgba(uint8_t red, uint8_t green, uint8_t blue, double alpha) {} +-+ void rgba(uint8_t red, uint8_t green, uint8_t blue, double alpha) +-+ { +-+ (void)red; (void)green; (void)blue; (void)alpha; +-+ } +- +- /** +- * Called at each HSL color value of a property. +-@@ -92,7 +125,10 @@ public: +- * @param sat saturation +- * @param light lightness +- */ +-- void hsl(uint8_t hue, uint8_t sat, uint8_t light) {} +-+ void hsl(uint8_t hue, uint8_t sat, uint8_t light) +-+ { +-+ (void)hue; (void)sat; (void)light; +-+ } +- +- /** +- * Called at each HSL color value of a property with alpha transparency +-@@ -103,7 +139,10 @@ public: +- * @param light lightness +- * @param alpha alpha value +- */ +-- void hsla(uint8_t hue, uint8_t sat, uint8_t light, double alpha) {} +-+ void hsla(uint8_t hue, uint8_t sat, uint8_t light, double alpha) +-+ { +-+ (void)hue; (void)sat; (void)light; (void)alpha; +-+ } +- +- /** +- * Called at each URL value of a property. +-@@ -111,7 +150,10 @@ public: +- * @param p pointer to the char-array containing the URL value string. +- * @param n length of the URL value string. +- */ +-- void url(const char* p, size_t n) {} +-+ void url(const char* p, size_t n) +-+ { +-+ (void)p; (void)n; +-+ } +- +- /** +- * Called when the parsing begins. +-diff --git a/include/orcus/csv_parser.hpp b/include/orcus/csv_parser.hpp +-index a873b0f2..27b4f924 100644 +---- a/include/orcus/csv_parser.hpp +-+++ b/include/orcus/csv_parser.hpp +-@@ -47,7 +47,10 @@ public: +- * the text content is guaranteed to be valid so long as +- * the original CSV stream content is valid. +- */ +-- void cell(const char* p, size_t n, bool transient) {} +-+ void cell(const char* p, size_t n, bool transient) +-+ { +-+ (void)p; (void)n; (void)transient; +-+ } +- }; +- +- template +-diff --git a/include/orcus/json_parser.hpp b/include/orcus/json_parser.hpp +-index 51a3d7cc..ef22b3a8 100644 +---- a/include/orcus/json_parser.hpp +-+++ b/include/orcus/json_parser.hpp +-@@ -54,7 +54,10 @@ public: +- * pointer points to somewhere in the JSON stream being +- * parsed. +- */ +-- void object_key(const char* p, size_t len, bool transient) {} +-+ void object_key(const char* p, size_t len, bool transient) +-+ { +-+ (void)p; (void)len; (void)transient; +-+ } +- +- /** +- * Called when the closing curly brace of an object is encountered. +-@@ -87,14 +90,20 @@ public: +- * pointer points to somewhere in the JSON stream being +- * parsed. +- */ +-- void string(const char* p, size_t len, bool transient) {} +-+ void string(const char* p, size_t len, bool transient) +-+ { +-+ (void)p; (void)len; (void)transient; +-+ } +- +- /** +- * Called when a numeric value is encountered. +- * +- * @param val numeric value. +- */ +-- void number(double val) {} +-+ void number(double val) +-+ { +-+ (void)val; +-+ } +- }; +- +- /** +-diff --git a/include/orcus/sax_parser.hpp b/include/orcus/sax_parser.hpp +-index 73c17d06..3b21bfdf 100644 +---- a/include/orcus/sax_parser.hpp +-+++ b/include/orcus/sax_parser.hpp +-@@ -30,7 +30,10 @@ public: +- * +- * @param param struct containing doctype declaration data. +- */ +-- void doctype(const orcus::sax::doctype_declaration& param) {} +-+ void doctype(const orcus::sax::doctype_declaration& param) +-+ { +-+ (void)param; +-+ } +- +- /** +- * Called when <?... is encountered, where the '...' may be an +-@@ -39,28 +42,40 @@ public: +- * +- * @param decl name of the identifier. +- */ +-- void start_declaration(const orcus::pstring& decl) {} +-+ void start_declaration(const orcus::pstring& decl) +-+ { +-+ (void)decl; +-+ } +- +- /** +- * Called when the closing tag (>) of a <?... ?> is encountered. +- * +- * @param decl name of the identifier. +- */ +-- void end_declaration(const orcus::pstring& decl) {} +-+ void end_declaration(const orcus::pstring& decl) +-+ { +-+ (void)decl; +-+ } +- +- /** +- * Called at the start of each element. +- * +- * @param elem information of the element being parsed. +- */ +-- void start_element(const orcus::sax::parser_element& elem) {} +-+ void start_element(const orcus::sax::parser_element& elem) +-+ { +-+ (void)elem; +-+ } +- +- /** +- * Called at the end of each element. +- * +- * @param elem information of the element being parsed. +- */ +-- void end_element(const orcus::sax::parser_element& elem) {} +-+ void end_element(const orcus::sax::parser_element& elem) +-+ { +-+ (void)elem; +-+ } +- +- /** +- * Called when a segment of a text content is parsed. Each text content +-@@ -76,7 +91,10 @@ public: +- * a non-text value or be interned within the scope of +- * the callback. +- */ +-- void characters(const orcus::pstring& val, bool transient) {} +-+ void characters(const orcus::pstring& val, bool transient) +-+ { +-+ (void)val; (void)transient; +-+ } +- +- /** +- * Called upon parsing of an attribute of an element. Note that when +-@@ -86,7 +104,10 @@ public: +- * +- * @param attr struct containing attribute information. +- */ +-- void attribute(const orcus::sax::parser_attribute& attr) {} +-+ void attribute(const orcus::sax::parser_attribute& attr) +-+ { +-+ (void)attr; +-+ } +- }; +- +- /** +-diff --git a/include/orcus/sax_token_parser.hpp b/include/orcus/sax_token_parser.hpp +-index 1452bc27..6b1b1de4 100644 +---- a/include/orcus/sax_token_parser.hpp +-+++ b/include/orcus/sax_token_parser.hpp +-@@ -71,7 +71,10 @@ public: +- * +- * @param decl struct containing the attributes of the XML declaration. +- */ +-- void declaration(const orcus::xml_declaration_t& decl) {} +-+ void declaration(const orcus::xml_declaration_t& decl) +-+ { +-+ (void)decl; +-+ } +- +- /** +- * Called at the start of each element. +-@@ -79,7 +82,10 @@ public: +- * @param elem struct containing the element's information as well as all +- * the attributes that belong to the element. +- */ +-- void start_element(const orcus::xml_token_element_t& elem) {} +-+ void start_element(const orcus::xml_token_element_t& elem) +-+ { +-+ (void)elem; +-+ } +- +- /** +- * Called at the end of each element. +-@@ -87,7 +93,10 @@ public: +- * @param elem struct containing the element's information as well as all +- * the attributes that belong to the element. +- */ +-- void end_element(const orcus::xml_token_element_t& elem) {} +-+ void end_element(const orcus::xml_token_element_t& elem) +-+ { +-+ (void)elem; +-+ } +- +- /** +- * Called when a segment of a text content is parsed. Each text content +-@@ -103,7 +112,10 @@ public: +- * a non-text value or be interned within the scope of +- * the callback. +- */ +-- void characters(const orcus::pstring& val, bool transient) {} +-+ void characters(const orcus::pstring& val, bool transient) +-+ { +-+ (void)val; (void)transient; +-+ } +- }; +- +- /** +-diff --git a/include/orcus/yaml_parser.hpp b/include/orcus/yaml_parser.hpp +-index 797ebbec..8d16fbc7 100644 +---- a/include/orcus/yaml_parser.hpp +-+++ b/include/orcus/yaml_parser.hpp +-@@ -72,14 +72,20 @@ public: +- * @param p pointer to the first character of the string value. +- * @param len length of the string value. +- */ +-- void string(const char* p, size_t n) {} +-+ void string(const char* p, size_t n) +-+ { +-+ (void)p; (void)n; +-+ } +- +- /** +- * Called when a numeric value is encountered. +- * +- * @param val numeric value. +- */ +-- void number(double val) {} +-+ void number(double val) +-+ { +-+ (void)val; +-+ } +- +- /** +- * Called when a boolean 'true' keyword is encountered. +--- +-2.25.1 +- +diff --git a/external/liborcus/UnpackedTarball_liborcus.mk b/external/liborcus/UnpackedTarball_liborcus.mk +index 4736dbccab4b..e5e33b0b1249 100644 +--- a/external/liborcus/UnpackedTarball_liborcus.mk ++++ b/external/liborcus/UnpackedTarball_liborcus.mk +@@ -20,7 +20,6 @@ $(eval $(call gb_UnpackedTarball_add_patches,liborcus,\ + external/liborcus/gcc9.patch.0 \ + external/liborcus/libtool.patch.0 \ + external/liborcus/fix-pch.patch.0 \ +- external/liborcus/0001-Mark-all-untentionally-unused-variables.patch \ + )) + + ifeq ($(OS),WNT) +-- +cgit v1.2.1 + diff --git a/debian/patches/make-package-modules-not-suck.diff b/debian/patches/make-package-modules-not-suck.diff new file mode 100644 index 00000000000..2f29277ec58 --- /dev/null +++ b/debian/patches/make-package-modules-not-suck.diff @@ -0,0 +1,200 @@ +diff --git a/scp2/InstallModule_draw.mk b/scp2/InstallModule_draw.mk +index a7c02be..d48edf2 100644 +--- a/scp2/InstallModule_draw.mk ++++ b/scp2/InstallModule_draw.mk +@@ -10,6 +10,7 @@ + $(eval $(call gb_InstallModule_InstallModule,scp2/draw)) + + $(eval $(call gb_InstallModule_use_auto_install_libs,scp2/draw,\ ++ draw \ + draw_brand \ + )) + +diff --git a/scp2/source/draw/module_draw.scp b/scp2/source/draw/module_draw.scp +index 8737579..0913c61 100644 +--- a/scp2/source/draw/module_draw.scp ++++ b/scp2/source/draw/module_draw.scp +@@ -18,6 +18,7 @@ + + #include "macros.inc" + ++#include "AutoInstall/draw" + #include "AutoInstall/draw_brand" + + Module gid_Module_Prg_Draw +@@ -34,7 +35,8 @@ Module gid_Module_Prg_Draw_Bin + Sortkey = "100"; + Default = YES; + Styles = (HIDDEN_ROOT); +- Files = (gid_File_Extra_Urldesktop_Draw,gid_File_Extra_Urlnew_Draw,gid_File_Extra_Urlstart_Draw,gid_File_Extra_Urltasks_Draw, ++ Files = (auto_draw_ALL, ++ gid_File_Extra_Urldesktop_Draw,gid_File_Extra_Urlnew_Draw,gid_File_Extra_Urlstart_Draw,gid_File_Extra_Urltasks_Draw, + gid_File_Share_Registry_Draw_Xcd, + gid_File_Tmp_Userinstall_Draw_Inf); + End +diff --git a/scp2/AutoInstall.mk b/scp2/AutoInstall.mk +index 7d2a347..a15ac52 100644 +--- a/scp2/AutoInstall.mk ++++ b/scp2/AutoInstall.mk +@@ -17,6 +17,7 @@ $(eval $(call gb_AutoInstall_add_module,base_brand,,LIBO_EXECUTABLE,,PACKAGE_FIL + $(eval $(call gb_AutoInstall_add_module,brand,,LIBO_EXECUTABLE,,PACKAGE_FILELIST)) + $(eval $(call gb_AutoInstall_add_module,calc,LIBO_LIB_FILE,,,PACKAGE_FILELIST)) + $(eval $(call gb_AutoInstall_add_module,calc_brand,,LIBO_EXECUTABLE,,PACKAGE_FILELIST)) ++$(eval $(call gb_AutoInstall_add_module,draw,LIBO_LIB_FILE)) + $(eval $(call gb_AutoInstall_add_module,draw_brand,,LIBO_EXECUTABLE,,PACKAGE_FILELIST)) + $(eval $(call gb_AutoInstall_add_module,extensions_ct2n,,,,PACKAGE_FILELIST)) + $(eval $(call gb_AutoInstall_add_module,extensions_bsh,,,LIBO_JAR_FILE)) +diff --git a/Repository.mk b/Repository.mk +index 36b35b7a4262..25f202cb0983 100644 +--- a/Repository.mk ++++ b/Repository.mk +@@ -245,13 +245,29 @@ $(eval $(call gb_Helper_register_executables_for_install,UREBIN,ure,\ + + $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,base, \ + abp \ ++ calc \ ++ dba \ ++ dbahsql \ ++ $(call gb_Helper_optional,DBCONNECTIVITY, \ ++ dbase \ ++ dbaxml) \ + dbp \ + dbu \ ++ $(call gb_Helper_optional,DBCONNECTIVITY,flat) \ ++ $(if $(ENABLE_JAVA),jdbc) \ ++ $(call gb_Helper_optional,DBCONNECTIVITY,mysql_jdbc) \ ++ $(call gb_Helper_optional,MARIADBC,$(call gb_Helper_optional,DBCONNECTIVITY,mysqlc)) \ ++ odbc \ ++)) ++ ++$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,base, \ ++ $(call gb_Helper_optional,DBCONNECTIVITY,dbpool2) \ ++ $(if $(ENABLE_JAVA),hsqldb) \ ++ sdbc2 \ + )) + + $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,calc, \ + analysis \ +- $(call gb_Helper_optional,DBCONNECTIVITY,calc) \ + date \ + pricing \ + sc \ +@@ -263,6 +279,14 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,calc, \ + $(call gb_Helper_optional,SCRIPTING,vbaobj) \ + )) + ++$(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,draw, \ ++ animcore \ ++ sd \ ++ sdd \ ++ sdfilt \ ++ sdui \ ++)) ++ + $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,graphicfilter, \ + svgfilter \ + wpftdraw \ +@@ -271,10 +295,10 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,graphicfilter, \ + )) + + $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,impress, \ +- animcore \ + PresenterScreen \ + PresentationMinimizer \ + wpftimpress \ ++ slideshow \ + )) + + $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,onlineupdate, \ +@@ -349,11 +349,6 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \ + configmgr \ + ctl \ + cui \ +- dba \ +- dbahsql \ +- $(call gb_Helper_optional,DBCONNECTIVITY, \ +- dbase \ +- dbaxml) \ + dbtools \ + deploymentmisc \ + $(if $(filter-out MACOSX WNT,$(OS)),desktopbe1) \ +@@ -366,7 +386,6 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \ + evtatt \ + expwrap \ + $(call gb_Helper_optional,DBCONNECTIVITY, \ +- flat \ + file) \ + filterconfig \ + fps_office \ +@@ -387,7 +406,6 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \ + gie \ + hyphen \ + icg \ +- $(if $(ENABLE_JAVA),jdbc) \ + $(if $(ENABLE_LDAP),ldapbe2) \ + $(if $(filter WNT,$(OS)),WinUserInfoBe) \ + localebe1 \ +@@ -403,10 +421,7 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \ + msfilter \ + $(call gb_Helper_optional,SCRIPTING,msforms) \ + mtfrenderer \ +- $(call gb_Helper_optional,DBCONNECTIVITY,mysql_jdbc) \ +- $(call gb_Helper_optional,MARIADBC,$(call gb_Helper_optional,DBCONNECTIVITY,mysqlc)) \ + numbertext \ +- odbc \ + odfflatxml \ + offacc \ + oox \ +@@ -419,13 +434,8 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \ + sb \ + $(call gb_Helper_optional,DBCONNECTIVITY,sdbt) \ + scn \ +- sd \ +- sdd \ +- sdfilt \ +- sdui \ + sfx \ + simplecanvas \ +- slideshow \ + sot \ + $(if $(filter-out iOS,$(OS)),spell) \ + $(if $(DISABLE_GUI),,spl) \ +@@ -437,7 +447,6 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \ + svt \ + svx \ + svxcore \ +- sw \ + syssh \ + textconversiondlgs \ + textfd \ +@@ -522,6 +531,7 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,writer, \ + hwp \ + $(if $(ENABLE_LWP),lwpft) \ + msword \ ++ sw \ + swd \ + swui \ + t602filter \ +@@ -600,14 +610,12 @@ $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \ + cached1 \ + collator_data \ + comphelper \ +- $(call gb_Helper_optional,DBCONNECTIVITY,dbpool2) \ + $(call gb_Helper_optional,BREAKPAD,crashreport) \ + deployment \ + deploymentgui \ + dict_ja \ + dict_zh \ + embobj \ +- $(if $(ENABLE_JAVA),hsqldb) \ + i18nutil \ + index_data \ + $(if $(and $(ENABLE_GTK3), $(filter LINUX %BSD SOLARIS,$(OS))), libreofficekitgtk) \ +@@ -623,7 +631,6 @@ $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \ + emboleobj \ + package2 \ + $(call gb_Helper_optional,SCRIPTING,scriptframe) \ +- sdbc2 \ + sofficeapp \ + srtrs1 \ + $(if $(filter $(OS),WNT),sysdtrans) \ diff --git a/debian/patches/mediwiki-oor-replace.diff b/debian/patches/mediwiki-oor-replace.diff new file mode 100644 index 00000000000..ed04c917e35 --- /dev/null +++ b/debian/patches/mediwiki-oor-replace.diff @@ -0,0 +1,51 @@ +diff --git a/swext/mediawiki/src/registry/data/org/openoffice/Office/OptionsDialog.xcu b/swext/mediawiki/src/registry/data/org/openoffice/Office/OptionsDialog.xcu +index 2b35ced08f31..0c96070dd4f0 100644 +--- a/swext/mediawiki/src/registry/data/org/openoffice/Office/OptionsDialog.xcu ++++ b/swext/mediawiki/src/registry/data/org/openoffice/Office/OptionsDialog.xcu +@@ -18,9 +18,9 @@ + --> + + +- ++ + +- ++ + + com.sun.wiki-publisher + +diff --git a/swext/mediawiki/src/registry/data/org/openoffice/TypeDetection/Filter.xcu b/swext/mediawiki/src/registry/data/org/openoffice/TypeDetection/Filter.xcu +index 3309b503824c..261e470b253b 100644 +--- a/swext/mediawiki/src/registry/data/org/openoffice/TypeDetection/Filter.xcu ++++ b/swext/mediawiki/src/registry/data/org/openoffice/TypeDetection/Filter.xcu +@@ -19,7 +19,7 @@ + + + +- ++ + 0 + MediaWiki + com.sun.star.text.TextDocument +@@ -31,7 +31,7 @@ + + EXPORT ALIEN 3RDPARTYFILTER + +- ++ + 0 + MediaWiki + com.sun.star.text.WebDocument +diff --git a/swext/mediawiki/src/registry/data/org/openoffice/TypeDetection/Types.xcu b/swext/mediawiki/src/registry/data/org/openoffice/TypeDetection/Types.xcu +index 15e4f850041a..ce7cd0763b79 100644 +--- a/swext/mediawiki/src/registry/data/org/openoffice/TypeDetection/Types.xcu ++++ b/swext/mediawiki/src/registry/data/org/openoffice/TypeDetection/Types.xcu +@@ -19,7 +19,7 @@ + + + +- ++ + com.sun.star.comp.filters.XMLFilterDetect + + txt diff --git a/debian/patches/mention-java-common-package.diff b/debian/patches/mention-java-common-package.diff new file mode 100644 index 00000000000..24fbbc0a877 --- /dev/null +++ b/debian/patches/mention-java-common-package.diff @@ -0,0 +1,35 @@ +diff --git a/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx b/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx +index 718902caba6f..3c8499b5a42c 100644 +--- a/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx ++++ b/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx +@@ -141,6 +141,9 @@ static bool findAndSelect(JavaInfo ** ppInfo) + if (errcode == JFW_E_NO_JAVA_FOUND) + { + fprintf(stderr,"javaldx: Could not find a Java Runtime Environment!\n"); ++ fprintf(stderr,"Please ensure that a JVM and the package libreoffice-java-common\n"); ++ fprintf(stderr,"is installed.\n"); ++ fprintf(stderr,"If it is already installed then try removing ~/.config/libreoffice/4/user/config/javasettings_Linux_*.xml\n"); + return false; + } + else if (errcode != JFW_E_NONE && errcode != JFW_E_DIRECT_MODE) +diff --git a/include/svtools/strings.hrc b/include/svtools/strings.hrc +index f9dc617f4313..874b0400cbc5 100644 +--- a/include/svtools/strings.hrc ++++ b/include/svtools/strings.hrc +@@ -281,13 +281,13 @@ + + #define STR_SVT_DEFAULT_SERVICE_LABEL NC_("STR_SVT_DEFAULT_SERVICE_LABEL", "$user$'s $service$") + +-#define STR_WARNING_JAVANOTFOUND NC_("STR_WARNING_JAVANOTFOUND", "%PRODUCTNAME requires a Java runtime environment (JRE) to perform this task. Please install a JRE and restart %PRODUCTNAME.") ++#define STR_WARNING_JAVANOTFOUND NC_("STR_WARNING_JAVANOTFOUND", "%PRODUCTNAME requires a Java runtime environment (JRE) to perform this task. Please install a JRE (and libreoffice-java-common) and restart %PRODUCTNAME.") + #define STR_WARNING_JAVANOTFOUND_WIN NC_("STR_WARNING_JAVANOTFOUND_WIN", "%PRODUCTNAME requires a %BITNESS-bit Java runtime environment (JRE) to perform this task. Please install a JRE and restart %PRODUCTNAME.") + #define STR_WARNING_JAVANOTFOUND_MAC NC_("STR_WARNING_JAVANOTFOUND_MAC", "%PRODUCTNAME requires Oracle's Java Development Kit (JDK) on macOS 10.10 or greater to perform this task. Please install them and restart %PRODUCTNAME.") + #define STR_WARNING_INVALIDJAVASETTINGS_MAC NC_("STR_WARNING_INVALIDJAVASETTINGS_MAC", "The %PRODUCTNAME configuration has been changed. Under %PRODUCTNAME - Preferences - %PRODUCTNAME - Advanced, select the Java runtime environment you want to have used by %PRODUCTNAME.") +-#define STR_WARNING_INVALIDJAVASETTINGS NC_("STR_WARNING_INVALIDJAVASETTINGS", "The %PRODUCTNAME configuration has been changed. Under Tools - Options - %PRODUCTNAME - Advanced, select the Java runtime environment you want to have used by %PRODUCTNAME.") ++#define STR_WARNING_INVALIDJAVASETTINGS NC_("STR_WARNING_INVALIDJAVASETTINGS", "The %PRODUCTNAME configuration has been changed. Under Tools - Options - %PRODUCTNAME - Advanced, select the Java runtime environment you want to have used by %PRODUCTNAME. Maybe you also need to install libreoffice-java-common.") + #define STR_ERROR_JVMCREATIONFAILED_MAC NC_("STR_ERROR_JVMCREATIONFAILED_MAC", "%PRODUCTNAME requires a Java runtime environment (JRE) to perform this task. The selected JRE is defective. Please select another version or install a new JRE and select it under %PRODUCTNAME - Preferences - %PRODUCTNAME - Advanced.") +-#define STR_ERROR_JVMCREATIONFAILED NC_("STR_ERROR_JVMCREATIONFAILED", "%PRODUCTNAME requires a Java runtime environment (JRE) to perform this task. The selected JRE is defective. Please select another version or install a new JRE and select it under Tools - Options - %PRODUCTNAME - Advanced.") ++#define STR_ERROR_JVMCREATIONFAILED NC_("STR_ERROR_JVMCREATIONFAILED", "%PRODUCTNAME requires a Java runtime environment (JRE) to perform this task. The selected JRE is defective. Please select another version or install a new JRE and select it under Tools - Options - %PRODUCTNAME - Advanced or install libreoffice-java-common if not already installed.") + #define STR_WARNING_JAVANOTFOUND_TITLE NC_("STR_WARNING_JAVANOTFOUND_TITLE", "JRE Required") + #define STR_WARNING_INVALIDJAVASETTINGS_TITLE NC_("STR_WARNING_INVALIDJAVASETTINGS_TITLE", "Select JRE") + #define STR_ERROR_JVMCREATIONFAILED_TITLE NC_("STR_ERROR_JVMCREATIONFAILED_TITLE", "JRE is Defective") diff --git a/debian/patches/no-check-if-root.diff b/debian/patches/no-check-if-root.diff new file mode 100644 index 00000000000..95ebbb329a4 --- /dev/null +++ b/debian/patches/no-check-if-root.diff @@ -0,0 +1,26 @@ +--- a/Makefile.in 2017-07-28 06:09:37.072183489 +0000 ++++ b/Makefile.in 2017-10-18 12:43:59.215567467 +0000 +@@ -57,14 +57,6 @@ else # MAKE_RESTARTS + + .DEFAULT_GOAL := build + +-check-if-root: +- @if test ! `uname` = 'Haiku' -a `id -u` = 0 && ! grep -q 'lxc\|docker' /proc/self/cgroup && ! grep -q 'libpod_parent' /proc/self/cgroup; then \ +- echo; \ +- echo 'Building LibreOffice as root is a very bad idea, use a regular user.'; \ +- echo; \ +- exit 1; \ +- fi +- + gb_Side ?= host + + include $(BUILDDIR)/config_$(gb_Side).mk +@@ -252,7 +244,7 @@ endif + # + # Bootstrap + # +-bootstrap: check-if-root compilerplugins ++bootstrap: compilerplugins + + # + # Build diff --git a/debian/patches/no-opencl-per-default.diff b/debian/patches/no-opencl-per-default.diff new file mode 100644 index 00000000000..d17e9c0598d --- /dev/null +++ b/debian/patches/no-opencl-per-default.diff @@ -0,0 +1,26 @@ +From b54cfe9d3d22fdd40f7015bd343df8620c983779 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Mon, 27 Mar 2017 11:47:01 +0100 +Subject: [PATCH] Resolves: rhbz#1432468 disable opencl by default + +Change-Id: Ie037fcabdd219f195425979dd721501fb5527573 +--- + officecfg/registry/schema/org/openoffice/Office/Common.xcs | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs +index 946bd32..284d694 100644 +--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs ++++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs +@@ -5670,7 +5670,7 @@ + Determines whether OpenCL can be used, when available, to speed up + some operations. + +- true ++ false + + + +-- +2.9.3 + diff --git a/debian/patches/no-openssl.diff b/debian/patches/no-openssl.diff new file mode 100644 index 00000000000..a5c26903ae1 --- /dev/null +++ b/debian/patches/no-openssl.diff @@ -0,0 +1,357 @@ +don't add -lssl etc if not needed (because we use system-postgresql) + +diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk +index 0fc7d25..952b140 100644 +--- a/RepositoryExternal.mk ++++ b/RepositoryExternal.mk +@@ -2911,9 +2917,10 @@ $(call gb_LinkTarget_add_libs,$(1),\ + $(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq/libpq$(gb_StaticLibrary_PLAINEXT) \ + ) + +-ifeq ($(OS),WNT) + $(call gb_LinkTarget_use_external,$(1),openssl) + ++ifeq ($(OS),WNT) ++ + $(call gb_LinkTarget_use_system_win32_libs,$(1),\ + secur32 \ + ws2_32 \ +diff --git a/connectivity/Library_postgresql-sdbc-impl.mk b/connectivity/Library_postgresql-sdbc-impl.mk +index 0580a8b..7e8b778 100644 +--- a/connectivity/Library_postgresql-sdbc-impl.mk ++++ b/connectivity/Library_postgresql-sdbc-impl.mk +@@ -46,7 +46,6 @@ $(eval $(call gb_Library_use_externals,postgresql-sdbc-impl,\ + boost_headers \ + postgresql \ + $(if $(filter-out MSC,$(COM)), \ +- openssl \ + $(if $(ENABLE_LDAP),openldap) \ + nss3 \ + plc4 \ + +... and don't uselessly check for openssl in configure + +diff --git a/config_host.mk.in b/config_host.mk.in +index ddd144e..19f8368 100644 +--- a/config_host.mk.in ++++ b/config_host.mk.in +@@ -93,7 +93,6 @@ export DEFAULT_BRAND_IMAGES=@DEFAULT_BRAND_IMAGES@ + export DICT_SYSTEM_DIR=@DICT_SYSTEM_DIR@ + export DISABLE_CVE_TESTS=@DISABLE_CVE_TESTS@ + export DISABLE_DYNLOADING=@DISABLE_DYNLOADING@ +-export DISABLE_OPENSSL=@DISABLE_OPENSSL@ + export DISABLE_PYTHON=@DISABLE_PYTHON@ + export DLOPEN_LIBS=@DLOPEN_LIBS@ + export DLLTOOL=@DLLTOOL@ +@@ -438,8 +439,6 @@ export OOO_JUNIT_JAR=@OOO_JUNIT_JAR@ + export BFFVALIDATOR=@BFFVALIDATOR@ + export OOO_JUNIT_JAR=@OOO_JUNIT_JAR@ + export OOO_VENDOR=@OOO_VENDOR@ +-export OPENSSL_CFLAGS=$(gb_SPACE)@OPENSSL_CFLAGS@ +-export OPENSSL_LIBS=$(gb_SPACE)@OPENSSL_LIBS@ + export OPENSYMBOL_TTF=@OPENSYMBOL_TTF@ + export ORCUS_CFLAGS=$(gb_SPACE)@ORCUS_CFLAGS@ + export ORCUS_LIBS=$(gb_SPACE)@ORCUS_LIBS@ +@@ -569,7 +568,6 @@ export SYSTEM_ODBC_HEADERS=@SYSTEM_ODBC_HEADERS@ + export SYSTEM_ODBC_HEADERS=@SYSTEM_ODBC_HEADERS@ + export SYSTEM_ODFGEN=@SYSTEM_ODFGEN@ + export SYSTEM_OPENLDAP=@SYSTEM_OPENLDAP@ +-export SYSTEM_OPENSSL=@SYSTEM_OPENSSL@ + export SYSTEM_PAGEMAKER=@SYSTEM_PAGEMAKER@ + export SYSTEM_POPPLER=@SYSTEM_POPPLER@ + export SYSTEM_POSTGRESQL=@SYSTEM_POSTGRESQL@ +diff --git a/configure.ac b/configure.ac +index 3862386..45d5e25 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -9422,67 +9422,6 @@ else + AC_MSG_RESULT([no]) + fi + +-dnl =================================================================== +-dnl Check for system openssl +-dnl =================================================================== +-DISABLE_OPENSSL= +-AC_MSG_CHECKING([whether to disable OpenSSL usage]) +-if test "$enable_openssl" = "yes"; then +- AC_MSG_RESULT([no]) +- if test "$_os" = Darwin ; then +- # OpenSSL is deprecated when building for 10.7 or later. +- # +- # http://stackoverflow.com/questions/7406946/why-is-apple-deprecating-openssl-in-macos-10-7-lion +- # http://stackoverflow.com/questions/7475914/libcrypto-deprecated-on-mac-os-x-10-7-lion +- +- with_system_openssl=no +- libo_CHECK_SYSTEM_MODULE([openssl],[OPENSSL],[openssl]) +- elif test "$_os" = "NetBSD" -o "$_os" = "OpenBSD" -o "$_os" = "DragonFly" \ +- && test "$with_system_openssl" != "no"; then +- with_system_openssl=yes +- SYSTEM_OPENSSL=TRUE +- OPENSSL_CFLAGS= +- OPENSSL_LIBS="-lssl -lcrypto" +- else +- libo_CHECK_SYSTEM_MODULE([openssl],[OPENSSL],[openssl]) +- fi +- if test "$with_system_openssl" = "yes"; then +- AC_MSG_CHECKING([whether openssl supports SHA512]) +- AC_LANG_PUSH([C]) +- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]],[[ +- SHA512_CTX context; +-]])],[AC_MSG_RESULT([yes])],[AC_MSG_ERROR([no, openssl too old. Need >= 0.9.8.])]) +- AC_LANG_POP(C) +- fi +-else +- AC_MSG_RESULT([yes]) +- DISABLE_OPENSSL=TRUE +- +- # warn that although OpenSSL is disabled, system libraries may depend on it +- AC_MSG_WARN([OpenSSL has been disabled. No code compiled here will make use of it but system libraries may create indirect dependencies]) +- add_warning "OpenSSL has been disabled. No code compiled here will make use of it but system libraries may create indirect dependencies" +-fi +- +-AC_SUBST([DISABLE_OPENSSL]) +- +-if test "$enable_cipher_openssl_backend" = yes && test "$DISABLE_OPENSSL" = TRUE; then +- if test "$libo_fuzzed_enable_cipher_openssl_backend" = yes; then +- AC_MSG_NOTICE([Resetting --enable-cipher-openssl-backend=no]) +- enable_cipher_openssl_backend=no +- else +- AC_MSG_ERROR([--enable-cipher-openssl-backend needs OpenSSL, but --disable-openssl was given.]) +- fi +-fi +-AC_MSG_CHECKING([whether to enable the OpenSSL backend for rtl/cipher.h]) +-ENABLE_CIPHER_OPENSSL_BACKEND= +-if test "$enable_cipher_openssl_backend" = yes; then +- AC_MSG_RESULT([yes]) +- ENABLE_CIPHER_OPENSSL_BACKEND=TRUE +-else +- AC_MSG_RESULT([no]) +-fi +-AC_SUBST([ENABLE_CIPHER_OPENSSL_BACKEND]) +- + dnl =================================================================== + dnl Check for building gnutls + dnl =================================================================== + +.. and without these gbuild still wants it ... + +diff --git a/external/Module_external.mk b/external/Module_external.mk +index 44280e3..44c1c63 100644 +--- a/external/Module_external.mk ++++ b/external/Module_external.mk +@@ -82,7 +82,6 @@ $(eval $(call gb_Module_add_moduledirs,external,\ + $(call gb_Helper_optional,NSS,nss) \ + $(call gb_Helper_optional,ODFGEN,libodfgen) \ + $(call gb_Helper_optional,OPENLDAP,openldap) \ +- $(call gb_Helper_optional,OPENSSL,openssl) \ + $(call gb_Helper_optional,ORCUS,liborcus) \ + $(call gb_Helper_optional,OWNCLOUD_ANDROID_LIB,owncloud-android-lib) \ + $(call gb_Helper_optional,PAGEMAKER,libpagemaker) \ +diff --git a/oox/CppunitTest_oox_tokenmap.mk b/oox/CppunitTest_oox_tokenmap.mk +index 9eac2a5..ef6d5c9 100644 +--- a/oox/CppunitTest_oox_tokenmap.mk ++++ b/oox/CppunitTest_oox_tokenmap.mk +@@ -20,19 +20,10 @@ $(eval $(call gb_CppunitTest_use_sdk_api,oox_tokenmap)) + + $(eval $(call gb_CppunitTest_use_library_objects,oox_tokenmap,oox)) + +-ifeq ($(TLS),OPENSSL) +-$(eval $(call gb_CppunitTest_use_externals,oox_tokenmap,\ +- openssl \ +- openssl_headers \ +-)) +-else +-ifeq ($(TLS),NSS) + $(eval $(call gb_CppunitTest_use_externals,oox_tokenmap,\ + plc4 \ + nss3 \ + )) +-endif +-endif + + $(eval $(call gb_CppunitTest_use_libraries,oox_tokenmap,\ + avmedia \ +diff --git a/oox/Library_oox.mk b/oox/Library_oox.mk +index fcd7215..a178883 100644 +--- a/oox/Library_oox.mk ++++ b/oox/Library_oox.mk +@@ -67,19 +67,10 @@ $(eval $(call gb_Library_use_externals,oox,\ + boost_headers \ + )) + +-ifeq ($(TLS),OPENSSL) +-$(eval $(call gb_Library_use_externals,oox,\ +- openssl \ +- openssl_headers \ +-)) +-else +-ifeq ($(TLS),NSS) + $(eval $(call gb_Library_use_externals,oox,\ + plc4 \ + nss3 \ + )) +-endif +-endif + + $(eval $(call gb_Library_set_componentfile,oox,oox/util/oox)) + +diff --git a/ucb/CppunitTest_ucb_webdav_local_neon.mk b/ucb/CppunitTest_ucb_webdav_local_neon.mk +index 20e827b..9b869f9 100644 +--- a/ucb/CppunitTest_ucb_webdav_local_neon.mk ++++ b/ucb/CppunitTest_ucb_webdav_local_neon.mk +@@ -34,7 +34,6 @@ $(eval $(call gb_CppunitTest_use_externals,ucb_webdav_local_neon,\ + boost_headers \ + libxml2 \ + neon \ +- openssl \ + )) + + $(eval $(call gb_CppunitTest_use_custom_headers,ucb_webdav_local_neon,\ +diff --git a/ucb/Library_ucpdav1.mk b/ucb/Library_ucpdav1.mk +index 37f3c8f..2167dd2 100644 +--- a/ucb/Library_ucpdav1.mk ++++ b/ucb/Library_ucpdav1.mk +@@ -30,7 +30,6 @@ $(eval $(call gb_Library_use_externals,ucpdav1,\ + boost_headers \ + libxml2 \ + neon \ +- openssl \ + )) + + $(eval $(call gb_Library_use_custom_headers,ucpdav1,\ +@@ -66,7 +65,6 @@ else # WITH_WEBDAV == serf + $(eval $(call gb_Library_use_externals,ucpdav1,\ + boost_headers \ + apr \ +- openssl \ + serf \ + zlib \ + )) +diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk +index 0fc7d25..fe5a208 100644 +--- a/RepositoryExternal.mk ++++ b/RepositoryExternal.mk +@@ -1525,75 +1525,6 @@ endif # ENABLE_HARFBUZZ + + ifeq ($(DISABLE_OPENSSL),TRUE) + +-gb_ExternalProject__use_openssl:= +-gb_LinkTarget__use_openssl_headers:= +-gb_LinkTarget__use_openssl:= +- +-else # !DISABLE_OPENSSL +- +-ifneq ($(SYSTEM_OPENSSL),) +- +-gb_LinkTarget__use_openssl_headers:= +-gb_ExternalProject__use_openssl:= +- +-define gb_LinkTarget__use_openssl +-$(call gb_LinkTarget_set_include,$(1),\ +- $$(INCLUDE) \ +- $(OPENSSL_CFLAGS) \ +-) +-$(call gb_LinkTarget_add_libs,$(1),$(OPENSSL_LIBS)) +- +-endef +- +-else # !SYSTEM_OPENSSL +- +-$(eval $(call gb_Helper_register_packages_for_install,ooo, \ +- openssl \ +-)) +- +-define gb_ExternalProject__use_openssl +-$(call gb_ExternalProject_use_package,$(1),openssl) +- +-endef +- +-define gb_LinkTarget__use_openssl_headers +-$(call gb_LinkTarget_use_external_project,$(1),openssl) +-$(call gb_LinkTarget_set_include,$(1),\ +- -I$(call gb_UnpackedTarball_get_dir,openssl)/include \ +- $$(INCLUDE) \ +-) +- +-endef +- +-define gb_LinkTarget__use_openssl +-$(call gb_LinkTarget_use_package,$(1),openssl) +-ifeq ($(OS),WNT) +-$(call gb_LinkTarget_add_libs,$(1),\ +- $(call gb_UnpackedTarball_get_dir,openssl)/out32dll/ssleay32.lib \ +- $(call gb_UnpackedTarball_get_dir,openssl)/out32dll/libeay32.lib \ +-) +-else +-$(call gb_LinkTarget_add_libs,$(1),\ +- $(call gb_UnpackedTarball_get_dir,openssl)/libssl.a \ +- $(call gb_UnpackedTarball_get_dir,openssl)/libcrypto.a \ +-) +-$(call gb_LinkTarget_use_external_project,$(1),openssl) +-ifeq ($(OS),SOLARIS) +-$(call gb_LinkTarget_add_libs,$(1),\ +- -lnsl \ +- -lsocket \ +-) +-endif +-endif +- +-endef +- +-endif # SYSTEM_OPENSSL +-endif # DISABLE_OPENSSL +- +- +-ifeq ($(DISABLE_OPENSSL),TRUE) +- + define gb_LinkTarget__use_gnutls + $(call gb_LinkTarget_set_include,$(1),\ + $$(INCLUDE) \ +diff --git a/ucb/CppunitTest_ucb_webdav_neon_opts.mk b/ucb/CppunitTest_ucb_webdav_neon_opts.mk +index 91e167b..21e5257 100644 +--- a/ucb/CppunitTest_ucb_webdav_neon_opts.mk ++++ b/ucb/CppunitTest_ucb_webdav_neon_opts.mk +@@ -34,7 +34,6 @@ $(eval $(call gb_CppunitTest_use_externals,ucb_webdav_neon_opts,\ + boost_headers \ + libxml2 \ + neon \ +- openssl \ + )) + + $(eval $(call gb_CppunitTest_use_custom_headers,ucb_webdav_neon_opts,\ +diff --git a/ucb/CppunitTest_ucb_webdav_propfindcache.mk b/ucb/CppunitTest_ucb_webdav_propfindcache.mk +index ebbaee7..e2d064e 100644 +--- a/ucb/CppunitTest_ucb_webdav_propfindcache.mk ++++ b/ucb/CppunitTest_ucb_webdav_propfindcache.mk +@@ -34,7 +34,6 @@ $(eval $(call gb_CppunitTest_use_externals,ucb_webdav_propfindcache,\ + boost_headers \ + libxml2 \ + neon \ +- openssl \ + )) + + $(eval $(call gb_CppunitTest_use_custom_headers,ucb_webdav_propfindcache,\ +diff --git a/ucb/CppunitTest_ucb_webdav_res_access.mk b/ucb/CppunitTest_ucb_webdav_res_access.mk +index ac48f87..c7d151e 100644 +--- a/ucb/CppunitTest_ucb_webdav_res_access.mk ++++ b/ucb/CppunitTest_ucb_webdav_res_access.mk +@@ -34,7 +34,6 @@ $(eval $(call gb_CppunitTest_use_externals,ucb_webdav_res_access,\ + boost_headers \ + libxml2 \ + neon \ +- openssl \ + )) + + $(eval $(call gb_CppunitTest_use_custom_headers,ucb_webdav_res_access,\ +diff --git a/connectivity/Library_mysqlc.mk b/connectivity/Library_mysqlc.mk +index f765fb1e305f..0999b46d3eec 100644 +--- a/connectivity/Library_mysqlc.mk ++++ b/connectivity/Library_mysqlc.mk +@@ -12,7 +12,6 @@ $(eval $(call gb_Library_Library,mysqlc)) + $(eval $(call gb_Library_use_externals,mysqlc,\ + boost_headers \ + mariadb-connector-c \ +- openssl \ + )) + + $(eval $(call gb_Library_set_include,mysqlc,\ diff --git a/debian/patches/no-packagekit-per-default.diff b/debian/patches/no-packagekit-per-default.diff new file mode 100644 index 00000000000..a496c702169 --- /dev/null +++ b/debian/patches/no-packagekit-per-default.diff @@ -0,0 +1,21 @@ +diff --git a/officecfg/registry/data/org/openoffice/Office/Common.xcu b/officecfg/registry/data/org/openoffice/Office/Common.xcu +index 3d138551b593..9cb9831f3236 100644 +--- a/officecfg/registry/data/org/openoffice/Office/Common.xcu ++++ b/officecfg/registry/data/org/openoffice/Office/Common.xcu +@@ -551,13 +551,13 @@ + + + +- true ++ false + + +- true ++ false + + +- true ++ false + + + diff --git a/debian/patches/pdfium-m68k.diff b/debian/patches/pdfium-m68k.diff new file mode 100644 index 00000000000..8b9df41fa09 --- /dev/null +++ b/debian/patches/pdfium-m68k.diff @@ -0,0 +1,20 @@ +don't break pdfium build on m68k + +FIXME: Make this set by autoconf, most of the defines in build_config.h are not actually +used anyway in pdfium... + +diff --git a/external/pdfium/configs/build_config.h b/external/pdfium/configs/build_config.h +index 22084c0a0836..6fd080e644fb 100644 +--- a/external/pdfium/configs/build_config.h ++++ b/external/pdfium/configs/build_config.h +@@ -118,6 +118,9 @@ + #define ARCH_CPU_ARM_FAMILY 1 + #define ARCH_CPU_ARM64 1 + #define ARCH_CPU_64_BITS 1 ++#elif defined(__m68k__) ++#define ARCH_CPU_M68K 1 ++#define ARCH_CPU_32_BITS 1 + #else + #error Please add support for your architecture in build/build_config.h + #endif + diff --git a/debian/patches/remove-ability-to-trust-not-validated-macro-signatures-in-high-security.diff b/debian/patches/remove-ability-to-trust-not-validated-macro-signatures-in-high-security.diff new file mode 100644 index 00000000000..f910e1b2a43 --- /dev/null +++ b/debian/patches/remove-ability-to-trust-not-validated-macro-signatures-in-high-security.diff @@ -0,0 +1,67 @@ +From 2587dbff640e2443f0800f9c1a865723500de1c5 Mon Sep 17 00:00:00 2001 +From: Sarper Akdemir +Date: Tue, 11 Jun 2024 12:39:36 +0200 +Subject: [PATCH] remove ability to trust not validated macro signatures in + high security +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Giving the user the option to determine if they should trust an +invalid signature in HIGH macro security doesn't make sense. +CommonName of the signature is the most prominent feature presented +and the CommonName of a certificate can be easily forged for an +invalid signature, tricking the user into accepting an invalid +signature. + +in the HIGH macro security setting only show the pop-up to +enable/disable signed macro if the certificate signature can be +validated. + +cherry-picked without UI/String altering bits for 24-2 + +Change-Id: Ia766fb701660160ee5dc9f6e077f4012a44ce721 +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168667 +Tested-by: Jenkins +Reviewed-by: Sarper Akdemir +(cherry picked from commit 2beaa3be3829303e948d401f492dbfd239d60aad) +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169525 +Reviewed-by: Thorsten Behrens +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171306 +Reviewed-by: Caolán McNamara +Tested-by: Caolán McNamara +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171314 +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171315 +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171317 +--- + sfx2/source/doc/docmacromode.cxx | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/sfx2/source/doc/docmacromode.cxx b/sfx2/source/doc/docmacromode.cxx +index 919033cbaf5d..33d546f2920a 100644 +--- a/sfx2/source/doc/docmacromode.cxx ++++ b/sfx2/source/doc/docmacromode.cxx +@@ -228,14 +228,18 @@ namespace sfx2 + // check whether the document is signed with trusted certificate + if ( nMacroExecutionMode != MacroExecMode::FROM_LIST ) + { ++ SignatureState nSignatureState = m_xData->m_rDocumentAccess.getScriptingSignatureState(); ++ + // the trusted macro check will also retrieve the signature state ( small optimization ) + const SvtSecurityOptions aSecOption; + const bool bAllowUIToAddAuthor = nMacroExecutionMode != MacroExecMode::FROM_LIST_AND_SIGNED_NO_WARN + && (nMacroExecutionMode == MacroExecMode::ALWAYS_EXECUTE +- || !aSecOption.IsReadOnly(SvtSecurityOptions::EOption::MacroTrustedAuthors)); ++ || !aSecOption.IsReadOnly(SvtSecurityOptions::EOption::MacroTrustedAuthors)) ++ && (nMacroExecutionMode != MacroExecMode::FROM_LIST_AND_SIGNED_WARN ++ || nSignatureState == SignatureState::OK); ++ + const bool bHasTrustedMacroSignature = m_xData->m_rDocumentAccess.hasTrustedScriptingSignature(bAllowUIToAddAuthor); + +- SignatureState nSignatureState = m_xData->m_rDocumentAccess.getScriptingSignatureState(); + if ( nSignatureState == SignatureState::BROKEN ) + { + if (!bAllowUIToAddAuthor) +-- +2.39.2 + diff --git a/debian/patches/reportdesign-mention-package.diff b/debian/patches/reportdesign-mention-package.diff new file mode 100644 index 00000000000..f85471bf069 --- /dev/null +++ b/debian/patches/reportdesign-mention-package.diff @@ -0,0 +1,13 @@ +diff --git a/dbaccess/inc/strings.hrc b/dbaccess/inc/strings.hrc +index 47068f43d09e..1f8b9a2331b6 100644 +--- a/dbaccess/inc/strings.hrc ++++ b/dbaccess/inc/strings.hrc +@@ -349,7 +349,7 @@ + #define STR_WARNINGS_DURING_CONNECT NC_("STR_WARNINGS_DURING_CONNECT", "Warnings were encountered while connecting to the data source. Press \"$buttontext$\" to view them.") + #define STR_NAMED_OBJECT_ALREADY_EXISTS NC_("STR_NAMED_OBJECT_ALREADY_EXISTS", "The name '$#$' already exists.\nPlease enter another name." ) + // #i96130# use hard coded name +-#define RID_STR_EXTENSION_NOT_PRESENT NC_("RID_STR_EXTENSION_NOT_PRESENT", "The report, \"$file$\", requires the Report Builder feature.") ++#define RID_STR_EXTENSION_NOT_PRESENT NC_("RID_STR_EXTENSION_NOT_PRESENT", "The report, \"$file$\", requires the Report Builder feature. For this, install the package 'libreoffice-report-builder'.") + + #define STR_COULDNOTCREATE_DRIVERMANAGER NC_("STR_COULDNOTCREATE_DRIVERMANAGER", "Cannot connect to the SDBC driver manager (#servicename#).") + #define STR_NOREGISTEREDDRIVER NC_("STR_NOREGISTEREDDRIVER", "A driver is not registered for the URL #connurl#.") diff --git a/debian/patches/reuse-AllowedLinkProtocolFromDocument-1.diff b/debian/patches/reuse-AllowedLinkProtocolFromDocument-1.diff new file mode 100644 index 00000000000..95ec93adc08 --- /dev/null +++ b/debian/patches/reuse-AllowedLinkProtocolFromDocument-1.diff @@ -0,0 +1,261 @@ +From 530830fdae0f9092fbd93c7be315b2055a841bf3 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Wed, 15 Nov 2023 11:39:24 +0000 +Subject: reuse AllowedLinkProtocolFromDocument in writer +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +reorg calc hyperlink check to reuse elsewhere + +Change-Id: I20ae3c5df15502c3a0a366fb4a2924c06ffac3d0 +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159487 +Tested-by: Jenkins +Reviewed-by: Caolán McNamara +(cherry picked from commit e6a7537762e19fde446441edd10d301f9b37ce75) + +reuse AllowedLinkProtocolFromDocument in writer + +Change-Id: Iacf5e313fc6ca5f7d69ca6986a036f0e1ab1f2a0 +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159488 +Tested-by: Caolán McNamara +Reviewed-by: Caolán McNamara +(cherry picked from commit 32535dfa82200b54296838b52285c054fbe5e51d) + +combine these hyperlink dispatchers into one call + +Change-Id: Icb7822e811013de648ccf2fbb23a5f0be9e29bb0 +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159489 +Tested-by: Caolán McNamara +Reviewed-by: Caolán McNamara +(cherry picked from commit 0df175ccc6ea542bc5801f631ff72bed187042eb) + +we can have just one LoadURL for writer + +Change-Id: Ia0162ee1c275292fcf200bad4662e4c2c6b7b972 +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159557 +Tested-by: Jenkins +Reviewed-by: Caolán McNamara +(cherry picked from commit 521ca9cf6acbae96cf95d9740859c9682212013d) +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159858 +Tested-by: Jenkins CollaboraOffice +Reviewed-by: Miklos Vajna +(cherry picked from commit e32b8601dbd63cf01497889601d6c9c1241106d6) +--- + include/sfx2/objsh.hxx | 7 +++++-- + sc/source/core/data/global.cxx | 32 ++---------------------------- + sfx2/source/doc/objmisc.cxx | 27 +++++++++++++++++++++++++ + sw/source/uibase/shells/drwtxtex.cxx | 8 ++------ + sw/source/uibase/wrtsh/wrtsh2.cxx | 38 +++++++++++++++++++++++------------- + 5 files changed, 60 insertions(+), 52 deletions(-) + +diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx +index 43df4605fe1d..2a65b7a93e7e 100644 +--- a/include/sfx2/objsh.hxx ++++ b/include/sfx2/objsh.hxx +@@ -202,6 +202,9 @@ private: + + SAL_DLLPRIVATE bool SaveTo_Impl(SfxMedium &rMedium, const SfxItemSet* pSet ); + ++ // true if the document had macros (or similar) on load to trigger warning user ++ SAL_DLLPRIVATE bool GetHadCheckedMacrosOnLoad() const; ++ + protected: + SfxObjectShell(SfxObjectCreateMode); + SfxObjectShell(SfxModelFlags); // see sfxmodelfactory.hxx +@@ -418,8 +421,8 @@ public: + void SetMacroCallsSeenWhileLoading(); + bool GetMacroCallsSeenWhileLoading() const; + +- // true if the document had macros (or similar) on load to trigger warning user +- bool GetHadCheckedMacrosOnLoad() const; ++ // true if this type of link, from a document, is allowed by the user to be passed to uno:OpenDoc ++ static bool AllowedLinkProtocolFromDocument(const OUString& rUrl, SfxObjectShell* pObjShell, weld::Window* pDialogParent); + + const css::uno::Sequence< css::beans::PropertyValue >& GetModifyPasswordInfo() const; + bool SetModifyPasswordInfo( const css::uno::Sequence< css::beans::PropertyValue >& aInfo ); +diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx +index 9696f7d9414d..3295a38a0243 100644 +--- a/sc/source/core/data/global.cxx ++++ b/sc/source/core/data/global.cxx +@@ -26,9 +26,7 @@ + #include + #include + #include +-#include + #include +-#include + #include + #include + #include +@@ -827,34 +825,8 @@ void ScGlobal::OpenURL(const OUString& rURL, const OUString& rTarget, bool bIgno + aUrlName = aNewUrlName; + } + +- if (INetURLObject(aUrlName).IsExoticProtocol()) +- { +- // Default to ignoring exotic protocols +- bool bAllow = false; +- if (pObjShell) +- { +- // If the document had macros when loaded then follow the allowed macro-mode +- if (pObjShell->GetHadCheckedMacrosOnLoad()) +- bAllow = pObjShell->AdjustMacroMode(); +- else // otherwise ask the user, defaulting to cancel +- { +- assert(pFrame && "if we have pObjShell we have pFrame"); +- //Reuse URITools::onOpenURI warning string +- std::unique_ptr xQueryBox(Application::CreateMessageDialog(pFrame->GetWindow().GetFrameWeld(), +- VclMessageType::Warning, VclButtonsType::YesNo, +- SfxResId(STR_DANGEROUS_TO_OPEN))); +- xQueryBox->set_primary_text(xQueryBox->get_primary_text().replaceFirst("$(ARG1)", +- INetURLObject::decode(aUrlName, INetURLObject::DecodeMechanism::Unambiguous))); +- xQueryBox->set_default_response(RET_NO); +- bAllow = xQueryBox->run() == RET_YES; +- } +- } +- if (!bAllow) +- { +- SAL_WARN("sc", "ScGlobal::OpenURL ignoring: " << aUrlName); +- return; +- } +- } ++ if (!SfxObjectShell::AllowedLinkProtocolFromDocument(aUrlName, pObjShell, pFrame ? pFrame->GetWindow().GetFrameWeld() : nullptr)) ++ return; + + SfxStringItem aUrl( SID_FILE_NAME, aUrlName ); + SfxStringItem aTarget( SID_TARGETNAME, rTarget ); +diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx +index c7418ef127fd..f372de7fe4b1 100644 +--- a/sfx2/source/doc/objmisc.cxx ++++ b/sfx2/source/doc/objmisc.cxx +@@ -964,6 +964,33 @@ bool SfxObjectShell::GetHadCheckedMacrosOnLoad() const + return pImpl->m_bHadCheckedMacrosOnLoad; + } + ++bool SfxObjectShell::AllowedLinkProtocolFromDocument(const OUString& rUrl, SfxObjectShell* pObjShell, weld::Window* pDialogParent) ++{ ++ if (!INetURLObject(rUrl).IsExoticProtocol()) ++ return true; ++ // Default to ignoring exotic protocols ++ bool bAllow = false; ++ if (pObjShell) ++ { ++ // If the document had macros when loaded then follow the allowed macro-mode ++ if (pObjShell->GetHadCheckedMacrosOnLoad()) ++ bAllow = pObjShell->AdjustMacroMode(); ++ else // otherwise ask the user, defaulting to cancel ++ { ++ //Reuse URITools::onOpenURI warning string ++ std::unique_ptr xQueryBox(Application::CreateMessageDialog(pDialogParent, ++ VclMessageType::Warning, VclButtonsType::YesNo, ++ SfxResId(STR_DANGEROUS_TO_OPEN))); ++ xQueryBox->set_primary_text(xQueryBox->get_primary_text().replaceFirst("$(ARG1)", ++ INetURLObject::decode(rUrl, INetURLObject::DecodeMechanism::Unambiguous))); ++ xQueryBox->set_default_response(RET_NO); ++ bAllow = xQueryBox->run() == RET_YES; ++ } ++ } ++ SAL_WARN_IF(!bAllow, "sfx.appl", "SfxObjectShell::AllowedLinkProtocolFromDocument ignoring: " << rUrl); ++ return bAllow; ++} ++ + void SfxObjectShell::CheckEncryption_Impl( const uno::Reference< task::XInteractionHandler >& xHandler ) + { + OUString aVersion; +diff --git a/sw/source/uibase/shells/drwtxtex.cxx b/sw/source/uibase/shells/drwtxtex.cxx +index 60bdf16380be..0e3ba07c3973 100644 +--- a/sw/source/uibase/shells/drwtxtex.cxx ++++ b/sw/source/uibase/shells/drwtxtex.cxx +@@ -545,12 +545,8 @@ void SwDrawTextShell::Execute( SfxRequest &rReq ) + const SvxFieldData* pField = pOLV->GetFieldAtCursor(); + if (const SvxURLField* pURLField = dynamic_cast(pField)) + { +- SfxStringItem aUrl(SID_FILE_NAME, pURLField->GetURL()); +- SfxStringItem aTarget(SID_TARGETNAME, pURLField->GetTargetFrame()); +- SfxBoolItem aNewView(SID_OPEN_NEW_VIEW, false); +- SfxBoolItem aBrowsing(SID_BROWSE, true); +- GetView().GetViewFrame()->GetDispatcher()->ExecuteList( +- SID_OPENDOC, SfxCallMode::SYNCHRON, { &aUrl, &aTarget, &aNewView, &aBrowsing }); ++ ::LoadURL(GetShell(), pURLField->GetURL(), LoadUrlFlags::NONE, ++ pURLField->GetTargetFrame()); + } + } + break; +diff --git a/sw/source/uibase/wrtsh/wrtsh2.cxx b/sw/source/uibase/wrtsh/wrtsh2.cxx +index 3197c596e52a..7a4088f0c497 100644 +--- a/sw/source/uibase/wrtsh/wrtsh2.cxx ++++ b/sw/source/uibase/wrtsh/wrtsh2.cxx +@@ -490,30 +490,24 @@ bool SwWrtShell::ClickToINetGrf( const Point& rDocPt, LoadUrlFlags nFilter ) + return bRet; + } + +-void LoadURL( SwViewShell& rVSh, const OUString& rURL, LoadUrlFlags nFilter, +- const OUString& rTargetFrameName ) ++static void LoadURL(SwView& rView, const OUString& rURL, LoadUrlFlags nFilter, ++ const OUString& rTargetFrameName) + { +- OSL_ENSURE( !rURL.isEmpty(), "what should be loaded here?" ); +- if( rURL.isEmpty() ) +- return ; ++ SwDocShell* pDShell = rView.GetDocShell(); ++ OSL_ENSURE( pDShell, "No DocShell?!"); ++ SfxViewFrame* pViewFrame = rView.GetViewFrame(); + +- // The shell could be 0 also!!!!! +- if ( dynamic_cast( &rVSh) == nullptr ) ++ if (!SfxObjectShell::AllowedLinkProtocolFromDocument(rURL, pDShell, pViewFrame->GetWindow().GetFrameWeld())) + return; + + // We are doing tiledRendering, let the client handles the URL loading, + // unless we are jumping to a TOC mark. + if (comphelper::LibreOfficeKit::isActive() && !rURL.startsWith("#")) + { +- rVSh.GetSfxViewShell()->libreOfficeKitViewCallback(LOK_CALLBACK_HYPERLINK_CLICKED, rURL.toUtf8().getStr()); ++ rView.libreOfficeKitViewCallback(LOK_CALLBACK_HYPERLINK_CLICKED, rURL.toUtf8().getStr()); + return; + } + +- //A CursorShell is always a WrtShell +- SwWrtShell &rSh = static_cast(rVSh); +- +- SwDocShell* pDShell = rSh.GetView().GetDocShell(); +- OSL_ENSURE( pDShell, "No DocShell?!"); + OUString sTargetFrame(rTargetFrameName); + if (sTargetFrame.isEmpty() && pDShell) + { +@@ -528,7 +522,6 @@ void LoadURL( SwViewShell& rVSh, const OUString& rURL, LoadUrlFlags nFilter, + OUString sReferer; + if( pDShell && pDShell->GetMedium() ) + sReferer = pDShell->GetMedium()->GetName(); +- SfxViewFrame* pViewFrame = rSh.GetView().GetViewFrame(); + SfxFrameItem aView( SID_DOCFRAME, pViewFrame ); + SfxStringItem aName( SID_FILE_NAME, rURL ); + SfxStringItem aTargetFrameName( SID_TARGETNAME, sTargetFrame ); +@@ -554,6 +547,23 @@ void LoadURL( SwViewShell& rVSh, const OUString& rURL, LoadUrlFlags nFilter, + SfxCallMode::ASYNCHRON|SfxCallMode::RECORD ); + } + ++void LoadURL( SwViewShell& rVSh, const OUString& rURL, LoadUrlFlags nFilter, ++ const OUString& rTargetFrameName ) ++{ ++ OSL_ENSURE( !rURL.isEmpty(), "what should be loaded here?" ); ++ if( rURL.isEmpty() ) ++ return ; ++ ++ // The shell could be 0 also!!!!! ++ if ( dynamic_cast( &rVSh) == nullptr ) ++ return; ++ ++ //A CursorShell is always a WrtShell ++ SwWrtShell &rSh = static_cast(rVSh); ++ ++ ::LoadURL(rSh.GetView(), rURL, nFilter, rTargetFrameName); ++} ++ + void SwWrtShell::NavigatorPaste( const NaviContentBookmark& rBkmk, + const sal_uInt16 nAction ) + { +-- +cgit v1.2.1 + diff --git a/debian/patches/reuse-AllowedLinkProtocolFromDocument-2.diff b/debian/patches/reuse-AllowedLinkProtocolFromDocument-2.diff new file mode 100644 index 00000000000..fc603e02b3a --- /dev/null +++ b/debian/patches/reuse-AllowedLinkProtocolFromDocument-2.diff @@ -0,0 +1,82 @@ +From ddbc78e7879671574e79cc3b93a0ccd362bad30e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Wed, 22 Nov 2023 21:14:41 +0000 +Subject: reuse AllowedLinkProtocolFromDocument in impress/draw +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Change-Id: I73ca4f087946a45dbf92d69a0dc1e769de9b5690 +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159843 +Tested-by: Jenkins +Reviewed-by: Caolán McNamara +(cherry picked from commit f0942eed2eb328b04856f20613f5226d66b66a20) +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159759 +Reviewed-by: Michael Stahl +Signed-off-by: Xisco Fauli +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159884 +Reviewed-by: Miklos Vajna +Signed-off-by: Xisco Fauli +--- + sd/source/ui/app/sdmod1.cxx | 29 ++++++++++++++++++----------- + 1 file changed, 18 insertions(+), 11 deletions(-) + +diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx +index 3d84ddb0da56..8d42653545ea 100644 +--- a/sd/source/ui/app/sdmod1.cxx ++++ b/sd/source/ui/app/sdmod1.cxx +@@ -32,6 +32,7 @@ + #include + #include + #include ++#include + #include + + #include +@@ -193,26 +194,32 @@ void SdModule::Execute(SfxRequest& rReq) + { + bool bIntercept = false; + ::sd::DrawDocShell* pDocShell = dynamic_cast< ::sd::DrawDocShell *>( SfxObjectShell::Current() ); +- if (pDocShell) ++ ::sd::ViewShell* pViewShell = pDocShell ? pDocShell->GetViewShell() : nullptr; ++ if (pViewShell) + { +- ::sd::ViewShell* pViewShell = pDocShell->GetViewShell(); +- if (pViewShell) ++ if( sd::SlideShow::IsRunning( pViewShell->GetViewShellBase() ) ) + { +- if( sd::SlideShow::IsRunning( pViewShell->GetViewShellBase() ) ) ++ // Prevent documents from opening while the slide ++ // show is running, except when this request comes ++ // from a shape interaction. ++ if (rReq.GetArgs() == nullptr) + { +- // Prevent documents from opening while the slide +- // show is running, except when this request comes +- // from a shape interaction. +- if (rReq.GetArgs() == nullptr) +- { +- bIntercept = true; +- } ++ bIntercept = true; + } + } + } + + if (!bIntercept) + { ++ if (const SfxStringItem* pURLItem = rReq.GetArg(SID_FILE_NAME)) ++ { ++ if (!pViewShell || !SfxObjectShell::AllowedLinkProtocolFromDocument(pURLItem->GetValue(), ++ pViewShell->GetObjectShell(), ++ pViewShell->GetFrameWeld())) ++ { ++ return; ++ } ++ } + SfxGetpApp()->ExecuteSlot(rReq, SfxGetpApp()->GetInterface()); + } + else +-- +cgit v1.2.1 + diff --git a/debian/patches/sc-opengl-optional.diff b/debian/patches/sc-opengl-optional.diff new file mode 100644 index 00000000000..20a5cbe2118 --- /dev/null +++ b/debian/patches/sc-opengl-optional.diff @@ -0,0 +1,26 @@ +diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx +index c657bd81defc..d5678c089f41 100644 +--- a/sc/source/core/data/global.cxx ++++ b/sc/source/core/data/global.cxx +@@ -71,6 +71,8 @@ + #include + #include + ++#include ++ + tools::SvRef ScGlobal::xDrawClipDocShellRef; + SvxSearchItem* ScGlobal::pSearchItem = nullptr; + ScAutoFormat* ScGlobal::pAutoFormat = nullptr; +@@ -472,7 +474,11 @@ void ScGlobal::InitPPT() + { + OutputDevice* pDev = Application::GetDefaultDevice(); + +- if (comphelper::LibreOfficeKit::isActive() || OpenGLWrapper::isVCLOpenGLEnabled()) ++ if (comphelper::LibreOfficeKit::isActive() ++#if defined HAVE_FEATURE_OPENGL && defined HAVE_FEATURE_UI ++|| OpenGLWrapper::isVCLOpenGLEnabled() ++#endif ++) + { + // LOK: the below limited precision is not enough for RowColumnHeader. + // OpenGL: limited precision breaks AA of text in charts. diff --git a/debian/patches/sc-stack-parameter-count.diff b/debian/patches/sc-stack-parameter-count.diff new file mode 100644 index 00000000000..31d969cc627 --- /dev/null +++ b/debian/patches/sc-stack-parameter-count.diff @@ -0,0 +1,221 @@ +From 48ce354351d58f4a63c45d0c56156ff1268bd050 Mon Sep 17 00:00:00 2001 +From: Eike Rathke +Date: Thu, 16 Feb 2023 20:20:31 +0100 +Subject: [PATCH] Obtain actual 0-parameter count for OR(), AND() and + 1-parameter functions +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +OR and AND for legacy infix notation are classified as binary +operators but in fact are functions with parameter count. In case +no argument is supplied, GetByte() returns 0 and for that case the +implicit binary operator 2 parameters were wrongly assumed. +Similar for functions expecting 1 parameter, without argument 1 +was assumed. For "real" unary and binary operators the compiler +already checks parameters. Omit OR and AND and 1-parameter +functions from this implicit assumption and return the actual 0 +count. + +Change-Id: Ie05398c112a98021ac2875cf7b6de994aee9d882 +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147173 +Reviewed-by: Eike Rathke +Tested-by: Jenkins +(cherry picked from commit e7ce9bddadb2db222eaa5f594ef1de2e36d57e5c) +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147129 +Reviewed-by: Caolán McNamara +(cherry picked from commit d6599a2af131994487d2d9223a4fd32a8c3ddc49) +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147132 +Reviewed-by: Xisco Fauli +Tested-by: Caolán McNamara +--- + formula/source/core/api/token.cxx | 13 +++++-------- + sc/source/core/tool/interpr4.cxx | 10 +++++++++- + 2 files changed, 14 insertions(+), 9 deletions(-) + +From 48ce354351d58f4a63c45d0c56156ff1268bd050 Mon Sep 17 00:00:00 2001 +From: Eike Rathke +Date: Thu, 16 Feb 2023 20:20:31 +0100 +Subject: [PATCH] Obtain actual 0-parameter count for OR(), AND() and + 1-parameter functions +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +OR and AND for legacy infix notation are classified as binary +operators but in fact are functions with parameter count. In case +no argument is supplied, GetByte() returns 0 and for that case the +implicit binary operator 2 parameters were wrongly assumed. +Similar for functions expecting 1 parameter, without argument 1 +was assumed. For "real" unary and binary operators the compiler +already checks parameters. Omit OR and AND and 1-parameter +functions from this implicit assumption and return the actual 0 +count. + +Change-Id: Ie05398c112a98021ac2875cf7b6de994aee9d882 +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147173 +Reviewed-by: Eike Rathke +Tested-by: Jenkins +(cherry picked from commit e7ce9bddadb2db222eaa5f594ef1de2e36d57e5c) +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147129 +Reviewed-by: Caolán McNamara +(cherry picked from commit d6599a2af131994487d2d9223a4fd32a8c3ddc49) +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147132 +Reviewed-by: Xisco Fauli +Tested-by: Caolán McNamara +--- + formula/source/core/api/token.cxx | 13 +++++-------- + sc/source/core/tool/interpr4.cxx | 10 +++++++++- + 2 files changed, 14 insertions(+), 9 deletions(-) + +From ef9af49e1060bfb2a15db81ba10703ebd520bbf6 Mon Sep 17 00:00:00 2001 +From: Eike Rathke +Date: Mon, 27 Feb 2023 16:10:06 +0100 +Subject: [PATCH] Always push a result, even if it's only an error +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +PERCENTILE() and QUARTILE() if an error was passed as argument (or +an error encountered during obtaining arguments) omitted to push +an error result, only setting the error. + +Fallout from + + commit f336f63da900d76c2bf6e5690f1c8a7bd15a0aa2 + CommitDate: Thu Mar 3 16:28:59 2016 +0000 + + tdf#94635 Add FORECAST.ETS functions to Calc + +Change-Id: I23e276fb0ce735cfd6383cc963446499dcf819f4 +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147922 +Reviewed-by: Eike Rathke +Tested-by: Jenkins +(cherry picked from commit 64914560e279c71ff1233f4bab851e2a292797e6) +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147901 +Reviewed-by: Caolán McNamara +Reviewed-by: Michael Stahl +Tested-by: Christian Lohmaier +Reviewed-by: Christian Lohmaier +--- + sc/source/core/tool/interpr3.cxx | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff -urN libreoffice-7-0-4.old/formula/source/core/api/token.cxx libreoffice-7-0-4/formula/source/core/api/token.cxx +--- libreoffice-7-0-4.old/formula/source/core/api/token.cxx 2021-10-27 07:29:16.182034576 +0200 ++++ libreoffice-7-0-4/formula/source/core/api/token.cxx 2023-05-22 19:05:09.572018039 +0200 +@@ -93,17 +93,14 @@ + return 0; // parameters and specials + // ocIf... jump commands not for FAP, have cByte then + //2do: bool parameter whether FAP or not? +- else if ( GetByte() ) ++ else if (GetByte()) + return GetByte(); // all functions, also ocExternal and ocMacro +- else if (SC_OPCODE_START_BIN_OP <= eOp && eOp < SC_OPCODE_STOP_BIN_OP) +- return 2; // binary +- else if ((SC_OPCODE_START_UN_OP <= eOp && eOp < SC_OPCODE_STOP_UN_OP) +- || eOp == ocPercentSign) +- return 1; // unary ++ else if (SC_OPCODE_START_BIN_OP <= eOp && eOp < SC_OPCODE_STOP_BIN_OP && eOp != ocAnd && eOp != ocOr) ++ return 2; // binary operators, compiler checked; OR and AND legacy but are functions ++ else if ((SC_OPCODE_START_UN_OP <= eOp && eOp < SC_OPCODE_STOP_UN_OP) || eOp == ocPercentSign) ++ return 1; // unary operators, compiler checked + else if (SC_OPCODE_START_NO_PAR <= eOp && eOp < SC_OPCODE_STOP_NO_PAR) + return 0; // no parameter +- else if (SC_OPCODE_START_1_PAR <= eOp && eOp < SC_OPCODE_STOP_1_PAR) +- return 1; // one parameter + else if (FormulaCompiler::IsOpCodeJumpCommand( eOp )) + return 1; // only the condition counts as parameter + else +diff -urN libreoffice-7-0-4.old/sc/source/core/inc/interpre.hxx libreoffice-7-0-4/sc/source/core/inc/interpre.hxx +--- libreoffice-7-0-4.old/sc/source/core/inc/interpre.hxx 2021-10-27 07:29:17.774042923 +0200 ++++ libreoffice-7-0-4/sc/source/core/inc/interpre.hxx 2023-05-22 19:05:09.576018095 +0200 +@@ -235,6 +235,7 @@ + inline bool MustHaveParamCount( short nAct, short nMust ); + inline bool MustHaveParamCount( short nAct, short nMust, short nMax ); + inline bool MustHaveParamCountMin( short nAct, short nMin ); ++ inline bool MustHaveParamCountMinWithStackCheck( short nAct, short nMin ); + void PushParameterExpected(); + void PushIllegalParameter(); + void PushIllegalArgument(); +@@ -1089,6 +1090,17 @@ + return false; + } + ++inline bool ScInterpreter::MustHaveParamCountMinWithStackCheck( short nAct, short nMin ) ++{ ++ assert(sp >= nAct); ++ if (sp < nAct) ++ { ++ PushParameterExpected(); ++ return false; ++ } ++ return MustHaveParamCountMin( nAct, nMin); ++} ++ + inline bool ScInterpreter::CheckStringPositionArgument( double & fVal ) + { + if (!std::isfinite( fVal)) +diff -urN libreoffice-7-0-4.old/sc/source/core/tool/interpr1.cxx libreoffice-7-0-4/sc/source/core/tool/interpr1.cxx +--- libreoffice-7-0-4.old/sc/source/core/tool/interpr1.cxx 2023-05-20 18:17:05.645488480 +0200 ++++ libreoffice-7-0-4/sc/source/core/tool/interpr1.cxx 2023-05-22 19:06:29.129145235 +0200 +@@ -7528,7 +7528,7 @@ + void ScInterpreter::ScSubTotal() + { + sal_uInt8 nParamCount = GetByte(); +- if ( MustHaveParamCountMin( nParamCount, 2 ) ) ++ if ( MustHaveParamCountMinWithStackCheck( nParamCount, 2 ) ) + { + // We must fish the 1st parameter deep from the stack! And push it on top. + const FormulaToken* p = pStack[ sp - nParamCount ]; +@@ -7575,7 +7575,7 @@ + void ScInterpreter::ScAggregate() + { + sal_uInt8 nParamCount = GetByte(); +- if ( MustHaveParamCountMin( nParamCount, 3 ) ) ++ if ( MustHaveParamCountMinWithStackCheck( nParamCount, 3 ) ) + { + const FormulaError nErr = nGlobalError; + nGlobalError = FormulaError::NONE; +diff -urN libreoffice-7-0-4.old/sc/source/core/tool/interpr3.cxx libreoffice-7-0-4/sc/source/core/tool/interpr3.cxx +--- libreoffice-7-0-4.old/sc/source/core/tool/interpr3.cxx 2021-10-27 07:29:17.798043049 +0200 ++++ libreoffice-7-0-4/sc/source/core/tool/interpr3.cxx 2023-05-22 19:05:09.584018209 +0200 +@@ -3478,7 +3478,7 @@ + GetNumberSequenceArray( 1, aArray, false ); + if ( aArray.empty() || nGlobalError != FormulaError::NONE ) + { +- SetError( FormulaError::NoValue ); ++ PushNoValue(); + return; + } + if ( bInclusive ) +@@ -3501,7 +3501,7 @@ + GetNumberSequenceArray( 1, aArray, false ); + if ( aArray.empty() || nGlobalError != FormulaError::NONE ) + { +- SetError( FormulaError::NoValue ); ++ PushNoValue(); + return; + } + if ( bInclusive ) +diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx +index 347377ed0a90..80a0e3027bc3 100644 +--- a/sc/source/core/tool/interpr4.cxx ++++ b/sc/source/core/tool/interpr4.cxx +@@ -4023,7 +4023,15 @@ StackVar ScInterpreter::Interpret() + else if (sp >= pCur->GetParamCount()) + nStackBase = sp - pCur->GetParamCount(); + else +- nStackBase = sp; // underflow?!? ++ { ++ SAL_WARN("sc.core", "Stack anomaly at " << aPos.Format( ++ ScRefFlags::VALID | ScRefFlags::FORCE_DOC | ScRefFlags::TAB_3D, pDok) ++ << " eOp: " << static_cast(eOp) ++ << " params: " << static_cast(pCur->GetParamCount()) ++ << " nStackBase: " << nStackBase << " sp: " << sp); ++ nStackBase = sp; ++ assert(!"underflow"); ++ } + } + + switch( eOp ) diff --git a/debian/patches/search-usr-share-for-images.diff b/debian/patches/search-usr-share-for-images.diff new file mode 100644 index 00000000000..6b91fcc127e --- /dev/null +++ b/debian/patches/search-usr-share-for-images.diff @@ -0,0 +1,137 @@ +diff --git a/vcl/inc/impimagetree.hxx b/vcl/inc/impimagetree.hxx +index 41c4f56..93d80f1 100644 +--- a/vcl/inc/impimagetree.hxx ++++ b/vcl/inc/impimagetree.hxx +@@ -85,6 +85,10 @@ private: + typedef boost::unordered_map< + rtl::OUString, std::pair< bool, BitmapEx >, rtl::OUStringHash > IconCache; + ++ // we want to search zip files (icons) also in /usr/share/ ++ ::rtl::OUString m_datadir; // /usr/share/ ++ ::rtl::OUString m_libdir; // /usr/lib or /usr/lib64 ++ + rtl::OUString m_style; + Zips m_zips; + CheckStyleCache m_checkStyleCache; +@@ -92,6 +96,7 @@ private: + + void setStyle(rtl::OUString const & style ); + ++ void addUrlToZips(const rtl::OUString &url); + void resetZips(); + + bool checkStyleCacheLookup( rtl::OUString const & style, bool &exists ); +diff --git a/vcl/source/gdi/impimagetree.cxx b/vcl/source/gdi/impimagetree.cxx +index 03442fc..cfe6c45 100644 +--- a/vcl/source/gdi/impimagetree.cxx ++++ b/vcl/source/gdi/impimagetree.cxx +@@ -121,7 +121,11 @@ void loadFromStream( + + } + +-ImplImageTree::ImplImageTree() {} ++ImplImageTree::ImplImageTree() ++{ ++ m_datadir = ::rtl::OUString::createFromAscii ( "/usr/share/" ); ++ m_libdir = ::rtl::OUString::createFromAscii ( "/usr/lib/" ); ++} + + ImplImageTree::~ImplImageTree() {} + +@@ -259,6 +263,22 @@ void ImplImageTree::setStyle(rtl::OUString const & style) { + } + } + ++void ImplImageTree::addUrlToZips(const rtl::OUString &url) { ++ if ( url.getLength() == 0 ) ++ return; ++ m_zips.push_back( ++ std::make_pair( ++ url, ++ css::uno::Reference< css::container::XNameAccess >())); ++ sal_Int32 nLibDirPos = url.indexOf( m_libdir ); ++ if ( nLibDirPos >= 0 ) { ++ m_zips.push_back( ++ std::make_pair( ++ url.replaceAt( nLibDirPos, m_libdir.getLength(), m_datadir ), ++ css::uno::Reference< css::container::XNameAccess >())); ++ } ++} ++ + void ImplImageTree::resetZips() { + m_zips.clear(); + { +@@ -284,19 +304,14 @@ void ImplImageTree::resetZips() { + b.appendAscii(RTL_CONSTASCII_STRINGPARAM("_brand.zip")); + bool ok = u.Append(b.makeStringAndClear(), INetURLObject::ENCODE_ALL); + OSL_ASSERT(ok); (void) ok; +- m_zips.push_back( +- std::make_pair( +- u.GetMainURL(INetURLObject::NO_DECODE), +- css::uno::Reference< css::container::XNameAccess >())); ++ addUrlToZips(u.GetMainURL(INetURLObject::NO_DECODE)); + } + { + rtl::OUString url( + RTL_CONSTASCII_USTRINGPARAM( + "$BRAND_BASE_DIR/share/config/images_brand.zip")); + rtl::Bootstrap::expandMacros(url); +- m_zips.push_back( +- std::make_pair( +- url, css::uno::Reference< css::container::XNameAccess >())); ++ addUrlToZips(url); + } + { + rtl::OUString url( +@@ -310,10 +310,7 @@ + b.appendAscii(RTL_CONSTASCII_STRINGPARAM(".zip")); + bool ok = u.Append(b.makeStringAndClear(), INetURLObject::ENCODE_ALL); + OSL_ASSERT(ok); (void) ok; +- m_zips.push_back( +- std::make_pair( +- u.GetMainURL(INetURLObject::NO_DECODE), +- css::uno::Reference< css::container::XNameAccess >())); ++ addUrlToZips(u.GetMainURL(INetURLObject::NO_DECODE)); + } + if ( m_style == "default" ) + { +@@ -321,9 +333,7 @@ void ImplImageTree::resetZips() { + RTL_CONSTASCII_USTRINGPARAM( + "$BRAND_BASE_DIR/share/config/images.zip")); + rtl::Bootstrap::expandMacros(url); +- m_zips.push_back( +- std::make_pair( +- url, css::uno::Reference< css::container::XNameAccess >())); ++ addUrlToZips(url); + } + } + +diff --git a/xmlhelp/source/cxxhelp/provider/provider.cxx b/xmlhelp/source/cxxhelp/provider/provider.cxx +index e55fe5d..848bed7 100644 +--- a/xmlhelp/source/cxxhelp/provider/provider.cxx ++++ b/xmlhelp/source/cxxhelp/provider/provider.cxx +@@ -335,7 +335,7 @@ void ContentProvider::init() + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( " " )) + + setupextension ); + +- uno::Sequence< rtl::OUString > aImagesZipPaths( 2 ); ++ uno::Sequence< rtl::OUString > aImagesZipPaths( 3 ); + xHierAccess = getHierAccess( sProvider, "org.openoffice.Office.Common" ); + + rtl::OUString aPath( getKey( xHierAccess, "Path/Current/UserConfig" ) ); +@@ -344,6 +344,15 @@ void ContentProvider::init() + + aPath = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("$BRAND_BASE_DIR/share/config")); + rtl::Bootstrap::expandMacros(aPath); ++ aImagesZipPaths[ 2 ] = aPath; ++ ++ // try also /usr/share and even before /usr/lib ++ ::rtl::OUString aDataDir = ::rtl::OUString::createFromAscii ( "/usr/share/" ); ++ ::rtl::OUString aLibDir = ::rtl::OUString::createFromAscii ( "/usr/lib/" ); ++ sal_Int32 nLibDirPos = aPath.indexOf( aLibDir ); ++ ++ if ( nLibDirPos >= 0 ) ++ aPath = aPath.replaceAt( nLibDirPos, aLibDir.getLength(), aDataDir ); + aImagesZipPaths[ 1 ] = aPath; + + uno::Reference< uno::XComponentContext > xContext; diff --git a/debian/patches/sensible-lomua.diff b/debian/patches/sensible-lomua.diff new file mode 100644 index 00000000000..6b98bbc4d6e --- /dev/null +++ b/debian/patches/sensible-lomua.diff @@ -0,0 +1,50 @@ +Index: libreoffice-3.6.2~rc1/officecfg/registry/data/org/openoffice/Office/Common.xcu +=================================================================== +--- libreoffice-3.6.2~rc1.orig/officecfg/registry/data/org/openoffice/Office/Common.xcu 2012-10-07 21:03:17.662850386 -0400 ++++ libreoffice-3.6.2~rc1/officecfg/registry/data/org/openoffice/Office/Common.xcu 2012-10-07 21:03:57.174850591 -0400 +@@ -655,7 +655,7 @@ + + + +- ++ sensible-lomua + + + +Index: libreoffice-3.6.2~rc1/shell/source/unix/misc/senddoc.sh +=================================================================== +--- libreoffice-3.6.2~rc1.orig/shell/source/unix/misc/senddoc.sh 2012-10-07 21:03:17.662850386 -0400 ++++ libreoffice-3.6.2~rc1/shell/source/unix/misc/senddoc.sh 2012-10-07 21:29:13.074858447 -0400 +@@ -59,6 +59,32 @@ + shift + fi + ++case `basename "$MAILER"` in ++ sensible-lomua) ++ if [ -x /usr/bin/xdg-email ] ; then ++ MAILER=/usr/bin/xdg-email ++ elif [ -n "$KDE_FULL_SESSION" -a -x /usr/bin/kde-open ] \ ++ || [ -x /usr/bin/gnome-open ] \ ++ || [ -x /usr/bin/xdg-open ]; then ++ # use an undefined mailer, to trigger the default handling ++ MAILER=undefined ++ elif [ -n "$GNOME_DESKTOP_SESSION_ID" -a -x /usr/bin/evolution ]; then ++ MAILER=/usr/bin/evolution ++ elif [ -n "$KDE_FULL_SESSION" -a -x /usr/bin/kmail ]; then ++ MAILER=/usr/bin/kmail ++ elif [ -x /usr/bin/evolution ]; then ++ # default ++ MAILER=/usr/bin/evolution ++ elif [ -x /usr/bin/icedove ]; then ++ # fallback ++ MAILER=/usr/bin/icedove ++ elif [ -x /usr/bin/thunderbird ]; then ++ # fallback ++ MAILER=/usr/bin/thunderbird ++ fi ++ ;; ++esac ++ + # autodetect mail client from executable name + case $(basename "$MAILER" | sed 's/-.*$//') in + diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 00000000000..18799c95a85 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,89 @@ +no-check-if-root.diff +debian-opt.diff +jurt-soffice-location.diff +split-evoab.diff +debian-debug.diff +#fix-system-lpsolve-build.diff +build-against-shared-lpsolve.diff +install-fixes.diff +mention-java-common-package.diff +help-msg-add-package-info.diff +sensible-lomua.diff +reportdesign-mention-package.diff +jdbc-driver-classpaths.diff +#search-usr-share-for-images.diff +make-package-modules-not-suck.diff +mediwiki-oor-replace.diff +debian-hardened-buildflags-CPPFLAGS.diff +debian-hardened-buildflags-no-LO-fstack-protector-strong.diff +disable-flaky-tests.diff +#dont-touch-urd.diff +fix-internal-hsqldb-build.diff +javadoc-optional.diff +hppa-is-32bit.diff +no-packagekit-per-default.diff +system-officeotron-and-odfvalidator.diff +no-openssl.diff +cppunit-optional.diff +#disable-unused-test-programs.diff +apparmor-complain.diff +hide-math-desktop-file.patch +appstream-ignore-startcenter.diff +disable-java-in-odk-build-examples-on-zero-vm.diff +do-not-hide-test-output.diff +apparmor-allow-java.security.diff +apparmor-cleanups.diff +apparmor-mesa.diff +disableClassPathURLCheck.diff +use-mariadb-java-instead-of-mysql-java.diff +apparmor-opencl.diff +fix-uicheck-tests-on-i386.patch +fix-flaky-bridgetest.diff +add-access2base-doc.diff +sc-opengl-optional.diff +fix-lo-xlate-lang-nb.diff +disable-shortcuts_tab_navigation-uitest.diff +no-opencl-per-default.diff +bigendian.diff +liborcus-0.16.diff +bash-completion-DRAWDOCS-pdf.diff +fix-bluez-external.diff +unowinreg-static-libgcc.diff +pdfium-m68k.diff +apparmor-updates.diff +xmlsecurity-replace-XSecParser-implementation.diff +xmlsecurity-XSecParser-confused-about-multiple-timestamps.diff +xmlsecurity-ignore-elements-in-ds:Object-that-arent-signed.diff +default-to-CertificateValidity::INVALID.diff +xmlsecurity-improve-handling-of-multiple-X509Data-elements.diff +hrk-euro.diff +b0404f80577de9ff69e58390c6f6ef949fdb0139.patch +0001-CVE-2022-26305-compare-authors-using-Thumbprint.patch +0002-CVE-2022-26307-make-hash-encoding-match-decoding.patch +0003-CVE-2022-26306-add-Initialization-Vectors-to-passwor.patch +0004-CVE-2022-2630-6-7-add-infobar-to-prompt-to-refresh-t.patch +fix-e_book_client_connect_direct_sync-sig.diff +ZDI-CAN-17859.diff +hrk-euro-default.diff +avoid-empty-java.class.path.diff +CVE-2023-2255.diff +sc-stack-parameter-count.diff +escape-url-passed-to-gstreamer.diff +improve-macro-checks.diff +floating-frame-targets-unneeded-protocols.diff +warn-about-exotic-protocols-as-well.diff +ignore-LO-special-purpose-hyperlinks-per-default.diff +reuse-AllowedLinkProtocolFromDocument-1.diff +reuse-AllowedLinkProtocolFromDocument-2.diff +work-around-expired-certificiate-in-test.diff +add-notify-for-script-use.diff +remove-ability-to-trust-not-validated-macro-signatures-in-high-security.diff +do-not-trust-any-signature-on-repaired-package.diff +CVE-2024-12425.patch +CVE-2024-12426_1.patch +CVE-2024-12426_2.patch +CVE-2024-12426_3.patch +CVE-2024-12426_4.patch +DisableTestThatFail.patch +CVE-2025-1080.patch +CVE-2025-2866.patch diff --git a/debian/patches/split-evoab.diff b/debian/patches/split-evoab.diff new file mode 100644 index 00000000000..f563560099f --- /dev/null +++ b/debian/patches/split-evoab.diff @@ -0,0 +1,61 @@ +diff --git a/scp2/source/gnome/file_gnome.scp b/scp2/source/gnome/file_gnome.scp +index c7a13c8..a3f59a6 100644 +--- a/scp2/source/gnome/file_gnome.scp ++++ b/scp2/source/gnome/file_gnome.scp +@@ -25,3 +25,13 @@ File gid_File_Share_Registry_Gnome_Xcd + Name = "gnome.xcd"; + End + #endif ++ ++#ifdef ENABLE_EVOAB2 ++File gid_File_Share_Registry_Evoab_Xcd ++ TXT_FILE_BODY; ++ Styles = (PACKED); ++ Dir = gid_Brand_Dir_Share_Registry; ++ Name = "evoab.xcd"; ++End ++#endif ++ +diff --git a/scp2/source/gnome/module_gnome.scp b/scp2/source/gnome/module_gnome.scp +index 08d9efe..492e274 100644 +--- a/scp2/source/gnome/module_gnome.scp ++++ b/scp2/source/gnome/module_gnome.scp +@@ -31,6 +31,9 @@ Module gid_Module_Optional_Gnome + #if ENABLE_GIO + ,gid_File_Share_Registry_Gnome_Xcd + #endif ++#ifdef ENABLE_EVOAB2 ++ ,gid_File_Share_Registry_Evoab_Xcd ++#endif + ); + End + +diff --git a/postprocess/CustomTarget_registry.mk b/postprocess/CustomTarget_registry.mk +index 510b444..3ff190f 100644 +--- a/postprocess/CustomTarget_registry.mk ++++ b/postprocess/CustomTarget_registry.mk +@@ -331,8 +331,9 @@ ifneq ($(WITH_WEBDAV),) + postprocess_FILES_main += $(postprocess_MOD)/org/openoffice/ucb/Configuration-webdav.xcu + endif + ifeq ($(ENABLE_EVOAB2),TRUE) +-postprocess_FILES_main += $(call gb_XcuModuleTarget_get_target,connectivity/registry/evoab2)/org/openoffice/Office/DataAccess/Drivers-evoab2.xcu +-postprocess_FILES_main += $(postprocess_MOD)/org/openoffice/Office/DataAccess-evoab2.xcu ++postprocess_XCDS += evoab.xcd ++postprocess_FILES_evoab += $(call gb_XcuModuleTarget_get_target,connectivity/registry/evoab2)/org/openoffice/Office/DataAccess/Drivers-evoab2.xcu ++postprocess_FILES_evoab += $(postprocess_MOD)/org/openoffice/Office/DataAccess-evoab2.xcu + postprocess_DRIVERS += evoab + endif + ifeq ($(ENABLE_JAVA),TRUE) +diff --git a/scp2/InstallModule_gnome.mk b/scp2/InstallModule_gnome.mk +index c33f4f52d67b..8f06c0273eff 100644 +--- a/scp2/InstallModule_gnome.mk ++++ b/scp2/InstallModule_gnome.mk +@@ -19,4 +19,8 @@ $(eval $(call gb_InstallModule_add_localized_scpfiles,scp2/gnome,\ + scp2/source/gnome/module_gnome \ + )) + ++$(eval $(call gb_InstallModule_define_if_set,scp2/gnome,\ ++ ENABLE_EVOAB2 \ ++)) ++ + # vim: set shiftwidth=4 tabstop=4 noexpandtab: diff --git a/debian/patches/system-officeotron-and-odfvalidator.diff b/debian/patches/system-officeotron-and-odfvalidator.diff new file mode 100644 index 00000000000..971608ef949 --- /dev/null +++ b/debian/patches/system-officeotron-and-odfvalidator.diff @@ -0,0 +1,16 @@ +diff --git a/bin/odfvalidator.sh.in b/bin/odfvalidator.sh.in +index 56e2f29..9415ef6 100644 +--- a/bin/odfvalidator.sh.in ++++ b/bin/odfvalidator.sh.in +@@ -1,2 +1,2 @@ + #!/usr/bin/env bash +-java -Djavax.xml.validation.SchemaFactory:http://relaxng.org/ns/structure/1.0=org.iso_relax.verifier.jaxp.validation.RELAXNGSchemaFactoryImpl -Dorg.iso_relax.verifier.VerifierFactoryLoader=com.sun.msv.verifier.jarv.FactoryLoaderImpl -jar @TARFILE_LOCATION@/@ODFVALIDATOR_JAR@ "$@" ++java -Djavax.xml.validation.SchemaFactory:http://relaxng.org/ns/structure/1.0=org.iso_relax.verifier.jaxp.validation.RELAXNGSchemaFactoryImpl -Dorg.iso_relax.verifier.VerifierFactoryLoader=com.sun.msv.verifier.jarv.FactoryLoaderImpl -jar /usr/share/java/odfvalidator.jar "$@" +diff --git a/bin/officeotron.sh.in b/bin/officeotron.sh.in +index 7281f1b..6eab5b5 100644 +--- a/bin/officeotron.sh.in ++++ b/bin/officeotron.sh.in +@@ -1,2 +1,2 @@ + #!/usr/bin/env bash +-java -jar @TARFILE_LOCATION@/@OFFICEOTRON_JAR@ "$@" ++java -jar /usr/share/java/officeotron.jar "$@" diff --git a/debian/patches/unowinreg-static-libgcc.diff b/debian/patches/unowinreg-static-libgcc.diff new file mode 100644 index 00000000000..d3e600f6ba9 --- /dev/null +++ b/debian/patches/unowinreg-static-libgcc.diff @@ -0,0 +1,13 @@ +diff --git a/odk/CustomTarget_unowinreg.mk b/odk/CustomTarget_unowinreg.mk +index 3a46ddfd6860..a847e1d6bb38 100644 +--- a/odk/CustomTarget_unowinreg.mk ++++ b/odk/CustomTarget_unowinreg.mk +@@ -19,7 +19,7 @@ $(call gb_CustomTarget_get_workdir,odk/unowinreg)/unowinreg.dll : \ + $(if $(filter FREEBSD,$(OS)),-I$(JAVA_HOME)/include/freebsd \ + -I$(JAVA_HOME)/include/bsd -I$(JAVA_HOME)/include/linux,\ + $(if $(filter NETBSD,$(OS)),-I$(JAVA_HOME)/include/netbsd))) \ +- -shared -o $@ $< \ ++ -shared -static-libgcc -o $@ $< \ + -Wl,--kill-at -lkernel32 -ladvapi32 && \ + $(MINGWSTRIP) $@ + diff --git a/debian/patches/use-mariadb-java-instead-of-mysql-java.diff b/debian/patches/use-mariadb-java-instead-of-mysql-java.diff new file mode 100644 index 00000000000..a88823c3989 --- /dev/null +++ b/debian/patches/use-mariadb-java-instead-of-mysql-java.diff @@ -0,0 +1,59 @@ +>From 1172166889764ae0e77488e5d173f33961b9859b Mon Sep 17 00:00:00 2001 +From: Markus Koschany +Date: Fri, 9 Nov 2018 23:06:15 +0100 +Subject: [PATCH] mariadb + +--- + connectivity/qa/complex/connectivity/JdbcLongVarCharTest.java | 4 ++-- + .../mysql/org/openoffice/Office/DataAccess/Drivers.xcu | 2 +- + connectivity/source/drivers/mysql/YDriver.cxx | 4 ++-- + 3 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/connectivity/qa/complex/connectivity/JdbcLongVarCharTest.java b/connectivity/qa/complex/connectivity/JdbcLongVarCharTest.java +index 3817add48da6..ace57bd35d98 100644 +--- a/connectivity/qa/complex/connectivity/JdbcLongVarCharTest.java ++++ b/connectivity/qa/complex/connectivity/JdbcLongVarCharTest.java +@@ -64,7 +64,7 @@ public class JdbcLongVarCharTest extends ComplexTestCase + */ + String url = System.getenv("CONNECTIVITY_TEST_MYSQL_DRIVER_JDBC"); + com.sun.star.beans.PropertyValue prop[] = new PropertyValue[1]; +- prop[0] = new PropertyValue("JavaDriverClass", 0, "com.mysql.jdbc.Driver", PropertyState.DIRECT_VALUE); ++ prop[0] = new PropertyValue("JavaDriverClass", 0, "org.mariadb.jdbc.Driver", PropertyState.DIRECT_VALUE); + + // get the remote office component context + XMultiServiceFactory xServiceManager = param.getMSF(); +diff --git a/connectivity/registry/mysql/org/openoffice/Office/DataAccess/Drivers.xcu b/connectivity/registry/mysql/org/openoffice/Office/DataAccess/Drivers.xcu +index 77988448f..acd8bfdaf 100644 +--- a/connectivity/registry/mysql_jdbc/org/openoffice/Office/DataAccess/Drivers.xcu ++++ b/connectivity/registry/mysql_jdbc/org/openoffice/Office/DataAccess/Drivers.xcu +@@ -33,7 +33,7 @@ + + + +- com.mysql.jdbc.Driver ++ org.mariadb.jdbc.Driver + + + +diff --git a/connectivity/source/drivers/mysql/YDriver.cxx b/connectivity/source/drivers/mysql/YDriver.cxx +index 95094265e..c0ad7802e 100644 +--- a/connectivity/source/drivers/mysql_jdbc/YDriver.cxx ++++ b/connectivity/source/drivers/mysql_jdbc/YDriver.cxx +@@ -54,7 +54,7 @@ namespace + OUString getJavaDriverClass(css::uno::Sequence const& info) + { + return comphelper::NamedValueCollection(info).getOrDefault("JavaDriverClass", +- OUString("com.mysql.jdbc.Driver")); ++ OUString("org.mariadb.jdbc.Driver")); + } + } + +@@ -170,7 +170,7 @@ Sequence lcl_convertProperties(T_DRIVERTYPE _eType, + if (!jdc) + { + aProps.push_back(PropertyValue("JavaDriverClass", 0, +- makeAny(OUString("com.mysql.jdbc.Driver")), ++ makeAny(OUString("org.mariadb.jdbc.Driver")), + PropertyState_DIRECT_VALUE)); + } + } diff --git a/debian/patches/warn-about-exotic-protocols-as-well.diff b/debian/patches/warn-about-exotic-protocols-as-well.diff new file mode 100644 index 00000000000..3ce5f487555 --- /dev/null +++ b/debian/patches/warn-about-exotic-protocols-as-well.diff @@ -0,0 +1,79 @@ +From b245f1e20e67c1e73a702425ab41df8eb58452e3 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Sat, 4 Nov 2023 19:57:51 +0000 +Subject: warn about exotic protocols as well +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Change-Id: I50dcf4f36cd20d75f5ad3876353143268740a50f +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151834 +Tested-by: Jenkins +Reviewed-by: Caolán McNamara +(cherry picked from commit 1305f70cff8a81a58a5a6d9c96c5bb032005389e) +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159034 +Reviewed-by: Eike Rathke +(cherry picked from commit 2e1bcbb550d54278b366ec619cc5280d44d6aba4) +--- + sw/source/filter/html/htmlplug.cxx | 2 +- + sw/source/filter/xml/xmltexti.cxx | 2 +- + tools/source/fsys/urlobj.cxx | 3 ++- + xmloff/source/draw/ximpshap.cxx | 2 +- + 4 files changed, 5 insertions(+), 4 deletions(-) + +diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx +index eb707040adb2..112975f98511 100644 +--- a/sw/source/filter/html/htmlplug.cxx ++++ b/sw/source/filter/html/htmlplug.cxx +@@ -1089,7 +1089,7 @@ void SwHTMLParser::InsertFloatingFrame() + + OUString sHRef = aFrameDesc.GetURL().GetMainURL( INetURLObject::DecodeMechanism::NONE ); + +- if (INetURLObject(sHRef).GetProtocol() == INetProtocol::Macro) ++ if (INetURLObject(sHRef).IsExoticProtocol()) + NotifyMacroEventRead(); + + xSet->setPropertyValue("FrameURL", uno::makeAny( sHRef ) ); +diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx +index 169cbdc1534d..caf300f239c6 100644 +--- a/sw/source/filter/xml/xmltexti.cxx ++++ b/sw/source/filter/xml/xmltexti.cxx +@@ -856,7 +856,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertFloatingFra + OUString sHRef = URIHelper::SmartRel2Abs( + INetURLObject( GetXMLImport().GetBaseURL() ), rHRef ); + +- if (INetURLObject(sHRef).GetProtocol() == INetProtocol::Macro) ++ if (INetURLObject(sHRef).IsExoticProtocol()) + GetXMLImport().NotifyMacroEventRead(); + + xSet->setPropertyValue("FrameURL", +diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx +index ab6e885639db..1ef2b7e0b2af 100644 +--- a/tools/source/fsys/urlobj.cxx ++++ b/tools/source/fsys/urlobj.cxx +@@ -4776,7 +4776,8 @@ bool INetURLObject::IsExoticProtocol() const + return m_eScheme == INetProtocol::Slot || + m_eScheme == INetProtocol::Macro || + m_eScheme == INetProtocol::Uno || +- isSchemeEqualTo(u"vnd.sun.star.script"); ++ isSchemeEqualTo(u"vnd.sun.star.script") || ++ isSchemeEqualTo(u"service"); + } + + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ +diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx +index 44b5177501f1..30c303690d97 100644 +--- a/xmloff/source/draw/ximpshap.cxx ++++ b/xmloff/source/draw/ximpshap.cxx +@@ -3269,7 +3269,7 @@ void SdXMLFloatingFrameShapeContext::StartElement( const css::uno::Reference< cs + + if( !maHref.isEmpty() ) + { +- if (INetURLObject(maHref).GetProtocol() == INetProtocol::Macro) ++ if (INetURLObject(maHref).IsExoticProtocol()) + GetImport().NotifyMacroEventRead(); + + xProps->setPropertyValue("FrameURL", Any(maHref) ); +-- +cgit v1.2.1 + diff --git a/debian/patches/work-around-expired-certificiate-in-test.diff b/debian/patches/work-around-expired-certificiate-in-test.diff new file mode 100644 index 00000000000..f4f87dba480 --- /dev/null +++ b/debian/patches/work-around-expired-certificiate-in-test.diff @@ -0,0 +1,24 @@ +diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx +index 1898d3f1377f..be3d9ebd3253 100644 +--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx ++++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx +@@ -2829,7 +2829,8 @@ void DesktopLOKTest::testInsertCertificate_PEM_ODT() + } + + int nState = pDocument->m_pDocumentClass->getSignatureState(pDocument); +- CPPUNIT_ASSERT_EQUAL(int(1), nState); ++ // OK or NOTVALIDATED (signature is OK, but certificate could not be validated) ++ CPPUNIT_ASSERT(nState == 1 || nState == 4); + } + + void DesktopLOKTest::testInsertCertificate_PEM_DOCX() +@@ -2886,7 +2887,8 @@ void DesktopLOKTest::testInsertCertificate_PEM_DOCX() + } + + int nState = pDocument->m_pDocumentClass->getSignatureState(pDocument); +- CPPUNIT_ASSERT_EQUAL(int(5), nState); ++ // PARTIAL_OK or NOTVALIDATED_PARTIAL_OK ++ CPPUNIT_ASSERT(nState == 5 || nState == 6); + } + + void DesktopLOKTest::testSignDocument_PEM_PDF() diff --git a/debian/patches/xmlsecurity-XSecParser-confused-about-multiple-timestamps.diff b/debian/patches/xmlsecurity-XSecParser-confused-about-multiple-timestamps.diff new file mode 100644 index 00000000000..51327d5ee79 --- /dev/null +++ b/debian/patches/xmlsecurity-XSecParser-confused-about-multiple-timestamps.diff @@ -0,0 +1,393 @@ +From abe77c4fcb9ea97d9fff07eaea6d8863bcba5b02 Mon Sep 17 00:00:00 2001 +From: Michael Stahl +Date: Thu, 18 Feb 2021 19:22:31 +0100 +Subject: xmlsecurity: XSecParser confused about multiple timestamps +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +LO writes timestamp both to dc:date and xades:SigningTime elements. + +The parser tries to avoid reading multiple dc:date, preferring the first +one, but doesn't care about multiple xades:SigningTime, for undocumented +reasons. + +Ideally something should check all read values for consistency. + +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111160 +Tested-by: Jenkins +Reviewed-by: Michael Stahl +(cherry picked from commit 4ab8d9c09a5873ca0aea56dafa1ab34758d52ef7) + +xmlsecurity: remove XSecController::setPropertyId() + +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111252 +Tested-by: Jenkins +Reviewed-by: Michael Stahl +(cherry picked from commit d2a345e1163616fe3201ef1d6c758e2e819214e0) + +Change-Id: Ic018ee89797a1c8a4f870ae102af48006de930ef +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111908 +Tested-by: Jenkins +Reviewed-by: Caolán McNamara +--- + include/svl/sigstruct.hxx | 7 ++- + xmlsecurity/inc/xsecctl.hxx | 5 +- + xmlsecurity/source/helper/ooxmlsecparser.cxx | 4 +- + xmlsecurity/source/helper/xsecctl.cxx | 2 +- + xmlsecurity/source/helper/xsecparser.cxx | 81 ++++++++++++++-------------- + xmlsecurity/source/helper/xsecparser.hxx | 6 --- + xmlsecurity/source/helper/xsecsign.cxx | 4 +- + xmlsecurity/source/helper/xsecverify.cxx | 39 ++++++-------- + 8 files changed, 68 insertions(+), 80 deletions(-) + +diff --git a/include/svl/sigstruct.hxx b/include/svl/sigstruct.hxx +index 38c1ee5ed142..d62ecb09634c 100644 +--- a/include/svl/sigstruct.hxx ++++ b/include/svl/sigstruct.hxx +@@ -103,6 +103,9 @@ struct SignatureInformation + // XAdES EncapsulatedX509Certificate values + std::set maEncapsulatedX509Certificates; + ++ OUString ouSignatureId; ++ // signature may contain multiple time stamps - check they're consistent ++ bool hasInconsistentSigningTime = false; + //We also keep the date and time as string. This is done when this + //structure is created as a result of a XML signature being read. + //When then a signature is added or another removed, then the original +@@ -115,8 +118,8 @@ struct SignatureInformation + //and the converted time is written back, then the string looks different + //and the signature is broken. + OUString ouDateTime; +- OUString ouSignatureId; +- OUString ouPropertyId; ++ /// The Id attribute of the element that contains the . ++ OUString ouDateTimePropertyId; + /// Characters of the element inside the signature. + OUString ouDescription; + /// The Id attribute of the element that contains the . +diff --git a/xmlsecurity/inc/xsecctl.hxx b/xmlsecurity/inc/xsecctl.hxx +index 324f1c43388b..759a660d90ad 100644 +--- a/xmlsecurity/inc/xsecctl.hxx ++++ b/xmlsecurity/inc/xsecctl.hxx +@@ -271,8 +271,8 @@ private: + void setGpgCertificate( OUString const & ouGpgCert ); + void setGpgOwner( OUString const & ouGpgOwner ); + +- void setDate( OUString const & ouDate ); +- void setDescription(const OUString& rDescription); ++ void setDate(OUString const& rId, OUString const& ouDate); ++ void setDescription(OUString const& rId, OUString const& rDescription); + void setCertDigest(const OUString& rCertDigest); + void setValidSignatureImage(const OUString& rValidSigImg); + void setInvalidSignatureImage(const OUString& rInvalidSigImg); +@@ -283,7 +283,6 @@ public: + + private: + void setId( OUString const & ouId ); +- void setPropertyId( OUString const & ouPropertyId ); + + css::uno::Reference< css::xml::crypto::sax::XReferenceResolvedListener > prepareSignatureToRead( + sal_Int32 nSecurityId ); +diff --git a/xmlsecurity/source/helper/ooxmlsecparser.cxx b/xmlsecurity/source/helper/ooxmlsecparser.cxx +index c22e8c2261bf..a200de60c07a 100644 +--- a/xmlsecurity/source/helper/ooxmlsecparser.cxx ++++ b/xmlsecurity/source/helper/ooxmlsecparser.cxx +@@ -192,12 +192,12 @@ void SAL_CALL OOXMLSecParser::endElement(const OUString& rName) + } + else if (rName == "mdssi:Value") + { +- m_pXSecController->setDate(m_aMdssiValue); ++ m_pXSecController->setDate("", m_aMdssiValue); + m_bInMdssiValue = false; + } + else if (rName == "SignatureComments") + { +- m_pXSecController->setDescription(m_aSignatureComments); ++ m_pXSecController->setDescription("", m_aSignatureComments); + m_bInSignatureComments = false; + } + else if (rName == "X509IssuerName") +diff --git a/xmlsecurity/source/helper/xsecctl.cxx b/xmlsecurity/source/helper/xsecctl.cxx +index cac30006b6a7..e3df9a85f6da 100644 +--- a/xmlsecurity/source/helper/xsecctl.cxx ++++ b/xmlsecurity/source/helper/xsecctl.cxx +@@ -815,7 +815,7 @@ void XSecController::exportSignature( + pAttributeList = new SvXMLAttributeList(); + pAttributeList->AddAttribute( + "Id", +- signatureInfo.ouPropertyId); ++ signatureInfo.ouDateTimePropertyId); + pAttributeList->AddAttribute( + "Target", + "#" + signatureInfo.ouSignatureId); +diff --git a/xmlsecurity/source/helper/xsecparser.cxx b/xmlsecurity/source/helper/xsecparser.cxx +index 0aecb1854f8c..1418b7b43b46 100644 +--- a/xmlsecurity/source/helper/xsecparser.cxx ++++ b/xmlsecurity/source/helper/xsecparser.cxx +@@ -974,6 +974,9 @@ class XSecParser::XadesSigningCertificateContext + class XSecParser::XadesSigningTimeContext + : public XSecParser::Context + { ++ private: ++ OUString m_Value; ++ + public: + XadesSigningTimeContext(XSecParser & rParser, + std::unique_ptr pOldNamespaceMap) +@@ -981,20 +984,14 @@ class XSecParser::XadesSigningTimeContext + { + } + +- virtual void StartElement( +- css::uno::Reference const& /*xAttrs*/) override +- { +- m_rParser.m_ouDate.clear(); +- } +- + virtual void EndElement() override + { +- m_rParser.m_pXSecController->setDate( m_rParser.m_ouDate ); ++ m_rParser.m_pXSecController->setDate("", m_Value); + } + + virtual void Characters(OUString const& rChars) override + { +- m_rParser.m_ouDate += rChars; ++ m_Value += rChars; + } + }; + +@@ -1100,35 +1097,20 @@ class XSecParser::DcDateContext + : public XSecParser::Context + { + private: +- bool m_isIgnore = false; ++ OUString & m_rValue; + + public: + DcDateContext(XSecParser & rParser, +- std::unique_ptr pOldNamespaceMap) ++ std::unique_ptr pOldNamespaceMap, ++ OUString & rValue) + : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) ++ , m_rValue(rValue) + { + } + +- virtual void StartElement( +- css::uno::Reference const& /*xAttrs*/) override +- { +- m_isIgnore = !m_rParser.m_ouDate.isEmpty(); +- } +- +- virtual void EndElement() override +- { +- if (!m_isIgnore) +- { +- m_rParser.m_pXSecController->setDate( m_rParser.m_ouDate ); +- } +- } +- + virtual void Characters(OUString const& rChars) override + { +- if (!m_isIgnore) +- { +- m_rParser.m_ouDate += rChars; +- } ++ m_rValue += rChars; + } + }; + +@@ -1136,29 +1118,32 @@ class XSecParser::DcDescriptionContext + : public XSecParser::Context + { + private: +- OUString m_Value; ++ OUString & m_rValue; + + public: + DcDescriptionContext(XSecParser & rParser, +- std::unique_ptr pOldNamespaceMap) ++ std::unique_ptr pOldNamespaceMap, ++ OUString & rValue) + : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) ++ , m_rValue(rValue) + { + } + +- virtual void EndElement() override +- { +- m_rParser.m_pXSecController->setDescription(m_Value); +- } +- + virtual void Characters(OUString const& rChars) override + { +- m_Value += rChars; ++ m_rValue += rChars; + } + }; + + class XSecParser::DsSignaturePropertyContext + : public XSecParser::Context + { ++ private: ++ enum class SignatureProperty { Unknown, Date, Description }; ++ SignatureProperty m_Property = SignatureProperty::Unknown; ++ OUString m_Id; ++ OUString m_Value; ++ + public: + DsSignaturePropertyContext(XSecParser & rParser, + std::unique_ptr pOldNamespaceMap) +@@ -1169,10 +1154,22 @@ class XSecParser::DsSignaturePropertyContext + virtual void StartElement( + css::uno::Reference const& xAttrs) override + { +- OUString const ouIdAttr(m_rParser.HandleIdAttr(xAttrs)); +- if (!ouIdAttr.isEmpty()) ++ m_Id = m_rParser.HandleIdAttr(xAttrs); ++ } ++ ++ virtual void EndElement() override ++ { ++ switch (m_Property) + { +- m_rParser.m_pXSecController->setPropertyId( ouIdAttr ); ++ case SignatureProperty::Unknown: ++ SAL_INFO("xmlsecurity.helper", "Unknown property in ds:Object ignored"); ++ break; ++ case SignatureProperty::Date: ++ m_rParser.m_pXSecController->setDate(m_Id, m_Value); ++ break; ++ case SignatureProperty::Description: ++ m_rParser.m_pXSecController->setDescription(m_Id, m_Value); ++ break; + } + } + +@@ -1182,11 +1179,13 @@ class XSecParser::DsSignaturePropertyContext + { + if (nNamespace == XML_NAMESPACE_DC && rName == "date") + { +- return std::make_unique(m_rParser, std::move(pOldNamespaceMap)); ++ m_Property = SignatureProperty::Date; ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap), m_Value); + } + if (nNamespace == XML_NAMESPACE_DC && rName == "description") + { +- return std::make_unique(m_rParser, std::move(pOldNamespaceMap)); ++ m_Property = SignatureProperty::Description; ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap), m_Value); + } + return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName); + } +diff --git a/xmlsecurity/source/helper/xsecparser.hxx b/xmlsecurity/source/helper/xsecparser.hxx +index 93efcb766e3e..7a0eb08bca28 100644 +--- a/xmlsecurity/source/helper/xsecparser.hxx ++++ b/xmlsecurity/source/helper/xsecparser.hxx +@@ -97,12 +97,6 @@ private: + class DsSignatureContext; + class DsigSignaturesContext; + +- /* +- * the following members are used to reserve the signature information, +- * including X509IssuerName, X509SerialNumber, and X509Certificate,etc. +- */ +- OUString m_ouDate; +- + std::stack> m_ContextStack; + std::unique_ptr m_pNamespaceMap; + +diff --git a/xmlsecurity/source/helper/xsecsign.cxx b/xmlsecurity/source/helper/xsecsign.cxx +index b9648ed64397..1e1688767f00 100644 +--- a/xmlsecurity/source/helper/xsecsign.cxx ++++ b/xmlsecurity/source/helper/xsecsign.cxx +@@ -128,8 +128,8 @@ css::uno::Reference< css::xml::crypto::sax::XReferenceResolvedListener > XSecCon + if (nStorageFormat != embed::StorageFormats::OFOPXML) + { + internalSignatureInfor.signatureInfor.ouSignatureId = createId(); +- internalSignatureInfor.signatureInfor.ouPropertyId = createId(); +- internalSignatureInfor.addReference(SignatureReferenceType::SAMEDOCUMENT, digestID, internalSignatureInfor.signatureInfor.ouPropertyId, -1, OUString() ); ++ internalSignatureInfor.signatureInfor.ouDateTimePropertyId = createId(); ++ internalSignatureInfor.addReference(SignatureReferenceType::SAMEDOCUMENT, digestID, internalSignatureInfor.signatureInfor.ouDateTimePropertyId, -1, OUString() ); + size++; + + if (bXAdESCompliantIfODF) +diff --git a/xmlsecurity/source/helper/xsecverify.cxx b/xmlsecurity/source/helper/xsecverify.cxx +index c826971b1c7d..cdca811cc2cb 100644 +--- a/xmlsecurity/source/helper/xsecverify.cxx ++++ b/xmlsecurity/source/helper/xsecverify.cxx +@@ -317,7 +317,7 @@ void XSecController::setGpgOwner( OUString const & ouGpgOwner ) + isi.signatureInfor.ouGpgOwner = ouGpgOwner; + } + +-void XSecController::setDate( OUString const & ouDate ) ++void XSecController::setDate(OUString const& rId, OUString const& ouDate) + { + if (m_vInternalSignatureInformations.empty()) + { +@@ -325,17 +325,31 @@ void XSecController::setDate( OUString const & ouDate ) + return; + } + InternalSignatureInformation &isi = m_vInternalSignatureInformations.back(); ++ // there may be multiple timestamps in a signature - check them for consistency ++ if (!isi.signatureInfor.ouDateTime.isEmpty() ++ && isi.signatureInfor.ouDateTime != ouDate) ++ { ++ isi.signatureInfor.hasInconsistentSigningTime = true; ++ } + (void)utl::ISO8601parseDateTime( ouDate, isi.signatureInfor.stDateTime); + isi.signatureInfor.ouDateTime = ouDate; ++ if (!rId.isEmpty()) ++ { ++ isi.signatureInfor.ouDateTimePropertyId = rId; ++ } + } + +-void XSecController::setDescription(const OUString& rDescription) ++void XSecController::setDescription(OUString const& rId, OUString const& rDescription) + { + if (m_vInternalSignatureInformations.empty()) + return; + + InternalSignatureInformation& rInformation = m_vInternalSignatureInformations.back(); + rInformation.signatureInfor.ouDescription = rDescription; ++ if (!rId.isEmpty()) ++ { ++ rInformation.signatureInfor.ouDescriptionPropertyId = rId; ++ } + } + + void XSecController::setSignatureBytes(const uno::Sequence& rBytes) +@@ -429,27 +443,6 @@ void XSecController::setId( OUString const & ouId ) + isi.signatureInfor.ouSignatureId = ouId; + } + +-void XSecController::setPropertyId( OUString const & ouPropertyId ) +-{ +- if (m_vInternalSignatureInformations.empty()) +- { +- SAL_INFO("xmlsecurity.helper","XSecController::setPropertyId: no signature"); +- return; +- } +- InternalSignatureInformation &isi = m_vInternalSignatureInformations.back(); +- +- if (isi.signatureInfor.ouPropertyId.isEmpty()) +- { +- // ID attribute is for the date. +- isi.signatureInfor.ouPropertyId = ouPropertyId; +- } +- else +- { +- // ID attribute is for the description. +- isi.signatureInfor.ouDescriptionPropertyId = ouPropertyId; +- } +-} +- + /* public: for signature verify */ + void XSecController::collectToVerify( const OUString& referenceId ) + { +-- +cgit v1.2.1 + diff --git a/debian/patches/xmlsecurity-ignore-elements-in-ds:Object-that-arent-signed.diff b/debian/patches/xmlsecurity-ignore-elements-in-ds:Object-that-arent-signed.diff new file mode 100644 index 00000000000..5e0a9d7ee00 --- /dev/null +++ b/debian/patches/xmlsecurity-ignore-elements-in-ds:Object-that-arent-signed.diff @@ -0,0 +1,740 @@ +From 94ce59dd02fcfcaa1eb4f195b45a9a2edbd58242 Mon Sep 17 00:00:00 2001 +From: Michael Stahl +Date: Fri, 19 Feb 2021 17:56:21 +0100 +Subject: xmlsecurity: ignore elements in ds:Object that aren't signed +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Change-Id: I2e4411f0907b89e7ad6e0185cee8f12b600515e8 +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111253 +Tested-by: Jenkins +Reviewed-by: Michael Stahl +(cherry picked from commit 2bfa00e6bf4b2a310a8b8f5060acec85b5f7a3ce) +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111909 +Reviewed-by: Caolán McNamara +--- + xmlsecurity/inc/xsecctl.hxx | 1 + + xmlsecurity/source/helper/xsecparser.cxx | 290 +++++++++++++++++++++---------- + xmlsecurity/source/helper/xsecparser.hxx | 1 + + xmlsecurity/source/helper/xsecverify.cxx | 19 ++ + 4 files changed, 221 insertions(+), 90 deletions(-) + +diff --git a/xmlsecurity/inc/xsecctl.hxx b/xmlsecurity/inc/xsecctl.hxx +index 759a660d90ad..ec3669128d24 100644 +--- a/xmlsecurity/inc/xsecctl.hxx ++++ b/xmlsecurity/inc/xsecctl.hxx +@@ -252,6 +252,7 @@ private: + /// Sets algorithm from . + void setSignatureMethod(svl::crypto::SignatureMethodAlgorithm eAlgorithmID); + void switchGpgSignature(); ++ bool haveReferenceForId(OUString const& rId) const; + void addReference( + const OUString& ouUri, + sal_Int32 nDigestID, +diff --git a/xmlsecurity/source/helper/xsecparser.cxx b/xmlsecurity/source/helper/xsecparser.cxx +index 1418b7b43b46..f46277f96ea1 100644 +--- a/xmlsecurity/source/helper/xsecparser.cxx ++++ b/xmlsecurity/source/helper/xsecparser.cxx +@@ -95,6 +95,42 @@ auto XSecParser::Context::CreateChildContext( + return std::make_unique(m_rParser, std::move(pOldNamespaceMap)); + } + ++/** ++note: anything in ds:Object should be trusted *only* if there is a ds:Reference ++ to it so it is signed (exception: the xades:EncapsulatedX509Certificate). ++ ds:SignedInfo precedes all ds:Object. ++ ++ There may be multiple ds:Signature for purpose of counter-signatures ++ but the way XAdES describes these, only the ds:SignatureValue element ++ would be referenced, so requiring a ds:Reference for anything in ++ ds:Object shouldn't cause issues. ++ */ ++class XSecParser::ReferencedContextImpl ++ : public XSecParser::Context ++{ ++ protected: ++ bool m_isReferenced; ++ ++ public: ++ ReferencedContextImpl(XSecParser & rParser, ++ std::unique_ptr pOldNamespaceMap, ++ bool const isReferenced) ++ : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) ++ , m_isReferenced(isReferenced) ++ { ++ } ++ ++ OUString CheckIdAttrReferenced(css::uno::Reference const& xAttrs) ++ { ++ OUString const id(m_rParser.HandleIdAttr(xAttrs)); ++ if (!id.isEmpty() && m_rParser.m_pXSecController->haveReferenceForId(id)) ++ { ++ m_isReferenced = true; ++ } ++ return id; ++ } ++}; ++ + class XSecParser::LoPGPOwnerContext + : public XSecParser::Context + { +@@ -228,21 +264,29 @@ class XSecParser::DsX509CertificateContext + }; + + class XSecParser::DsX509SerialNumberContext +- : public XSecParser::Context ++ : public XSecParser::ReferencedContextImpl + { + private: + OUString m_Value; + + public: + DsX509SerialNumberContext(XSecParser & rParser, +- std::unique_ptr pOldNamespaceMap) +- : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) ++ std::unique_ptr pOldNamespaceMap, ++ bool const isReferenced) ++ : ReferencedContextImpl(rParser, std::move(pOldNamespaceMap), isReferenced) + { + } + + virtual void EndElement() override + { +- m_rParser.m_pXSecController->setX509SerialNumber(m_Value); ++ if (m_isReferenced) ++ { ++ m_rParser.m_pXSecController->setX509SerialNumber(m_Value); ++ } ++ else ++ { ++ SAL_INFO("xmlsecurity.helper", "ignoring unsigned X509SerialNumber"); ++ } + } + + virtual void Characters(OUString const& rChars) override +@@ -252,21 +296,29 @@ class XSecParser::DsX509SerialNumberContext + }; + + class XSecParser::DsX509IssuerNameContext +- : public XSecParser::Context ++ : public XSecParser::ReferencedContextImpl + { + private: + OUString m_Value; + + public: + DsX509IssuerNameContext(XSecParser & rParser, +- std::unique_ptr pOldNamespaceMap) +- : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) ++ std::unique_ptr pOldNamespaceMap, ++ bool const isReferenced) ++ : ReferencedContextImpl(rParser, std::move(pOldNamespaceMap), isReferenced) + { + } + + virtual void EndElement() override + { +- m_rParser.m_pXSecController->setX509IssuerName(m_Value); ++ if (m_isReferenced) ++ { ++ m_rParser.m_pXSecController->setX509IssuerName(m_Value); ++ } ++ else ++ { ++ SAL_INFO("xmlsecurity.helper", "ignoring unsigned X509IssuerName"); ++ } + } + + virtual void Characters(OUString const& rChars) override +@@ -276,12 +328,13 @@ class XSecParser::DsX509IssuerNameContext + }; + + class XSecParser::DsX509IssuerSerialContext +- : public XSecParser::Context ++ : public XSecParser::ReferencedContextImpl + { + public: + DsX509IssuerSerialContext(XSecParser & rParser, +- std::unique_ptr pOldNamespaceMap) +- : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) ++ std::unique_ptr pOldNamespaceMap, ++ bool const isReferenced) ++ : ReferencedContextImpl(rParser, std::move(pOldNamespaceMap), isReferenced) + { + } + +@@ -291,11 +344,11 @@ class XSecParser::DsX509IssuerSerialContext + { + if (nNamespace == XML_NAMESPACE_DS && rName == "X509IssuerName") + { +- return std::make_unique(m_rParser, std::move(pOldNamespaceMap)); ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap), m_isReferenced); + } + if (nNamespace == XML_NAMESPACE_DS && rName == "X509SerialNumber") + { +- return std::make_unique(m_rParser, std::move(pOldNamespaceMap)); ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap), m_isReferenced); + } + // missing: ds:X509SKI, ds:X509SubjectName, ds:X509CRL + return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName); +@@ -318,7 +371,8 @@ class XSecParser::DsX509DataContext + { + if (nNamespace == XML_NAMESPACE_DS && rName == "X509IssuerSerial") + { +- return std::make_unique(m_rParser, std::move(pOldNamespaceMap)); ++ // can't require KeyInfo to be signed so pass in *true* ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap), true); + } + if (nNamespace == XML_NAMESPACE_DS && rName == "X509Certificate") + { +@@ -787,21 +841,29 @@ class XSecParser::XadesUnsignedPropertiesContext + }; + + class XSecParser::LoSignatureLineIdContext +- : public XSecParser::Context ++ : public XSecParser::ReferencedContextImpl + { + private: + OUString m_Value; + + public: + LoSignatureLineIdContext(XSecParser & rParser, +- std::unique_ptr pOldNamespaceMap) +- : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) ++ std::unique_ptr pOldNamespaceMap, ++ bool const isReferenced) ++ : ReferencedContextImpl(rParser, std::move(pOldNamespaceMap), isReferenced) + { + } + + virtual void EndElement() override + { +- m_rParser.m_pXSecController->setSignatureLineId(m_Value); ++ if (m_isReferenced) ++ { ++ m_rParser.m_pXSecController->setSignatureLineId(m_Value); ++ } ++ else ++ { ++ SAL_INFO("xmlsecurity.helper", "ignoring unsigned SignatureLineId"); ++ } + } + + virtual void Characters(OUString const& rChars) override +@@ -811,21 +873,29 @@ class XSecParser::LoSignatureLineIdContext + }; + + class XSecParser::LoSignatureLineValidImageContext +- : public XSecParser::Context ++ : public XSecParser::ReferencedContextImpl + { + private: + OUString m_Value; + + public: + LoSignatureLineValidImageContext(XSecParser & rParser, +- std::unique_ptr pOldNamespaceMap) +- : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) ++ std::unique_ptr pOldNamespaceMap, ++ bool const isReferenced) ++ : ReferencedContextImpl(rParser, std::move(pOldNamespaceMap), isReferenced) + { + } + + virtual void EndElement() override + { +- m_rParser.m_pXSecController->setValidSignatureImage(m_Value); ++ if (m_isReferenced) ++ { ++ m_rParser.m_pXSecController->setValidSignatureImage(m_Value); ++ } ++ else ++ { ++ SAL_INFO("xmlsecurity.helper", "ignoring unsigned SignatureLineValidImage"); ++ } + } + + virtual void Characters(OUString const& rChars) override +@@ -835,21 +905,29 @@ class XSecParser::LoSignatureLineValidImageContext + }; + + class XSecParser::LoSignatureLineInvalidImageContext +- : public XSecParser::Context ++ : public XSecParser::ReferencedContextImpl + { + private: + OUString m_Value; + + public: + LoSignatureLineInvalidImageContext(XSecParser & rParser, +- std::unique_ptr pOldNamespaceMap) +- : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) ++ std::unique_ptr pOldNamespaceMap, ++ bool const isReferenced) ++ : ReferencedContextImpl(rParser, std::move(pOldNamespaceMap), isReferenced) + { + } + + virtual void EndElement() override + { +- m_rParser.m_pXSecController->setInvalidSignatureImage(m_Value); ++ if (m_isReferenced) ++ { ++ m_rParser.m_pXSecController->setInvalidSignatureImage(m_Value); ++ } ++ else ++ { ++ SAL_INFO("xmlsecurity.helper", "ignoring unsigned SignatureLineInvalidImage"); ++ } + } + + virtual void Characters(OUString const& rChars) override +@@ -859,12 +937,13 @@ class XSecParser::LoSignatureLineInvalidImageContext + }; + + class XSecParser::LoSignatureLineContext +- : public XSecParser::Context ++ : public XSecParser::ReferencedContextImpl + { + public: + LoSignatureLineContext(XSecParser & rParser, +- std::unique_ptr pOldNamespaceMap) +- : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) ++ std::unique_ptr pOldNamespaceMap, ++ bool const isReferenced) ++ : ReferencedContextImpl(rParser, std::move(pOldNamespaceMap), isReferenced) + { + } + +@@ -874,22 +953,22 @@ class XSecParser::LoSignatureLineContext + { + if (nNamespace == XML_NAMESPACE_LO_EXT && rName == "SignatureLineId") + { +- return std::make_unique(m_rParser, std::move(pOldNamespaceMap)); ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap), m_isReferenced); + } + if (nNamespace == XML_NAMESPACE_LO_EXT && rName == "SignatureLineValidImage") + { +- return std::make_unique(m_rParser, std::move(pOldNamespaceMap)); ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap), m_isReferenced); + } + if (nNamespace == XML_NAMESPACE_LO_EXT && rName == "SignatureLineInvalidImage") + { +- return std::make_unique(m_rParser, std::move(pOldNamespaceMap)); ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap), m_isReferenced); + } + return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName); + } + }; + + class XSecParser::XadesCertDigestContext +- : public XSecParser::Context ++ : public XSecParser::ReferencedContextImpl + { + private: + OUString m_Value; +@@ -897,14 +976,22 @@ class XSecParser::XadesCertDigestContext + + public: + XadesCertDigestContext(XSecParser & rParser, +- std::unique_ptr pOldNamespaceMap) +- : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) ++ std::unique_ptr pOldNamespaceMap, ++ bool const isReferenced) ++ : ReferencedContextImpl(rParser, std::move(pOldNamespaceMap), isReferenced) + { + } + + virtual void EndElement() override + { +- m_rParser.m_pXSecController->setCertDigest(m_Value/* FIXME , m_nReferenceDigestID*/); ++ if (m_isReferenced) ++ { ++ m_rParser.m_pXSecController->setCertDigest(m_Value/* FIXME , m_nReferenceDigestID*/); ++ } ++ else ++ { ++ SAL_INFO("xmlsecurity.helper", "ignoring unsigned CertDigest"); ++ } + } + + virtual std::unique_ptr CreateChildContext( +@@ -924,12 +1011,13 @@ class XSecParser::XadesCertDigestContext + }; + + class XSecParser::XadesCertContext +- : public XSecParser::Context ++ : public XSecParser::ReferencedContextImpl + { + public: + XadesCertContext(XSecParser & rParser, +- std::unique_ptr pOldNamespaceMap) +- : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) ++ std::unique_ptr pOldNamespaceMap, ++ bool const isReferenced) ++ : ReferencedContextImpl(rParser, std::move(pOldNamespaceMap), isReferenced) + { + } + +@@ -939,23 +1027,24 @@ class XSecParser::XadesCertContext + { + if (nNamespace == XML_NAMESPACE_XADES132 && rName == "CertDigest") + { +- return std::make_unique(m_rParser, std::move(pOldNamespaceMap)); ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap), m_isReferenced); + } + if (nNamespace == XML_NAMESPACE_XADES132 && rName == "IssuerSerial") + { +- return std::make_unique(m_rParser, std::move(pOldNamespaceMap)); ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap), m_isReferenced); + } + return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName); + } + }; + + class XSecParser::XadesSigningCertificateContext +- : public XSecParser::Context ++ : public XSecParser::ReferencedContextImpl + { + public: + XadesSigningCertificateContext(XSecParser & rParser, +- std::unique_ptr pOldNamespaceMap) +- : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) ++ std::unique_ptr pOldNamespaceMap, ++ bool const isReferenced) ++ : ReferencedContextImpl(rParser, std::move(pOldNamespaceMap), isReferenced) + { + } + +@@ -965,28 +1054,36 @@ class XSecParser::XadesSigningCertificateContext + { + if (nNamespace == XML_NAMESPACE_XADES132 && rName == "Cert") + { +- return std::make_unique(m_rParser, std::move(pOldNamespaceMap)); ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap), m_isReferenced); + } + return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName); + } + }; + + class XSecParser::XadesSigningTimeContext +- : public XSecParser::Context ++ : public XSecParser::ReferencedContextImpl + { + private: + OUString m_Value; + + public: + XadesSigningTimeContext(XSecParser & rParser, +- std::unique_ptr pOldNamespaceMap) +- : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) ++ std::unique_ptr pOldNamespaceMap, ++ bool const isReferenced) ++ : ReferencedContextImpl(rParser, std::move(pOldNamespaceMap), isReferenced) + { + } + + virtual void EndElement() override + { +- m_rParser.m_pXSecController->setDate("", m_Value); ++ if (m_isReferenced) ++ { ++ m_rParser.m_pXSecController->setDate("", m_Value); ++ } ++ else ++ { ++ SAL_INFO("xmlsecurity.helper", "ignoring unsigned SigningTime"); ++ } + } + + virtual void Characters(OUString const& rChars) override +@@ -996,19 +1093,20 @@ class XSecParser::XadesSigningTimeContext + }; + + class XSecParser::XadesSignedSignaturePropertiesContext +- : public XSecParser::Context ++ : public XSecParser::ReferencedContextImpl + { + public: + XadesSignedSignaturePropertiesContext(XSecParser & rParser, +- std::unique_ptr pOldNamespaceMap) +- : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) ++ std::unique_ptr pOldNamespaceMap, ++ bool const isReferenced) ++ : ReferencedContextImpl(rParser, std::move(pOldNamespaceMap), isReferenced) + { + } + + virtual void StartElement( + css::uno::Reference const& xAttrs) override + { +- m_rParser.HandleIdAttr(xAttrs); ++ CheckIdAttrReferenced(xAttrs); + } + + virtual std::unique_ptr CreateChildContext( +@@ -1017,15 +1115,15 @@ class XSecParser::XadesSignedSignaturePropertiesContext + { + if (nNamespace == XML_NAMESPACE_XADES132 && rName == "SigningTime") + { +- return std::make_unique(m_rParser, std::move(pOldNamespaceMap)); ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap), m_isReferenced); + } + if (nNamespace == XML_NAMESPACE_XADES132 && rName == "SigningCertificate") + { +- return std::make_unique(m_rParser, std::move(pOldNamespaceMap)); ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap), m_isReferenced); + } + if (nNamespace == XML_NAMESPACE_LO_EXT && rName == "SignatureLine") + { +- return std::make_unique(m_rParser, std::move(pOldNamespaceMap)); ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap), m_isReferenced); + } + // missing: xades:SignaturePolicyIdentifier, xades:SignatureProductionPlace, xades:SignerRole + return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName); +@@ -1033,19 +1131,20 @@ class XSecParser::XadesSignedSignaturePropertiesContext + }; + + class XSecParser::XadesSignedPropertiesContext +- : public XSecParser::Context ++ : public XSecParser::ReferencedContextImpl + { + public: + XadesSignedPropertiesContext(XSecParser & rParser, +- std::unique_ptr pOldNamespaceMap) +- : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) ++ std::unique_ptr pOldNamespaceMap, ++ bool const isReferenced) ++ : ReferencedContextImpl(rParser, std::move(pOldNamespaceMap), isReferenced) + { + } + + virtual void StartElement( + css::uno::Reference const& xAttrs) override + { +- m_rParser.HandleIdAttr(xAttrs); ++ CheckIdAttrReferenced(xAttrs); + } + + virtual std::unique_ptr CreateChildContext( +@@ -1054,7 +1153,7 @@ class XSecParser::XadesSignedPropertiesContext + { + if (nNamespace == XML_NAMESPACE_XADES132 && rName == "SignedSignatureProperties") + { +- return std::make_unique(m_rParser, std::move(pOldNamespaceMap)); ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap), m_isReferenced); + } + // missing: xades:SignedDataObjectProperties + return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName); +@@ -1062,19 +1161,20 @@ class XSecParser::XadesSignedPropertiesContext + }; + + class XSecParser::XadesQualifyingPropertiesContext +- : public XSecParser::Context ++ : public XSecParser::ReferencedContextImpl + { + public: + XadesQualifyingPropertiesContext(XSecParser & rParser, +- std::unique_ptr pOldNamespaceMap) +- : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) ++ std::unique_ptr pOldNamespaceMap, ++ bool const isReferenced) ++ : ReferencedContextImpl(rParser, std::move(pOldNamespaceMap), isReferenced) + { + } + + virtual void StartElement( + css::uno::Reference const& xAttrs) override + { +- m_rParser.HandleIdAttr(xAttrs); ++ CheckIdAttrReferenced(xAttrs); + } + + virtual std::unique_ptr CreateChildContext( +@@ -1083,7 +1183,7 @@ class XSecParser::XadesQualifyingPropertiesContext + { + if (nNamespace == XML_NAMESPACE_XADES132 && rName == "SignedProperties") + { +- return std::make_unique(m_rParser, std::move(pOldNamespaceMap)); ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap), m_isReferenced); + } + if (nNamespace == XML_NAMESPACE_XADES132 && rName == "UnsignedProperties") + { +@@ -1136,7 +1236,7 @@ class XSecParser::DcDescriptionContext + }; + + class XSecParser::DsSignaturePropertyContext +- : public XSecParser::Context ++ : public XSecParser::ReferencedContextImpl + { + private: + enum class SignatureProperty { Unknown, Date, Description }; +@@ -1146,30 +1246,38 @@ class XSecParser::DsSignaturePropertyContext + + public: + DsSignaturePropertyContext(XSecParser & rParser, +- std::unique_ptr pOldNamespaceMap) +- : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) ++ std::unique_ptr pOldNamespaceMap, ++ bool const isReferenced) ++ : ReferencedContextImpl(rParser, std::move(pOldNamespaceMap), isReferenced) + { + } + + virtual void StartElement( + css::uno::Reference const& xAttrs) override + { +- m_Id = m_rParser.HandleIdAttr(xAttrs); ++ m_Id = CheckIdAttrReferenced(xAttrs); + } + + virtual void EndElement() override + { +- switch (m_Property) ++ if (m_isReferenced) ++ { ++ switch (m_Property) ++ { ++ case SignatureProperty::Unknown: ++ SAL_INFO("xmlsecurity.helper", "Unknown property in ds:Object ignored"); ++ break; ++ case SignatureProperty::Date: ++ m_rParser.m_pXSecController->setDate(m_Id, m_Value); ++ break; ++ case SignatureProperty::Description: ++ m_rParser.m_pXSecController->setDescription(m_Id, m_Value); ++ break; ++ } ++ } ++ else + { +- case SignatureProperty::Unknown: +- SAL_INFO("xmlsecurity.helper", "Unknown property in ds:Object ignored"); +- break; +- case SignatureProperty::Date: +- m_rParser.m_pXSecController->setDate(m_Id, m_Value); +- break; +- case SignatureProperty::Description: +- m_rParser.m_pXSecController->setDescription(m_Id, m_Value); +- break; ++ SAL_INFO("xmlsecurity.helper", "ignoring unsigned SignatureProperty"); + } + } + +@@ -1192,19 +1300,20 @@ class XSecParser::DsSignaturePropertyContext + }; + + class XSecParser::DsSignaturePropertiesContext +- : public XSecParser::Context ++ : public XSecParser::ReferencedContextImpl + { + public: + DsSignaturePropertiesContext(XSecParser & rParser, +- std::unique_ptr pOldNamespaceMap) +- : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) ++ std::unique_ptr pOldNamespaceMap, ++ bool const isReferenced) ++ : ReferencedContextImpl(rParser, std::move(pOldNamespaceMap), isReferenced) + { + } + + virtual void StartElement( + css::uno::Reference const& xAttrs) override + { +- m_rParser.HandleIdAttr(xAttrs); ++ CheckIdAttrReferenced(xAttrs); + } + + virtual std::unique_ptr CreateChildContext( +@@ -1213,26 +1322,27 @@ class XSecParser::DsSignaturePropertiesContext + { + if (nNamespace == XML_NAMESPACE_DS && rName == "SignatureProperty") + { +- return std::make_unique(m_rParser, std::move(pOldNamespaceMap)); ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap), m_isReferenced); + } + return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName); + } + }; + + class XSecParser::DsObjectContext +- : public XSecParser::Context ++ : public XSecParser::ReferencedContextImpl + { + public: + DsObjectContext(XSecParser & rParser, + std::unique_ptr pOldNamespaceMap) +- : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) ++ // init with "false" here - the Signature element can't be referenced by its child ++ : XSecParser::ReferencedContextImpl(rParser, std::move(pOldNamespaceMap), false) + { + } + + virtual void StartElement( + css::uno::Reference const& xAttrs) override + { +- m_rParser.HandleIdAttr(xAttrs); ++ CheckIdAttrReferenced(xAttrs); + } + + virtual std::unique_ptr CreateChildContext( +@@ -1241,11 +1351,11 @@ class XSecParser::DsObjectContext + { + if (nNamespace == XML_NAMESPACE_DS && rName == "SignatureProperties") + { +- return std::make_unique(m_rParser, std::move(pOldNamespaceMap)); ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap), m_isReferenced); + } + if (nNamespace == XML_NAMESPACE_XADES132 && rName == "QualifyingProperties") + { +- return std::make_unique(m_rParser, std::move(pOldNamespaceMap)); ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap), m_isReferenced); + } + // missing: ds:Manifest + return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName); +diff --git a/xmlsecurity/source/helper/xsecparser.hxx b/xmlsecurity/source/helper/xsecparser.hxx +index 7a0eb08bca28..7674bf28b84d 100644 +--- a/xmlsecurity/source/helper/xsecparser.hxx ++++ b/xmlsecurity/source/helper/xsecparser.hxx +@@ -56,6 +56,7 @@ public: + class Context; + private: + class UnknownContext; ++ class ReferencedContextImpl; + class LoPGPOwnerContext; + class DsPGPKeyPacketContext; + class DsPGPKeyIDContext; +diff --git a/xmlsecurity/source/helper/xsecverify.cxx b/xmlsecurity/source/helper/xsecverify.cxx +index cdca811cc2cb..92ebfb6c72e8 100644 +--- a/xmlsecurity/source/helper/xsecverify.cxx ++++ b/xmlsecurity/source/helper/xsecverify.cxx +@@ -143,6 +143,25 @@ void XSecController::switchGpgSignature() + #endif + } + ++bool XSecController::haveReferenceForId(OUString const& rId) const ++{ ++ if (m_vInternalSignatureInformations.empty()) ++ { ++ SAL_INFO("xmlsecurity.helper","XSecController::haveReferenceForId: no signature"); ++ return false; ++ } ++ InternalSignatureInformation const& rIsi(m_vInternalSignatureInformations.back()); ++ for (SignatureReferenceInformation const& rSri : rIsi.signatureInfor.vSignatureReferenceInfors) ++ { ++ if (rSri.nType == SignatureReferenceType::SAMEDOCUMENT ++ && rSri.ouURI == rId) // ouUri has # stripped ++ { ++ return true; ++ } ++ } ++ return false; ++} ++ + void XSecController::addReference( const OUString& ouUri, sal_Int32 nDigestID, const OUString& ouType ) + { + if (m_vInternalSignatureInformations.empty()) +-- +cgit v1.2.1 + diff --git a/debian/patches/xmlsecurity-improve-handling-of-multiple-X509Data-elements.diff b/debian/patches/xmlsecurity-improve-handling-of-multiple-X509Data-elements.diff new file mode 100644 index 00000000000..988574269a9 --- /dev/null +++ b/debian/patches/xmlsecurity-improve-handling-of-multiple-X509Data-elements.diff @@ -0,0 +1,1597 @@ +From a1cf770c2d7ca3e153e0b1f01ddcc313bc2bed7f Mon Sep 17 00:00:00 2001 +From: Michael Stahl +Date: Thu, 25 Feb 2021 14:17:48 +0100 +Subject: xmlsecurity: improve handling of multiple X509Data elements +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Combine everything related to a certificate in a new struct X509Data. + +The CertDigest is not actually written in the X509Data element but in +xades:Cert, so try to find the matching entry in +XSecController::setX509CertDigest(). + +There was a confusing interaction with PGP signatures, where ouGpgKeyID +was used for import, but export wrote the value from ouCertDigest +instead - this needed fixing. + +The main point of this is enforcing a constraint from xmldsig-core 4.5.4: + + All certificates appearing in an X509Data element MUST relate to the + validation key by either containing it or being part of a certification + chain that terminates in a certificate containing the validation key. + +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111254 +Tested-by: Jenkins +Reviewed-by: Michael Stahl +(cherry picked from commit 9e82509b09f5fe2eb77bcdb8fd193c71923abb67) + +xmlsecurity: improve handling of multiple certificates per X509Data + +It turns out that an X509Data element can contain an arbitrary number of +each of its child elements. + +How exactly certificates of an issuer chain may or should be distributed +across multiple X509Data elements isn't terribly obvious. + +One thing that is clear is that any element that refers to or contains +one particular certificate has to be a child of the same X509Data +element, although in no particular order, so try to match the 2 such +elements that the parser supports in XSecController::setX509Data(). + +Presumably the only way it makes sense to have multiple signing +certificates is if they all contain the same key but are signed by +different CAs. This case isn't handled currently; CheckX509Data() will +complain there's not a single chain and validation of the certificates +will fail. + +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111500 +Tested-by: Jenkins +Reviewed-by: Michael Stahl +(cherry picked from commit 5af5ea893bcb8a8eb472ac11133da10e5a604e66) + +xmlsecurity: add EqualDistinguishedNames() + +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111545 +Tested-by: Jenkins +Reviewed-by: Michael Stahl +(cherry picked from commit 1d3da3486d827dd5e7a3bf1c7a533f5aa9860e42) + +xmlsecurity: avoid exception in DigitalSignaturesDialog::getCertificate() + +Fallback to PGP if there's no X509 signing certificate because +CheckX509Data() failed prevents the dialog from popping up. + +To avoid confusing the user in this situation, the dialog should +show no certificate, which is already the case. + +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111664 +Tested-by: Jenkins +Reviewed-by: Michael Stahl +(cherry picked from commit 90b725675c2964f4a151d802d9afedd8bc2ae1a7) + +xmlsecurity: fix crash in DocumentDigitalSignatures::isAuthorTrusted() + +If the argument is null. + +This function also should use EqualDistinguishedNames(). + +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111667 +Tested-by: Jenkins +Reviewed-by: Michael Stahl +(cherry picked from commit ca98e505cd69bf95d8ddb9387cf3f8e03ae4577d) + +Change-Id: I9633a980b0c18d58dfce24fc59396a833498a77d +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111910 +Tested-by: Jenkins +Reviewed-by: Caolán McNamara +--- + include/svl/sigstruct.hxx | 32 +++- + svl/source/crypto/cryptosign.cxx | 16 +- + sw/source/core/edit/edfcol.cxx | 3 +- + xmlsecurity/inc/biginteger.hxx | 3 + + xmlsecurity/inc/xmlsignaturehelper.hxx | 12 ++ + xmlsecurity/inc/xsecctl.hxx | 14 +- + .../source/component/documentdigitalsignatures.cxx | 54 ++++--- + .../source/dialogs/digitalsignaturesdialog.cxx | 15 +- + .../source/helper/documentsignaturehelper.cxx | 63 +++++--- + .../source/helper/documentsignaturemanager.cxx | 12 ++ + xmlsecurity/source/helper/ooxmlsecexporter.cxx | 22 ++- + xmlsecurity/source/helper/ooxmlsecparser.cxx | 22 ++- + xmlsecurity/source/helper/pdfsignaturehelper.cxx | 8 +- + xmlsecurity/source/helper/xmlsignaturehelper.cxx | 161 +++++++++++++++++++++ + xmlsecurity/source/helper/xsecctl.cxx | 80 ++++++---- + xmlsecurity/source/helper/xsecparser.cxx | 144 +++++++++--------- + xmlsecurity/source/helper/xsecsign.cxx | 30 ++-- + xmlsecurity/source/helper/xsecverify.cxx | 124 +++++++++++++--- + .../xmlsec/mscrypt/x509certificate_mscryptimpl.cxx | 47 ++++++ + .../xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx | 2 + + .../source/xmlsec/nss/x509certificate_nssimpl.cxx | 25 ++++ + .../source/xmlsec/nss/xmlsignature_nssimpl.cxx | 3 + + 22 files changed, 678 insertions(+), 214 deletions(-) + +diff --git a/include/svl/sigstruct.hxx b/include/svl/sigstruct.hxx +index d62ecb09634c..6d53e048d47b 100644 +--- a/include/svl/sigstruct.hxx ++++ b/include/svl/sigstruct.hxx +@@ -89,9 +89,30 @@ struct SignatureInformation + sal_Int32 nSecurityId; + css::xml::crypto::SecurityOperationStatus nStatus; + SignatureReferenceInformations vSignatureReferenceInfors; +- OUString ouX509IssuerName; +- OUString ouX509SerialNumber; +- OUString ouX509Certificate; ++ struct X509CertInfo ++ { ++ OUString X509IssuerName; ++ OUString X509SerialNumber; ++ OUString X509Certificate; ++ /// OOXML certificate SHA-256 digest, empty for ODF except when doing XAdES signature. ++ OUString CertDigest; ++ /// The certificate owner (aka subject). ++ OUString X509Subject; ++ }; ++ typedef std::vector X509Data; ++ // note: at parse time, it's unkown which one is the signing certificate; ++ // ImplVerifySignatures() figures it out and puts it at the back ++ std::vector X509Datas; ++ ++ X509CertInfo const* GetSigningCertificate() const ++ { ++ if (X509Datas.empty()) ++ { ++ return nullptr; ++ } ++ assert(!X509Datas.back().empty()); ++ return & X509Datas.back().back(); ++ } + + OUString ouGpgKeyID; + OUString ouGpgCertificate; +@@ -124,8 +145,6 @@ struct SignatureInformation + OUString ouDescription; + /// The Id attribute of the element that contains the . + OUString ouDescriptionPropertyId; +- /// OOXML certificate SHA-256 digest, empty for ODF except when doing XAdES signature. +- OUString ouCertDigest; + /// Valid and invalid signature line images + css::uno::Reference aValidSignatureImage; + css::uno::Reference aInvalidSignatureImage; +@@ -140,9 +159,6 @@ struct SignatureInformation + /// For PDF: the byte range doesn't cover the whole document. + bool bPartialDocumentSignature; + +- /// The certificate owner (aka subject). +- OUString ouSubject; +- + svl::crypto::SignatureMethodAlgorithm eAlgorithmID; + + SignatureInformation( sal_Int32 nId ) +diff --git a/svl/source/crypto/cryptosign.cxx b/svl/source/crypto/cryptosign.cxx +index 573c06ba5826..a015f00576a4 100644 +--- a/svl/source/crypto/cryptosign.cxx ++++ b/svl/source/crypto/cryptosign.cxx +@@ -2094,8 +2094,12 @@ bool Signing::Verify(const std::vector& aData, + aDerCert[i] = pCertificate->derCert.data[i]; + OUStringBuffer aBuffer; + comphelper::Base64::encode(aBuffer, aDerCert); +- rInformation.ouX509Certificate = aBuffer.makeStringAndClear(); +- rInformation.ouSubject = OUString(pCertificate->subjectName, PL_strlen(pCertificate->subjectName), RTL_TEXTENCODING_UTF8); ++ SignatureInformation::X509Data temp; ++ temp.emplace_back(); ++ temp.back().X509Certificate = aBuffer.makeStringAndClear(); ++ temp.back().X509Subject = OUString(pCertificate->subjectName, PL_strlen(pCertificate->subjectName), RTL_TEXTENCODING_UTF8); ++ rInformation.X509Datas.clear(); ++ rInformation.X509Datas.emplace_back(temp); + } + + PRTime nSigningTime; +@@ -2274,8 +2278,12 @@ bool Signing::Verify(const std::vector& aData, + aDerCert[i] = pSignerCertContext->pbCertEncoded[i]; + OUStringBuffer aBuffer; + comphelper::Base64::encode(aBuffer, aDerCert); +- rInformation.ouX509Certificate = aBuffer.makeStringAndClear(); +- rInformation.ouSubject = GetSubjectName(pSignerCertContext); ++ SignatureInformation::X509Data temp; ++ temp.emplace_back(); ++ temp.back().X509Certificate = aBuffer.makeStringAndClear(); ++ temp.back().X509Subject = GetSubjectName(pSignerCertContext); ++ rInformation.X509Datas.clear(); ++ rInformation.X509Datas.emplace_back(temp); + } + + if (bNonDetached) +diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx +index d0154b4886ef..b2299ec42213 100644 +--- a/sw/source/core/edit/edfcol.cxx ++++ b/sw/source/core/edit/edfcol.cxx +@@ -402,7 +402,8 @@ std::pair lcl_MakeParagraphSignatureFieldText(const SignatureDes + valid = valid + && aInfo.nStatus == xml::crypto::SecurityOperationStatus_OPERATION_SUCCEEDED; + +- msg = SwResId(STR_SIGNED_BY) + ": " + aInfo.ouSubject + ", " + ++ assert(aInfo.GetSigningCertificate()); // it was valid ++ msg = SwResId(STR_SIGNED_BY) + ": " + aInfo.GetSigningCertificate()->X509Subject + ", " + + aDescr.msDate; + msg += (!aDescr.msUsage.isEmpty() ? (" (" + aDescr.msUsage + "): ") : OUString(": ")); + msg += (valid ? SwResId(STR_VALID) : SwResId(STR_INVALID)); +diff --git a/xmlsecurity/inc/biginteger.hxx b/xmlsecurity/inc/biginteger.hxx +index d07ecf45d8af..8b4d8a9143b5 100644 +--- a/xmlsecurity/inc/biginteger.hxx ++++ b/xmlsecurity/inc/biginteger.hxx +@@ -31,6 +31,9 @@ namespace xmlsecurity + { + XSECXMLSEC_DLLPUBLIC OUString bigIntegerToNumericString( const css::uno::Sequence< sal_Int8 >& serial ); + XSECXMLSEC_DLLPUBLIC css::uno::Sequence< sal_Int8 > numericStringToBigInteger ( const OUString& serialNumber ); ++ ++XSECXMLSEC_DLLPUBLIC bool EqualDistinguishedNames(OUString const& rName1, ++ OUString const& rName2); + } + + #endif +diff --git a/xmlsecurity/inc/xmlsignaturehelper.hxx b/xmlsecurity/inc/xmlsignaturehelper.hxx +index 2437686ea31b..a12309ef4d0a 100644 +--- a/xmlsecurity/inc/xmlsignaturehelper.hxx ++++ b/xmlsecurity/inc/xmlsignaturehelper.hxx +@@ -28,6 +28,9 @@ + #include "xmlsignaturehelper.hxx" + #include "xsecctl.hxx" + ++#include ++#include ++ + class DateTime; + class UriBindingHelper; + +@@ -93,6 +96,15 @@ public: + // After signing/verifying, get information about signatures + SignatureInformation GetSignatureInformation( sal_Int32 nSecurityId ) const; + SignatureInformations GetSignatureInformations() const; ++ /// ImplVerifySignature calls this to figure out which X509Data is the ++ /// signing certificate and update the internal state with the result. ++ /// @return ++ /// A sequence with the signing certificate at the back on success. ++ /// An empty sequence on failure. ++ std::vector> ++ CheckAndUpdateSignatureInformation( ++ css::uno::Reference const& xSecEnv, ++ SignatureInformation const& rInfo); + + // See XSecController for documentation + void StartMission(const css::uno::Reference& xSecurityContext); +diff --git a/xmlsecurity/inc/xsecctl.hxx b/xmlsecurity/inc/xsecctl.hxx +index ec3669128d24..ca6c169798c2 100644 +--- a/xmlsecurity/inc/xsecctl.hxx ++++ b/xmlsecurity/inc/xsecctl.hxx +@@ -263,9 +263,13 @@ private: + sal_Int32 nDigestID ); + void setReferenceCount() const; + +- void setX509IssuerName( OUString const & ouX509IssuerName ); +- void setX509SerialNumber( OUString const & ouX509SerialNumber ); +- void setX509Certificate( OUString const & ouX509Certificate ); ++ void setX509Data( ++ std::vector> & rX509IssuerSerials, ++ std::vector const& rX509Certificates); ++ void setX509CertDigest( ++ OUString const& rCertDigest, sal_Int32 const nReferenceDigestID, ++ OUString const& rX509IssuerName, OUString const& rX509SerialNumber); ++ + void setSignatureValue( OUString const & ouSignatureValue ); + void setDigestValue( sal_Int32 nDigestID, OUString const & ouDigestValue ); + void setGpgKeyID( OUString const & ouKeyID ); +@@ -274,7 +278,6 @@ private: + + void setDate(OUString const& rId, OUString const& ouDate); + void setDescription(OUString const& rId, OUString const& rDescription); +- void setCertDigest(const OUString& rCertDigest); + void setValidSignatureImage(const OUString& rValidSigImg); + void setInvalidSignatureImage(const OUString& rInvalidSigImg); + void setSignatureLineId(const OUString& rSignatureLineId); +@@ -303,6 +306,9 @@ public: + + SignatureInformation getSignatureInformation( sal_Int32 nSecurityId ) const; + SignatureInformations getSignatureInformations() const; ++ /// only verify can figure out which X509Data is the signing certificate ++ void UpdateSignatureInformation(sal_Int32 nSecurityId, ++ std::vector const& rDatas); + + static void exportSignature( + const css::uno::Reference< css::xml::sax::XDocumentHandler >& xDocumentHandler, +diff --git a/xmlsecurity/source/component/documentdigitalsignatures.cxx b/xmlsecurity/source/component/documentdigitalsignatures.cxx +index d149bf5e30b2..8f1fe7c2785d 100644 +--- a/xmlsecurity/source/component/documentdigitalsignatures.cxx ++++ b/xmlsecurity/source/component/documentdigitalsignatures.cxx +@@ -529,30 +529,36 @@ DocumentDigitalSignatures::ImplVerifySignatures( + const SignatureInformation& rInfo = aSignInfos[n]; + css::security::DocumentSignatureInformation& rSigInfo = arInfos[n]; + +- if (rInfo.ouGpgCertificate.isEmpty()) // X.509 ++ if (!rInfo.X509Datas.empty()) // X.509 + { +- if (!rInfo.ouX509Certificate.isEmpty()) +- rSigInfo.Signer = xSecEnv->createCertificateFromAscii(rInfo.ouX509Certificate); +- if (!rSigInfo.Signer.is()) +- rSigInfo.Signer = xSecEnv->getCertificate( +- rInfo.ouX509IssuerName, +- xmlsecurity::numericStringToBigInteger(rInfo.ouX509SerialNumber)); +- +- // On Windows checking the certificate path is buggy. It does name matching (issuer, subject name) +- // to find the parent certificate. It does not take into account that there can be several certificates +- // with the same subject name. +- try ++ std::vector> certs( ++ rSignatureHelper.CheckAndUpdateSignatureInformation( ++ xSecEnv, rInfo)); ++ if (certs.empty()) + { +- rSigInfo.CertificateStatus = xSecEnv->verifyCertificate( +- rSigInfo.Signer, Sequence>()); ++ rSigInfo.CertificateStatus = css::security::CertificateValidity::INVALID; + } +- catch (SecurityException&) ++ else + { +- OSL_FAIL("Verification of certificate failed"); +- rSigInfo.CertificateStatus = css::security::CertificateValidity::INVALID; ++ rSigInfo.Signer = certs.back(); ++ // get only intermediates ++ certs.pop_back(); ++ // On Windows checking the certificate path is buggy. It does name matching (issuer, subject name) ++ // to find the parent certificate. It does not take into account that there can be several certificates ++ // with the same subject name. ++ try ++ { ++ rSigInfo.CertificateStatus = xSecEnv->verifyCertificate( ++ rSigInfo.Signer, comphelper::containerToSequence(certs)); ++ } ++ catch (SecurityException&) ++ { ++ SAL_WARN("xmlsecurity.comp", "Verification of certificate failed"); ++ rSigInfo.CertificateStatus = css::security::CertificateValidity::INVALID; ++ } + } + } +- else if (xGpgSecEnv.is()) // GPG ++ else if (!rInfo.ouGpgCertificate.isEmpty() && xGpgSecEnv.is()) // GPG + { + // TODO not ideal to retrieve cert by keyID, might + // collide, or PGPKeyID format might change - can't we +@@ -638,15 +644,19 @@ void DocumentDigitalSignatures::showCertificate( + } + + sal_Bool DocumentDigitalSignatures::isAuthorTrusted( +- const Reference< css::security::XCertificate >& Author ) ++ const Reference& xAuthor) + { +- OUString sSerialNum = xmlsecurity::bigIntegerToNumericString( Author->getSerialNumber() ); ++ if (!xAuthor.is()) ++ { ++ return false; ++ } ++ OUString sSerialNum = xmlsecurity::bigIntegerToNumericString(xAuthor->getSerialNumber()); + + Sequence< SvtSecurityOptions::Certificate > aTrustedAuthors = SvtSecurityOptions().GetTrustedAuthors(); + + return std::any_of(aTrustedAuthors.begin(), aTrustedAuthors.end(), +- [&Author, &sSerialNum](const SvtSecurityOptions::Certificate& rAuthor) { +- return ( rAuthor[0] == Author->getIssuerName() ) ++ [&xAuthor, &sSerialNum](const SvtSecurityOptions::Certificate& rAuthor) { ++ return xmlsecurity::EqualDistinguishedNames(rAuthor[0], xAuthor->getIssuerName()) + && ( rAuthor[1] == sSerialNum ); + }); + } +diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx +index ef67c7167c04..18ccaf2d2166 100644 +--- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx ++++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx +@@ -588,7 +588,7 @@ void DigitalSignaturesDialog::ImplFillSignaturesBox() + if (!rInfo.ouGpgCertificate.isEmpty()) + aType = "OpenPGP"; + // XML based: XAdES or not. +- else if (!rInfo.ouCertDigest.isEmpty()) ++ else if (rInfo.GetSigningCertificate() && !rInfo.GetSigningCertificate()->CertDigest.isEmpty()) + aType = "XAdES"; + else + aType = "XML-DSig"; +@@ -700,8 +700,8 @@ uno::Reference DigitalSignaturesDialog::getCertificate(c + uno::Reference xCert; + + //First we try to get the certificate which is embedded in the XML Signature +- if (xSecEnv.is() && !rInfo.ouX509Certificate.isEmpty()) +- xCert = xSecEnv->createCertificateFromAscii(rInfo.ouX509Certificate); ++ if (xSecEnv.is() && rInfo.GetSigningCertificate() && !rInfo.GetSigningCertificate()->X509Certificate.isEmpty()) ++ xCert = xSecEnv->createCertificateFromAscii(rInfo.GetSigningCertificate()->X509Certificate); + else { + //There must be an embedded certificate because we use it to get the + //issuer name. We cannot use /Signature/KeyInfo/X509Data/X509IssuerName +@@ -713,9 +713,12 @@ uno::Reference DigitalSignaturesDialog::getCertificate(c + } + + //In case there is no embedded certificate we try to get it from a local store +- if (!xCert.is() && xSecEnv.is()) +- xCert = xSecEnv->getCertificate( rInfo.ouX509IssuerName, xmlsecurity::numericStringToBigInteger( rInfo.ouX509SerialNumber ) ); +- if (!xCert.is() && xGpgSecEnv.is()) ++ if (!xCert.is() && xSecEnv.is() && rInfo.GetSigningCertificate()) ++ { ++ xCert = xSecEnv->getCertificate(rInfo.GetSigningCertificate()->X509IssuerName, ++ xmlsecurity::numericStringToBigInteger(rInfo.GetSigningCertificate()->X509SerialNumber)); ++ } ++ if (!xCert.is() && xGpgSecEnv.is() && !rInfo.ouGpgKeyID.isEmpty()) + xCert = xGpgSecEnv->getCertificate( rInfo.ouGpgKeyID, xmlsecurity::numericStringToBigInteger("") ); + + SAL_WARN_IF( !xCert.is(), "xmlsecurity.dialogs", "Certificate not found and can't be created!" ); +diff --git a/xmlsecurity/source/helper/documentsignaturehelper.cxx b/xmlsecurity/source/helper/documentsignaturehelper.cxx +index 482ae6cc4126..ddff308ee52f 100644 +--- a/xmlsecurity/source/helper/documentsignaturehelper.cxx ++++ b/xmlsecurity/source/helper/documentsignaturehelper.cxx +@@ -492,6 +492,29 @@ void DocumentSignatureHelper::writeDigestMethod( + xDocumentHandler->endElement("DigestMethod"); + } + ++static void WriteXadesCert( ++ uno::Reference const& xDocumentHandler, ++ SignatureInformation::X509CertInfo const& rCertInfo) ++{ ++ xDocumentHandler->startElement("xd:Cert", uno::Reference(new SvXMLAttributeList())); ++ xDocumentHandler->startElement("xd:CertDigest", uno::Reference(new SvXMLAttributeList())); ++ DocumentSignatureHelper::writeDigestMethod(xDocumentHandler); ++ xDocumentHandler->startElement("DigestValue", uno::Reference(new SvXMLAttributeList())); ++ assert(!rCertInfo.CertDigest.isEmpty()); ++ xDocumentHandler->characters(rCertInfo.CertDigest); ++ xDocumentHandler->endElement("DigestValue"); ++ xDocumentHandler->endElement("xd:CertDigest"); ++ xDocumentHandler->startElement("xd:IssuerSerial", uno::Reference(new SvXMLAttributeList())); ++ xDocumentHandler->startElement("X509IssuerName", uno::Reference(new SvXMLAttributeList())); ++ xDocumentHandler->characters(rCertInfo.X509IssuerName); ++ xDocumentHandler->endElement("X509IssuerName"); ++ xDocumentHandler->startElement("X509SerialNumber", uno::Reference(new SvXMLAttributeList())); ++ xDocumentHandler->characters(rCertInfo.X509SerialNumber); ++ xDocumentHandler->endElement("X509SerialNumber"); ++ xDocumentHandler->endElement("xd:IssuerSerial"); ++ xDocumentHandler->endElement("xd:Cert"); ++} ++ + void DocumentSignatureHelper::writeSignedProperties( + const uno::Reference& xDocumentHandler, + const SignatureInformation& signatureInfo, +@@ -508,26 +531,26 @@ void DocumentSignatureHelper::writeSignedProperties( + xDocumentHandler->characters(sDate); + xDocumentHandler->endElement("xd:SigningTime"); + xDocumentHandler->startElement("xd:SigningCertificate", uno::Reference(new SvXMLAttributeList())); +- xDocumentHandler->startElement("xd:Cert", uno::Reference(new SvXMLAttributeList())); +- xDocumentHandler->startElement("xd:CertDigest", uno::Reference(new SvXMLAttributeList())); +- writeDigestMethod(xDocumentHandler); +- +- xDocumentHandler->startElement("DigestValue", uno::Reference(new SvXMLAttributeList())); +- // TODO: this is empty for gpg signatures currently +- //assert(!signatureInfo.ouCertDigest.isEmpty()); +- xDocumentHandler->characters(signatureInfo.ouCertDigest); +- xDocumentHandler->endElement("DigestValue"); +- +- xDocumentHandler->endElement("xd:CertDigest"); +- xDocumentHandler->startElement("xd:IssuerSerial", uno::Reference(new SvXMLAttributeList())); +- xDocumentHandler->startElement("X509IssuerName", uno::Reference(new SvXMLAttributeList())); +- xDocumentHandler->characters(signatureInfo.ouX509IssuerName); +- xDocumentHandler->endElement("X509IssuerName"); +- xDocumentHandler->startElement("X509SerialNumber", uno::Reference(new SvXMLAttributeList())); +- xDocumentHandler->characters(signatureInfo.ouX509SerialNumber); +- xDocumentHandler->endElement("X509SerialNumber"); +- xDocumentHandler->endElement("xd:IssuerSerial"); +- xDocumentHandler->endElement("xd:Cert"); ++ assert(signatureInfo.GetSigningCertificate() || !signatureInfo.ouGpgKeyID.isEmpty()); ++ if (signatureInfo.GetSigningCertificate()) ++ { ++ // how should this deal with multiple X509Data elements? ++ // for now, let's write all of the certificates ... ++ for (auto const& rData : signatureInfo.X509Datas) ++ { ++ for (auto const& it : rData) ++ { ++ WriteXadesCert(xDocumentHandler, it); ++ } ++ } ++ } ++ else ++ { ++ // for PGP, write empty mandatory X509IssuerName, X509SerialNumber ++ SignatureInformation::X509CertInfo temp; ++ temp.CertDigest = signatureInfo.ouGpgKeyID; ++ WriteXadesCert(xDocumentHandler, temp); ++ } + xDocumentHandler->endElement("xd:SigningCertificate"); + xDocumentHandler->startElement("xd:SignaturePolicyIdentifier", uno::Reference(new SvXMLAttributeList())); + xDocumentHandler->startElement("xd:SignaturePolicyImplied", uno::Reference(new SvXMLAttributeList())); +diff --git a/xmlsecurity/source/helper/documentsignaturemanager.cxx b/xmlsecurity/source/helper/documentsignaturemanager.cxx +index 79d2cdf26b61..7252c54e74ab 100644 +--- a/xmlsecurity/source/helper/documentsignaturemanager.cxx ++++ b/xmlsecurity/source/helper/documentsignaturemanager.cxx +@@ -586,6 +586,18 @@ void DocumentSignatureManager::read(bool bUseTempStream, bool bCacheLastSignatur + bCacheLastSignature); + maSignatureHelper.EndMission(); + ++ // this parses the XML independently from ImplVerifySignatures() - check ++ // certificates here too ... ++ for (auto const& it : maSignatureHelper.GetSignatureInformations()) ++ { ++ if (!it.X509Datas.empty()) ++ { ++ uno::Reference const xSecEnv( ++ getSecurityEnvironment()); ++ getSignatureHelper().CheckAndUpdateSignatureInformation(xSecEnv, it); ++ } ++ } ++ + maCurrentSignatureInformations = maSignatureHelper.GetSignatureInformations(); + } + else +diff --git a/xmlsecurity/source/helper/ooxmlsecexporter.cxx b/xmlsecurity/source/helper/ooxmlsecexporter.cxx +index fe4d0df89a5d..d2c29041338f 100644 +--- a/xmlsecurity/source/helper/ooxmlsecexporter.cxx ++++ b/xmlsecurity/source/helper/ooxmlsecexporter.cxx +@@ -200,13 +200,21 @@ void OOXMLSecExporter::Impl::writeKeyInfo() + { + m_xDocumentHandler->startElement( + "KeyInfo", uno::Reference(new SvXMLAttributeList())); +- m_xDocumentHandler->startElement( +- "X509Data", uno::Reference(new SvXMLAttributeList())); +- m_xDocumentHandler->startElement( +- "X509Certificate", uno::Reference(new SvXMLAttributeList())); +- m_xDocumentHandler->characters(m_rInformation.ouX509Certificate); +- m_xDocumentHandler->endElement("X509Certificate"); +- m_xDocumentHandler->endElement("X509Data"); ++ assert(m_rInformation.GetSigningCertificate()); ++ for (auto const& rData : m_rInformation.X509Datas) ++ { ++ m_xDocumentHandler->startElement( ++ "X509Data", uno::Reference(new SvXMLAttributeList())); ++ for (auto const& it : rData) ++ { ++ m_xDocumentHandler->startElement( ++ "X509Certificate", ++ uno::Reference(new SvXMLAttributeList())); ++ m_xDocumentHandler->characters(it.X509Certificate); ++ m_xDocumentHandler->endElement("X509Certificate"); ++ } ++ m_xDocumentHandler->endElement("X509Data"); ++ } + m_xDocumentHandler->endElement("KeyInfo"); + } + +diff --git a/xmlsecurity/source/helper/ooxmlsecparser.cxx b/xmlsecurity/source/helper/ooxmlsecparser.cxx +index a200de60c07a..a25872fc057d 100644 +--- a/xmlsecurity/source/helper/ooxmlsecparser.cxx ++++ b/xmlsecurity/source/helper/ooxmlsecparser.cxx +@@ -185,9 +185,22 @@ void SAL_CALL OOXMLSecParser::endElement(const OUString& rName) + m_pXSecController->setSignatureValue(m_aSignatureValue); + m_bInSignatureValue = false; + } ++ else if (rName == "X509Data") ++ { ++ std::vector> X509IssuerSerials; ++ std::vector X509Certificates; ++ if (!m_aX509Certificate.isEmpty()) ++ { ++ X509Certificates.emplace_back(m_aX509Certificate); ++ } ++ if (!m_aX509IssuerName.isEmpty() && !m_aX509SerialNumber.isEmpty()) ++ { ++ X509IssuerSerials.emplace_back(m_aX509IssuerName, m_aX509SerialNumber); ++ } ++ m_pXSecController->setX509Data(X509IssuerSerials, X509Certificates); ++ } + else if (rName == "X509Certificate") + { +- m_pXSecController->setX509Certificate(m_aX509Certificate); + m_bInX509Certificate = false; + } + else if (rName == "mdssi:Value") +@@ -202,17 +215,18 @@ void SAL_CALL OOXMLSecParser::endElement(const OUString& rName) + } + else if (rName == "X509IssuerName") + { +- m_pXSecController->setX509IssuerName(m_aX509IssuerName); + m_bInX509IssuerName = false; + } + else if (rName == "X509SerialNumber") + { +- m_pXSecController->setX509SerialNumber(m_aX509SerialNumber); + m_bInX509SerialNumber = false; + } ++ else if (rName == "xd:Cert") ++ { ++ m_pXSecController->setX509CertDigest(m_aCertDigest, css::xml::crypto::DigestID::SHA1, m_aX509IssuerName, m_aX509SerialNumber); ++ } + else if (rName == "xd:CertDigest") + { +- m_pXSecController->setCertDigest(m_aCertDigest); + m_bInCertDigest = false; + } + else if (rName == "Object") +diff --git a/xmlsecurity/source/helper/pdfsignaturehelper.cxx b/xmlsecurity/source/helper/pdfsignaturehelper.cxx +index b0795cb8f33f..843000a9c326 100644 +--- a/xmlsecurity/source/helper/pdfsignaturehelper.cxx ++++ b/xmlsecurity/source/helper/pdfsignaturehelper.cxx +@@ -85,8 +85,12 @@ PDFSignatureHelper::GetDocumentSignatureInformations( + security::DocumentSignatureInformation& rExternal = aRet[i]; + rExternal.SignatureIsValid + = rInternal.nStatus == xml::crypto::SecurityOperationStatus_OPERATION_SUCCEEDED; +- if (!rInternal.ouX509Certificate.isEmpty()) +- rExternal.Signer = xSecEnv->createCertificateFromAscii(rInternal.ouX509Certificate); ++ if (rInternal.GetSigningCertificate() ++ && !rInternal.GetSigningCertificate()->X509Certificate.isEmpty()) ++ { ++ rExternal.Signer = xSecEnv->createCertificateFromAscii( ++ rInternal.GetSigningCertificate()->X509Certificate); ++ } + rExternal.PartialDocumentSignature = rInternal.bPartialDocumentSignature; + + // Verify certificate. +diff --git a/xmlsecurity/source/helper/xmlsignaturehelper.cxx b/xmlsecurity/source/helper/xmlsignaturehelper.cxx +index 22c056e70da1..bcb79039e342 100644 +--- a/xmlsecurity/source/helper/xmlsignaturehelper.cxx ++++ b/xmlsecurity/source/helper/xmlsignaturehelper.cxx +@@ -21,6 +21,7 @@ + #include + #include + #include ++#include + + #include + +@@ -45,6 +46,8 @@ + #include + #include + ++#include ++ + #define NS_DOCUMENTSIGNATURES "http://openoffice.org/2004/documentsignatures" + #define NS_DOCUMENTSIGNATURES_ODF_1_2 "urn:oasis:names:tc:opendocument:xmlns:digitalsignature:1.0" + #define OOXML_SIGNATURE_ORIGIN "http://schemas.openxmlformats.org/package/2006/relationships/digital-signature/origin" +@@ -547,4 +550,162 @@ void XMLSignatureHelper::CreateAndWriteOOXMLSignature(const uno::ReferenceendDocument(); + } + ++/** check this constraint from xmldsig-core 4.5.4: ++ ++ All certificates appearing in an X509Data element MUST relate to the ++ validation key by either containing it or being part of a certification ++ chain that terminates in a certificate containing the validation key. ++ */ ++static auto CheckX509Data( ++ uno::Reference const& xSecEnv, ++ std::vector const& rX509CertInfos, ++ std::vector> & rCerts, ++ std::vector & rSorted) -> bool ++{ ++ assert(rCerts.empty()); ++ assert(rSorted.empty()); ++ if (rX509CertInfos.empty()) ++ { ++ SAL_WARN("xmlsecurity.comp", "no X509Data"); ++ return false; ++ } ++ std::vector> certs; ++ for (SignatureInformation::X509CertInfo const& it : rX509CertInfos) ++ { ++ if (!it.X509Certificate.isEmpty()) ++ { ++ certs.emplace_back(xSecEnv->createCertificateFromAscii(it.X509Certificate)); ++ } ++ else ++ { ++ certs.emplace_back(xSecEnv->getCertificate( ++ it.X509IssuerName, ++ xmlsecurity::numericStringToBigInteger(it.X509SerialNumber))); ++ } ++ if (!certs.back().is()) ++ { ++ SAL_WARN("xmlsecurity.comp", "X509Data cannot be parsed"); ++ return false; ++ } ++ } ++ ++ // first, search one whose issuer isn't in the list, or a self-signed one ++ std::optional start; ++ for (size_t i = 0; i < certs.size(); ++i) ++ { ++ for (size_t j = 0; ; ++j) ++ { ++ if (j == certs.size()) ++ { ++ if (start) ++ { ++ SAL_WARN("xmlsecurity.comp", "X509Data do not form a chain: certificate has no issuer but already have start of chain: " << certs[i]->getSubjectName()); ++ return false; ++ } ++ start = i; // issuer isn't in the list ++ break; ++ } ++ if (xmlsecurity::EqualDistinguishedNames(certs[i]->getIssuerName(), certs[j]->getSubjectName())) ++ { ++ if (i == j) // self signed ++ { ++ if (start) ++ { ++ SAL_WARN("xmlsecurity.comp", "X509Data do not form a chain: certificate is self-signed but already have start of chain: " << certs[i]->getSubjectName()); ++ return false; ++ } ++ start = i; ++ } ++ break; ++ } ++ } ++ } ++ std::vector chain; ++ if (!start) ++ { ++ // this can only be a cycle? ++ SAL_WARN("xmlsecurity.comp", "X509Data do not form a chain: cycle detected"); ++ return false; ++ } ++ chain.emplace_back(*start); ++ ++ // second, check that there is a chain, no tree or cycle... ++ for (size_t i = 0; i < certs.size(); ++i) ++ { ++ assert(chain.size() == i + 1); ++ for (size_t j = 0; j < certs.size(); ++j) ++ { ++ if (chain[i] != j) ++ { ++ if (xmlsecurity::EqualDistinguishedNames( ++ certs[chain[i]]->getSubjectName(), certs[j]->getIssuerName())) ++ { ++ if (chain.size() != i + 1) // already found issuee? ++ { ++ SAL_WARN("xmlsecurity.comp", "X509Data do not form a chain: certificate issued 2 others: " << certs[chain[i]]->getSubjectName()); ++ return false; ++ } ++ chain.emplace_back(j); ++ } ++ } ++ } ++ if (i == certs.size() - 1) ++ { // last one: must be a leaf ++ if (chain.size() != i + 1) ++ { ++ SAL_WARN("xmlsecurity.comp", "X509Data do not form a chain: certificate in cycle: " << certs[chain[i]]->getSubjectName()); ++ return false; ++ } ++ } ++ else if (chain.size() != i + 2) ++ { // not issuer of another? ++ SAL_WARN("xmlsecurity.comp", "X509Data do not form a chain: certificate issued 0 others: " << certs[chain[i]]->getSubjectName()); ++ return false; ++ } ++ } ++ ++ // success ++ assert(chain.size() == rX509CertInfos.size()); ++ for (auto const& it : chain) ++ { ++ rSorted.emplace_back(rX509CertInfos[it]); ++ rCerts.emplace_back(certs[it]); ++ } ++ return true; ++} ++ ++std::vector> ++XMLSignatureHelper::CheckAndUpdateSignatureInformation( ++ uno::Reference const& xSecEnv, ++ SignatureInformation const& rInfo) ++{ ++ // if the check fails, it's not possible to determine which X509Data ++ // contained the signing certificate - the UI cannot display something ++ // useful in this case, so prevent anything misleading by clearing the ++ // X509Datas. ++ ++ std::vector> certs; ++ std::vector datas; ++ // TODO: for now, just merge all X509Datas together for checking... ++ // (this will probably break round-trip of signature with multiple X509Data, ++ // no idea if that is a problem) ++ SignatureInformation::X509Data temp; ++ SignatureInformation::X509Data tempResult; ++ for (auto const& rData : rInfo.X509Datas) ++ { ++ for (auto const& it : rData) ++ { ++ temp.emplace_back(it); ++ } ++ } ++ if (CheckX509Data(xSecEnv, temp, certs, tempResult)) ++ { ++ datas.emplace_back(tempResult); ++ } ++ ++ // rInfo is a copy, update the original ++ mpXSecController->UpdateSignatureInformation(rInfo.nSecurityId, datas); ++ return certs; ++} ++ + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ +diff --git a/xmlsecurity/source/helper/xsecctl.cxx b/xmlsecurity/source/helper/xsecctl.cxx +index e3df9a85f6da..6bd88e24f91e 100644 +--- a/xmlsecurity/source/helper/xsecctl.cxx ++++ b/xmlsecurity/source/helper/xsecctl.cxx +@@ -734,7 +734,7 @@ void XSecController::exportSignature( + xDocumentHandler->startElement( + "PGPKeyID", + css::uno::Reference< css::xml::sax::XAttributeList > (new SvXMLAttributeList())); +- xDocumentHandler->characters( signatureInfo.ouCertDigest ); ++ xDocumentHandler->characters(signatureInfo.ouGpgKeyID); + xDocumentHandler->endElement( "PGPKeyID" ); + + /* Write PGPKeyPacket element */ +@@ -758,43 +758,50 @@ void XSecController::exportSignature( + } + else + { +- /* Write X509Data element */ +- xDocumentHandler->startElement( +- "X509Data", +- css::uno::Reference< css::xml::sax::XAttributeList > (new SvXMLAttributeList())); ++ assert(signatureInfo.GetSigningCertificate()); ++ for (auto const& rData : signatureInfo.X509Datas) + { +- /* Write X509IssuerSerial element */ ++ /* Write X509Data element */ + xDocumentHandler->startElement( +- "X509IssuerSerial", ++ "X509Data", + css::uno::Reference< css::xml::sax::XAttributeList > (new SvXMLAttributeList())); + { +- /* Write X509IssuerName element */ +- xDocumentHandler->startElement( +- "X509IssuerName", +- css::uno::Reference< css::xml::sax::XAttributeList > (new SvXMLAttributeList())); +- xDocumentHandler->characters( signatureInfo.ouX509IssuerName ); +- xDocumentHandler->endElement( "X509IssuerName" ); +- +- /* Write X509SerialNumber element */ +- xDocumentHandler->startElement( +- "X509SerialNumber", +- css::uno::Reference< css::xml::sax::XAttributeList > (new SvXMLAttributeList())); +- xDocumentHandler->characters( signatureInfo.ouX509SerialNumber ); +- xDocumentHandler->endElement( "X509SerialNumber" ); +- } +- xDocumentHandler->endElement( "X509IssuerSerial" ); +- +- /* Write X509Certificate element */ +- if (!signatureInfo.ouX509Certificate.isEmpty()) +- { +- xDocumentHandler->startElement( +- "X509Certificate", +- css::uno::Reference< css::xml::sax::XAttributeList > (new SvXMLAttributeList())); +- xDocumentHandler->characters( signatureInfo.ouX509Certificate ); +- xDocumentHandler->endElement( "X509Certificate" ); ++ for (auto const& it : rData) ++ { ++ /* Write X509IssuerSerial element */ ++ xDocumentHandler->startElement( ++ "X509IssuerSerial", ++ css::uno::Reference< css::xml::sax::XAttributeList > (new SvXMLAttributeList())); ++ { ++ /* Write X509IssuerName element */ ++ xDocumentHandler->startElement( ++ "X509IssuerName", ++ css::uno::Reference< css::xml::sax::XAttributeList > (new SvXMLAttributeList())); ++ xDocumentHandler->characters(it.X509IssuerName); ++ xDocumentHandler->endElement( "X509IssuerName" ); ++ ++ /* Write X509SerialNumber element */ ++ xDocumentHandler->startElement( ++ "X509SerialNumber", ++ css::uno::Reference< css::xml::sax::XAttributeList > (new SvXMLAttributeList())); ++ xDocumentHandler->characters(it.X509SerialNumber); ++ xDocumentHandler->endElement( "X509SerialNumber" ); ++ } ++ xDocumentHandler->endElement( "X509IssuerSerial" ); ++ ++ /* Write X509Certificate element */ ++ if (!it.X509Certificate.isEmpty()) ++ { ++ xDocumentHandler->startElement( ++ "X509Certificate", ++ css::uno::Reference< css::xml::sax::XAttributeList > (new SvXMLAttributeList())); ++ xDocumentHandler->characters(it.X509Certificate); ++ xDocumentHandler->endElement( "X509Certificate" ); ++ } ++ } + } ++ xDocumentHandler->endElement( "X509Data" ); + } +- xDocumentHandler->endElement( "X509Data" ); + } + } + xDocumentHandler->endElement( "KeyInfo" ); +@@ -913,6 +920,15 @@ void XSecController::exportOOXMLSignature(const uno::Reference& + aExporter.writeSignature(); + } + ++void XSecController::UpdateSignatureInformation(sal_Int32 const nSecurityId, ++ std::vector const& rDatas) ++{ ++ SignatureInformation aInf( 0 ); ++ int const nIndex = findSignatureInfor(nSecurityId); ++ assert(nIndex != -1); // nothing should touch this between parsing and verify ++ m_vInternalSignatureInformations[nIndex].signatureInfor.X509Datas = rDatas; ++} ++ + SignatureInformation XSecController::getSignatureInformation( sal_Int32 nSecurityId ) const + { + SignatureInformation aInf( 0 ); +diff --git a/xmlsecurity/source/helper/xsecparser.cxx b/xmlsecurity/source/helper/xsecparser.cxx +index f46277f96ea1..f2e00fca99c9 100644 +--- a/xmlsecurity/source/helper/xsecparser.cxx ++++ b/xmlsecurity/source/helper/xsecparser.cxx +@@ -243,98 +243,79 @@ class XSecParser::DsX509CertificateContext + : public XSecParser::Context + { + private: +- OUString m_Value; ++ OUString & m_rValue; + + public: + DsX509CertificateContext(XSecParser & rParser, +- std::unique_ptr pOldNamespaceMap) ++ std::unique_ptr pOldNamespaceMap, ++ OUString & rValue) + : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) ++ , m_rValue(rValue) + { + } + +- virtual void EndElement() override +- { +- m_rParser.m_pXSecController->setX509Certificate(m_Value); +- } +- + virtual void Characters(OUString const& rChars) override + { +- m_Value += rChars; ++ m_rValue += rChars; + } + }; + + class XSecParser::DsX509SerialNumberContext +- : public XSecParser::ReferencedContextImpl ++ : public XSecParser::Context + { + private: +- OUString m_Value; ++ OUString & m_rValue; + + public: + DsX509SerialNumberContext(XSecParser & rParser, + std::unique_ptr pOldNamespaceMap, +- bool const isReferenced) +- : ReferencedContextImpl(rParser, std::move(pOldNamespaceMap), isReferenced) +- { +- } +- +- virtual void EndElement() override ++ OUString & rValue) ++ : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) ++ , m_rValue(rValue) + { +- if (m_isReferenced) +- { +- m_rParser.m_pXSecController->setX509SerialNumber(m_Value); +- } +- else +- { +- SAL_INFO("xmlsecurity.helper", "ignoring unsigned X509SerialNumber"); +- } + } + + virtual void Characters(OUString const& rChars) override + { +- m_Value += rChars; ++ m_rValue += rChars; + } + }; + + class XSecParser::DsX509IssuerNameContext +- : public XSecParser::ReferencedContextImpl ++ : public XSecParser::Context + { + private: +- OUString m_Value; ++ OUString & m_rValue; + + public: + DsX509IssuerNameContext(XSecParser & rParser, + std::unique_ptr pOldNamespaceMap, +- bool const isReferenced) +- : ReferencedContextImpl(rParser, std::move(pOldNamespaceMap), isReferenced) +- { +- } +- +- virtual void EndElement() override ++ OUString & rValue) ++ : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) ++ , m_rValue(rValue) + { +- if (m_isReferenced) +- { +- m_rParser.m_pXSecController->setX509IssuerName(m_Value); +- } +- else +- { +- SAL_INFO("xmlsecurity.helper", "ignoring unsigned X509IssuerName"); +- } + } + + virtual void Characters(OUString const& rChars) override + { +- m_Value += rChars; ++ m_rValue += rChars; + } + }; + + class XSecParser::DsX509IssuerSerialContext +- : public XSecParser::ReferencedContextImpl ++ : public XSecParser::Context + { ++ private: ++ OUString & m_rX509IssuerName; ++ OUString & m_rX509SerialNumber; ++ + public: + DsX509IssuerSerialContext(XSecParser & rParser, + std::unique_ptr pOldNamespaceMap, +- bool const isReferenced) +- : ReferencedContextImpl(rParser, std::move(pOldNamespaceMap), isReferenced) ++ OUString & rIssuerName, OUString & rSerialNumber) ++ : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) ++ , m_rX509IssuerName(rIssuerName) ++ , m_rX509SerialNumber(rSerialNumber) + { + } + +@@ -344,20 +325,27 @@ class XSecParser::DsX509IssuerSerialContext + { + if (nNamespace == XML_NAMESPACE_DS && rName == "X509IssuerName") + { +- return std::make_unique(m_rParser, std::move(pOldNamespaceMap), m_isReferenced); ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap), m_rX509IssuerName); + } + if (nNamespace == XML_NAMESPACE_DS && rName == "X509SerialNumber") + { +- return std::make_unique(m_rParser, std::move(pOldNamespaceMap), m_isReferenced); ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap), m_rX509SerialNumber); + } + // missing: ds:X509SKI, ds:X509SubjectName, ds:X509CRL + return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName); + } + }; + ++/// can't be sure what is supposed to happen here because the spec is clear as mud + class XSecParser::DsX509DataContext + : public XSecParser::Context + { ++ private: ++ // sigh... "No ordering is implied by the above constraints." ++ // so store the ball of mud in vectors and try to figure it out later. ++ std::vector> m_X509IssuerSerials; ++ std::vector m_X509Certificates; ++ + public: + DsX509DataContext(XSecParser & rParser, + std::unique_ptr pOldNamespaceMap) +@@ -365,18 +353,24 @@ class XSecParser::DsX509DataContext + { + } + ++ virtual void EndElement() override ++ { ++ m_rParser.m_pXSecController->setX509Data(m_X509IssuerSerials, m_X509Certificates); ++ } ++ + virtual std::unique_ptr CreateChildContext( + std::unique_ptr pOldNamespaceMap, + sal_uInt16 const nNamespace, OUString const& rName) override + { + if (nNamespace == XML_NAMESPACE_DS && rName == "X509IssuerSerial") + { +- // can't require KeyInfo to be signed so pass in *true* +- return std::make_unique(m_rParser, std::move(pOldNamespaceMap), true); ++ m_X509IssuerSerials.emplace_back(); ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap), m_X509IssuerSerials.back().first, m_X509IssuerSerials.back().second); + } + if (nNamespace == XML_NAMESPACE_DS && rName == "X509Certificate") + { +- return std::make_unique(m_rParser, std::move(pOldNamespaceMap)); ++ m_X509Certificates.emplace_back(); ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap), m_X509Certificates.back()); + } + // missing: ds:X509SKI, ds:X509SubjectName, ds:X509CRL + return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName); +@@ -968,30 +962,20 @@ class XSecParser::LoSignatureLineContext + }; + + class XSecParser::XadesCertDigestContext +- : public XSecParser::ReferencedContextImpl ++ : public XSecParser::Context + { + private: +- OUString m_Value; +- sal_Int32 m_nReferenceDigestID = css::xml::crypto::DigestID::SHA1; ++ OUString & m_rDigestValue; ++ sal_Int32 & m_rReferenceDigestID; + + public: + XadesCertDigestContext(XSecParser & rParser, + std::unique_ptr pOldNamespaceMap, +- bool const isReferenced) +- : ReferencedContextImpl(rParser, std::move(pOldNamespaceMap), isReferenced) +- { +- } +- +- virtual void EndElement() override ++ OUString & rDigestValue, sal_Int32 & rReferenceDigestID) ++ : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) ++ , m_rDigestValue(rDigestValue) ++ , m_rReferenceDigestID(rReferenceDigestID) + { +- if (m_isReferenced) +- { +- m_rParser.m_pXSecController->setCertDigest(m_Value/* FIXME , m_nReferenceDigestID*/); +- } +- else +- { +- SAL_INFO("xmlsecurity.helper", "ignoring unsigned CertDigest"); +- } + } + + virtual std::unique_ptr CreateChildContext( +@@ -1000,11 +984,11 @@ class XSecParser::XadesCertDigestContext + { + if (nNamespace == XML_NAMESPACE_DS && rName == "DigestMethod") + { +- return std::make_unique(m_rParser, std::move(pOldNamespaceMap), m_nReferenceDigestID); ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap), m_rReferenceDigestID); + } + if (nNamespace == XML_NAMESPACE_DS && rName == "DigestValue") + { +- return std::make_unique(m_rParser, std::move(pOldNamespaceMap), m_Value); ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap), m_rDigestValue); + } + return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName); + } +@@ -1013,6 +997,12 @@ class XSecParser::XadesCertDigestContext + class XSecParser::XadesCertContext + : public XSecParser::ReferencedContextImpl + { ++ private: ++ sal_Int32 m_nReferenceDigestID = css::xml::crypto::DigestID::SHA1; ++ OUString m_CertDigest; ++ OUString m_X509IssuerName; ++ OUString m_X509SerialNumber; ++ + public: + XadesCertContext(XSecParser & rParser, + std::unique_ptr pOldNamespaceMap, +@@ -1021,17 +1011,29 @@ class XSecParser::XadesCertContext + { + } + ++ virtual void EndElement() override ++ { ++ if (m_isReferenced) ++ { ++ m_rParser.m_pXSecController->setX509CertDigest(m_CertDigest, m_nReferenceDigestID, m_X509IssuerName, m_X509SerialNumber); ++ } ++ else ++ { ++ SAL_INFO("xmlsecurity.helper", "ignoring unsigned xades:Cert"); ++ } ++ } ++ + virtual std::unique_ptr CreateChildContext( + std::unique_ptr pOldNamespaceMap, + sal_uInt16 const nNamespace, OUString const& rName) override + { + if (nNamespace == XML_NAMESPACE_XADES132 && rName == "CertDigest") + { +- return std::make_unique(m_rParser, std::move(pOldNamespaceMap), m_isReferenced); ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap), m_CertDigest, m_nReferenceDigestID); + } + if (nNamespace == XML_NAMESPACE_XADES132 && rName == "IssuerSerial") + { +- return std::make_unique(m_rParser, std::move(pOldNamespaceMap), m_isReferenced); ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap), m_X509IssuerName, m_X509SerialNumber); + } + return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName); + } +diff --git a/xmlsecurity/source/helper/xsecsign.cxx b/xmlsecurity/source/helper/xsecsign.cxx +index 1e1688767f00..fd33a320d9bd 100644 +--- a/xmlsecurity/source/helper/xsecsign.cxx ++++ b/xmlsecurity/source/helper/xsecsign.cxx +@@ -193,6 +193,7 @@ void XSecController::signAStream( sal_Int32 securityId, const OUString& uri, boo + } + } + ++// note: this is called when creating a new signature from scratch + void XSecController::setX509Certificate( + sal_Int32 nSecurityId, + const OUString& ouX509IssuerName, +@@ -206,10 +207,13 @@ void XSecController::setX509Certificate( + if ( index == -1 ) + { + InternalSignatureInformation isi(nSecurityId, nullptr); +- isi.signatureInfor.ouX509IssuerName = ouX509IssuerName; +- isi.signatureInfor.ouX509SerialNumber = ouX509SerialNumber; +- isi.signatureInfor.ouX509Certificate = ouX509Cert; +- isi.signatureInfor.ouCertDigest = ouX509CertDigest; ++ isi.signatureInfor.X509Datas.clear(); ++ isi.signatureInfor.X509Datas.emplace_back(); ++ isi.signatureInfor.X509Datas.back().emplace_back(); ++ isi.signatureInfor.X509Datas.back().back().X509IssuerName = ouX509IssuerName; ++ isi.signatureInfor.X509Datas.back().back().X509SerialNumber = ouX509SerialNumber; ++ isi.signatureInfor.X509Datas.back().back().X509Certificate = ouX509Cert; ++ isi.signatureInfor.X509Datas.back().back().CertDigest = ouX509CertDigest; + isi.signatureInfor.eAlgorithmID = eAlgorithmID; + m_vInternalSignatureInformations.push_back( isi ); + } +@@ -217,16 +221,19 @@ void XSecController::setX509Certificate( + { + SignatureInformation &si + = m_vInternalSignatureInformations[index].signatureInfor; +- si.ouX509IssuerName = ouX509IssuerName; +- si.ouX509SerialNumber = ouX509SerialNumber; +- si.ouX509Certificate = ouX509Cert; +- si.ouCertDigest = ouX509CertDigest; ++ si.X509Datas.clear(); ++ si.X509Datas.emplace_back(); ++ si.X509Datas.back().emplace_back(); ++ si.X509Datas.back().back().X509IssuerName = ouX509IssuerName; ++ si.X509Datas.back().back().X509SerialNumber = ouX509SerialNumber; ++ si.X509Datas.back().back().X509Certificate = ouX509Cert; ++ si.X509Datas.back().back().CertDigest = ouX509CertDigest; + } + } + + void XSecController::setGpgCertificate( + sal_Int32 nSecurityId, +- const OUString& ouCertDigest, ++ const OUString& ouKeyDigest, + const OUString& ouCert, + const OUString& ouOwner) + { +@@ -237,16 +244,17 @@ void XSecController::setGpgCertificate( + InternalSignatureInformation isi(nSecurityId, nullptr); + isi.signatureInfor.ouGpgCertificate = ouCert; + isi.signatureInfor.ouGpgOwner = ouOwner; +- isi.signatureInfor.ouCertDigest = ouCertDigest; ++ isi.signatureInfor.ouGpgKeyID = ouKeyDigest; + m_vInternalSignatureInformations.push_back( isi ); + } + else + { + SignatureInformation &si + = m_vInternalSignatureInformations[index].signatureInfor; ++ si.X509Datas.clear(); // it is a PGP signature now + si.ouGpgCertificate = ouCert; + si.ouGpgOwner = ouOwner; +- si.ouCertDigest = ouCertDigest; ++ si.ouGpgKeyID = ouKeyDigest; + } + } + +diff --git a/xmlsecurity/source/helper/xsecverify.cxx b/xmlsecurity/source/helper/xsecverify.cxx +index 92ebfb6c72e8..89141ed1dfd4 100644 +--- a/xmlsecurity/source/helper/xsecverify.cxx ++++ b/xmlsecurity/source/helper/xsecverify.cxx +@@ -22,6 +22,7 @@ + #include + #include "xsecparser.hxx" + #include "ooxmlsecparser.hxx" ++#include + #include + #include + #include +@@ -240,7 +241,9 @@ void XSecController::setReferenceCount() const + } + } + +-void XSecController::setX509IssuerName( OUString const & ouX509IssuerName ) ++void XSecController::setX509Data( ++ std::vector> & rX509IssuerSerials, ++ std::vector const& rX509Certificates) + { + if (m_vInternalSignatureInformations.empty()) + { +@@ -248,29 +251,52 @@ void XSecController::setX509IssuerName( OUString const & ouX509IssuerName ) + return; + } + InternalSignatureInformation &isi = m_vInternalSignatureInformations.back(); +- isi.signatureInfor.ouX509IssuerName = ouX509IssuerName; +-} +- +-void XSecController::setX509SerialNumber( OUString const & ouX509SerialNumber ) +-{ +- if (m_vInternalSignatureInformations.empty()) ++ SignatureInformation::X509Data data; ++ // due to the excessive flexibility of the spec it's possible that there ++ // is both a reference to a cert and the cert itself in one X509Data ++ for (OUString const& it : rX509Certificates) + { +- SAL_INFO("xmlsecurity.helper","XSecController::setX509SerialNumber: no signature"); +- return; ++ try ++ { ++ data.emplace_back(); ++ data.back().X509Certificate = it; ++ uno::Reference const xSecEnv(m_xSecurityContext->getSecurityEnvironment()); ++ uno::Reference const xCert(xSecEnv->createCertificateFromAscii(it)); ++ if (!xCert.is()) ++ { ++ SAL_INFO("xmlsecurity.helper", "cannot parse X509Certificate"); ++ continue; // will be handled in CheckX509Data ++ } ++ OUString const issuerName(xCert->getIssuerName()); ++ OUString const serialNumber(xmlsecurity::bigIntegerToNumericString(xCert->getSerialNumber())); ++ auto const iter = std::find_if(rX509IssuerSerials.begin(), rX509IssuerSerials.end(), ++ [&](auto const& rX509IssuerSerial) { ++ return xmlsecurity::EqualDistinguishedNames(issuerName, rX509IssuerSerial.first) ++ && serialNumber == rX509IssuerSerial.second; ++ }); ++ if (iter != rX509IssuerSerials.end()) ++ { ++ data.back().X509IssuerName = iter->first; ++ data.back().X509SerialNumber = iter->second; ++ rX509IssuerSerials.erase(iter); ++ } ++ } ++ catch (uno::Exception const&) ++ { ++ SAL_INFO("xmlsecurity.helper", "cannot parse X509Certificate"); ++ } + } +- InternalSignatureInformation &isi = m_vInternalSignatureInformations.back(); +- isi.signatureInfor.ouX509SerialNumber = ouX509SerialNumber; +-} +- +-void XSecController::setX509Certificate( OUString const & ouX509Certificate ) +-{ +- if (m_vInternalSignatureInformations.empty()) ++ // now handle any that are left... ++ for (auto const& it : rX509IssuerSerials) + { +- SAL_INFO("xmlsecurity.helper","XSecController::setX509Certificate: no signature"); +- return; ++ data.emplace_back(); ++ data.back().X509IssuerName = it.first; ++ data.back().X509SerialNumber = it.second; ++ } ++ if (!data.empty()) ++ { ++ isi.signatureInfor.X509Datas.push_back(data); + } +- InternalSignatureInformation &isi = m_vInternalSignatureInformations.back(); +- isi.signatureInfor.ouX509Certificate = ouX509Certificate; + } + + void XSecController::setSignatureValue( OUString const & ouSignatureValue ) +@@ -380,13 +406,67 @@ void XSecController::setSignatureBytes(const uno::Sequence& rBytes) + rInformation.signatureInfor.aSignatureBytes = rBytes; + } + +-void XSecController::setCertDigest(const OUString& rCertDigest) ++void XSecController::setX509CertDigest( ++ OUString const& rCertDigest, sal_Int32 const /*TODO nReferenceDigestID*/, ++ OUString const& rX509IssuerName, OUString const& rX509SerialNumber) + { + if (m_vInternalSignatureInformations.empty()) + return; + + InternalSignatureInformation& rInformation = m_vInternalSignatureInformations.back(); +- rInformation.signatureInfor.ouCertDigest = rCertDigest; ++ for (auto & rData : rInformation.signatureInfor.X509Datas) ++ { ++ for (auto & it : rData) ++ { ++ if (xmlsecurity::EqualDistinguishedNames(it.X509IssuerName, rX509IssuerName) ++ && it.X509SerialNumber == rX509SerialNumber) ++ { ++ it.CertDigest = rCertDigest; ++ return; ++ } ++ } ++ } ++ // fall-back: read the actual certificates ++ for (auto & rData : rInformation.signatureInfor.X509Datas) ++ { ++ for (auto & it : rData) ++ { ++ if (!it.X509Certificate.isEmpty()) ++ { ++ try ++ { ++ uno::Reference const xSecEnv(m_xSecurityContext->getSecurityEnvironment()); ++ uno::Reference const xCert(xSecEnv->createCertificateFromAscii(it.X509Certificate)); ++ if (!xCert.is()) ++ { ++ SAL_INFO("xmlsecurity.helper", "cannot parse X509Certificate"); ++ } ++ else if (xmlsecurity::EqualDistinguishedNames(xCert->getIssuerName(),rX509IssuerName) ++ && xmlsecurity::bigIntegerToNumericString(xCert->getSerialNumber()) == rX509SerialNumber) ++ { ++ it.CertDigest = rCertDigest; ++ // note: testInsertCertificate_PEM_DOCX requires these! ++ it.X509SerialNumber = rX509SerialNumber; ++ it.X509IssuerName = rX509IssuerName; ++ return; ++ } ++ } ++ catch (uno::Exception const&) ++ { ++ SAL_INFO("xmlsecurity.helper", "cannot parse X509Certificate"); ++ } ++ } ++ } ++ } ++ if (!rInformation.signatureInfor.ouGpgCertificate.isEmpty()) ++ { ++ SAL_INFO_IF(rCertDigest != rInformation.signatureInfor.ouGpgKeyID, ++ "xmlsecurity.helper", "PGPKeyID vs CertDigest mismatch"); ++ } ++ else ++ { ++ SAL_INFO("xmlsecurity.helper", "cannot find X509Data for CertDigest"); ++ } + } + + namespace { +diff --git a/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx +index 0e619b2802f8..244cd46ac564 100644 +--- a/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx ++++ b/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx +@@ -26,6 +26,7 @@ + #include + #include "x509certificate_mscryptimpl.hxx" + #include ++#include + #include "sanextension_mscryptimpl.hxx" + + #include "oid.hxx" +@@ -649,4 +650,50 @@ Sequence SAL_CALL X509Certificate_MSCryptImpl::getSupportedServiceName + return { OUString() }; + } + ++namespace xmlsecurity { ++ ++static bool EncodeDistinguishedName(OUString const& rName, CERT_NAME_BLOB & rBlob) ++{ ++ LPCWSTR pszError; ++ if (!CertStrToNameW(X509_ASN_ENCODING, ++ reinterpret_cast(rName.getStr()), CERT_X500_NAME_STR, ++ nullptr, nullptr, &rBlob.cbData, &pszError)) ++ { ++ SAL_INFO("xmlsecurity.xmlsec", "CertStrToNameW failed: " << WindowsErrorString(GetLastError()) << "; " << reinterpret_cast(pszError)); ++ return false; ++ } ++ rBlob.pbData = new BYTE[rBlob.cbData]; ++ if (!CertStrToNameW(X509_ASN_ENCODING, ++ reinterpret_cast(rName.getStr()), CERT_X500_NAME_STR, ++ nullptr, rBlob.pbData, &rBlob.cbData, &pszError)) ++ { ++ SAL_INFO("xmlsecurity.xmlsec", "CertStrToNameW failed: " << WindowsErrorString(GetLastError()) << "; " << reinterpret_cast(pszError)); ++ return false; ++ } ++ return true; ++} ++ ++bool EqualDistinguishedNames( ++ OUString const& rName1, OUString const& rName2) ++{ ++ CERT_NAME_BLOB blob1; ++ if (!EncodeDistinguishedName(rName1, blob1)) ++ { ++ return false; ++ } ++ CERT_NAME_BLOB blob2; ++ if (!EncodeDistinguishedName(rName2, blob2)) ++ { ++ delete[] blob1.pbData; ++ return false; ++ } ++ bool const ret(CertCompareCertificateName(X509_ASN_ENCODING, ++ &blob1, &blob2) == TRUE); ++ delete[] blob2.pbData; ++ delete[] blob1.pbData; ++ return ret; ++} ++ ++} // namespace xmlsecurity ++ + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ +diff --git a/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx +index dcbad0348091..c699c950f351 100644 +--- a/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx ++++ b/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx +@@ -18,6 +18,7 @@ + */ + + #include ++#include + #include + #include + +@@ -254,6 +255,7 @@ SAL_CALL XMLSignature_MSCryptImpl::validate( + ++nReferenceGood; + } + } ++ SAL_INFO("xmlsecurity.xmlsec", "xmlSecDSigCtxVerify status " << pDsigCtx->status << ", references good " << nReferenceGood << " of " << nReferenceCount); + + if (rs == 0 && nReferenceCount == nReferenceGood) + { +diff --git a/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx +index 1a323d33f32f..d6143a81883c 100644 +--- a/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx ++++ b/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx +@@ -31,6 +31,7 @@ + #include + #include "x509certificate_nssimpl.hxx" + ++#include + #include + + #include "sanextension_nssimpl.hxx" +@@ -533,4 +534,28 @@ sal_Bool SAL_CALL X509Certificate_NssImpl::supportsService(const OUString& servi + /* XServiceInfo */ + Sequence SAL_CALL X509Certificate_NssImpl::getSupportedServiceNames() { return { OUString() }; } + ++namespace xmlsecurity { ++ ++bool EqualDistinguishedNames( ++ OUString const& rName1, OUString const& rName2) ++{ ++ CERTName *const pName1(CERT_AsciiToName(OUStringToOString(rName1, RTL_TEXTENCODING_UTF8).getStr())); ++ if (pName1 == nullptr) ++ { ++ return false; ++ } ++ CERTName *const pName2(CERT_AsciiToName(OUStringToOString(rName2, RTL_TEXTENCODING_UTF8).getStr())); ++ if (pName2 == nullptr) ++ { ++ CERT_DestroyName(pName1); ++ return false; ++ } ++ bool const ret(CERT_CompareName(pName1, pName2) == SECEqual); ++ CERT_DestroyName(pName2); ++ CERT_DestroyName(pName1); ++ return ret; ++} ++ ++} // namespace xmlsecurity ++ + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ +diff --git a/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx +index 32e4335a5207..b41d754f7407 100644 +--- a/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx ++++ b/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx +@@ -26,6 +26,8 @@ + + #include "securityenvironment_nssimpl.hxx" + ++#include ++ + #include + #include + +@@ -261,6 +263,7 @@ SAL_CALL XMLSignature_NssImpl::validate( + ++nReferenceGood; + } + } ++ SAL_INFO("xmlsecurity.xmlsec", "xmlSecDSigCtxVerify status " << pDsigCtx->status << ", references good " << nReferenceGood << " of " << nReferenceCount); + + if (rs == 0 && pDsigCtx->status == xmlSecDSigStatusSucceeded && nReferenceCount == nReferenceGood) + { +-- +cgit v1.2.1 + diff --git a/debian/patches/xmlsecurity-replace-XSecParser-implementation.diff b/debian/patches/xmlsecurity-replace-XSecParser-implementation.diff new file mode 100644 index 00000000000..861c4e22637 --- /dev/null +++ b/debian/patches/xmlsecurity-replace-XSecParser-implementation.diff @@ -0,0 +1,2170 @@ +From ad5930e87e788780a255523f106deb1dde5d7b37 Mon Sep 17 00:00:00 2001 +From: Michael Stahl +Date: Fri, 12 Feb 2021 16:42:51 +0100 +Subject: xmlsecurity: replace XSecParser implementation +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Implement Namespaces in XML and follow xmldsig-core and XAdES schemas. + +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110833 +Tested-by: Jenkins +Reviewed-by: Michael Stahl +(cherry picked from commit 12b15be8f4f930a04d8056b9219ac969b42a9784) + +xmlsecurity: move XSecParser state into contexts + +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111158 +Tested-by: Jenkins +Reviewed-by: Michael Stahl +(cherry picked from commit 59df9e70ce1a7ec797b836bda7f9642912febc53) + +xmlsecurity: move XSecParser Reference state into contexts + +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111159 +Tested-by: Jenkins +Reviewed-by: Michael Stahl +(cherry picked from commit cfeb89a758b5f0ec406f0d72444e52ed2f47b85e) + +Change-Id: I03537b51bb757ecbfa63a826b38de543c70ba032 +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111907 +Tested-by: Jenkins +Reviewed-by: Caolán McNamara +--- + include/xmloff/xmlimp.hxx | 6 +- + include/xmloff/xmlnmspe.hxx | 7 + + include/xmloff/xmltoken.hxx | 13 + + xmloff/source/core/xmlimp.cxx | 26 +- + xmloff/source/core/xmltoken.cxx | 13 + + xmloff/source/token/tokens.txt | 10 + + xmlsecurity/source/helper/xsecparser.cxx | 1634 ++++++++++++++++++++++++------ + xmlsecurity/source/helper/xsecparser.hxx | 99 +- + 8 files changed, 1427 insertions(+), 381 deletions(-) + +diff --git a/include/xmloff/xmlimp.hxx b/include/xmloff/xmlimp.hxx +index 7f08609189ab..86871b7df445 100644 +--- a/include/xmloff/xmlimp.hxx ++++ b/include/xmloff/xmlimp.hxx +@@ -240,8 +240,12 @@ class XMLOFF_DLLPUBLIC SvXMLImport : public cppu::WeakImplHelper< + + static void initializeNamespaceMaps(); + void registerNamespaces(); +- std::unique_ptr processNSAttributes( ++public: ++ static std::unique_ptr processNSAttributes( ++ std::unique_ptr & rpNamespaceMap, ++ SvXMLImport *const pImport, + const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList); ++private: + void Characters(const OUString& aChars); + + css::uno::Reference< css::task::XStatusIndicator > mxStatusIndicator; +diff --git a/include/xmloff/xmlnmspe.hxx b/include/xmloff/xmlnmspe.hxx +index d45832f02d81..cabdcc7578e2 100644 +--- a/include/xmloff/xmlnmspe.hxx ++++ b/include/xmloff/xmlnmspe.hxx +@@ -69,6 +69,13 @@ constexpr sal_uInt16 XML_NAMESPACE_TCD = 34; // text conversion di + constexpr sal_uInt16 XML_NAMESPACE_DLG = 35; + constexpr sal_uInt16 XML_NAMESPACE_REPORT = 36; + constexpr sal_uInt16 XML_NAMESPACE_VERSIONS_LIST = 37; ++// OOo extension digital signatures, used in ODF 1.1 ++constexpr sal_uInt16 XML_NAMESPACE_DSIG_OOO = 38; ++// ODF 1.2 digital signature namespaces ++constexpr sal_uInt16 XML_NAMESPACE_DSIG = 39; ++constexpr sal_uInt16 XML_NAMESPACE_DS = 40; ++constexpr sal_uInt16 XML_NAMESPACE_XADES132 = 41; ++constexpr sal_uInt16 XML_NAMESPACE_XADES141 = 42; + + // namespaces for ODF extended formats + constexpr sal_uInt16 XML_NAMESPACE_EXT_BASE = 50; +diff --git a/include/xmloff/xmltoken.hxx b/include/xmloff/xmltoken.hxx +index 49178ebdc996..b6956245ed17 100644 +--- a/include/xmloff/xmltoken.hxx ++++ b/include/xmloff/xmltoken.hxx +@@ -135,6 +135,19 @@ namespace xmloff::token { + XML_NP_GRDDL, + XML_N_GRDDL, + ++ // OOo extension digital signatures, used in ODF 1.1 ++ XML_NP_DSIG_OOO, ++ XML_N_DSIG_OOO, ++ // ODF 1.2 digital signatures ++ XML_NP_DSIG, ++ XML_N_DSIG, ++ XML_NP_DS, ++ XML_N_DS, ++ XML_NP_XADES132, ++ XML_N_XADES132, ++ XML_NP_XADES141, ++ XML_N_XADES141, ++ + // ODF Enhanced namespaces + XML_NP_OFFICE_EXT, + XML_N_OFFICE_EXT, +diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx +index 0c9e9d06cfd4..18429cc4860f 100644 +--- a/xmloff/source/core/xmlimp.cxx ++++ b/xmloff/source/core/xmlimp.cxx +@@ -665,6 +665,8 @@ void SAL_CALL SvXMLImport::endDocument() + } + + std::unique_ptr SvXMLImport::processNSAttributes( ++ std::unique_ptr & rpNamespaceMap, ++ SvXMLImport *const pImport, // TODO??? + const uno::Reference< xml::sax::XAttributeList >& xAttrList) + { + std::unique_ptr pRewindMap; +@@ -672,12 +674,13 @@ std::unique_ptr SvXMLImport::processNSAttributes( + for( sal_Int16 i=0; i < nAttrCount; i++ ) + { + const OUString& rAttrName = xAttrList->getNameByIndex( i ); +- if ( rAttrName == "office:version" ) ++ if (pImport && rAttrName == "office:version") + { +- mpImpl->aODFVersion = xAttrList->getValueByIndex( i ); ++ pImport->mpImpl->aODFVersion = xAttrList->getValueByIndex( i ); + + // the ODF version in content.xml and manifest.xml must be the same starting from ODF1.2 +- if ( mpImpl->mStreamName == "content.xml" && !IsODFVersionConsistent( mpImpl->aODFVersion ) ) ++ if (pImport->mpImpl->mStreamName == "content.xml" ++ && !pImport->IsODFVersionConsistent(pImport->mpImpl->aODFVersion)) + { + throw xml::sax::SAXException("Inconsistent ODF versions in content.xml and manifest.xml!", + uno::Reference< uno::XInterface >(), +@@ -691,8 +694,8 @@ std::unique_ptr SvXMLImport::processNSAttributes( + { + if( !pRewindMap ) + { +- pRewindMap = std::move(mpNamespaceMap); +- mpNamespaceMap.reset(new SvXMLNamespaceMap(*pRewindMap)); ++ pRewindMap = std::move(rpNamespaceMap); ++ rpNamespaceMap.reset(new SvXMLNamespaceMap(*pRewindMap)); + } + const OUString& rAttrValue = xAttrList->getValueByIndex( i ); + +@@ -700,18 +703,18 @@ std::unique_ptr SvXMLImport::processNSAttributes( + ? OUString() + : rAttrName.copy( 6 ) ); + // Add namespace, but only if it is known. +- sal_uInt16 nKey = mpNamespaceMap->AddIfKnown( aPrefix, rAttrValue ); ++ sal_uInt16 nKey = rpNamespaceMap->AddIfKnown( aPrefix, rAttrValue ); + // If namespace is unknown, try to match a name with similar + // TC Id and version + if( XML_NAMESPACE_UNKNOWN == nKey ) + { + OUString aTestName( rAttrValue ); + if( SvXMLNamespaceMap::NormalizeURI( aTestName ) ) +- nKey = mpNamespaceMap->AddIfKnown( aPrefix, aTestName ); ++ nKey = rpNamespaceMap->AddIfKnown( aPrefix, aTestName ); + } + // If that namespace is not known, too, add it as unknown + if( XML_NAMESPACE_UNKNOWN == nKey ) +- mpNamespaceMap->Add( aPrefix, rAttrValue ); ++ rpNamespaceMap->Add( aPrefix, rAttrValue ); + + } + } +@@ -724,7 +727,8 @@ void SAL_CALL SvXMLImport::startElement( const OUString& rName, + // SAL_INFO("svg", "startElement " << rName); + // Process namespace attributes. This must happen before creating the + // context, because namespace declaration apply to the element name itself. +- std::unique_ptr pRewindMap(processNSAttributes(xAttrList)); ++ std::unique_ptr pRewindMap( ++ processNSAttributes(mpNamespaceMap, this, xAttrList)); + + // Get element's namespace and local name. + OUString aLocalName; +@@ -898,7 +902,7 @@ void SAL_CALL SvXMLImport::startFastElement (sal_Int32 Element, + + maNamespaceHandler->addNSDeclAttributes( maNamespaceAttrList ); + std::unique_ptr pRewindMap( +- processNSAttributes( maNamespaceAttrList.get() )); ++ processNSAttributes(mpNamespaceMap, this, maNamespaceAttrList.get())); + assert( dynamic_cast( xContext.get() ) != nullptr ); + SvXMLImportContext *pContext = static_cast( xContext.get() ); + if (pRewindMap) +@@ -2251,7 +2255,7 @@ void SAL_CALL SvXMLLegacyToFastDocHandler::endDocument() + void SAL_CALL SvXMLLegacyToFastDocHandler::startElement( const OUString& rName, + const uno::Reference< xml::sax::XAttributeList >& xAttrList ) + { +- mrImport->processNSAttributes(xAttrList); ++ SvXMLImport::processNSAttributes(mrImport->mpNamespaceMap, mrImport.get(), xAttrList); + OUString aLocalName; + sal_uInt16 nPrefix = mrImport->mpNamespaceMap->GetKeyByAttrName( rName, &aLocalName ); + Sequence< sal_Int8 > aLocalNameSeq( reinterpret_cast( +diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx +index 8d9a70f5e082..91c014f5756f 100644 +--- a/xmloff/source/core/xmltoken.cxx ++++ b/xmloff/source/core/xmltoken.cxx +@@ -144,6 +144,19 @@ namespace xmloff::token { + TOKEN( "grddl", XML_NP_GRDDL ), + TOKEN( "http://www.w3.org/2003/g/data-view#", XML_N_GRDDL ), + ++ // OOo extension digital signatures, used in ODF 1.1 ++ TOKEN( "dsigooo", XML_NP_DSIG_OOO ), ++ TOKEN( "http://openoffice.org/2004/documentsignatures", XML_N_DSIG_OOO ), ++ // ODF 1.2 digital signature namespaces ++ TOKEN( "dsig", XML_NP_DSIG ), ++ TOKEN( "urn:oasis:names:tc:opendocument:xmlns:digitalsignature:1.0", XML_N_DSIG ), ++ TOKEN( "ds", XML_NP_DS ), ++ TOKEN( "http://www.w3.org/2000/09/xmldsig#", XML_N_DS ), ++ TOKEN( "xades132", XML_NP_XADES132 ), ++ TOKEN( "http://uri.etsi.org/01903/v1.3.2#", XML_N_XADES132 ), ++ TOKEN( "xades141", XML_NP_XADES141 ), ++ TOKEN( "http://uri.etsi.org/01903/v1.4.1#", XML_N_XADES141 ), ++ + // ODF Enhanced namespaces + TOKEN( "officeooo", XML_NP_OFFICE_EXT ), + TOKEN( "http://openoffice.org/2009/office", XML_N_OFFICE_EXT ), +diff --git a/xmloff/source/token/tokens.txt b/xmloff/source/token/tokens.txt +index 34b9af91e03c..495e519ffb2d 100644 +--- a/xmloff/source/token/tokens.txt ++++ b/xmloff/source/token/tokens.txt +@@ -72,6 +72,16 @@ xhtml + N_XHTML_DUMMY + grddl + N_GRDDL_DUMMY ++dsigooo ++N_DSIG_OOO_DUMMY ++dsig ++N_DSIG_DUMMY ++ds ++N_DS_DUMMY ++xades132 ++N_XADES132_DUMMY ++xades141 ++N_XADES141_DUMMY + officeooo + N_OFFICE_EXT_DUMMY + formx +diff --git a/xmlsecurity/source/helper/xsecparser.cxx b/xmlsecurity/source/helper/xsecparser.cxx +index 9f2bbe074a1b..0aecb1854f8c 100644 +--- a/xmlsecurity/source/helper/xsecparser.cxx ++++ b/xmlsecurity/source/helper/xsecparser.cxx +@@ -21,476 +21,1468 @@ + #include "xsecparser.hxx" + #include + #include ++ ++#include ++#include ++ + #include + #include + #include + ++class XSecParser::Context ++{ ++ protected: ++ friend class XSecParser; ++ XSecParser & m_rParser; ++ private: ++ std::unique_ptr m_pOldNamespaceMap; + +-XSecParser::XSecParser(XMLSignatureHelper& rXMLSignatureHelper, +- XSecController* pXSecController) +- : m_bInX509IssuerName(false) +- , m_bInX509SerialNumber(false) +- , m_bInX509Certificate(false) +- , m_bInGpgCertificate(false) +- , m_bInGpgKeyID(false) +- , m_bInGpgOwner(false) +- , m_bInCertDigest(false) +- , m_bInEncapsulatedX509Certificate(false) +- , m_bInSigningTime(false) +- , m_bInDigestValue(false) +- , m_bInSignatureValue(false) +- , m_bInDate(false) +- , m_bInDescription(false) +- , m_bInSignatureLineId(false) +- , m_bInSignatureLineValidImage(false) +- , m_bInSignatureLineInvalidImage(false) +- , m_pXSecController(pXSecController) +- , m_bReferenceUnresolved(false) +- , m_nReferenceDigestID(css::xml::crypto::DigestID::SHA1) +- , m_rXMLSignatureHelper(rXMLSignatureHelper) ++ public: ++ Context(XSecParser & rParser, ++ std::unique_ptr pOldNamespaceMap) ++ : m_rParser(rParser) ++ , m_pOldNamespaceMap(std::move(pOldNamespaceMap)) ++ { ++ } ++ ++ virtual ~Context() = default; ++ ++ virtual void StartElement( ++ css::uno::Reference const& /*xAttrs*/) ++ { ++ } ++ ++ virtual void EndElement() ++ { ++ } ++ ++ virtual std::unique_ptr CreateChildContext( ++ std::unique_ptr pOldNamespaceMap, ++ sal_uInt16 const /*nNamespace*/, OUString const& /*rName*/); ++ ++ virtual void Characters(OUString const& /*rChars*/) ++ { ++ } ++}; ++ ++// it's possible that an unsupported element has an Id attribute and a ++// ds:Reference digesting it - probably this means XSecController needs to know ++// about it. (For known elements, the Id attribute is only processed according ++// to the schema.) ++class XSecParser::UnknownContext ++ : public XSecParser::Context + { ++ public: ++ UnknownContext(XSecParser & rParser, ++ std::unique_ptr pOldNamespaceMap) ++ : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) ++ { ++ } ++ ++ virtual void StartElement( ++ css::uno::Reference const& xAttrs) override ++ { ++ m_rParser.HandleIdAttr(xAttrs); ++ } ++}; ++ ++auto XSecParser::Context::CreateChildContext( ++ std::unique_ptr pOldNamespaceMap, ++ sal_uInt16 const /*nNamespace*/, OUString const& /*rName*/) ++-> std::unique_ptr ++{ ++ // default: create new base context ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap)); + } + +-OUString XSecParser::getIdAttr(const css::uno::Reference< css::xml::sax::XAttributeList >& xAttribs ) ++class XSecParser::LoPGPOwnerContext ++ : public XSecParser::Context + { +- OUString ouIdAttr = xAttribs->getValueByName("id"); ++ private: ++ OUString m_Value; + +- if (ouIdAttr.isEmpty()) +- { +- ouIdAttr = xAttribs->getValueByName("Id"); +- } ++ public: ++ LoPGPOwnerContext(XSecParser & rParser, ++ std::unique_ptr pOldNamespaceMap) ++ : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) ++ { ++ } + +- return ouIdAttr; +-} ++ virtual void EndElement() override ++ { ++ m_rParser.m_pXSecController->setGpgOwner(m_Value); ++ } + +-/* +- * XDocumentHandler +- */ +-void SAL_CALL XSecParser::startDocument( ) ++ virtual void Characters(OUString const& rChars) override ++ { ++ m_Value += rChars; ++ } ++}; ++ ++class XSecParser::DsPGPKeyPacketContext ++ : public XSecParser::Context + { +- m_bInX509IssuerName = false; +- m_bInX509SerialNumber = false; +- m_bInX509Certificate = false; +- m_bInGpgCertificate = false; +- m_bInGpgKeyID = false; +- m_bInGpgOwner = false; +- m_bInSignatureValue = false; +- m_bInDigestValue = false; +- m_bInDate = false; +- m_bInDescription = false; ++ private: ++ OUString m_Value; + +- if (m_xNextHandler.is()) +- { +- m_xNextHandler->startDocument(); +- } +-} ++ public: ++ DsPGPKeyPacketContext(XSecParser & rParser, ++ std::unique_ptr pOldNamespaceMap) ++ : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) ++ { ++ } + +-void SAL_CALL XSecParser::endDocument( ) ++ virtual void EndElement() override ++ { ++ m_rParser.m_pXSecController->setGpgCertificate(m_Value); ++ } ++ ++ virtual void Characters(OUString const& rChars) override ++ { ++ m_Value += rChars; ++ } ++}; ++ ++class XSecParser::DsPGPKeyIDContext ++ : public XSecParser::Context + { +- if (m_xNextHandler.is()) +- { +- m_xNextHandler->endDocument(); +- } +-} ++ private: ++ OUString m_Value; + +-void SAL_CALL XSecParser::startElement( +- const OUString& aName, +- const css::uno::Reference< css::xml::sax::XAttributeList >& xAttribs ) ++ public: ++ DsPGPKeyIDContext(XSecParser & rParser, ++ std::unique_ptr pOldNamespaceMap) ++ : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) ++ { ++ } ++ ++ virtual void EndElement() override ++ { ++ m_rParser.m_pXSecController->setGpgKeyID(m_Value); ++ } ++ ++ virtual void Characters(OUString const& rChars) override ++ { ++ m_Value += rChars; ++ } ++}; ++ ++class XSecParser::DsPGPDataContext ++ : public XSecParser::Context + { +- try +- { +- OUString ouIdAttr = getIdAttr(xAttribs); +- if (!ouIdAttr.isEmpty()) ++ public: ++ DsPGPDataContext(XSecParser & rParser, ++ std::unique_ptr pOldNamespaceMap) ++ : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) ++ { ++ } ++ ++ virtual void StartElement( ++ css::uno::Reference const& /*xAttrs*/) override ++ { ++ m_rParser.m_pXSecController->switchGpgSignature(); ++ } ++ ++ virtual std::unique_ptr CreateChildContext( ++ std::unique_ptr pOldNamespaceMap, ++ sal_uInt16 const nNamespace, OUString const& rName) override ++ { ++ if (nNamespace == XML_NAMESPACE_DS && rName == "PGPKeyID") ++ { ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap)); ++ } ++ if (nNamespace == XML_NAMESPACE_DS && rName == "PGPKeyPacket") ++ { ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap)); ++ } ++ if (nNamespace == XML_NAMESPACE_LO_EXT && rName == "PGPOwner") ++ { ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap)); ++ } ++ return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName); ++ } ++}; ++ ++class XSecParser::DsX509CertificateContext ++ : public XSecParser::Context ++{ ++ private: ++ OUString m_Value; ++ ++ public: ++ DsX509CertificateContext(XSecParser & rParser, ++ std::unique_ptr pOldNamespaceMap) ++ : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) ++ { ++ } ++ ++ virtual void EndElement() override ++ { ++ m_rParser.m_pXSecController->setX509Certificate(m_Value); ++ } ++ ++ virtual void Characters(OUString const& rChars) override ++ { ++ m_Value += rChars; ++ } ++}; ++ ++class XSecParser::DsX509SerialNumberContext ++ : public XSecParser::Context ++{ ++ private: ++ OUString m_Value; ++ ++ public: ++ DsX509SerialNumberContext(XSecParser & rParser, ++ std::unique_ptr pOldNamespaceMap) ++ : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) ++ { ++ } ++ ++ virtual void EndElement() override ++ { ++ m_rParser.m_pXSecController->setX509SerialNumber(m_Value); ++ } ++ ++ virtual void Characters(OUString const& rChars) override ++ { ++ m_Value += rChars; ++ } ++}; ++ ++class XSecParser::DsX509IssuerNameContext ++ : public XSecParser::Context ++{ ++ private: ++ OUString m_Value; ++ ++ public: ++ DsX509IssuerNameContext(XSecParser & rParser, ++ std::unique_ptr pOldNamespaceMap) ++ : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) ++ { ++ } ++ ++ virtual void EndElement() override ++ { ++ m_rParser.m_pXSecController->setX509IssuerName(m_Value); ++ } ++ ++ virtual void Characters(OUString const& rChars) override ++ { ++ m_Value += rChars; ++ } ++}; ++ ++class XSecParser::DsX509IssuerSerialContext ++ : public XSecParser::Context ++{ ++ public: ++ DsX509IssuerSerialContext(XSecParser & rParser, ++ std::unique_ptr pOldNamespaceMap) ++ : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) ++ { ++ } ++ ++ virtual std::unique_ptr CreateChildContext( ++ std::unique_ptr pOldNamespaceMap, ++ sal_uInt16 const nNamespace, OUString const& rName) override ++ { ++ if (nNamespace == XML_NAMESPACE_DS && rName == "X509IssuerName") ++ { ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap)); ++ } ++ if (nNamespace == XML_NAMESPACE_DS && rName == "X509SerialNumber") ++ { ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap)); ++ } ++ // missing: ds:X509SKI, ds:X509SubjectName, ds:X509CRL ++ return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName); ++ } ++}; ++ ++class XSecParser::DsX509DataContext ++ : public XSecParser::Context ++{ ++ public: ++ DsX509DataContext(XSecParser & rParser, ++ std::unique_ptr pOldNamespaceMap) ++ : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) ++ { ++ } ++ ++ virtual std::unique_ptr CreateChildContext( ++ std::unique_ptr pOldNamespaceMap, ++ sal_uInt16 const nNamespace, OUString const& rName) override ++ { ++ if (nNamespace == XML_NAMESPACE_DS && rName == "X509IssuerSerial") ++ { ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap)); ++ } ++ if (nNamespace == XML_NAMESPACE_DS && rName == "X509Certificate") ++ { ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap)); ++ } ++ // missing: ds:X509SKI, ds:X509SubjectName, ds:X509CRL ++ return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName); ++ } ++}; ++ ++class XSecParser::DsKeyInfoContext ++ : public XSecParser::Context ++{ ++ public: ++ DsKeyInfoContext(XSecParser & rParser, ++ std::unique_ptr pOldNamespaceMap) ++ : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) ++ { ++ } ++ ++ virtual void StartElement( ++ css::uno::Reference const& xAttrs) override ++ { ++ m_rParser.HandleIdAttr(xAttrs); ++ } ++ ++ virtual std::unique_ptr CreateChildContext( ++ std::unique_ptr pOldNamespaceMap, ++ sal_uInt16 const nNamespace, OUString const& rName) override ++ { ++ if (nNamespace == XML_NAMESPACE_DS && rName == "X509Data") ++ { ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap)); ++ } ++ if (nNamespace == XML_NAMESPACE_DS && rName == "PGPData") ++ { ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap)); ++ } ++ // missing: ds:KeyName, ds:KeyValue, ds:RetrievalMethod, ds:SPKIData, ds:MgmtData ++ // (old code would read ds:Transform inside ds:RetrievalMethod but ++ // presumably that was a bug) ++ return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName); ++ } ++ ++}; ++ ++class XSecParser::DsSignatureValueContext ++ : public XSecParser::Context ++{ ++ private: ++ OUString m_Value; ++ ++ public: ++ DsSignatureValueContext(XSecParser & rParser, ++ std::unique_ptr pOldNamespaceMap) ++ : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) ++ { ++ } ++ ++ virtual void StartElement( ++ css::uno::Reference const& xAttrs) override ++ { ++ m_rParser.HandleIdAttr(xAttrs); ++ } ++ ++ virtual void EndElement() override ++ { ++ m_rParser.m_pXSecController->setSignatureValue(m_Value); ++ } ++ ++ virtual void Characters(OUString const& rChars) override ++ { ++ m_Value += rChars; ++ } ++}; ++ ++class XSecParser::DsDigestValueContext ++ : public XSecParser::Context ++{ ++ private: ++ OUString & m_rValue; ++ ++ public: ++ DsDigestValueContext(XSecParser & rParser, ++ std::unique_ptr pOldNamespaceMap, ++ OUString & rValue) ++ : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) ++ , m_rValue(rValue) ++ { ++ } ++ ++ virtual void StartElement( ++ css::uno::Reference const& /*xAttrs*/) override ++ { ++ m_rValue.clear(); ++ } ++ ++ virtual void Characters(OUString const& rChars) override ++ { ++ m_rValue += rChars; ++ } ++}; ++ ++class XSecParser::DsDigestMethodContext ++ : public XSecParser::Context ++{ ++ private: ++ sal_Int32 & m_rReferenceDigestID; ++ ++ public: ++ DsDigestMethodContext(XSecParser & rParser, ++ std::unique_ptr pOldNamespaceMap, ++ sal_Int32 & rReferenceDigestID) ++ : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) ++ , m_rReferenceDigestID(rReferenceDigestID) ++ { ++ } ++ ++ virtual void StartElement( ++ css::uno::Reference const& xAttrs) override ++ { ++ OUString ouAlgorithm = xAttrs->getValueByName("Algorithm"); ++ ++ SAL_WARN_IF( ouAlgorithm.isEmpty(), "xmlsecurity.helper", "no Algorithm in Reference" ); ++ if (!ouAlgorithm.isEmpty()) ++ { ++ SAL_WARN_IF( ouAlgorithm != ALGO_XMLDSIGSHA1 ++ && ouAlgorithm != ALGO_XMLDSIGSHA256 ++ && ouAlgorithm != ALGO_XMLDSIGSHA512, ++ "xmlsecurity.helper", "Algorithm neither SHA1, SHA256 nor SHA512"); ++ if (ouAlgorithm == ALGO_XMLDSIGSHA1) ++ m_rReferenceDigestID = css::xml::crypto::DigestID::SHA1; ++ else if (ouAlgorithm == ALGO_XMLDSIGSHA256) ++ m_rReferenceDigestID = css::xml::crypto::DigestID::SHA256; ++ else if (ouAlgorithm == ALGO_XMLDSIGSHA512) ++ m_rReferenceDigestID = css::xml::crypto::DigestID::SHA512; ++ else ++ m_rReferenceDigestID = 0; ++ } ++ } ++}; ++ ++class XSecParser::DsTransformContext ++ : public XSecParser::Context ++{ ++ private: ++ bool & m_rIsC14N; ++ ++ public: ++ DsTransformContext(XSecParser & rParser, ++ std::unique_ptr pOldNamespaceMap, ++ bool & rIsC14N) ++ : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) ++ , m_rIsC14N(rIsC14N) ++ { ++ } ++ ++ virtual void StartElement( ++ css::uno::Reference const& xAttrs) override ++ { ++ OUString ouAlgorithm = xAttrs->getValueByName("Algorithm"); ++ ++ if (ouAlgorithm == ALGO_C14N) ++ /* ++ * a xml stream ++ */ ++ { ++ m_rIsC14N = true; ++ } ++ } ++}; ++ ++class XSecParser::DsTransformsContext ++ : public XSecParser::Context ++{ ++ private: ++ bool & m_rIsC14N; ++ ++ public: ++ DsTransformsContext(XSecParser & rParser, ++ std::unique_ptr pOldNamespaceMap, ++ bool & rIsC14N) ++ : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) ++ , m_rIsC14N(rIsC14N) ++ { ++ } ++ ++ virtual std::unique_ptr CreateChildContext( ++ std::unique_ptr pOldNamespaceMap, ++ sal_uInt16 const nNamespace, OUString const& rName) override ++ { ++ if (nNamespace == XML_NAMESPACE_DS && rName == "Transform") ++ { ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap), m_rIsC14N); ++ } ++ return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName); ++ } ++}; ++ ++class XSecParser::DsReferenceContext ++ : public XSecParser::Context ++{ ++ private: ++ OUString m_URI; ++ OUString m_Type; ++ OUString m_DigestValue; ++ bool m_IsC14N = false; ++ // Relevant for ODF. The digest algorithm selected by the DigestMethod ++ // element's Algorithm attribute. @see css::xml::crypto::DigestID. ++ sal_Int32 m_nReferenceDigestID = css::xml::crypto::DigestID::SHA1; ++ ++ public: ++ DsReferenceContext(XSecParser & rParser, ++ std::unique_ptr pOldNamespaceMap) ++ : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) ++ { ++ } ++ ++ virtual void StartElement( ++ css::uno::Reference const& xAttrs) override ++ { ++ m_rParser.HandleIdAttr(xAttrs); ++ ++ m_URI = xAttrs->getValueByName("URI"); ++ SAL_WARN_IF(m_URI.isEmpty(), "xmlsecurity.helper", "URI is empty"); ++ // Remember the type of this reference. ++ m_Type = xAttrs->getValueByName("Type"); ++ } ++ ++ virtual void EndElement() override ++ { ++ if (m_URI.startsWith("#")) ++ { ++ /* ++ * remove the first character '#' from the attribute value ++ */ ++ m_rParser.m_pXSecController->addReference(m_URI.copy(1), m_nReferenceDigestID, m_Type); ++ } ++ else ++ { ++ if (m_IsC14N) // this is determined by nested ds:Transform ++ { ++ m_rParser.m_pXSecController->addStreamReference(m_URI, false, m_nReferenceDigestID); ++ } ++ else ++ /* ++ * it must be an octet stream ++ */ ++ { ++ m_rParser.m_pXSecController->addStreamReference(m_URI, true, m_nReferenceDigestID); ++ } ++ } ++ ++ m_rParser.m_pXSecController->setDigestValue(m_nReferenceDigestID, m_DigestValue); ++ } ++ ++ virtual std::unique_ptr CreateChildContext( ++ std::unique_ptr pOldNamespaceMap, ++ sal_uInt16 const nNamespace, OUString const& rName) override ++ { ++ if (nNamespace == XML_NAMESPACE_DS && rName == "Transforms") ++ { ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap), m_IsC14N); ++ } ++ if (nNamespace == XML_NAMESPACE_DS && rName == "DigestMethod") ++ { ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap), m_nReferenceDigestID); ++ } ++ if (nNamespace == XML_NAMESPACE_DS && rName == "DigestValue") ++ { ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap), m_DigestValue); ++ } ++ return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName); ++ } ++}; ++ ++class XSecParser::DsSignatureMethodContext ++ : public XSecParser::Context ++{ ++ public: ++ DsSignatureMethodContext(XSecParser & rParser, ++ std::unique_ptr pOldNamespaceMap) ++ : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) ++ { ++ } ++ ++ virtual void StartElement( ++ css::uno::Reference const& xAttrs) override ++ { ++ OUString ouAlgorithm = xAttrs->getValueByName("Algorithm"); ++ if (ouAlgorithm == ALGO_ECDSASHA1 || ouAlgorithm == ALGO_ECDSASHA256 ++ || ouAlgorithm == ALGO_ECDSASHA512) ++ { ++ m_rParser.m_pXSecController->setSignatureMethod(svl::crypto::SignatureMethodAlgorithm::ECDSA); ++ } ++ } ++}; ++ ++class XSecParser::DsSignedInfoContext ++ : public XSecParser::Context ++{ ++ public: ++ DsSignedInfoContext(XSecParser & rParser, ++ std::unique_ptr pOldNamespaceMap) ++ : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) ++ { ++ } ++ ++ virtual void StartElement( ++ css::uno::Reference const& xAttrs) override ++ { ++ m_rParser.HandleIdAttr(xAttrs); ++ } ++ ++ virtual void EndElement() override ++ { ++ m_rParser.m_pXSecController->setReferenceCount(); ++ } ++ ++ virtual std::unique_ptr CreateChildContext( ++ std::unique_ptr pOldNamespaceMap, ++ sal_uInt16 const nNamespace, OUString const& rName) override ++ { ++ if (nNamespace == XML_NAMESPACE_DS && rName == "SignatureMethod") ++ { ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap)); ++ } ++ if (nNamespace == XML_NAMESPACE_DS && rName == "Reference") ++ { ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap)); ++ } ++ // missing: ds:CanonicalizationMethod ++ return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName); ++ } ++}; ++ ++class XSecParser::XadesEncapsulatedX509CertificateContext ++ : public XSecParser::Context ++{ ++ private: ++ OUString m_Value; ++ ++ public: ++ XadesEncapsulatedX509CertificateContext(XSecParser & rParser, ++ std::unique_ptr pOldNamespaceMap) ++ : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) ++ { ++ } ++ ++ virtual void StartElement( ++ css::uno::Reference const& xAttrs) override ++ { ++ m_rParser.HandleIdAttr(xAttrs); ++ } ++ ++ virtual void EndElement() override ++ { ++ m_rParser.m_pXSecController->addEncapsulatedX509Certificate(m_Value); ++ } ++ ++ virtual void Characters(OUString const& rChars) override ++ { ++ m_Value += rChars; ++ } ++}; ++ ++class XSecParser::XadesCertificateValuesContext ++ : public XSecParser::Context ++{ ++ public: ++ XadesCertificateValuesContext(XSecParser & rParser, ++ std::unique_ptr pOldNamespaceMap) ++ : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) ++ { ++ } ++ ++ virtual void StartElement( ++ css::uno::Reference const& xAttrs) override ++ { ++ m_rParser.HandleIdAttr(xAttrs); ++ } ++ ++ virtual std::unique_ptr CreateChildContext( ++ std::unique_ptr pOldNamespaceMap, ++ sal_uInt16 const nNamespace, OUString const& rName) override ++ { ++ if (nNamespace == XML_NAMESPACE_XADES132 && rName == "EncapsulatedX509Certificate") ++ { ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap)); ++ } ++ // missing: xades:OtherCertificate ++ return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName); ++ } ++}; ++ ++class XSecParser::XadesUnsignedSignaturePropertiesContext ++ : public XSecParser::Context ++{ ++ public: ++ XadesUnsignedSignaturePropertiesContext(XSecParser & rParser, ++ std::unique_ptr pOldNamespaceMap) ++ : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) ++ { ++ } ++ ++ virtual void StartElement( ++ css::uno::Reference const& xAttrs) override ++ { ++ m_rParser.HandleIdAttr(xAttrs); ++ } ++ ++ virtual std::unique_ptr CreateChildContext( ++ std::unique_ptr pOldNamespaceMap, ++ sal_uInt16 const nNamespace, OUString const& rName) override ++ { ++ if (nNamespace == XML_NAMESPACE_XADES132 && rName == "CertificateValues") ++ { ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap)); ++ } ++ // missing: ++ // xades:CounterSignature ++ // ^ old code would read a ds:Signature inside it? ++ // xades:SignatureTimeStamp ++ // xades:CompleteCertificateRefs ++ // xades:CompleteRevocationRefs ++ // xades:AttributeCertificateRefs ++ // xades:AttributeRevocationRefs ++ // xades:SigAndRefsTimeStamp ++ // xades:RefsOnlyTimeStamp ++ // xades:RevocationValues ++ // xades:AttrAuthoritiesCertValues ++ // ^ old code: was equivalent to CertificateValues ??? ++ // xades:AttributeRevocationValues ++ // xades:ArchiveTimeStamp ++ return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName); ++ } ++}; ++ ++class XSecParser::XadesUnsignedPropertiesContext ++ : public XSecParser::Context ++{ ++ public: ++ XadesUnsignedPropertiesContext(XSecParser & rParser, ++ std::unique_ptr pOldNamespaceMap) ++ : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) ++ { ++ } ++ ++ virtual void StartElement( ++ css::uno::Reference const& xAttrs) override ++ { ++ m_rParser.HandleIdAttr(xAttrs); ++ } ++ ++ virtual std::unique_ptr CreateChildContext( ++ std::unique_ptr pOldNamespaceMap, ++ sal_uInt16 const nNamespace, OUString const& rName) override ++ { ++ if (nNamespace == XML_NAMESPACE_XADES132 && rName == "UnsignedSignatureProperties") ++ { ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap)); ++ } ++ // missing: xades:UnsignedDataObjectProperties ++ return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName); ++ } ++}; ++ ++class XSecParser::LoSignatureLineIdContext ++ : public XSecParser::Context ++{ ++ private: ++ OUString m_Value; ++ ++ public: ++ LoSignatureLineIdContext(XSecParser & rParser, ++ std::unique_ptr pOldNamespaceMap) ++ : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) ++ { ++ } ++ ++ virtual void EndElement() override ++ { ++ m_rParser.m_pXSecController->setSignatureLineId(m_Value); ++ } ++ ++ virtual void Characters(OUString const& rChars) override ++ { ++ m_Value += rChars; ++ } ++}; ++ ++class XSecParser::LoSignatureLineValidImageContext ++ : public XSecParser::Context ++{ ++ private: ++ OUString m_Value; ++ ++ public: ++ LoSignatureLineValidImageContext(XSecParser & rParser, ++ std::unique_ptr pOldNamespaceMap) ++ : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) ++ { ++ } ++ ++ virtual void EndElement() override ++ { ++ m_rParser.m_pXSecController->setValidSignatureImage(m_Value); ++ } ++ ++ virtual void Characters(OUString const& rChars) override + { +- m_pXSecController->collectToVerify( ouIdAttr ); ++ m_Value += rChars; ++ } ++}; ++ ++class XSecParser::LoSignatureLineInvalidImageContext ++ : public XSecParser::Context ++{ ++ private: ++ OUString m_Value; ++ ++ public: ++ LoSignatureLineInvalidImageContext(XSecParser & rParser, ++ std::unique_ptr pOldNamespaceMap) ++ : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) ++ { ++ } ++ ++ virtual void EndElement() override ++ { ++ m_rParser.m_pXSecController->setInvalidSignatureImage(m_Value); ++ } ++ ++ virtual void Characters(OUString const& rChars) override ++ { ++ m_Value += rChars; ++ } ++}; ++ ++class XSecParser::LoSignatureLineContext ++ : public XSecParser::Context ++{ ++ public: ++ LoSignatureLineContext(XSecParser & rParser, ++ std::unique_ptr pOldNamespaceMap) ++ : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) ++ { ++ } ++ ++ virtual std::unique_ptr CreateChildContext( ++ std::unique_ptr pOldNamespaceMap, ++ sal_uInt16 const nNamespace, OUString const& rName) override ++ { ++ if (nNamespace == XML_NAMESPACE_LO_EXT && rName == "SignatureLineId") ++ { ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap)); ++ } ++ if (nNamespace == XML_NAMESPACE_LO_EXT && rName == "SignatureLineValidImage") ++ { ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap)); ++ } ++ if (nNamespace == XML_NAMESPACE_LO_EXT && rName == "SignatureLineInvalidImage") ++ { ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap)); ++ } ++ return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName); + } ++}; + +- if ( aName == "Signature" ) ++class XSecParser::XadesCertDigestContext ++ : public XSecParser::Context ++{ ++ private: ++ OUString m_Value; ++ sal_Int32 m_nReferenceDigestID = css::xml::crypto::DigestID::SHA1; ++ ++ public: ++ XadesCertDigestContext(XSecParser & rParser, ++ std::unique_ptr pOldNamespaceMap) ++ : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) + { +- m_rXMLSignatureHelper.StartVerifySignatureElement(); +- m_pXSecController->addSignature(); +- if (!ouIdAttr.isEmpty()) +- { +- m_pXSecController->setId( ouIdAttr ); +- } + } +- else if (aName == "SignatureMethod") ++ ++ virtual void EndElement() override + { +- OUString ouAlgorithm = xAttribs->getValueByName("Algorithm"); +- if (ouAlgorithm == ALGO_ECDSASHA1 || ouAlgorithm == ALGO_ECDSASHA256 +- || ouAlgorithm == ALGO_ECDSASHA512) +- m_pXSecController->setSignatureMethod(svl::crypto::SignatureMethodAlgorithm::ECDSA); ++ m_rParser.m_pXSecController->setCertDigest(m_Value/* FIXME , m_nReferenceDigestID*/); + } +- else if ( aName == "Reference" ) ++ ++ virtual std::unique_ptr CreateChildContext( ++ std::unique_ptr pOldNamespaceMap, ++ sal_uInt16 const nNamespace, OUString const& rName) override + { +- OUString ouUri = xAttribs->getValueByName("URI"); +- SAL_WARN_IF( ouUri.isEmpty(), "xmlsecurity.helper", "URI is empty" ); +- // Remember the type of this reference. +- OUString ouType = xAttribs->getValueByName("Type"); +- if (ouUri.startsWith("#")) ++ if (nNamespace == XML_NAMESPACE_DS && rName == "DigestMethod") + { +- /* +- * remove the first character '#' from the attribute value +- */ +- m_pXSecController->addReference( ouUri.copy(1), m_nReferenceDigestID, ouType ); ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap), m_nReferenceDigestID); + } +- else ++ if (nNamespace == XML_NAMESPACE_DS && rName == "DigestValue") + { +- /* +- * remember the uri +- */ +- m_currentReferenceURI = ouUri; +- m_bReferenceUnresolved = true; ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap), m_Value); + } ++ return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName); + } +- else if (aName == "DigestMethod") ++}; ++ ++class XSecParser::XadesCertContext ++ : public XSecParser::Context ++{ ++ public: ++ XadesCertContext(XSecParser & rParser, ++ std::unique_ptr pOldNamespaceMap) ++ : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) + { +- OUString ouAlgorithm = xAttribs->getValueByName("Algorithm"); ++ } + +- SAL_WARN_IF( ouAlgorithm.isEmpty(), "xmlsecurity.helper", "no Algorithm in Reference" ); +- if (!ouAlgorithm.isEmpty()) ++ virtual std::unique_ptr CreateChildContext( ++ std::unique_ptr pOldNamespaceMap, ++ sal_uInt16 const nNamespace, OUString const& rName) override ++ { ++ if (nNamespace == XML_NAMESPACE_XADES132 && rName == "CertDigest") + { +- SAL_WARN_IF( ouAlgorithm != ALGO_XMLDSIGSHA1 +- && ouAlgorithm != ALGO_XMLDSIGSHA256 +- && ouAlgorithm != ALGO_XMLDSIGSHA512, +- "xmlsecurity.helper", "Algorithm neither SHA1, SHA256 nor SHA512"); +- if (ouAlgorithm == ALGO_XMLDSIGSHA1) +- m_nReferenceDigestID = css::xml::crypto::DigestID::SHA1; +- else if (ouAlgorithm == ALGO_XMLDSIGSHA256) +- m_nReferenceDigestID = css::xml::crypto::DigestID::SHA256; +- else if (ouAlgorithm == ALGO_XMLDSIGSHA512) +- m_nReferenceDigestID = css::xml::crypto::DigestID::SHA512; +- else +- m_nReferenceDigestID = 0; ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap)); + } +- } +- else if (aName == "Transform") +- { +- if ( m_bReferenceUnresolved ) ++ if (nNamespace == XML_NAMESPACE_XADES132 && rName == "IssuerSerial") + { +- OUString ouAlgorithm = xAttribs->getValueByName("Algorithm"); +- +- if (ouAlgorithm == ALGO_C14N) +- /* +- * a xml stream +- */ +- { +- m_pXSecController->addStreamReference( m_currentReferenceURI, false, m_nReferenceDigestID ); +- m_bReferenceUnresolved = false; +- } ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap)); + } ++ return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName); + } +- else if (aName == "X509IssuerName") +- { +- m_ouX509IssuerName.clear(); +- m_bInX509IssuerName = true; +- } +- else if (aName == "X509SerialNumber") ++}; ++ ++class XSecParser::XadesSigningCertificateContext ++ : public XSecParser::Context ++{ ++ public: ++ XadesSigningCertificateContext(XSecParser & rParser, ++ std::unique_ptr pOldNamespaceMap) ++ : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) + { +- m_ouX509SerialNumber.clear(); +- m_bInX509SerialNumber = true; + } +- else if (aName == "X509Certificate") ++ ++ virtual std::unique_ptr CreateChildContext( ++ std::unique_ptr pOldNamespaceMap, ++ sal_uInt16 const nNamespace, OUString const& rName) override + { +- m_ouX509Certificate.clear(); +- m_bInX509Certificate = true; ++ if (nNamespace == XML_NAMESPACE_XADES132 && rName == "Cert") ++ { ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap)); ++ } ++ return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName); + } +- else if (aName == "PGPData") ++}; ++ ++class XSecParser::XadesSigningTimeContext ++ : public XSecParser::Context ++{ ++ public: ++ XadesSigningTimeContext(XSecParser & rParser, ++ std::unique_ptr pOldNamespaceMap) ++ : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) + { +- m_pXSecController->switchGpgSignature(); + } +- else if (aName == "PGPKeyID") ++ ++ virtual void StartElement( ++ css::uno::Reference const& /*xAttrs*/) override + { +- m_ouGpgKeyID.clear(); +- m_bInGpgKeyID = true; ++ m_rParser.m_ouDate.clear(); + } +- else if (aName == "PGPKeyPacket") ++ ++ virtual void EndElement() override + { +- m_ouGpgCertificate.clear(); +- m_bInGpgCertificate = true; ++ m_rParser.m_pXSecController->setDate( m_rParser.m_ouDate ); + } +- else if (aName == "loext:PGPOwner") ++ ++ virtual void Characters(OUString const& rChars) override + { +- m_ouGpgOwner.clear(); +- m_bInGpgOwner = true; ++ m_rParser.m_ouDate += rChars; + } +- else if (aName == "SignatureValue") ++}; ++ ++class XSecParser::XadesSignedSignaturePropertiesContext ++ : public XSecParser::Context ++{ ++ public: ++ XadesSignedSignaturePropertiesContext(XSecParser & rParser, ++ std::unique_ptr pOldNamespaceMap) ++ : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) + { +- m_ouSignatureValue.clear(); +- m_bInSignatureValue = true; + } +- else if (aName == "DigestValue" && !m_bInCertDigest) ++ ++ virtual void StartElement( ++ css::uno::Reference const& xAttrs) override + { +- m_ouDigestValue.clear(); +- m_bInDigestValue = true; ++ m_rParser.HandleIdAttr(xAttrs); + } +- else if (aName == "xd:CertDigest") ++ ++ virtual std::unique_ptr CreateChildContext( ++ std::unique_ptr pOldNamespaceMap, ++ sal_uInt16 const nNamespace, OUString const& rName) override + { +- m_ouCertDigest.clear(); +- m_bInCertDigest = true; ++ if (nNamespace == XML_NAMESPACE_XADES132 && rName == "SigningTime") ++ { ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap)); ++ } ++ if (nNamespace == XML_NAMESPACE_XADES132 && rName == "SigningCertificate") ++ { ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap)); ++ } ++ if (nNamespace == XML_NAMESPACE_LO_EXT && rName == "SignatureLine") ++ { ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap)); ++ } ++ // missing: xades:SignaturePolicyIdentifier, xades:SignatureProductionPlace, xades:SignerRole ++ return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName); + } +- // FIXME: Existing code here in xmlsecurity uses "xd" as the namespace prefix for XAdES, +- // while the sample document attached to tdf#76142 uses "xades". So accept either here. Of +- // course this is idiotic and wrong, the right thing would be to use a proper way to parse +- // XML that would handle namespaces correctly. I have no idea how substantial re-plumbing of +- // this code that would require. +- else if (aName == "xd:EncapsulatedX509Certificate" || aName == "xades:EncapsulatedX509Certificate") ++}; ++ ++class XSecParser::XadesSignedPropertiesContext ++ : public XSecParser::Context ++{ ++ public: ++ XadesSignedPropertiesContext(XSecParser & rParser, ++ std::unique_ptr pOldNamespaceMap) ++ : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) + { +- m_ouEncapsulatedX509Certificate.clear(); +- m_bInEncapsulatedX509Certificate = true; + } +- else if (aName == "xd:SigningTime" || aName == "xades:SigningTime") ++ ++ virtual void StartElement( ++ css::uno::Reference const& xAttrs) override + { +- m_ouDate.clear(); +- m_bInSigningTime = true; ++ m_rParser.HandleIdAttr(xAttrs); + } +- else if ( aName == "SignatureProperty" ) ++ ++ virtual std::unique_ptr CreateChildContext( ++ std::unique_ptr pOldNamespaceMap, ++ sal_uInt16 const nNamespace, OUString const& rName) override + { +- if (!ouIdAttr.isEmpty()) ++ if (nNamespace == XML_NAMESPACE_XADES132 && rName == "SignedSignatureProperties") + { +- m_pXSecController->setPropertyId( ouIdAttr ); ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap)); + } ++ // missing: xades:SignedDataObjectProperties ++ return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName); + } +- else if (aName == "dc:date") +- { +- if (m_ouDate.isEmpty()) +- m_bInDate = true; +- } +- else if (aName == "dc:description") ++}; ++ ++class XSecParser::XadesQualifyingPropertiesContext ++ : public XSecParser::Context ++{ ++ public: ++ XadesQualifyingPropertiesContext(XSecParser & rParser, ++ std::unique_ptr pOldNamespaceMap) ++ : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) + { +- m_ouDescription.clear(); +- m_bInDescription = true; + } +- else if (aName == "loext:SignatureLineId") ++ ++ virtual void StartElement( ++ css::uno::Reference const& xAttrs) override + { +- m_ouSignatureLineId.clear(); +- m_bInSignatureLineId = true; ++ m_rParser.HandleIdAttr(xAttrs); + } +- else if (aName == "loext:SignatureLineValidImage") ++ ++ virtual std::unique_ptr CreateChildContext( ++ std::unique_ptr pOldNamespaceMap, ++ sal_uInt16 const nNamespace, OUString const& rName) override + { +- m_ouSignatureLineValidImage.clear(); +- m_bInSignatureLineValidImage = true; ++ if (nNamespace == XML_NAMESPACE_XADES132 && rName == "SignedProperties") ++ { ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap)); ++ } ++ if (nNamespace == XML_NAMESPACE_XADES132 && rName == "UnsignedProperties") ++ { ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap)); ++ } ++ return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName); + } +- else if (aName == "loext:SignatureLineInvalidImage") ++}; ++ ++class XSecParser::DcDateContext ++ : public XSecParser::Context ++{ ++ private: ++ bool m_isIgnore = false; ++ ++ public: ++ DcDateContext(XSecParser & rParser, ++ std::unique_ptr pOldNamespaceMap) ++ : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) + { +- m_ouSignatureLineInvalidImage.clear(); +- m_bInSignatureLineInvalidImage = true; + } + +- if (m_xNextHandler.is()) ++ virtual void StartElement( ++ css::uno::Reference const& /*xAttrs*/) override + { +- m_xNextHandler->startElement(aName, xAttribs); ++ m_isIgnore = !m_rParser.m_ouDate.isEmpty(); + } +- } +- catch (css::uno::Exception& ) +- {//getCaughtException MUST be the first line in the catch block +- css::uno::Any exc = cppu::getCaughtException(); +- throw css::xml::sax::SAXException( +- "xmlsecurity: Exception in XSecParser::startElement", +- nullptr, exc); +- } +- catch (...) +- { +- throw css::xml::sax::SAXException( +- "xmlsecurity: unexpected exception in XSecParser::startElement", nullptr, +- css::uno::Any()); +- } +-} + +-void SAL_CALL XSecParser::endElement( const OUString& aName ) +-{ +- try +- { +- if (aName == "DigestValue" && !m_bInCertDigest) ++ virtual void EndElement() override + { +- m_bInDigestValue = false; ++ if (!m_isIgnore) ++ { ++ m_rParser.m_pXSecController->setDate( m_rParser.m_ouDate ); ++ } + } +- else if ( aName == "Reference" ) ++ ++ virtual void Characters(OUString const& rChars) override + { +- if ( m_bReferenceUnresolved ) +- /* +- * it must be an octet stream +- */ ++ if (!m_isIgnore) + { +- m_pXSecController->addStreamReference( m_currentReferenceURI, true, m_nReferenceDigestID ); +- m_bReferenceUnresolved = false; ++ m_rParser.m_ouDate += rChars; + } +- +- m_pXSecController->setDigestValue( m_nReferenceDigestID, m_ouDigestValue ); + } +- else if ( aName == "SignedInfo" ) ++}; ++ ++class XSecParser::DcDescriptionContext ++ : public XSecParser::Context ++{ ++ private: ++ OUString m_Value; ++ ++ public: ++ DcDescriptionContext(XSecParser & rParser, ++ std::unique_ptr pOldNamespaceMap) ++ : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) + { +- m_pXSecController->setReferenceCount(); + } +- else if ( aName == "SignatureValue" ) ++ ++ virtual void EndElement() override + { +- m_pXSecController->setSignatureValue( m_ouSignatureValue ); +- m_bInSignatureValue = false; ++ m_rParser.m_pXSecController->setDescription(m_Value); + } +- else if (aName == "X509IssuerName") ++ ++ virtual void Characters(OUString const& rChars) override + { +- m_pXSecController->setX509IssuerName( m_ouX509IssuerName ); +- m_bInX509IssuerName = false; ++ m_Value += rChars; + } +- else if (aName == "X509SerialNumber") ++}; ++ ++class XSecParser::DsSignaturePropertyContext ++ : public XSecParser::Context ++{ ++ public: ++ DsSignaturePropertyContext(XSecParser & rParser, ++ std::unique_ptr pOldNamespaceMap) ++ : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) + { +- m_pXSecController->setX509SerialNumber( m_ouX509SerialNumber ); +- m_bInX509SerialNumber = false; + } +- else if (aName == "X509Certificate") ++ ++ virtual void StartElement( ++ css::uno::Reference const& xAttrs) override + { +- m_pXSecController->setX509Certificate( m_ouX509Certificate ); +- m_bInX509Certificate = false; ++ OUString const ouIdAttr(m_rParser.HandleIdAttr(xAttrs)); ++ if (!ouIdAttr.isEmpty()) ++ { ++ m_rParser.m_pXSecController->setPropertyId( ouIdAttr ); ++ } + } +- else if (aName == "PGPKeyID") ++ ++ virtual std::unique_ptr CreateChildContext( ++ std::unique_ptr pOldNamespaceMap, ++ sal_uInt16 const nNamespace, OUString const& rName) override + { +- m_pXSecController->setGpgKeyID( m_ouGpgKeyID ); +- m_bInGpgKeyID = false; ++ if (nNamespace == XML_NAMESPACE_DC && rName == "date") ++ { ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap)); ++ } ++ if (nNamespace == XML_NAMESPACE_DC && rName == "description") ++ { ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap)); ++ } ++ return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName); + } +- else if (aName == "PGPKeyPacket") ++}; ++ ++class XSecParser::DsSignaturePropertiesContext ++ : public XSecParser::Context ++{ ++ public: ++ DsSignaturePropertiesContext(XSecParser & rParser, ++ std::unique_ptr pOldNamespaceMap) ++ : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) + { +- m_pXSecController->setGpgCertificate( m_ouGpgCertificate ); +- m_bInGpgCertificate = false; + } +- else if (aName == "loext:PGPOwner") ++ ++ virtual void StartElement( ++ css::uno::Reference const& xAttrs) override + { +- m_pXSecController->setGpgOwner( m_ouGpgOwner ); +- m_bInGpgOwner = false; ++ m_rParser.HandleIdAttr(xAttrs); + } +- else if (aName == "xd:CertDigest") ++ ++ virtual std::unique_ptr CreateChildContext( ++ std::unique_ptr pOldNamespaceMap, ++ sal_uInt16 const nNamespace, OUString const& rName) override + { +- m_pXSecController->setCertDigest( m_ouCertDigest ); +- m_bInCertDigest = false; ++ if (nNamespace == XML_NAMESPACE_DS && rName == "SignatureProperty") ++ { ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap)); ++ } ++ return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName); + } +- else if (aName == "xd:EncapsulatedX509Certificate" || aName == "xades:EncapsulatedX509Certificate") ++}; ++ ++class XSecParser::DsObjectContext ++ : public XSecParser::Context ++{ ++ public: ++ DsObjectContext(XSecParser & rParser, ++ std::unique_ptr pOldNamespaceMap) ++ : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) + { +- m_pXSecController->addEncapsulatedX509Certificate( m_ouEncapsulatedX509Certificate ); +- m_bInEncapsulatedX509Certificate = false; + } +- else if (aName == "xd:SigningTime" || aName == "xades:SigningTime") ++ ++ virtual void StartElement( ++ css::uno::Reference const& xAttrs) override + { +- m_pXSecController->setDate( m_ouDate ); +- m_bInSigningTime = false; ++ m_rParser.HandleIdAttr(xAttrs); + } +- else if (aName == "dc:date") ++ ++ virtual std::unique_ptr CreateChildContext( ++ std::unique_ptr pOldNamespaceMap, ++ sal_uInt16 const nNamespace, OUString const& rName) override + { +- if (m_bInDate) ++ if (nNamespace == XML_NAMESPACE_DS && rName == "SignatureProperties") ++ { ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap)); ++ } ++ if (nNamespace == XML_NAMESPACE_XADES132 && rName == "QualifyingProperties") + { +- m_pXSecController->setDate( m_ouDate ); +- m_bInDate = false; ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap)); + } ++ // missing: ds:Manifest ++ return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName); + } +- else if (aName == "dc:description") ++}; ++ ++class XSecParser::DsSignatureContext ++ : public XSecParser::Context ++{ ++ public: ++ DsSignatureContext(XSecParser & rParser, ++ std::unique_ptr pOldNamespaceMap) ++ : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) + { +- m_pXSecController->setDescription( m_ouDescription ); +- m_bInDescription = false; + } +- else if (aName == "loext:SignatureLineId") ++ ++ virtual void StartElement( ++ css::uno::Reference const& xAttrs) override + { +- m_pXSecController->setSignatureLineId( m_ouSignatureLineId ); +- m_bInSignatureLineId = false; ++ OUString const ouIdAttr(m_rParser.HandleIdAttr(xAttrs)); ++ m_rParser.m_rXMLSignatureHelper.StartVerifySignatureElement(); ++ m_rParser.m_pXSecController->addSignature(); ++ if (!ouIdAttr.isEmpty()) ++ { ++ m_rParser.m_pXSecController->setId( ouIdAttr ); ++ } + } +- else if (aName == "loext:SignatureLineValidImage") ++ ++ virtual std::unique_ptr CreateChildContext( ++ std::unique_ptr pOldNamespaceMap, ++ sal_uInt16 const nNamespace, OUString const& rName) override + { +- m_pXSecController->setValidSignatureImage( m_ouSignatureLineValidImage ); +- m_bInSignatureLineValidImage = false; ++ if (nNamespace == XML_NAMESPACE_DS && rName == "SignedInfo") ++ { ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap)); ++ } ++ if (nNamespace == XML_NAMESPACE_DS && rName == "SignatureValue") ++ { ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap)); ++ } ++ if (nNamespace == XML_NAMESPACE_DS && rName == "KeyInfo") ++ { ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap)); ++ } ++ if (nNamespace == XML_NAMESPACE_DS && rName == "Object") ++ { ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap)); ++ } ++ return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName); + } +- else if (aName == "loext:SignatureLineInvalidImage") ++}; ++ ++class XSecParser::DsigSignaturesContext ++ : public XSecParser::Context ++{ ++ public: ++ DsigSignaturesContext(XSecParser & rParser, ++ std::unique_ptr pOldNamespaceMap) ++ : XSecParser::Context(rParser, std::move(pOldNamespaceMap)) + { +- m_pXSecController->setInvalidSignatureImage( m_ouSignatureLineInvalidImage ); +- m_bInSignatureLineInvalidImage = false; + } + +- if (m_xNextHandler.is()) ++ virtual std::unique_ptr CreateChildContext( ++ std::unique_ptr pOldNamespaceMap, ++ sal_uInt16 const nNamespace, OUString const& rName) override + { +- m_xNextHandler->endElement(aName); ++ if (nNamespace == XML_NAMESPACE_DS && rName == "Signature") ++ { ++ return std::make_unique(m_rParser, std::move(pOldNamespaceMap)); ++ } ++ return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName); + } +- } +- catch (css::uno::Exception& ) +- {//getCaughtException MUST be the first line in the catch block +- css::uno::Any exc = cppu::getCaughtException(); +- throw css::xml::sax::SAXException( +- "xmlsecurity: Exception in XSecParser::endElement", +- nullptr, exc); +- } +- catch (...) +- { +- throw css::xml::sax::SAXException( +- "xmlsecurity: unexpected exception in XSecParser::endElement", nullptr, +- css::uno::Any()); +- } ++}; ++ ++ ++XSecParser::XSecParser(XMLSignatureHelper& rXMLSignatureHelper, ++ XSecController* pXSecController) ++ : m_pNamespaceMap(new SvXMLNamespaceMap) ++ , m_pXSecController(pXSecController) ++ , m_rXMLSignatureHelper(rXMLSignatureHelper) ++{ ++ using namespace xmloff::token; ++ m_pNamespaceMap->Add( GetXMLToken(XML_XML), GetXMLToken(XML_N_XML), XML_NAMESPACE_XML ); ++ m_pNamespaceMap->Add( "_dsig_ooo", GetXMLToken(XML_N_DSIG_OOO), XML_NAMESPACE_DSIG_OOO ); ++ m_pNamespaceMap->Add( "_dsig", GetXMLToken(XML_N_DSIG), XML_NAMESPACE_DSIG ); ++ m_pNamespaceMap->Add( "_ds", GetXMLToken(XML_N_DS), XML_NAMESPACE_DS ); ++ m_pNamespaceMap->Add( "_xades132", GetXMLToken(XML_N_XADES132), XML_NAMESPACE_XADES132); ++ m_pNamespaceMap->Add( "_xades141", GetXMLToken(XML_N_XADES141), XML_NAMESPACE_XADES141); ++ m_pNamespaceMap->Add( "_dc", GetXMLToken(XML_N_DC), XML_NAMESPACE_DC ); ++ m_pNamespaceMap->Add( "_office_libo", ++ GetXMLToken(XML_N_LO_EXT), XML_NAMESPACE_LO_EXT); + } + +-void SAL_CALL XSecParser::characters( const OUString& aChars ) ++OUString XSecParser::HandleIdAttr(css::uno::Reference const& xAttrs) + { +- if (m_bInX509IssuerName) +- { +- m_ouX509IssuerName += aChars; +- } +- else if (m_bInX509SerialNumber) +- { +- m_ouX509SerialNumber += aChars; +- } +- else if (m_bInX509Certificate) +- { +- m_ouX509Certificate += aChars; +- } +- else if (m_bInGpgCertificate) ++ OUString ouIdAttr = getIdAttr(xAttrs); ++ if (!ouIdAttr.isEmpty()) + { +- m_ouGpgCertificate += aChars; ++ m_pXSecController->collectToVerify( ouIdAttr ); + } +- else if (m_bInGpgKeyID) ++ return ouIdAttr; ++} ++ ++OUString XSecParser::getIdAttr(const css::uno::Reference< css::xml::sax::XAttributeList >& xAttribs ) ++{ ++ OUString ouIdAttr = xAttribs->getValueByName("id"); ++ ++ if (ouIdAttr.isEmpty()) + { +- m_ouGpgKeyID += aChars; ++ ouIdAttr = xAttribs->getValueByName("Id"); + } +- else if (m_bInGpgOwner) ++ ++ return ouIdAttr; ++} ++ ++/* ++ * XDocumentHandler ++ */ ++void SAL_CALL XSecParser::startDocument( ) ++{ ++ if (m_xNextHandler.is()) + { +- m_ouGpgOwner += aChars; ++ m_xNextHandler->startDocument(); + } +- else if (m_bInSignatureValue) ++} ++ ++void SAL_CALL XSecParser::endDocument( ) ++{ ++ if (m_xNextHandler.is()) + { +- m_ouSignatureValue += aChars; ++ m_xNextHandler->endDocument(); + } +- else if (m_bInDigestValue && !m_bInCertDigest) ++} ++ ++void SAL_CALL XSecParser::startElement( ++ const OUString& rName, ++ const css::uno::Reference< css::xml::sax::XAttributeList >& xAttribs ) ++{ ++ assert(m_pNamespaceMap); ++ std::unique_ptr pRewindMap( ++ SvXMLImport::processNSAttributes(m_pNamespaceMap, nullptr, xAttribs)); ++ ++ OUString localName; ++ sal_uInt16 const nPrefix(m_pNamespaceMap->GetKeyByAttrName(rName, &localName)); ++ ++ std::unique_ptr pContext; ++ ++ if (m_ContextStack.empty()) + { +- m_ouDigestValue += aChars; ++ if ((nPrefix == XML_NAMESPACE_DSIG || nPrefix == XML_NAMESPACE_DSIG_OOO) ++ && localName == "document-signatures") ++ { ++ pContext.reset(new DsigSignaturesContext(*this, std::move(pRewindMap))); ++ } ++ else ++ { ++ throw css::xml::sax::SAXException( ++ "xmlsecurity: unexpected root element", nullptr, ++ css::uno::Any()); ++ } + } +- else if (m_bInDate) ++ else + { +- m_ouDate += aChars; ++ pContext = m_ContextStack.top()->CreateChildContext( ++ std::move(pRewindMap), nPrefix, localName); + } +- else if (m_bInDescription) ++ ++ m_ContextStack.push(std::move(pContext)); ++ assert(!pRewindMap); ++ ++ try + { +- m_ouDescription += aChars; ++ m_ContextStack.top()->StartElement(xAttribs); ++ ++ if (m_xNextHandler.is()) ++ { ++ m_xNextHandler->startElement(rName, xAttribs); ++ } + } +- else if (m_bInCertDigest) +- { +- m_ouCertDigest += aChars; ++ catch (css::uno::Exception& ) ++ {//getCaughtException MUST be the first line in the catch block ++ css::uno::Any exc = cppu::getCaughtException(); ++ throw css::xml::sax::SAXException( ++ "xmlsecurity: Exception in XSecParser::startElement", ++ nullptr, exc); + } +- else if (m_bInEncapsulatedX509Certificate) ++ catch (...) + { +- m_ouEncapsulatedX509Certificate += aChars; ++ throw css::xml::sax::SAXException( ++ "xmlsecurity: unexpected exception in XSecParser::startElement", nullptr, ++ css::uno::Any()); + } +- else if (m_bInSigningTime) ++} ++ ++void SAL_CALL XSecParser::endElement(const OUString& rName) ++{ ++ assert(!m_ContextStack.empty()); // this should be checked by sax parser? ++ ++ try + { +- m_ouDate += aChars; ++ m_ContextStack.top()->EndElement(); ++ ++ if (m_xNextHandler.is()) ++ { ++ m_xNextHandler->endElement(rName); ++ } + } +- else if (m_bInSignatureLineId) +- { +- m_ouSignatureLineId += aChars; ++ catch (css::uno::Exception& ) ++ {//getCaughtException MUST be the first line in the catch block ++ css::uno::Any exc = cppu::getCaughtException(); ++ throw css::xml::sax::SAXException( ++ "xmlsecurity: Exception in XSecParser::endElement", ++ nullptr, exc); + } +- else if (m_bInSignatureLineValidImage) ++ catch (...) + { +- m_ouSignatureLineValidImage += aChars; ++ throw css::xml::sax::SAXException( ++ "xmlsecurity: unexpected exception in XSecParser::endElement", nullptr, ++ css::uno::Any()); + } +- else if (m_bInSignatureLineInvalidImage) ++ ++ if (m_ContextStack.top()->m_pOldNamespaceMap) + { +- m_ouSignatureLineInvalidImage += aChars; ++ m_pNamespaceMap = std::move(m_ContextStack.top()->m_pOldNamespaceMap); + } ++ m_ContextStack.pop(); ++} ++ ++void SAL_CALL XSecParser::characters(const OUString& rChars) ++{ ++ assert(!m_ContextStack.empty()); // this should be checked by sax parser? ++ m_ContextStack.top()->Characters(rChars); + + if (m_xNextHandler.is()) + { +- m_xNextHandler->characters(aChars); ++ m_xNextHandler->characters(rChars); + } + } + +diff --git a/xmlsecurity/source/helper/xsecparser.hxx b/xmlsecurity/source/helper/xsecparser.hxx +index d9b079aa3116..93efcb766e3e 100644 +--- a/xmlsecurity/source/helper/xsecparser.hxx ++++ b/xmlsecurity/source/helper/xsecparser.hxx +@@ -25,6 +25,10 @@ + + #include + ++#include ++ ++#include ++ + class XMLSignatureHelper; + class XSecController; + +@@ -48,47 +52,59 @@ class XSecParser: public cppu::WeakImplHelper + ******************************************************************************/ + { + friend class XSecController; ++public: ++ class Context; + private: ++ class UnknownContext; ++ class LoPGPOwnerContext; ++ class DsPGPKeyPacketContext; ++ class DsPGPKeyIDContext; ++ class DsPGPDataContext; ++ class DsX509CertificateContext; ++ class DsX509SerialNumberContext; ++ class DsX509IssuerNameContext; ++ class DsX509IssuerSerialContext; ++ class DsX509DataContext; ++ class DsKeyInfoContext; ++ class DsSignatureValueContext; ++ class DsDigestValueContext; ++ class DsDigestMethodContext; ++ class DsTransformContext; ++ class DsTransformsContext; ++ class DsReferenceContext; ++ class DsSignatureMethodContext; ++ class DsSignedInfoContext; ++ class XadesEncapsulatedX509CertificateContext; ++ class XadesCertificateValuesContext; ++ class XadesUnsignedSignaturePropertiesContext; ++ class XadesUnsignedPropertiesContext; ++ class LoSignatureLineIdContext; ++ class LoSignatureLineValidImageContext; ++ class LoSignatureLineInvalidImageContext; ++ class LoSignatureLineContext; ++ class XadesCertDigestContext; ++ class XadesCertContext; ++ class XadesSigningCertificateContext; ++ class XadesSigningTimeContext; ++ class XadesSignedSignaturePropertiesContext; ++ class XadesSignedPropertiesContext; ++ class XadesQualifyingPropertiesContext; ++ class DcDateContext; ++ class DcDescriptionContext; ++ class DsSignaturePropertyContext; ++ class DsSignaturePropertiesContext; ++ class DsObjectContext; ++ class DsSignatureContext; ++ class DsigSignaturesContext; ++ + /* + * the following members are used to reserve the signature information, + * including X509IssuerName, X509SerialNumber, and X509Certificate,etc. + */ +- OUString m_ouX509IssuerName; +- OUString m_ouX509SerialNumber; +- OUString m_ouX509Certificate; +- OUString m_ouGpgCertificate; +- OUString m_ouGpgKeyID; +- OUString m_ouGpgOwner; +- OUString m_ouCertDigest; +- OUString m_ouEncapsulatedX509Certificate; +- OUString m_ouDigestValue; +- OUString m_ouSignatureValue; + OUString m_ouDate; +- /// Characters of a element, as just read from XML. +- OUString m_ouDescription; +- OUString m_ouSignatureLineId; +- OUString m_ouSignatureLineValidImage; +- OUString m_ouSignatureLineInvalidImage; + +- /* +- * whether inside a particular element +- */ +- bool m_bInX509IssuerName; +- bool m_bInX509SerialNumber; +- bool m_bInX509Certificate; +- bool m_bInGpgCertificate; +- bool m_bInGpgKeyID; +- bool m_bInGpgOwner; +- bool m_bInCertDigest; +- bool m_bInEncapsulatedX509Certificate; +- bool m_bInSigningTime; +- bool m_bInDigestValue; +- bool m_bInSignatureValue; +- bool m_bInDate; +- bool m_bInDescription; +- bool m_bInSignatureLineId; +- bool m_bInSignatureLineValidImage; +- bool m_bInSignatureLineInvalidImage; ++ std::stack> m_ContextStack; ++ std::unique_ptr m_pNamespaceMap; + + /* + * the XSecController collaborating with XSecParser +@@ -101,22 +117,9 @@ private: + css::uno::Reference< + css::xml::sax::XDocumentHandler > m_xNextHandler; + +- /* +- * this string is used to remember the current handled reference's URI, +- * +- * because it can be decided whether a stream reference is xml based or binary based +- * only after the Transforms element is read in, so we have to reserve the reference's +- * URI when the startElement event is met. +- */ +- OUString m_currentReferenceURI; +- bool m_bReferenceUnresolved; +- +- // Relevant for ODF. The digest algorithm selected by the current DigestMethod element's +- // Algorithm attribute in the current Reference element. From css::xml::crypto::DigestID. +- sal_Int32 m_nReferenceDigestID; + XMLSignatureHelper& m_rXMLSignatureHelper; + +-private: ++ OUString HandleIdAttr(css::uno::Reference const& xAttrs); + static OUString getIdAttr(const css::uno::Reference< + css::xml::sax::XAttributeList >& xAttribs ); + +-- +cgit v1.2.1 + diff --git a/debian/python3-access2base.links b/debian/python3-access2base.links new file mode 100644 index 00000000000..f76ba1c90f7 --- /dev/null +++ b/debian/python3-access2base.links @@ -0,0 +1 @@ +usr/share/doc/libreoffice-common/access2base.html usr/share/doc/python3-access2base/access2base.html diff --git a/debian/python3-uno.NEWS b/debian/python3-uno.NEWS new file mode 100644 index 00000000000..fb4312b42c4 --- /dev/null +++ b/debian/python3-uno.NEWS @@ -0,0 +1,11 @@ +libreoffice (1:3.5.2-2) unstable; urgency=low + + * The script provider for python (which was in python3-uno before) has been + split out into libreoffice-script-provider-python as it's the same in both + variants and python3-uno should contain just the module anyway. + + If you relied on python3-uno for the script provider, install the new + package in addition. + + -- Rene Engelhard Sat, 07 Apr 2012 14:30:41 +0200 + diff --git a/debian/python3-uno.ucf b/debian/python3-uno.ucf new file mode 100644 index 00000000000..8a56cd5b703 --- /dev/null +++ b/debian/python3-uno.ucf @@ -0,0 +1 @@ +/usr/lib/libreoffice/share/.registry/pyuno.xcd /etc/libreoffice/registry/pyuno.xcd diff --git a/debian/rules b/debian/rules new file mode 100755 index 00000000000..7d8604c1577 --- /dev/null +++ b/debian/rules @@ -0,0 +1,3913 @@ +#!/usr/bin/make -f +################################################################################ +# LibreOffice source package rules file +# +# Please see debian/README for detailed documentation about the build system, and +# how to build LibreOffice. +################################################################################ +# Authors: +# Chris Halls +# Rene Engelhard +# Copyright 2002-2015 Software in the Public Interest, Inc. +# Portions Copyright 2010 Canonical Ltd. Author: Matthias Klose +# Portions Copyright 2011-2013 Canonical Ltd. Author: Bjoern Michaelsen +# Licensed under the GNU General Public License, version 2. See the file +# /usr/share/common-licenses/GPL or . +################################################################################ + +vafilt = $(subst $(2)=,,$(filter $(2)=%,$(1))) + +include /usr/share/dpkg/pkg-info.mk +CURDIR ?= $(realpath $(dir $(firstword $(MAKEFILE_LIST)))/..) +BASE_VERSION:=$(shell echo $(DEB_VERSION) | cut -d: -f1):$(DEB_VERSION_UPSTREAM) +BINARY_VERSION=$(DEB_VERSION) +#HELP_L10N_VIRTUAL_VERSION:=$(shell echo $(DEB_VERSION_UPSTREAM) | cut -d: -f2 | tr [~] [\\-]) +HELP_L10N_VIRTUAL_VERSION:=7.0 +OOVER:=7.0 +NEXT_OOVER:=$(shell echo "$(OOVER) + 0.1" | bc) + +ARCH_INDEP_PACKAGES := $(shell dh_listpackages -i) +ARCH_DEP_PACKAGES := $(shell dh_listpackages -a) +PACKAGES := $(ARCH_INDEP_PACKAGES) $(ARCH_DEP_PACKAGES) + +include /usr/share/dpkg/architecture.mk +include /usr/share/dpkg/vendor.mk +SHELL:=/bin/bash + +#SYSTEM_GCC_VERSION = $(shell gcc --version | sed -n '/^gcc/s/.*\(.\..\)\..$$/\1/p') +#FIXME +SYSTEM_GCC_VERSION = $(shell gcc --version | sed -n '/^gcc/s/.*\(.\..\)\../\1/p' | cut -d" " -f1) +ifeq "$(shell echo $(SYSTEM_GCC_VERSION) | cut -d. -f1)" "0" # gcc 10+ (0.0, 0.1, 0.2 etc.) +SYSTEM_GCC_VERSION = $(shell gcc --version | sed -n '/^gcc/s/.*\(..\..\)\../\1/p' | cut -d" " -f1) +endif + +PKGDIR:=debian/libreoffice +OODIRNAME=libreoffice +OODIR:=usr/lib/$(OODIRNAME) +OOSDKDIR:=$(OODIR)/sdk + +# Figure out who's building this package. +ifneq "$(DEB_VENDOR)" "Debian" +OOO_VENDOR:=The Document Foundation, $(DEB_PARENT_VENDOR) and $(DEB_VENDOR) +else +OOO_VENDOR=The Document Foundation/$(DEB_VENDOR) +endif +export OOO_VENDOR + +# debhelper +export DH_OPTIONS +export DH_ALWAYS_EXCLUDE=CVS:.svn:.bzr:.git +#export DH_VERBOSE=1 +# quilt +export QUILT_PATCHES=debian/patches +export QUILT_OPTIONS="-p1 -F0" + +SOURCE_TREE=. +STAMP_DIR=debian/stampdir +TARFILE_LOCATION=$(CURDIR)/tarballs +export TARFILE_LOCATION +USE_SOURCE_TARBALLS=y +USE_GIT_TARBALLS=n +ifeq "$(USE_GIT_TARBALLS)" "y" +GIT_BASEURL:=git://anongit.freedesktop.org/libreoffice +lo_sources_ver=$(shell grep AC_INIT $(SOURCE_TREE)/configure.ac | grep documentfoundation | cut -d, -f2 | sed -e 's,\[,,' -e 's,\],,') +# NOT in proper libreoffice-3-6 branch +# use ./g checkout -b tag-libreoffice-3.6.2.1 libreoffice-3.6.2.1 +GIT_TAG=libreoffice-$(lo_sources_ver) +GIT_BRANCH=libreoffice-7-0-4 +endif +ifeq "$(USE_SOURCE_TARBALLS)" "y" +lo_sources_ver=$(shell cat $(CURDIR)/sources.ver | cut -d= -f2) +endif + +######### +# Default package configuration +# +OOO_ARCHS = alpha amd64 arm64 armel armhf hppa i386 ia64 kfreebsd-amd64 kfreebsd-i386 m68k mips mipsel mips64 mips64el powerpc powerpcspe ppc64 ppc64el s390 s390x sparc sparc64 +PATCHSET=$(DEB_VENDOR) +BUILD_DEPS=\ + autoconf,\ + automake,\ + bc,\ + bison,\ + bzip2,\ + flex (>= 2.3.35), \ + fontforge-nox | fontforge, \ + gperf (>= 3.1),\ + libc0.1 (>= 2.10.2-7) [kfreebsd-any],\ + libfontconfig1-dev,\ + libfreetype6-dev (>= 2.2.0),\ + pkg-config,\ + unzip,\ + xsltproc,\ + zip,\ + zlib1g-dev\ + +BUILD_DEPS_INDEP += rdfind, symlinks + +# These are components which can be built from internal copies, or used from the +# distribution. See configure --help for valid values (--with-system-). +SYSTEM_STUFF = dicts + +ENABLE_GUI=y + +ifeq ($(filter nopython,$(DEB_BUILD_PROFILES)),) +ENABLE_PYTHON=y +ifeq "$(ENABLE_PYTHON)" "y" + CONFIGURE_FLAGS += --enable-python=system + ENABLE_SCRIPT_PROVIDER_PYTHON=y + PACKAGE_LIBRELOGO=y +endif +# THIS IS ONLY FOR TESTING. When building against a specified pythonX.Y +# this will work inside OOo but *not* from outside OOo unless the user +# uses pythonX.Y directly (and the dh_pycentral-created dependencies allow +# also the non-working default python then) - see e.g. #587402. Also +# note we are NOT working with python < 2.6 anymore! +PYTHON_VERSION=current +ifeq "$(PYTHON_VERSION)" "current" + PYTHON=python3 + export PYTHON +else + # somehow configure insists on using python3 "for pyuno". The only way to + # override this (afaics) is this... + PYTHON=python$(PYTHON_VERSION) + PYTHON_CFLAGS=$(shell pkg-config --cflags python-$(PYTHON_VERSION)) + PYTHON_LIBS=$(shell pkg-config --libs python-$(PYTHON_VERSION)) + export PYTHON PYTHON_VERSION PYTHON_CFLAGS PYTHON_LIBS +endif +endif +BUILD_ONLY_EN_US=n +ifeq ($(filter nojava,$(DEB_BUILD_PROFILES)),) + ENABLE_JAVA=y + ifeq "$(ENABLE_JAVA)" "y" + JDK=default + include /usr/share/java/java_defaults.mk + ifneq "$(JDK)" "default" + JAVA_MAINVER=7 + endif + endif +else + ENABLE_JAVA=n +endif +JAVAHELPER_MIN_VERSION= (>= 0.37~) +SYSTEM_STUFF += hunspell +SYSTEM_STUFF += altlinuxhyph +SYSTEM_STUFF += boost +BOOST_VERSION=default +ifeq "$(BOOST_VERSION)" "default" + BOOST_MINVER= (>= 1.66) + ifeq "$(shell dpkg --compare-versions $(SYSTEM_GCC_VERSION) gt 10 && echo true)" "true" + BOOST_MINVER= (>= 1.71) + endif +endif +# libmdds-dev depends on libboost-dev, which will be removed +# when you install a non-default libboostX.Y-dev +ifeq "$(BOOST_VERSION)" "default" +SYSTEM_STUFF += mdds +endif +USE_EXTERNAL_CXXLIBS=y +SYSTEM_STUFF += mythes +SYSTEM_STUFF += icu +SYSTEM_STUFF += librevenge +SYSTEM_STUFF += libwpd libwpg libwps +SYSTEM_STUFF += libvisio +SYSTEM_STUFF += libcdr +SYSTEM_STUFF += libmspub +SYSTEM_STUFF += libmwaw +SYSTEM_STUFF += libodfgen +SYSTEM_STUFF += libepubgen +SYSTEM_STUFF += libetonyek +SYSTEM_STUFF += libfreehand +# this is libe-book, NOT evolutions libebook (which is +# dlopen()'ed anyway and whose headers we need from the +# system anyways if enabled +SYSTEM_STUFF += libebook +SYSTEM_STUFF += libabw +SYSTEM_STUFF += libpagemaker +SYSTEM_STUFF += libzmf +SYSTEM_STUFF += libstaroffice +SYSTEM_STUFF += libqxp +ENABLE_QRCODEGEN=y +SYSTEM_STUFF += qrcodegen +BUILD_CAIROCANVAS=y +SYSTEM_STUFF += cairo +ifeq "$(ENABLE_GUI)" "y" +BUILD_PLASMA=y +ENABLE_QT5=n +QT5_MINVER= (>= 5.6) +endif +ifeq "$(BUILD_PLASMA)" "y" + ENABLE_KF5=y + # KF5 depends on Qt5 + ifeq "$(ENABLE_KF5)" "y" + ENABLE_QT5=y + KF5_QT5_DEPENDS := libreoffice-qt5 (= $${binary:Version}) + endif +endif +# https://www.debian.org/doc/debian-policy/ says this is not defined and must +# be ignored, but dh_strip mentions (and honours) it, so... +ifneq (noautodbgsym,$(findstring noautodbgsym,$(DEB_BUILD_OPTIONS))) +BUILD_DBGSYM_PACKAGES=y +ifeq "$(DEB_HOST_ARCH)" "amd64" +USE_DWZ=y +DWZ_ARGS:=-L 100000000 +endif +endif +SYSTEM_STUFF += xmlsec + +ifeq ($(filter noinsttest,$(DEB_BUILD_PROFILES)),) + # this changes the packages built/contents of packages (-subsequentcheckbase) + # This is not exactly allowed in https://wiki.debian.org/BuildProfileSpec#Registered_profile_names + # but it doesn't have real practical difference, does it? + ifneq (nocheck,$(findstring nocheck,$(DEB_BUILD_OPTIONS))) + BUILD_TEST_PACKAGES=y + endif +endif + +ifneq ($(MAKECMDGOALS),build-indep) +ENABLE_SYMBOLS=y +SMALL_SYMBOLS=y +endif +ifeq ($(MAKECMDGOALS),build-indep) +# no need to do a double build... +BUILD_NOGUI_PACKAGES=n +endif + +ifeq "$(ENABLE_JAVA)" "y" + SYSTEM_STUFF += beanshell + SYSTEM_STUFF += hsqldb +endif +SYSTEM_STUFF += lpsolve +USE_SHARED_LPSOLVE=y +LPSOLVE_MIN_VERSION= (>= 5.5.0.13-5+b1) +ENABLE_COINMP=y +SYSTEM_STUFF += coinmp +USE_DBUS=y +ifeq "$(USE_DBUS)" "y" + ifeq (,$(findstring linux,$(DEB_HOST_ARCH_OS))) + ENABLE_BLUETOOTH=n + else + ENABLE_BLUETOOTH=y + SYSTEM_STUFF += bluez + endif + ENABLE_PACKAGEKIT=n +endif +ENABLE_AVAHI=y +ifeq "$(ENABLE_GUI)" "y" +USE_GSTREAMER=y +endif +ENABLE_WEBDAV=y +ifeq "$(ENABLE_WEBDAV)" "y" +WEBDAV_LIB=neon + ifeq "$(WEBDAV_LIB)" "neon" + SYSTEM_STUFF += neon + NEON_SECTYPE=gnutls + NEONSONR=27 + else + SYSTEM_STUFF += apr + SYSTEM_STUFF += serf + endif +endif +SYSTEM_STUFF += redland +PACKAGE_SDK=y +ifneq ($(filter nodoc,$(DEB_BUILD_PROFILES)),) +PACKAGE_SDK_DOCS=n +else +PACKAGE_SDK_DOCS=y +endif +PACKAGE_LOKIT=y +ENABLE_CHART_TESTS=n +# will not work, uses schema/ stripped in the tarballs +ifeq "$(USE_SOURCE_TARBALLS)" "y" +ENABLE_EXPORT_VALIDATION_TESTS=n +endif +JUNIT_MIN_VER= (>= 4.8.2-2) +CURL_SECTYPE=gnutls +USE_LIBSUITESPARSE=y +SUITESPARSE_MIN_VERSION= (>= 1:3.4.0) +PARALLEL_BUILD=y +ENABLE_LDAP=y +SYSTEM_STUFF += openldap +SYSTEM_STUFF += epoxy +ifeq "$(ENABLE_JAVA)" "y" + ENABLE_REPORTBUILDER=y + SYSTEM_STUFF += jfreereport + ENABLE_MEDIAWIKI=y + SYSTEM_STUFF += apache-commons + ENABLE_SCRIPT_PROVIDER_BSH=y + ENABLE_SCRIPT_PROVIDER_JS=y + ENABLE_NLPSOLVER=y +else + ENABLE_REPORTBUILDER=n + ENABLE_MEDIAWIKI=n + ENABLE_SCRIPT_PROVIDER_BSH=n + ENABLE_SCRIPT_PROVIDER_JS=n + ENABLE_NLPSOLVER=n +endif +ENABLE_SDBC_POSTGRESQL=y +ifeq "$(ENABLE_GUI)" "y" +BUILD_GTK3=y + # introspection needs GTK3 + ifeq "$(BUILD_GTK3)" "y" + ENABLE_INTROSPECTION=y + endif +endif +ENABLE_EVO2=y +ENABLE_GIO=y +ENABLE_DCONF=y +ENABLE_RANDR=y +PACKAGE_BASE=y +SYSTEM_STUFF += graphite +SYSTEM_STUFF += harfbuzz +SYSTEM_STUFF += libexttextcat +SYSTEM_STUFF += cppunit +DEFAULT_IMAGE=colibre +IMAGES:=$(DEFAULT_IMAGE) sifr sifr_dark sifr_dark_svg breeze breeze_dark breeze_dark_svg breeze_svg elementary elementary_svg karasa_jaga sukapura sukapura_svg +# FIXME +IMAGES_PACKAGES=$(subst _,-,$(filter-out sukapura_svg,$(filter-out sifr_dark_svg,$(filter-out breeze_dark_svg,$(filter-out sifr_dark,$(filter-out breeze_dark,$(filter-out breeze_svg,$(filter-out elementary_svg,$(IMAGES))))))))) +CONFIGURE_FLAGS_INDEP += --with-theme="$(IMAGES)" +MYSQL_FLAVOUR=mariadb +# set this also to y for system-mysql.. +SYSTEM_STUFF += mariadb +SYSTEM_STUFF += postgresql +DICT_DIR=/usr/share/hunspell +HYPH_DIR=/usr/share/hyphen +THES_DIR=/usr/share/mythes +SYSTEM_STUFF += libcmis +SYSTEM_STUFF += jpeg +SYSTEM_STUFF += libxml +SYSTEM_STUFF += expat +SYSTEM_STUFF += odbc +SYSTEM_STUFF += curl +SYSTEM_STUFF += sane +ENABLE_PDFIMPORT=y +ENABLE_POPPLER=y +SYSTEM_STUFF += poppler +ENABLE_PDFIUM=y +ifneq (big,$(DEB_HOST_ARCH_ENDIAN)) +ENABLE_SKIA=y +endif +SYSTEM_STUFF += libpng +SYSTEM_STUFF += nss +ENABLE_HELP=y +ifeq "$(ENABLE_HELP)" "y" + ENABLE_HTML_HELP=y + ifeq "$(ENABLE_HTML_HELP)" "y" + HELP_DEPENDS := libreoffice-help-common (= $${binary:Version}), firefox-esr | epiphany-browser | konqueror | chromium | firefox + HELP_COMMON_DEPENDS := libjs-normalize.css + else + HELP_DEPENDS := libreoffice-writer + DEBHELPER_OPTIONS += -Nlibreoffice-help-common + endif + SYSTEM_STUFF += clucene +endif +SYSTEM_STUFF += lcms2 +# this violates the requirement that nowindows should not change the +# package contents (-dev-common here) but a extra package for this +# is too much overhead (especially since this .dll will be gone +# in LO 7.2 anyway.) +ifeq ($(filter nowindows,$(DEB_BUILD_PROFILES)),) + PACKAGE_UNOWINREG_DLL=y + ifeq "$(DEB_VENDOR)" "Debian" + BUILD_UNOWINREG_DLL=y + endif +endif +SYSTEM_STUFF += liblangtag +SYSTEM_STUFF += orcus +USE_UCPP=y +ifeq "$(USE_UCPP)" "y" + SYSTEM_STUFF += ucpp +endif +# kfreebsd runs into SIZE_MAX problems, and the rest might +# get OOM (mips(el)...) so enable mergelibs only for 64bit +# archs +ifeq (,$(filter kfreebsd,$(DEB_HOST_ARCH))) + ifeq "$(DEB_HOST_ARCH_BITS)" "64" + ENABLE_MERGELIBS=y + endif +endif +#ifeq "$(ENABLE_MERGELIBS)" "y" +# ENABLE_LTO=y +#else + ENABLE_LTO=n +#endif +USE_OPENCL=y +ENABLE_FIREBIRD=y +ifeq "$(ENABLE_FIREBIRD)" "y" + SYSTEM_STUFF += firebird + ifeq (,$(filter firebird, $(SYSTEM_STUFF))) + SYSTEM_STUFF += libatomic-ops + SYSTEM_STUFF += libtommath + endif +endif +ENABLE_EOT=y +ifeq "$(ENABLE_EOT)" "y" +SYSTEM_STUFF += libeot +endif +SYSTEM_STUFF += glm +BUILD_PPC64EL=y +BUILD_ARM64=y +SYSTEM_STUFF += gpgmepp +INSTALL_APPARMOR_PROFILES=y +ENABLE_APPARMOR_PROFILES=y +CHECK_APPARMOR_PROFILES=true +ENABLE_LIBNUMBERTEXT=y +SYSTEM_STUFF += libnumbertext + +# Default flags to pass to configure +CONFIGURE_FLAGS+= \ + --with-vendor='$(OOO_VENDOR)' \ + --with-extra-buildid='$(DEB_VENDOR) package version: $(DEB_VERSION)' \ + --prefix=/usr --mandir=/usr/share/man \ + --docdir=/usr/share/doc/libreoffice \ + --libdir=/usr/lib \ + --bindir=/usr/bin \ + --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \ + --disable-online-update \ + --disable-fetch-external \ + --without-fonts --enable-build-opensymbol \ + --without-myspell-dicts \ + --with-branding=$(CURDIR)/debian/branding + +ifeq "$(ENABLE_GUI)" "y" +BUILD_DEPS += ,\ + libcups2-dev,\ + libgl-dev,\ + libice-dev,\ + libsm-dev,\ + libx11-dev,\ + libx11-xcb-dev, \ + libxaw7-dev,\ + libxext-dev,\ + libxinerama-dev,\ + libxkbfile-dev,\ + libxrender-dev,\ + libxt-dev,\ + libxtst-dev,\ + x11proto-render-dev +endif + +ifeq "$(ENABLE_HELP)" "y" +CONFIGURE_FLAGS_INDEP+= --with-help + ifeq "$(ENABLE_HTML_HELP)" "y" + CONFIGURE_FLAGS_INDEP+= --with-help=html + endif +endif + +ifeq "$(shell echo $(DEB_VERSION_UPSTREAM) | grep -E '(alpha|beta)'; echo $$?)" "1" +CONFIGURE_FLAGS += --enable-release-build +RELEASE_BUILD := y +endif + +ifeq "$(DEB_DISTRIBUTION)" "UNRELEASED" +BUGS=mailto:debian-openoffice@lists.debian.org +endif + +ifneq (terse,$(findstring terse,$(DEB_BUILD_OPTIONS))) +export verbose=t +endif + +############# +# Architecture-specific changes + +# helper to generate no_archs macros (pass name of source macro) +define gen_no_archs + _no_arch_macro = $(subst OOO_,OOO_NO_,$1) + _no_arch_tmp_$1 = $$(foreach _a,$$(filter-out $$(call $1),$(OOO_ARCHS)),!$$(_a)) + $$(_no_arch_macro) = $$(if $$(_no_arch_tmp_$1),$$(_empty) [$$(_no_arch_tmp_$1)]) +endef + +PLATFORMID := $(shell grep PLATFORMID debian/vars.$(DEB_HOST_ARCH) | cut -d"=" -f2) + + +OOO_64BIT_ARCHS = $(filter alpha amd64 arm64 ia64 kfreebsd-amd64 mips64 mips64el ppc64 ppc64el s390x sparc64, $(OOO_ARCHS)) +$(eval $(call gen_no_archs,OOO_64BIT_ARCHS)) +OOO_BE_ARCHS = $(filter hppa m68k mips mips64 powerpc powerpcspe ppc64 s390 s390x sparc sparc64,$(OOO_ARCHS)) +OOO_LE_ARCHS = $(filter-out $(OOO_BE_ARCHS),$(OOO_ARCHS)) +$(eval $(call gen_no_archs,OOO_LE_ARCHS)) + +OOO_CHECK_ARCHS := $(filter-out kfreebsd-i386 kfreebsd-amd64 mips mipsel mips64el armel,$(OOO_ARCHS)) +$(eval $(call gen_no_archs,OOO_CHECK_ARCHS)) +#OOO_JUNIT_ARCHS := i386 amd64 armhf arm64 +OOO_JUNIT_ARCHS := amd64 arm64 +$(eval $(call gen_no_archs,OOO_JUNIT_ARCHS)) +#OOO_CHECK_FATAL_ARCHS := i386 amd64 armhf arm64 +OOO_CHECK_FATAL_ARCHS := amd64 arm64 + +RUN_MAKE_CHECK=n +ifneq (nocheck,$(findstring nocheck,$(DEB_BUILD_OPTIONS))) + ifeq ($(DEB_HOST_ARCH),$(filter $(DEB_HOST_ARCH),$(OOO_CHECK_ARCHS))) + RUN_MAKE_CHECK=y + endif + ifeq "$(ENABLE_JAVA)" "y" + ifeq ($(DEB_HOST_ARCH),$(filter $(DEB_HOST_ARCH),$(OOO_JUNIT_ARCHS))) + ENABLE_JUNIT4=y + endif + endif + IGNORE_MAKE_CHECK_FAILURES=- + ifeq ($(DEB_HOST_ARCH),$(filter $(DEB_HOST_ARCH),$(OOO_CHECK_FATAL_ARCHS))) + IGNORE_MAKE_CHECK_FAILURES:= + endif +endif + +# Java... +ifeq "$(JDK)" "default" +OOO_JAVA_ARCHS = $(filter $(OOO_ARCHS),$(java6_architectures)) +else +OOO_JAVA_ARCHS = $(OOO_ARCHS) +endif +$(eval $(call gen_no_archs,OOO_JAVA_ARCHS)) + +OOO_ARCH_DEP_EXTENSIONS_ARCHS := $(OOO_ARCHS) +OOO_EXTENSIONS_ARCHS := $(OOO_ARCH_DEP_EXTENSIONS_ARCHS) + +OOO_BASE_ARCHS := $(OOO_JAVA_ARCHS) +$(eval $(call gen_no_archs,OOO_BASE_ARCHS)) +OOO_REPORTBUILDER_ARCHS := $(OOO_BASE_ARCHS) +$(eval $(call gen_no_archs,OOO_REPORTBUILDER_ARCHS)) +OOO_FIREBIRD_ARCHS := $(OOO_BASE_ARCHS) +$(eval $(call gen_no_archs,OOO_FIREBIRD_ARCHS)) +OOO_NOGUI_ARCHS := amd64 i386 arm64 armhf s390x ppc64 ppc64el +$(eval $(call gen_no_archs,OOO_NOGUI_ARCHS)) + +ifneq (,$(filter $(DEB_HOST_ARCH),$(OOO_NO_BASE_ARCHS))) + ifneq ($(DEB_HOST_ARCH),$(filter $(DEB_HOST_ARCH),$(OOO_BASE_ARCHS))) + PACKAGE_BASE=n + ENABLE_SDBC_POSTGRESQL=n + ENABLE_EVO2=n + ENABLE_REPORTBUILDER=n + DEBHELPER_OPTIONS += -Nlibreoffice-base libreoffice-base-core -Nlibreoffice-base-drivers + DEBHELPER_OPTIONS += -Nlibreoffice-evolution + DEBHELPER_OPTIONS += -Nlibreoffice-sdbc-postgresql -Nlibreoffice-sdbc-mysql + DEBHELPER_OPTIONS += -Nlibreoffice-sdbc-hsqldb -Nlibreoffice-sdbc-firebird + DEBHELPER_OPTIONS += -Nlibreoffice-report-builder-bin -Nlibreoffice-report-builder + DEBHELPER_OPTIONS += -Npython3-access2base +# CONFIGURE_FLAGS += --disable-database-connectivity + endif +endif + +ifeq (,$(filter $(DEB_HOST_ARCH),$(OOO_EXTENSIONS_ARCHS))) + ENABLE_MEDIAWIKI=n + ENABLE_NLPSOLVER=n + DEBHELPER_OPTIONS += -Nlibreoffice-wiki-publisher -Nlibreoffice-script-provider-python -Nlibreoffice-nlpsolver + CONFIGURE_FLAGS += --disable-extension-integration --disable-extensions +else + CONFIGURE_FLAGS += --enable-extension-integration +endif + +ifeq (,$(filter $(DEB_HOST_ARCH),$(OOO_JAVA_ARCHS))) + ENABLE_JAVA=n + ENABLE_REPORTBUILDER=n + ENABLE_MEDIAWIKI=n + ENABLE_NLPSOLVER=n +endif + +ifneq "$(BUILD_TEST_PACKAGES)" "y" + DEBHELPER_OPTIONS += -Nlibreoffice-subsequentcheckbase -Nlibreoffice-smoketest-data +endif + +ifeq "$(ENABLE_GUI)" "y" + ifeq ($(DEB_HOST_ARCH),$(filter $(DEB_HOST_ARCH),$(OOO_NOGUI_ARCHS))) + BUILD_NOGUI_PACKAGES=y + endif +else +CONFIGURE_FLAGS += --disable-gui +DEBHELPER_OPTIONS += -Nlibreoffice-core -Nlibreoffice-calc -Nlibreoffice-writer -Nlibreoffice-draw -Nlibreoffice-report-builder-bin -Nlibreoffice-base -Nlibreoffice-impress -Nlibreoffice-math +# transitional package.. +DEBHELPER_OPTIONS += -Nlibreoffice-kde5 +endif +ifneq "$(BUILD_NOGUI_PACKAGES)" "y" +DEBHELPER_OPTIONS += -Nlibreoffice-core-nogui -Nlibreoffice-calc-nogui -Nlibreoffice-writer-nogui -Nlibreoffice-draw-nogui -Nlibreoffice-report-builder-bin-nogui -Nlibreoffice-base-nogui -Nlibreoffice-impress-nogui -Nlibreoffice-math-nogui +endif + +############# +# Distro-specific overrides + +# Debian Buster +ifeq "$(DEB_DISTRIBUTION)" "buster-backports" + BUGS=mailto:debian-backports@lists.debian.org + SYSTEM_STUFF := $(filter-out libmwaw xmlsec mdds orcus libnumbertext,$(SYSTEM_STUFF)) + USE_DWZ := n + BUSTER_BACKPORT=y +endif + +CONFIGURE_FLAGS += $(foreach i, $(SYSTEM_STUFF),--with-system-$(i)) + +CC_PREFIX:=$(shell gcc -dumpmachine)- + +# generally use clang +USE_CLANG=n +# allow clang for skia? +ALLOW_CLANG=y + +CLANG_VERSION=default + +ifeq "$(USE_CLANG)" "y" + ENABLE_COMPILER_PLUGINS=n +endif + +ifneq "$(USE_CLANG)" "y" + ifneq "$(GCC_VERSION)" "" + ifneq "$(SYSTEM_GCC_VERSION)" "$(GCC_VERSION)" + BUILD_DEPS += , gcc-$(GCC_VERSION), g++-$(GCC_VERSION) + CONFIGURE_FLAGS+= \ + CC=$(CC_PREFIX)gcc-$(GCC_VERSION) \ + CXX=$(CC_PREFIX)g++-$(GCC_VERSION) + endif + endif + BUILD_DEPS += , gcc (>= 4:7), g++ (>= 4:7) + # Use -O0 for gcc 10 on armhf to avoid build/test failure with gcc 10 + # https://bugs.launchpad.net/ubuntu/+bug/1891623 + # In Debian this never appeared to be an actual build failure but + # this also helps for the test timeout on armv8 machines/buildds. + # (armv7 "works"). So make it conditional on whether we run checks. + # With g++-10 there also appear SIGSEGVs in/with openjdk-11 and it + # hangs at RunMacros, which also tries to use Java "Macros". + # A --without-java build passes. +ifeq "$(DEB_HOST_ARCH)" "armhf" + ifeq "$(shell dpkg --compare-versions $(SYSTEM_GCC_VERSION) gt 10 && echo true)" "true" + ifeq ($(ENABLE_JAVA),y) + ifneq (nocheck,$(findstring nocheck,$(DEB_BUILD_OPTIONS))) + ifneq (noopt,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + DEB_BUILD_OPTIONS += noopt + endif + endif + endif + endif +endif + # skia build picks up clang if present (for performance reasons, + # at least on Windows...). See the thread starting at + # https://lists.freedesktop.org/archives/libreoffice/2020-April/084929.html + # Make it a explicit build-dependency so we don't have builds + # "randomly" using gcc or clang depending on whether clang is installed + # or not + ifeq (armel,$(findstring armel,$(DEB_HOST_ARCH))) + # there is no clang 11 on buster, obviously and this also fails to build with gcc 7 in buster + ifeq "$(BUSTER_BACKPORT)" "y" + ENABLE_SKIA=n + endif + endif + ifeq "$(ENABLE_SKIA)" "y" + ifeq "$(ALLOW_CLANG)" "y" + ifeq (ccache,$(findstring ccache,$(DEB_BUILD_OPTIONS))) + export CCACHE_CPP2=1 + endif + ifeq "$(CLANG_VERSION)" "default" + BUILD_DEPS += , clang (>= 1:5.0.2) [$(filter-out armel,$(OOO_LE_ARCHS))] + ifneq "$(BUSTER_BACKPORT)" "y" + # see #963162, #963167 which apparently don't exist on 11 + BUILD_DEPS += , clang (>= 1:11) [armel] + endif + else + export CLANG_CC=clang-$(CLANG_VERSION) + export CLANG_CXX=clang++-$(CLANG_VERSION) + BUILD_DEPS += , clang-$(CLANG_VERSION) [$(OOO_LE_ARCHS)] + endif + endif + endif +else + ifeq "$(CLANG_VERSION)" "default" + BUILD_DEPS += , clang (>= 1:5.0.2) + CONFIGURE_FLAGS+= CC=clang CXX=clang++ + else + BUILD_DEPS += , clang-$(CLANG_VERSION) + CONFIGURE_FLAGS+= CC=clang-$(CLANG_VERSION) CXX=clang++-$(CLANG_VERSION) + endif + ifeq "$(ENABLE_COMPILER_PLUGINS)" "y" + CONFIGURE_FLAGS += --enable-compiler-plugins + CLANGDIR := /usr/lib/llvm-$(shell $(CLANG) --version | head -n 1 | awk '{ print $$3 }' | cut -d. -f1) + ifeq "$(CLANG_VERSION)" "default" + BUILD_DEPS += , libclang-dev, llvm-dev + else + BUILD_DEPS += , libclang-$(CLANG_VERSION)-dev, llvm-$(CLANG_VERSION)-dev + endif + endif +endif +USE_GOLD=n +# leaves cruft around after building because it runs update_pch.sh.. +ENABLE_PCH=n + +ifeq "$(USE_DWZ)" "y" + BUILD_DEPS += , debhelper (>= 10.10.4) + # dwz 0.12-3 claims to have DW_OP_GNU support but still + # dwz: debian/libreoffice-core/usr/lib/libreoffice/program/libmergedlo.so: Couldn't find DIE referenced by DW_OP_GNU_parameter_ref + # happens + BUILD_DEPS += , dwz (>> 0.12-3) +endif + +ifneq "$(PACKAGE_SDK)" "y" + CONFIGURE_FLAGS += --disable-odk + ifneq "$(PACKAGE_SDK_DOCS)" "y" + CONFIGURE_FLAGS += --without-doxygen --without-javadoc + endif +else + ifeq "$(PACKAGE_SDK_DOCS)" "y" + BUILD_DEPS_INDEP += , doxygen (>= 1.8.4) , graphviz + else + CONFIGURE_FLAGS += --without-doxygen --without-javadoc + endif +endif + +ifeq "$(ENABLE_PDFIMPORT)" "y" + ifeq "$(ENABLE_POPPLER)" "y" + BUILD_DEPS += , libpoppler-dev (>= 0.12.0), libpoppler-private-dev, libpoppler-cpp-dev + else + CONFIGURE_FLAGS += --disable-poppler + endif + ifeq "$(ENABLE_PDFIUM)" "n" + CONFIGURE_FLAGS += --disable-pdfium + endif +endif + +ifneq (,$(filter graphite, $(SYSTEM_STUFF))) + BUILD_DEPS += , libgraphite2-dev (>= 0.9.3) +endif + +ifneq (,$(filter harfbuzz, $(SYSTEM_STUFF))) + BUILD_DEPS += , libharfbuzz-dev (>= 0.9.42) +endif + +ifneq (,$(filter libexttextcat, $(SYSTEM_STUFF))) + BUILD_DEPS += , libexttextcat-dev (>= 3.4.1) + TEXTCAT_DATA_RECOMMENDS := libexttextcat-data +endif + +ifneq "$(ENABLE_LDAP)" "y" + CONFIGURE_FLAGS += --disable-ldap +endif + +ifeq "$(ENABLE_LIBNUMBERTEXT)" "y" + ifneq (,$(filter libnumbertext, $(SYSTEM_STUFF))) + BUILD_DEPS += , libnumbertext-dev (>= 1.0.6) + NUMBERTEXT_DATA_RECOMMENDS := libnumbertext-data + endif +else + CONFIGURE_FLAGS += --disable-libnumbertext +endif + +ifneq (,$(filter jpeg, $(SYSTEM_STUFF))) + BUILD_DEPS += , libjpeg-dev +endif +ifneq (,$(filter libxml, $(SYSTEM_STUFF))) + BUILD_DEPS += , libxml2-dev (>= 2.8), libxml2-utils + BUILD_DEPS += , libxslt1-dev +else + CONFIGURE_FLAGS += --without-system-libxml +endif +ifneq (,$(filter xmlsec, $(SYSTEM_STUFF))) + BUILD_DEPS += , libxmlsec1-dev (>= 1.2.28) +endif +ifneq (,$(filter expat, $(SYSTEM_STUFF))) + BUILD_DEPS += , libexpat1-dev +endif +ifneq (,$(filter odbc, $(SYSTEM_STUFF))) + BUILD_DEPS += , unixodbc-dev (>= 2.2.11) +endif +ifneq (,$(filter sane, $(SYSTEM_STUFF))) + BUILD_DEPS += , libsane-dev +endif +ifneq (,$(filter libpng, $(SYSTEM_STUFF))) + BUILD_DEPS += , libpng-dev +endif + +ifneq (,$(filter curl, $(SYSTEM_STUFF))) + BUILD_DEPS += , libcurl4-$(CURL_SECTYPE)-dev +endif + +COINMP_MINVER=(>= 1.7.6+dfsg1-2) + COINUTILS_MINVER=(>= 2.10.14+repack1-1) + # go sure given #873362 + COINMP_MINVER=(>= 1.8.3-3) +ifneq ($(ENABLE_COINMP),y) + CONFIGURE_FLAGS += --disable-coinmp +else + ifneq (,$(filter coinmp, $(SYSTEM_STUFF))) + BUILD_DEPS += , coinor-libcoinmp-dev $(COINMP_MINVER), coinor-libcoinutils-dev $(COINUTILS_MINVER) + endif +endif + +ifneq (,$(filter amd64,$(DEB_HOST_ARCH))) + SMALL_SYMBOLS = n +endif + +ifeq "$(ENABLE_SYMBOLS)" "y" + # Small symbols? + ifeq "$(SMALL_SYMBOLS)" "y" + CONFIGURE_FLAGS += --enable-symbols=SMALL + DEB_CFLAGS_MAINT_STRIP := -g + DEB_CXXFLAGS_MAINT_STRIP := -g + DEB_CFLAGS_MAINT_PREPEND += -g1 + DEB_CXXFLAGS_MAINT_PREPEND += -g1 +export DEB_CFLAGS_MAINT_STRIP DEB_CXXFLAGS_MAINT_STRIP +export DEB_CFLAGS_MAINT_PREPEND DEB_CXXFLAGS_MAINT_PREPEND + else + CONFIGURE_FLAGS += --enable-symbols + endif +else + DEB_CFLAGS_MAINT_STRIP := -g + DEB_CXXFLAGS_MAINT_STRIP := -g +export DEB_CFLAGS_MAINT_STRIP DEB_CXXFLAGS_MAINT_STRIP +endif +export DPKG_EXPORT_BUILDFLAGS=y +include /usr/share/dpkg/buildflags.mk +ifeq (debug,$(findstring debug,$(DEB_BUILD_OPTIONS))) + CONFIGURE_FLAGS += --enable-debug +endif +ifeq (noopt,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CONFIGURE_FLAGS += --disable-optimized +endif + +ifeq "$(ENABLE_PYTHON)" "y" +PYMAJOR:=$(shell $(PYTHON) -c "import sys; print (sys.version_info[0])") +PYMINOR:=$(shell $(PYTHON) -c "import sys; print (sys.version_info[1])") +PYMINORPLUS1:=$(shell $(PYTHON) -c "import sys; print (sys.version_info[1]+1)") +PYTHON_SITE:=debian/python3-uno/$(shell $(PYTHON) -c 'from distutils import sysconfig; print(sysconfig.get_python_lib())') +endif + + BUILD_DEPS += , $(PYTHON) +ifeq "$(ENABLE_PYTHON)" "y" + BUILD_DEPS += , $(PYTHON)-dev (>= 3.3) + BUILD_DEPS += , $(PYTHON)-distutils + BUILD_DEPS += , dh-python + ifeq "$(RUN_MAKE_CHECK)" "y" + ifneq (nocheck,$(findstring nocheck,$(DEB_BUILD_OPTIONS))) + BUILD_DEPS += , $(PYTHON)-lxml + else + CONFIGURE_FLAGS += --without-lxml + endif + endif +endif + + BUILD_DEPS += , debhelper-compat (= 12) +ifeq "$(BUILD_DBGSYM_PACKAGES)" "y" + # from debhelper changelog + BUILD_DEPS += , dpkg-dev (>= 1.18.2~) +else + BUILD_DEPS += , dpkg-dev (>= 1.17.14) +endif + + ifeq "$(RUN_MAKE_CHECK)" "y" + BUILD_DEPS += , locales$(OOO_NO_CHECK_ARCHS) + BUILD_DEPS += , gdb$(OOO_NO_CHECK_ARCHS) + BUILD_DEPS += , fontconfig$(OOO_NO_CHECK_ARCHS) + BUILD_DEPS += , fonts-liberation2$(OOO_NO_CHECK_ARCHS) + BUILD_DEPS += , fonts-crosextra-carlito$(OOO_NO_CHECK_ARCHS) + # https://lists.freedesktop.org/archives/libreoffice/2017-May/077764.html + BUILD_DEPS += , fonts-dejavu$(OOO_NO_CHECK_ARCHS) + ifneq (,$(filter cppunit, $(SYSTEM_STUFF))) + BUILD_DEPS += , libcppunit-dev (>= 1.14)$(OOO_NO_CHECK_ARCHS) + endif + # 17:35 <@sberg_> vmiklos, oh, what kind of poor test is that? "warn:sal.osl:3785:2:sal/osl/unx/process.cxx:344: ChildStatusProc : starting 'pstoedit' failed" etc. is what I see in workdir/CppunitTest/filter_eps_test.test.log... + BUILD_DEPS += , pstoedit$(OOO_NO_CHECK_ARCHS) + BUILD_DEPS += , imagemagick$(OOO_NO_CHECK_ARCHS) + BUILD_DEPS += , ghostscript$(OOO_NO_CHECK_ARCHS) + BUILD_DEPS += , hunspell-en-us$(OOO_NO_CHECK_ARCHS) + BUILD_DEPS += , hyphen-en-us$(OOO_NO_CHECK_ARCHS) + else + CONFIGURE_FLAGS += --without-cppunit + endif + ifeq "$(ENABLE_JUNIT4)" "y" + BUILD_DEPS += , junit4 $(JUNIT_MIN_VER) [$(OOO_JUNIT_ARCHS)] + else + CONFIGURE_FLAGS += --without-junit + endif + ifeq "$(ENABLE_CHART_TESTS)" "y" + CONFIGURE_FLAGS += --enable-chart-tests + endif + ifeq "$(ENABLE_EXPORT_VALIDATION_TESTS)" "y" + BUILD_DEPS += , libofficeotron-java$(OOO_NO_CHECK_ARCHS) , libodfvalidator-java$(OOO_NO_CHECK_ARCHS) + else + CONFIGURE_FLAGS += --without-export-validation + endif +ifneq "$(BUILD_ONLY_EN_US)" "y" + ifeq (lang=,$(findstring lang=,$(DEB_BUILD_OPTIONS))) + ISOS=$(shell echo "$(DEB_BUILD_OPTIONS) " | sed -n 's/^.*lang=\([^\s].*\)\s.*/\1/p' | awk '{ print $$1 }' | sed -e 's/,/ /g') + ifeq "$(ENABLE_HELP)" "n" + HELPISOS= + else + HELPISOS=$(shell echo "$(DEB_BUILD_OPTIONS) " | sed -n 's/^.*lang=\([^\s].*\)\s.*/\1/p' | awk '{ print $$1 }' | sed -e 's/,/ /g') + endif + LANGPACKISOS=$(shell echo "$(DEB_BUILD_OPTIONS) " | sed -n 's/^.*lang=\([^\s].*\)\s.*/\1/p' | awk '{ print $$1 }' | sed -e 's/,/ /g') + else + # Note that the first one here *has to be* en-US. the first one gets + # gid_Module_Root as filelist later and the rest gid_Module_Root.$iso + # but we can't/shouldn't do dynamic switching, so let en-US be the first + # one to that gid_Module_Root always is english and the other langpacks + # have gid_Module_Root.$iso + #ISOS=$(shell $(SOURCE_TREE)/bin/lo-xlate-lang -i all') + ISOS:=en-US af am ar as ast be bg bn br bs ca ca-valencia cs cy da de dz el \ + en-GB en-ZA eo es et eu fa fi fr ga gd gl gu gug he hi hr hu id is it ja \ + ka kk km kmr-Latn kn ko lt lv mk mn ml mr nb ne nl nn nr nso oc om or \ + pa-IN pl pt pt-BR ro ru rw si sk sl sr sr-Latn ss st sv szl \ + ta te tg th tn tr ts ug uk uz ve vi xh zh-CN zh-TW zu + ifeq "$(ENABLE_HELP)" "n" + HELPISOS:= + else + #HELPISOS:=$(shell $(SOURCE_TREE)/bin/lo-xlate-lang -i all') + HELPISOS:=en-US ca ca-valencia cs da de dz el en-GB es et eu fi fr gl hi hu id it \ + ja km ko nl om pl pt pt-BR ru sk sl sv tr vi zh-CN zh-TW + endif + #LANGPACKISOS:=$(shell $(SOURCE_TREE)/bin/lo-xlate-lang -i all') + LANGPACKISOS:=en-US af am ar as ast be bg bn br bs ca ca-valencia cs cy da de dz el \ + en-GB en-ZA eo es et eu fa fi fr ga gd gl gu gug he hi hr hu id is it ja \ + ka kk km kmr-Latn kn ko lt lv mk mn ml mr nb ne nl nn nr nso oc om or \ + pa-IN pl pt pt-BR ro ru rw si sk sl sr sr-Latn ss st sv szl \ + ta te tg th tn tr ts ug uk uz ve vi xh zh-CN zh-TW zu + endif +else + ISOS=en-US + ifeq "$(ENABLE_HELP)" "n" + HELPISOS= + else + HELPISOS=en-US + endif + LANGPACKISOS=en-US +endif +BUILD_ISOS = $(ISOS) + +ifneq "$(BUILD_ONLY_EN_US)" "y" + ifneq "$(BUILD_ISOS)" "en-US" + CONFIGURE_FLAGS_LANG += --with-lang="$(BUILD_ISOS)" + CONFIGURE_FLAGS_INDEP += $(CONFIGURE_FLAGS_LANG) + BUILD_DEPS_INDEP += , gettext + endif +endif + +ifeq "$(ENABLE_JAVA)" "y" + BUILD_DEPS += , maven-repo-helper + ifeq "$(JDK)" "default" + JAVA_HOME=/usr/lib/jvm/default-java + BUILD_DEPS += , java-common (>= 0.61) + DEFAULT_JDK := $(call java_dependency, default-jdk) + # build-depend on 1.9 (upstream needs it anyway for module-info support) + BUILD_DEPS += , $(shell echo $(DEFAULT_JDK) | sed -e 's/default-jdk/default-jdk (>= 2:1.9)/') + endif + ifeq "$(JDK)" "openjdk" + BUILD_DEPS += , openjdk-$(JAVA_MAINVER)-jdk + JAVA_HOME=/usr/lib/jvm/java-$(JAVA_MAINVER)-openjdk-$(DEB_HOST_ARCH) + endif + TEST_JAVA_HOME=$(JAVA_HOME) + ifeq "$(ENABLE_MEDIAWIKI)" "y" + BUILD_DEPS_INDEP += , ant (>= 1.7.0)$(OOO_NO_JAVA_ARCHS) , ant-optional (>= 1.7.0)$(OOO_NO_JAVA_ARCHS) + else + # report-builder is done in build-arch already + ifneq (,$(filter jfreereport, $(SYSTEM_STUFF))) + BUILD_DEPS += , ant (>= 1.6.5)$(OOO_NO_JAVA_ARCHS) + else + BUILD_DEPS_INDEP += , ant (>= 1.6.5)$(OOO_NO_JAVA_ARCHS) + endif + endif + # but upstream also says --target=1.8 so 1.8 is fine in runtime + JAVA_RUNTIME_DEPENDS = default-jre (>= 2:1.8) + JAVA_RUNTIME_DEPENDS += | java8-runtime + # Suns Java "packages" + JAVA_RUNTIME_DEPENDS += | jre +export JAVA_HOME + CONFIGURE_FLAGS += --with-jdk-home=$(JAVA_HOME) + JAVA_COMMON_DEPENDS= , libreoffice-java-common + JAVA_COMMON_DEPENDS_VERSION:= (>= $(BASE_VERSION)~) + ifeq "$(PACKAGE_SDK)" "y" + ifeq "$(PACKAGE_UNOWINREG_DLL)" "y" + ifeq "$(BUILD_UNOWINREG_DLL)" "y" + CONFIGURE_FLAGS_INDEP += --enable-build-unowinreg + BUILD_DEPS_INDEP += , g++-mingw-w64-i686 + WIN_TRIPLET := i686-w64-mingw32 + CONFIGURE_FLAGS_INDEP += --with-mingw-cross-compiler=$(WIN_TRIPLET)-g++ + endif + endif + endif + ifeq "$(ENABLE_MEDIAWIKI)" "y" + CONFIGURE_FLAGS_INDEP += --enable-ext-wiki-publisher + endif + ifeq "$(ENABLE_REPORTBUILDER)" "y" + # report-builder + ifneq (,$(filter jfreereport, $(SYSTEM_STUFF))) + REPORT_BUILDER_BUILD_DEPS += , libbase-java$(OOO_NO_REPORTBUILDER_ARCHS) , libsac-java$(OOO_NO_REPORTBUILDER_ARCHS) , libxml-java (>= 1.1.6)$(OOO_NO_REPORTBUILDER_ARCHS) , libflute-java (>= 1.1.6)$(OOO_NO_REPORTBUILDER_ARCHS) , libpentaho-reporting-flow-engine-java (>= 0.9.4)$(OOO_NO_REPORTBUILDER_ARCHS) , liblayout-java (>= 0.2.10)$(OOO_NO_REPORTBUILDER_ARCHS) , libloader-java (>= 1.1.6)$(OOO_NO_REPORTBUILDER_ARCHS) , libformula-java (>= 1.1.7)$(OOO_NO_REPORTBUILDER_ARCHS) , librepository-java (>= 1.1.6)$(OOO_NO_REPORTBUILDER_ARCHS) , libfonts-java (>= 1.1.6)$(OOO_NO_REPORTBUILDER_ARCHS) , libserializer-java (>= 1.1.6)$(OOO_NO_REPORTBUILDER_ARCHS) + REPORT_BUILDER_JAR_DEPENDS := , libbase-java, libsac-java, libxml-java (>= 1.1.6), libflute-java (>= 1.1.6), libpentaho-reporting-flow-engine-java (>= 0.9.4), liblayout-java (>= 0.2.10), libloader-java (>= 1.1.6), libformula-java (>= 1.1.7), librepository-java (>= 1.1.6), libfonts-java (>= 1.1.6), libserializer-java (>= 1.1.6) + CONFIGURE_FLAGS += --with-libbase-jar=/usr/share/java/libbase.jar --with-libxml-jar=/usr/share/java/libxml.jar --with-flute-jar=/usr/share/java/flute.jar --with-jfreereport-jar=/usr/share/java/flow-engine.jar --with-liblayout-jar=/usr/share/java/liblayout.jar --with-libloader-jar=/usr/share/java/libloader.jar --with-libformula-jar=/usr/share/java/libformula.jar --with-librepository-jar=/usr/share/java/librepository.jar --with-libfonts-jar=/usr/share/java/libfonts.jar --with-libserializer-jar=/usr/share/java/libserializer.jar + endif + ifneq (,$(filter apache-commons, $(SYSTEM_STUFF))) + REPORT_BUILDER_BUILD_DEPS += , libcommons-logging-java$(OOO_NO_JAVA_ARCHS) + REPORT_BUILDER_JAR_DEPENDS += , libcommons-logging-java + CONFIGURE_FLAGS += --with-commons-logging-jar=/usr/share/java/commons-logging.jar + endif + BUILD_DEPS += $(REPORT_BUILDER_BUILD_DEPS) + else + CONFIGURE_FLAGS += --disable-report-builder + endif + ifeq "$(ENABLE_NLPSOLVER)" "y" + CONFIGURE_FLAGS_INDEP += --enable-ext-nlpsolver + endif + OOO_OFFICEBEAN_DEP = libofficebean-java + BUILD_DEPS += , javahelper $(JAVAHELPER_MIN_VERSION) +else + CONFIGURE_FLAGS += --without-java + DEBHELPER_OPTIONS += -Nlibreoffice-officebean -Nlibofficebean-java -Nlibreoffice-java-common -Nlibreoffice-script-provider-bsh -Nlibreoffice-script-provider-js -Nlibreoffice-subsequentcheckbase -Nlibunoil-java -Nlibofficebean-java -Nlibjuh-java -Nlibridl-java -Nlibunoloader-java -Nlibjurt-java -Nliblibreoffice-java -Nlibreoffice-sdbc-hsqldb +endif + +ifeq "$(ENABLE_JAVA)" "y" + ifeq "$(shell $(JAVA_HOME)/bin/java -version 2>&1 | grep -q Zero && echo true)" "true" + #RUN_MAKE_CHECK:=n + ENABLE_JUNIT4=n + endif +endif + +ifneq (,$(filter nss, $(SYSTEM_STUFF))) + BUILD_DEPS+= , libnss3-dev (>= 3.12.3) + BUILD_DEPS+= , libnspr4-dev +endif + +ifeq "$(USE_UCPP)" "y" + ifneq (,$(filter ucpp, $(SYSTEM_STUFF))) + IDLC_CPP_DEPENDS := ucpp + endif +else +# hardcode 4.7 as 4.8 fails: +# 14:17 <@caolan> ah, "build fails with cpp 4.8.0, this is fixable by passing +# -P, but then idlc produces empty urd files" + IDLC_CPP_DEPENDS := cpp-4.7 + CONFIGURE_FLAGS += --with-idlc-cpp=cpp-4.7 +endif + BUILD_DEPS += , $(IDLC_CPP_DEPENDS) + +ifneq (,$(filter hunspell, $(SYSTEM_STUFF))) + BUILD_DEPS += , libhunspell-dev (>= 1.1.5-2) +endif + CONFIGURE_FLAGS += --with-external-dict-dir=$(DICT_DIR) + +ifneq (,$(filter altlinuxhyph, $(SYSTEM_STUFF))) + BUILD_DEPS += , libhyphen-dev (>= 2.4) +endif + CONFIGURE_FLAGS += --with-external-hyph-dir=$(HYPH_DIR) + +ifneq (,$(filter boost, $(SYSTEM_STUFF))) + ifneq "$(BOOST_VERSION)" "default" + BUILD_DEPS += , libboost$(BOOST_VERSION)-dev $(BOOST_MINVER), libboost-date-time$(BOOST_VERSION)-dev $(BOOST_MINVER), libboost-iostreams$(BOOST_VERSION)-dev, libboost-filesystem$(BOOST_VERSION)-dev, libboost-locale$(BOOST_VERSION)-dev + #BUILD_DEPS += , libboost-thread$(BOOST_VERSION)-dev, libboost-program-options$(BOOST_VERSION)-dev + ifeq (,$(filter orcus, $(SYSTEM_STUFF))) + BUILD_DEPS += , libboost-system$(BOOST_VERSION)-dev $(BOOST_MINVER), libboost-iostreams$(BOOST_VERSION)-dev $(BOOST_MINVER), libboost-program-options$(BOOST_VERSION)-dev $(BOOST_MINVER), libboost-filesystem$(BOOST_VERSION)-dev $(BOOST_MINVER) + endif + else + BUILD_DEPS += , libboost-dev $(BOOST_MINVER), libboost-date-time-dev $(BOOST_MINVER), libboost-iostreams-dev $(BOOST_MINVER), libboost-filesystem-dev $(BOOST_MINVER), libboost-locale-dev $(BOOST_MINVER) + #BUILD_DEPS += , libboost-thread-dev, libboost-program-options-dev + ifeq (,$(filter orcus, $(SYSTEM_STUFF))) + BUILD_DEPS += , libboost-system-dev $(BOOST_MINVER), libboost-iostreams-dev $(BOOST_MINVER), libboost-program-options-dev $(BOOST_MINVER), libboost-filesystem-dev $(BOOST_MINVER) + endif + endif + ifeq "$(shell if [ -e /usr/lib/$(DEB_HOST_MULTIARCH)/libboost_date_time.so ]; then echo true; fi)" "true" + CONFIGURE_FLAGS += --with-boost-libdir=/usr/lib/$(DEB_HOST_MULTIARCH) + endif +endif + +ifneq "$(ENABLE_SKIA)" "y" + CONFIGURE_FLAGS += --disable-skia +endif + +ifneq (,$(filter mdds, $(SYSTEM_STUFF))) + BUILD_DEPS += , libmdds-dev (>= 1.5), libmdds-dev (<< 1.8~) +endif + +ifneq (,$(filter orcus, $(SYSTEM_STUFF))) + BUILD_DEPS += , liborcus-dev (>= 0.16), liborcus-dev (<< 0.17~) +endif + +ifneq (,$(filter clucene, $(SYSTEM_STUFF))) + BUILD_DEPS += , libclucene-dev (>= 2.3.3.4-4.1) +endif + +ifeq "$(USE_EXTERNAL_CXXLIBS)" "y" + ifneq (,$(filter librevenge, $(SYSTEM_STUFF))) + BUILD_DEPS += , librevenge-dev, librevenge-dev (<< 0.1~) + endif + ifneq (,$(filter libwpd, $(SYSTEM_STUFF))) + BUILD_DEPS += , libwpd-dev (>= 0.10), libwpd-dev (<< 0.11~) + endif + ifneq (,$(filter mythes, $(SYSTEM_STUFF))) + BUILD_DEPS += , libmythes-dev (>= 2:1.2) + endif + ifneq (,$(filter libwps, $(SYSTEM_STUFF))) + BUILD_DEPS += , libwps-dev (>= 0.4), libwps-dev (<< 0.5~) + ifeq "$(RUN_MAKE_CHECK)" "y" + BUILD_DEPS += , libwps-dev (>= 0.4.9) + endif + endif + ifneq (,$(filter libwpg, $(SYSTEM_STUFF))) + BUILD_DEPS += , libwpg-dev (>= 0.3), libwpg-dev (<< 0.4~) + endif + ifneq (,$(filter libvisio, $(SYSTEM_STUFF))) + BUILD_DEPS += , libvisio-dev (>= 0.1), libvisio-dev (<< 0.2~) + endif + ifneq (,$(filter libcdr, $(SYSTEM_STUFF))) + BUILD_DEPS += , libcdr-dev (>= 0.1), libcdr-dev (<< 0.2~) + endif + ifneq (,$(filter libmspub, $(SYSTEM_STUFF))) + BUILD_DEPS += , libmspub-dev (>= 0.1), libmspub-dev (<< 0.2~) + endif + ifneq (,$(filter libmwaw, $(SYSTEM_STUFF))) + BUILD_DEPS += , libmwaw-dev (>= 0.3.1), libmwaw-dev (<< 0.4~) + ifeq "$(RUN_MAKE_CHECK)" "y" + BUILD_DEPS += , libmwaw-dev (>= 0.3.15) + endif + endif + ifneq (,$(filter libodfgen, $(SYSTEM_STUFF))) + BUILD_DEPS += , libodfgen-dev (>= 0.1), libodfgen-dev (<< 0.2~) + endif + ifneq (,$(filter libepubgen, $(SYSTEM_STUFF))) + BUILD_DEPS += , libepubgen-dev (>= 0.1.0), libepubgen-dev (<< 0.2~) + endif + ifneq (,$(filter libetonyek, $(SYSTEM_STUFF))) + BUILD_DEPS += , libetonyek-dev, libetonyek-dev (<< 0.2~) + ifeq "$(RUN_MAKE_CHECK)" "y" + BUILD_DEPS += , libetonyek-dev (>= 0.1.8) + endif + endif + ifneq (,$(filter libfreehand, $(SYSTEM_STUFF))) + BUILD_DEPS += , libfreehand-dev (>= 0.1), libfreehand-dev (<< 0.2~) + endif + ifneq (,$(filter libabw, $(SYSTEM_STUFF))) + BUILD_DEPS += , libabw-dev (>= 0.1), libabw-dev (<< 0.2~) + endif + ifneq (,$(filter libpagemaker, $(SYSTEM_STUFF))) + BUILD_DEPS += , libpagemaker-dev, libpagemaker-dev (<< 0.1~) + endif + ifneq (,$(filter libzmf, $(SYSTEM_STUFF))) + BUILD_DEPS += , libzmf-dev, libzmf-dev (<< 0.1~) + endif + ifneq (,$(filter libstaroffice, $(SYSTEM_STUFF))) + BUILD_DEPS += , libstaroffice-dev, libstaroffice-dev (<< 0.1~) + ifeq "$(RUN_MAKE_CHECK)" "y" + BUILD_DEPS += , libstaroffice-dev (>= 0.0.3) + endif + endif + ifneq (,$(filter libqxp, $(SYSTEM_STUFF))) + BUILD_DEPS += , libqxp-dev, libqxp-dev (<< 0.1~) + endif + ifneq (,$(filter libebook, $(SYSTEM_STUFF))) + BUILD_DEPS += , libe-book-dev (>= 0.1), libe-book-dev (<< 0.2~) + ifeq "$(RUN_MAKE_CHECK)" "y" + BUILD_DEPS += , libe-book-dev (>= 0.1.2) + endif + endif + ifneq (,$(filter libcmis, $(SYSTEM_STUFF))) + BUILD_DEPS += , libcmis-dev (>= 0.5.2~), libcmis-dev (<< 0.6~) + endif + ifeq "$(ENABLE_QRCODEGEN)" "y" + ifneq (,$(filter qrcodegen, $(SYSTEM_STUFF))) + BUILD_DEPS += , libqrcodegencpp-dev + endif + else + CONFIGURE_FLAGS += --disable-qrcodegen + endif +endif + CONFIGURE_FLAGS += --with-external-thes-dir=$(THES_DIR) + +ifeq "$(INSTALL_APPARMOR_PROFILES)" "y" + BUILD_DEPS += , dh-apparmor + ifeq "$(CHECK_APPARMOR_PROFILES)" "true" + BUILD_DEPS += , apparmor + endif +endif + +ifeq "$(ENABLE_EOT)" "y" + CONFIGURE_FLAGS += --enable-eot + ifneq (,$(filter libeot, $(SYSTEM_STUFF))) + BUILD_DEPS += , libeot-dev + endif +endif + +ifneq (,$(filter lcms2, $(SYSTEM_STUFF))) + BUILD_DEPS += , liblcms2-dev +endif + +ifneq (,$(filter openldap, $(SYSTEM_STUFF))) + BUILD_DEPS += , libldap2-dev +endif + +ifneq (,$(filter liblangtag, $(SYSTEM_STUFF))) + BUILD_DEPS += , liblangtag-dev (>= 0.4) +endif + +ifneq (,$(filter icu, $(SYSTEM_STUFF))) + BUILD_DEPS += , libicu-dev (>= 52) +endif + + +ifeq "$(BUILD_CAIROCANVAS)" "y" + ifneq (,$(filter cairo, $(SYSTEM_STUFF))) + BUILD_DEPS+= , libcairo2-dev + endif +else + CONFIGURE_FLAGS+= --disable-cairo +endif + +ifeq "$(ENABLE_KF5)" "y" + CONFIGURE_FLAGS += --enable-kf5 + BUILD_DEPS += , libkf5coreaddons-dev, libkf5i18n-dev, libkf5config-dev, libkf5windowsystem-dev, libkf5kio-dev +endif + PLASMA_ICONSET_DEP=libreoffice-style-breeze +ifeq "$(ENABLE_QT5)" "y" + CONFIGURE_FLAGS += --enable-qt5 + BUILD_DEPS += , qtbase5-dev $(QT5_MINVER), qt5-qmake $(QT5_MINVER), qtbase5-dev-tools $(QT5_MINVER) + BUILD_DEPS += , libqt5x11extras5-dev $(QT5_MINVER) + BUILD_DEPS += , libglib2.0-dev (>= 2.4) + BUILD_DEPS += , libxcb1-dev + BUILD_DEPS += , libxcb-icccm4-dev + ifeq "$(BUSTER_BACKPORT)" "y" + # for correct qmake/moc + BUILD_DEPS += , qtchooser + export QT_SELECT=5 + endif +endif + +ifeq "$(MYSQL_FLAVOUR)" "default" + BUILD_DEPS += , default-libmysqlclient-dev +else + ifeq "$(MYSQL_FLAVOUR)" "mysql" + ifneq (,$(filter mariadb, $(SYSTEM_STUFF))) + BUILD_DEPS += , libmysqlclient-dev + endif + MARIADBCONFIG=/usr/bin/mysql_config + endif + ifeq "$(MYSQL_FLAVOUR)" "mariadb" + ifneq (,$(filter mariadb, $(SYSTEM_STUFF))) + BUILD_DEPS += , libmariadb-dev + endif + MARIADBCONFIG=/usr/bin/mariadb_config + endif +endif + +ifeq "$(ENABLE_FIREBIRD)" "y" + BASE_FIREBIRD_RECOMMENDS = libreoffice-sdbc-firebird [$(OOO_FIREBIRD_ARCHS)] + ifneq (,$(filter libatomic-ops, $(SYSTEM_STUFF))) + BUILD_DEPS += , libatomic-ops-dev (>= 7.3~alpha1+git20110913-1)$(OOO_NO_FIREBIRD_ARCHS) + endif + ifneq (,$(filter libtommath, $(SYSTEM_STUFF))) + BUILD_DEPS += , libtommath-dev$(OOO_NO_FIREBIRD_ARCHS) + endif + ifneq (,$(filter firebird, $(SYSTEM_STUFF))) + BUILD_DEPS += , firebird-dev (>= 3.0.0.32483.ds4-4)$(OOO_NO_FIREBIRD_ARCHS) + # we need libEngine12.so + ifeq "$(RUN_MAKE_CHECK)" "y" + BUILD_DEPS += , firebird3.0-server-core $(OOO_NO_FIREBIRD_ARCHS) + endif + FIREBIRD_ENGINE_DEPENDS += firebird3.0-server-core + endif +else + CONFIGURE_FLAGS += --disable-firebird-sdbc + DEBHELPER_OPTIONS += -Nlibreoffice-sdbc-firebird +endif + +ifeq "$(BUILD_GTK3)" "y" + BUILD_DEPS += , libgtk-3-dev (>= 3.18.0), libglib2.0-dev (>= 2.38.0) + ifneq (cairo,$(findstring cairo,$(SYSTEM_STUFF))) + $(error GTK3 build fails without system-cairo!!) + endif + ifeq (,$(filter epoxy, $(SYSTEM_STUFF))) + BUILD_DEPS += , libegl1-mesa-dev + endif + GNOME_GTK_RECOMMENDS += libreoffice-gtk3 + ifeq "$(ENABLE_INTROSPECTION)" "y" + BUILD_DEPS += , gobject-introspection (>= 1.32.0), libgirepository1.0-dev (>= 1.32) + CONFIGURE_FLAGS += --enable-introspection + else + DEBHELPER_OPTIONS+= -Ngir1.2-lokdocview-0.1 + endif +endif + +ifeq "$(ENABLE_EVO2)" "n" + CONFIGURE_FLAGS += --disable-evolution2 + DEBHELPER_OPTIONS += -Nlibreoffice-evolution +else + CONFIGURE_FLAGS += --enable-evolution2 + BUILD_DEPS += , libebook1.2-dev + LIBEBOOK_DEP = $(shell debian/scripts/get_libebook_dep.sh) +endif + +ifeq "$(ENABLE_SDBC_POSTGRESQL)" "y" + ifneq (,$(filter postgresql, $(SYSTEM_STUFF))) + BUILD_DEPS += , libpq-dev (>= 9.0~) + else + BUILD_DEPS += , libkrb5-dev + endif +else + CONFIGURE_FLAGS += --disable-postgresql-sdbc + DEBHELPER_OPTIONS += -Nlibreoffice-sdbc-postgresql +endif + +ifeq "$(ENABLE_RANDR)" "y" + BUILD_DEPS += , libxrandr-dev +else + CONFIGURE_FLAGS += --disable-randr +endif + +ifneq "$(ENABLE_PYTHON)" "y" + DEBHELPER_OPTIONS+= -Npython3-uno -Nlibreoffice-script-provider-python -Npython3-access2base + CONFIGURE_FLAGS += --disable-python +else + PYUNO_DEPENDS = python3-uno (>= 4.4.0~beta2) + CONFIGURE_FLAGS += --enable-python=system +endif + +ifneq "$(PACKAGE_LIBRELOGO)" "y" + DEBHELPER_OPTIONS+= -Nlibreoffice-librelogo +endif + +ifeq "$(ENABLE_JAVA)" "y" + ifneq (,$(filter hsqldb, $(SYSTEM_STUFF))) + HSQLDB_MINVER= (>> 1.8.0.10) + HSQLDB_JAR=/usr/share/java/hsqldb1.8.0.jar + BUILD_DEPS += , libhsqldb1.8.0-java $(HSQLDB_MINVER)$(OOO_NO_JAVA_ARCHS) , libarchive-zip-perl$(OOO_NO_JAVA_ARCHS) + BASE_HSQLDB_DEPENDS = libhsqldb1.8.0-java $(HSQLDB_MINVER) + CONFIGURE_FLAGS += --with-hsqldb-jar=$(HSQLDB_JAR) + else + BUILD_DEPS += , libservlet3.1-java + endif + ifeq "$(ENABLE_SCRIPT_PROVIDER_BSH)" "y" + ifneq (,$(filter beanshell, $(SYSTEM_STUFF))) + BUILD_DEPS_INDEP += , libbsh-java + endif + CONFIGURE_FLAGS += --enable-scripting-beanshell + else + CONFIGURE_FLAGS += --disble-scripting-beanshell + DEBHELPER_OPTIONS += -Nlibreoffice-script-provider-bsh + endif + ifeq "$(ENABLE_SCRIPT_PROVIDER_JS)" "y" + CONFIGURE_FLAGS += --enable-scripting-javascript + else + CONFIGURE_FLAGS += --disable-scripting-javascript + DEBHELPER_OPTIONS += -Nlibreoffice-script-provider-js + endif +endif + +ifneq (,$(filter lpsolve, $(SYSTEM_STUFF))) + ifeq "$(USE_SHARED_LPSOLVE)" "y" + BUILD_DEPS += , liblpsolve55-dev $(LPSOLVE_MIN_VERSION), lp-solve $(LPSOLVE_MIN_VERSION) + LPSOLVE_DEP = lp-solve $(LPSOLVE_MIN_VERSION) + else + BUILD_DEPS += , liblpsolve55-dev $(LPSOLVE_MIN_VERSION) + endif + ifeq "$(USE_LIBSUITESPARSE)" "y" + BUILD_DEPS += , libsuitesparse-dev $(SUITESPARSE_MIN_VERSION) + else + BUILD_DEPS += , libufsparse-dev + endif +endif + +ifeq "$(USE_DBUS)" "y" + BUILD_DEPS += , libdbus-1-dev (>= 0.60) + CONFIGURE_FLAGS += --enable-dbus + ifeq "$(ENABLE_BLUETOOTH)" "y" + BUILD_DEPS += , libglib2.0-dev (>= 2.4) + ifneq (,$(filter bluez, $(SYSTEM_STUFF))) + BUILD_DEPS += , libbluetooth-dev [linux-any] + endif + else + CONFIGURE_FLAGS += --disable-sdremote-bluetooth + endif + ifeq "$(ENABLE_PACKAGEKIT)" "y" + CONFIGURE_FLAGS += --enable-packagekit + endif +endif + +ifeq "$(ENABLE_AVAHI)" "y" + BUILD_DEPS += , libavahi-client-dev + CONFIGURE_FLAGS += --enable-avahi +endif + +ifeq "$(USE_GSTREAMER)" "y" + BUILD_DEPS += , libgstreamer1.0-dev + CONFIGURE_FLAGS += --enable-gstreamer-1-0 + BUILD_DEPS += , libgstreamer-plugins-base1.0-dev + GSTREAMER_PLUGINS_SUGGESTS += , gstreamer1.0-plugins-base, gstreamer1.0-plugins-good, gstreamer1.0-plugins-ugly, gstreamer1.0-plugins-bad, gstreamer1.0-libav +else + CONFIGURE_FLAGS += --disable-gstreamer-1-0 +endif + +ifeq "$(ENABLE_WEBDAV)" "y" + ifeq "$(WEBDAV_LIB)" "neon" + ifneq (,$(filter neon, $(SYSTEM_STUFF))) + ifneq "$(NEON_SECTYPE)" "openssl" + BUILD_DEPS += , libneon$(NEONSONR)-$(NEON_SECTYPE)-dev + else + BUILD_DEPS += , libneon$(NEONSONR)-dev + endif + endif + else + ifneq (,$(filter apr, $(SYSTEM_STUFF))) + BUILD_DEPS += , libaprutil1-dev + endif + ifneq (,$(filter serf, $(SYSTEM_STUFF))) + BUILD_DEPS += , libserf-dev + endif + endif + CONFIGURE_FLAGS += --with-webdav=$(WEBDAV_LIB) +else + CONFIGURE_FLAGS += --with-webdav=no +endif + +ifeq "$(ENABLE_HELP)" "n" + CONFIGURE_FLAGS += --without-helppack-integration --without-help +endif + +ifneq (,$(filter redland, $(SYSTEM_STUFF))) + BUILD_DEPS += , librdf0-dev (>= 1.0.16-2) +endif + +ifeq "$(ENABLE_GUI)" "y" + ifneq (,$(filter epoxy, $(SYSTEM_STUFF))) + BUILD_DEPS += , libepoxy-dev (>= 1.2) + else + BUILD_DEPS += , libegl1-mesa-dev + endif +endif +ifneq (,$(filter glm, $(SYSTEM_STUFF))) + BUILD_DEPS += , libglm-dev (>= 0.9.9~a2) +endif + +ifneq (,$(filter gpgmepp, $(SYSTEM_STUFF))) + BUILD_DEPS+= , libgpgmepp-dev, libgpgme-dev, libgpg-error-dev +endif +ifeq "$(RUN_MAKE_CHECK)" "y" + BUILD_DEPS+= , gpg + BUILD_DEPS+= , gpgconf + BUILD_DEPS+= , gpg-agent +endif + +ifeq "$(ENABLE_GIO)" "y" + ifneq "$(BUILD_GTK3)" "y" + BUILD_DEPS += , libglib2.0-dev (>= 2.26.0) + endif +else + CONFIGURE_FLAGS += --disable-gio +endif + +ifeq "$(ENABLE_DCONF)" "y" + BUILD_DEPS += , libdconf-dev (>= 0.15.2) +else + CONFIGURE_FLAGS += --disable-dconf +endif + +ifeq ($(ENABLE_MERGELIBS),y) + CONFIGURE_FLAGS += --enable-mergelibs +endif + +ifeq ($(ENABLE_LTO),y) + CONFIGURE_FLAGS += --enable-lto +endif + +ifeq ($(USE_GOLD),y) + CONFIGURE_FLAGS += --enable-ld=gold +else +# --enable-ld=gold is default for debug builds if found +ifneq (debug,$(findstring debug,$(DEB_BUILD_OPTIONS))) + CONFIGURE_FLAGS += --disable-ld +endif +endif +ifneq (,$(findstring mips,$(DEB_HOST_ARCH))) +#10:46 < _rene_> can anyone shed a light on /<>/workdir/LinkTarget/Executable/bestreversemap: error while loading shared libraries: +# /<>/instdir/program/libuno_sal.so.3: ELF file ABI version invalid? both were built in the same LO build +#10:47 < _rene_> mips64el, apparently since gcc9 or new(er) binutils? +#10:47 < _rene_> on an other binary: +#10:47 < _rene_> file /home/rene/libreoffice-6.3.1~rc2/instdir/program/libunoidllo.so +# /home/rene/libreoffice-6.3.1~rc2/instdir/program/libunoidllo.so: ELF 64-bit LSB shared object, MIPS, MIPS64 rel2 version 1 (SYSV), +# dynamically linked, BuildID[sha1]=82f15433db9000b9dfee24ed07e2082ffb439dfd, with debug_info, not stripped +#10:47 < _rene_> (eller, mips64el chroot) +#[...] +#13:49 < aurel32> _rene_: the problem is the ABI version, ie those library have Version ABI: 5 instead of 0 for normal binaries +#13:50 < aurel32> the ABI version 5 will be used for gnu hash support in mips +#13:51 < aurel32> support has been added to binutils trunk recently, although the default is still sysv hash style +#13:51 < aurel32> and glibc support is still being reviewed, it might land in 2.31 +#13:51 < aurel32> previous version of libreoffice used -Wl,--hash-style=sysv +#13:52 < aurel32> now it seems it autodetect that binutils has gnu hash support and it passes -Wl,--hash-style=gnu +#13:52 < aurel32> but there is no support for the full toolchain yet +#13:54 < _rene_> so I need to force -Wl,--hash-style=sysv? +#13:54 < aurel32> --with-linker-hash-style +#13:54 < aurel32> Use linker with --hash-style=