summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-04-01fontwork: add sidebar panelSzymon Kłos
Change-Id: I092e40c17dd814d0b18f06aea01d7afa29cbad2e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110024 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112275 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2021-04-01Exclude tests based on device color depth, not RDPMike Kaganski
After 5c9ba1f47d00ed10960b59928befd68f6c020b15, the failures on Jenkins (see 21191d0d8953a3ca6eac6022c0a14a87fe9c5e2a) made it apparent that (at least some of) Jenkins builds also run in RDP sessions. Since the tests excluded in commit 9c6142ec26a0ba61b1cf58d1e6bf0b5376394bcd never failed in Jenkins builds before, it is wrong to exclude all those tests in all RDP sessions: our CI would not test those on Windows. In the meanwhile, I discovered that the system that failed the tests actually had 16-bit color depth, despite RDP being configured to use 32-bit colors; that was the reason why the colors were modified on roundtrip. So it is better to test the actual problem to exclude tests. This reimplements the check that was introduced in commit 9c6142ec26a0ba61b1cf58d1e6bf0b5376394bcd to test default virtual device color depth. Change-Id: I329a3e2d8eca21732c77dcacf15394d1246b2e18 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113460 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-04-01android: Show files opened using system picker for recently usedMichael Weghorn
Switch the list of recently used documents in LibreOffice Android Viewer to show the documents opened using the system file picker instead of those shown using the custom UI elements for file selection. This way, files provided by DocumentsProviders, like Nextcloud, can also be handled. As described at [1], this requires persisting permissions in order to be able to access the files after a device reboot. The corresponding method to do this, 'ContentResolver#takePersistableUriPermission', is only available from SDK level 19 on, so drop entries for older SDK levels (current minSdkVersion is 16). [1] https://developer.android.com/training/data-storage/shared/documents-files#persist-permissions Change-Id: Ifbf7148cda687a8a2e3f0c14fe66651509b2f19a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113459 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2021-04-01android: Drop check for SDK version < 16Michael Weghorn
This is unnecessary, since minSdkVersion was bumped to 16 in commit a7f6338875931d8afff55cb39ead8f6600af04cb Date: Wed Aug 7 12:06:25 2019 +0200 android: support NDK 19 and above (20 as of this commit) support for targeting API 14 and 15 was removed in NDK 18, so set minimum version to 16 [...] Change-Id: I70573f9e5e24b211ee7e84be5824d69e4f2b9f81 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113458 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2021-04-01android: Move code to get doc's display name from URI to static helperMichael Weghorn
Will be used in LibreOfficeUIActivity as well. Change-Id: Ie1b99f0d31dba1be263459d135ee7fcb36613a7b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113457 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2021-04-01android: Extract opening of file to separate method 'openDocument'Michael Weghorn
The method will also be used from elsewhere in a follow-up commit. Change-Id: I94cbdfa9faf54fcb655233f43d13ced8740b88a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113456 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2021-04-01We can surely drop iOS SDKs 12.* nowTor Lillqvist
Change-Id: I67b160432dfdcc2f9e17ec31bc9ffc4190438506 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113454 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2021-04-01Fix VclComplexTextTest::testArabic another wayMike Kaganski
After 5c9ba1f47d00ed10960b59928befd68f6c020b15, Jenkins builds sometimes fail the opposite way: Test name: VclComplexTextTest::testArabic equality assertion failed - Expected: 70x14@(1,1) - Actual : 71x14@(0,1) So it seems that RDP session is not a reliable criterion. Just relax the check to allow epsilon of 1. Change-Id: I17ecacb61d6b0f15f7d5c9ec348e6e0b05e83c0d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113453 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-04-01drop AFL_DRIVER_DONT_DEFER from fuzzing .optionsCaolán McNamara
now that we drop solarmutex before the fork Change-Id: I8bd687aa21b1d42fbfb2ba646d5c79cc39fde36f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113451 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-04-01tdf#141396: make sure that line color differs from the rest of the tabMike Kaganski
Change-Id: I9740fbfd776e8b4daa4e86d2ac978028535783b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113448 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-04-01tdf#124176 Use pragma once instead of include guardsrounak
Change-Id: I778393686b9a51df6437c61a814e5c62a34302de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113433 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-04-01lok: remove frame action listener when disposingHenry Castro
In order to prevent that the frame action listener holds the object reference count when removed, ensure they are removed when disposing the object. Change-Id: If83574e31230d9c683adaf36af36485650fd2c50 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113389 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com>
2021-04-01ReleaseSolarMutex before possible afl forkCaolán McNamara
Change-Id: I2b5dfed215cb07454319b7e20068cbc8fba39c75 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113450 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-04-01Resolves: tdf#141258 turn scrollbars on/off once per layout loopCaolán McNamara
in this scenario the vertical scrollbar is turned off, then turned on back to its original state but the off/on triggers another layout loop later which does the same thing. Turn on/off just once per loop so only one state change can occur so new layout is only triggered if the state really changes. Change-Id: I5736264a74723a15034e5fb467262dca6c0f283c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113447 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-04-01This can be a simple forward declarationMike Kaganski
Change-Id: Iba4c19ee3c81c96dfd5e2ab6145ec6a6aec3a03f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113444 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-04-01tdf#140343 sw page rtl gutter margin: add UIMiklos Vajna
And extend SwFrame::UpdateAttrFrame() so that the layout is updated when the UI mutates the doc model. Change-Id: I4112388981187226f97ec39f4c44ffb3cc1e5253 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113440 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-04-01Resolves: tdf#136839 {nl-BE} leading currency symbolEike Rathke
Change-Id: Iaa9065a078ae63aca8fe4226b5c20859e3366f85 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113446 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2021-04-01cid#1475790 Uninitialized scalar fieldCaolán McNamara
this appeared in: commit 0dac6d1f179c286dd7aea2d9ef7c37db8323fa37 Author: Miklos Vajna <vmiklos@collabora.co.uk> Date: Mon Jan 25 15:34:38 2016 +0100 xmlsecurity: implement OOXML stream references and disappeared in: commit cc1d19f7bbaefa5fb22ebd1344112755068b93c9 Author: Michael Stahl <michael.stahl@allotropia.de> Date: Tue Mar 30 17:37:31 2021 +0200 xmlsecurity: replace OOXMLSecParser implementation Change-Id: Ibaff786612d0f58639471d409dc49d813fb1cb6e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113442 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-04-01Simplify CheckFileExtRegistrationMike Kaganski
Change-Id: I49a01e9cae16a408c6be11fe0501f489c3db6e3a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113438 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-04-01cid#1222237 Untrusted loop boundCaolán McNamara
Change-Id: I7c82a0e3febda2903f1ef0fe5e1145554876bb81 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113443 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-04-01cid#1473732 Untrusted loop boundCaolán McNamara
and cid#1474044 Untrusted loop bound Change-Id: If30dc454d60adca11fd1a53ecf472555e328bd42 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113441 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-04-01Introduce Fontwork contextSzymon Kłos
Change-Id: I61512e4da13514d3e5a199ccb46468ba199b808f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110023 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112274 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2021-04-01Add missing popover for fontwork properties popup controllersSzymon Kłos
Change-Id: I293a88a681b55e123c45edc9c3034b73417d7af5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113418 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2021-04-01Update git submodulesRafael Lima
* Update helpcontent2 from branch 'master' to cfea24770960a92b601cef8ef1d0c03695a7daa9 - Related tdf#105354 fix link to Macro Selector in Customize Events The Help page 06140500.xhp (customize events) mentions the Macro Selector, but uses the incorrect target help page. Change-Id: Iede4da70c6507374a70e0c22e258d2522cb612ce Reviewed-on: https://gerrit.libreoffice.org/c/help/+/113363 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-04-01tdf#140343 sw page rtl gutter margin: add RTF filterMiklos Vajna
Map to the \rtlgutter section flag. This means that now rtl gutter is handled for all Word formats. Change-Id: I4c2c12b7df2ce2109d4d638df71e6b7f322afe52 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113439 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-04-01Use isEmpty instead of comparing getLength to 0 (ucb)Julien Nabet
Change-Id: I31f91295e1e34efbd0e2b7d2c463f2ca19b512e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113429 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-04-01KJ: Improve small Select Outline Format iconsRizal Muttaqin
Change-Id: I18fd7e4656b12790ad8896cbe56f3896f4a178f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113435 Tested-by: Jenkins Reviewed-by: Rizal Muttaqin <rizmut@libreoffice.org>
2021-04-01allow deck title to ellipsize so a native gtk deck could shrinkCaolán McNamara
Change-Id: Ie32e5d9a1f6952fcce4a43b92ab8188bf7779289 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113430 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-04-01vcl pdfread: clean up not needed HAVE_FEATURE_PDFIUM ifdefsMiklos Vajna
Towards completely avoiding the HAVE_FEATURE_PDFIUM ifdef forest. Change-Id: Ide634f14087ec18e5ab8186be21def0698ddbd5b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113428 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-04-01Fix --disable-pch Windows build - missing includesMike Kaganski
... after commit 6a6cd129f34220fadf5d134a2dc2c1e368acbc4f Change-Id: I681fec2e801a02681f4f6722681832d7046e164f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113437 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-04-01tdf#141405 fix null reference use crashJim Raykowski
Change-Id: I90906b7df044c1a139c6187b74d1b4b8210919c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113434 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-01Add mechanism to selectively enable macros for document eventsSamuel Mehrbrodt
Change-Id: I56703b2c0ee009a645458c78c026c546b2e7e321 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112584 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2021-04-01tdf#45735 New UI dialog at app startup to check default file formatsMatt K
On Windows only, and only on a non-admin installation, check on application startup whether the file formats ".ods", ".odt", and ".odp" are registered to be opened by LibreOffice by default. If any of the formats are not default, show a UI dialog informing the user which formats are not default and ask the user to set the defaults. If the user selects "OK" to set defaults then the Windows UI corresponding to the user's Windows version is opened for selecting defaults per program. There is also a checkbox on the dialog to select whether checking is performed on application startup. Also, in Tools -> Options -> General, add a UI checkbox for performing this check on application startup, and refactor the existing button "Windows Default apps" to use the same Windows UI Launch APIs. Change-Id: I5e7258d111ff7da8f68805e60405aec064ddcf7c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112370 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-04-01Use o3tl::convert for conversion to/from EMUsMike Kaganski
Change-Id: Ifbf762194836a3d05157e98943e65ef8aa2149c3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113425 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-04-01tdf#126689 Colibre: revise continue Previous Numbering iconsRizal Muttaqin
Change-Id: I7740dcb3dc14cd9a0b350f8dd868bdd59ca0e3db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113394 Tested-by: Jenkins Reviewed-by: Rizal Muttaqin <rizmut@libreoffice.org>
2021-03-31Use javax.xml.transform instead of reflection to write a DocumentStephan Bergmann
At least on Fedora 34 when building with --with-jdk-home=/usr/lib/jvm/java-16 against java-latest-openjdk-headless-16.0.0.0.36-1.rolling.fc34.x86_64, CustomTarget_odk/build-examples_java failed with > ERROR: Exception occurred: An error occurred while enabling: SayHello .../desktop/source/deployment/registry/dp_backend.cxx:645 > > ERROR: unopkg failed. > > make[2]: *** [Makefile:92: .../workdir/CustomTarget/odk/build-examples_java/out/sdk/LINUXexample.out/misc/ScriptingFramework/SayHello/devguide_scriptingframework_SayHello_register_scriptpkg.flag] Error 1 because of > info:bridges:1209707:1209707:bridges/source/jni_uno/jni_uno2java.cxx:117: exception occurred uno->java: [com.sun.star.lang.WrappedTargetException] java.io.IOException > java stack trace: > com.sun.star.lang.WrappedTargetException: java.io.IOException > at com.sun.star.script.framework.container.UnoPkgContainer.writeUnoPackageDB(UnoPkgContainer.java:279) > at com.sun.star.script.framework.container.UnoPkgContainer.processUnoPackage(UnoPkgContainer.java:330) > at com.sun.star.script.framework.provider.ScriptProvider.insertByName(ScriptProvider.java:563) > Caused by: java.io.IOException > at com.sun.star.script.framework.container.XMLParserFactory$DefaultParser.write(XMLParserFactory.java:190) > at com.sun.star.script.framework.container.DeployedUnoPackagesDB.write(DeployedUnoPackagesDB.java:107) > at com.sun.star.script.framework.container.UnoPkgContainer.writeUnoPackageDB(UnoPkgContainer.java:270) > ... 2 more > Caused by: java.lang.IllegalAccessException: class com.sun.star.script.framework.container.XMLParserFactory$DefaultParser cannot access class com.sun.org.apache.xml.internal.serialize.XMLSerializer (in module java.xml) because module java.xml does not export com.sun.org.apache.xml.internal.serialize to unnamed module @50860e85 > at java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:385) > at java.base/java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:687) > at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:489) > at java.base/java.lang.reflect.ReflectAccess.newInstance(ReflectAccess.java:128) > at java.base/jdk.internal.reflect.ReflectionFactory.newInstance(ReflectionFactory.java:350) > at java.base/java.lang.Class.newInstance(Class.java:642) > at com.sun.star.script.framework.container.XMLParserFactory$DefaultParser.write(XMLParserFactory.java:145) > ... 4 more The javax.xml.transform functionality appears to be available since Java 1.4, so it should not be a problem if we unconditionally use it. Change-Id: Idc31f8f6fb092b6603c537414497d24aec886ce7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113421 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-03-31lok: "BibFrameController_Impl" prefix m_* membersHenry Castro
Change-Id: I2bead3015d306c678d81980ef14e7689ab4acc54 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113419 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com>
2021-03-31ensure background color is used when layout widgets bg is overriddenCaolán McNamara
so in the sidebar the header lines with a custom bg are always drawn with that bg when resized Change-Id: I9bb7e9ea1324b677c025d66bd9bf8d39e8ad1a09 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113339 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-31tabbar is now too wide under windows hidpiCaolán McNamara
probably since: commit 75b9109a2da35cf0f0914504145d84cf918c6af2 Date: Thu Nov 12 20:48:50 2020 +0000 weld TabBar Change-Id: I8024d3479f766a065a24f7c82ceeadf01e7b9729 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113344 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-31cid#1242892 silence Untrusted loop boundCaolán McNamara
Change-Id: If7d1106e8cc5a5f5767df8ae6bfb6b1bfdb28f82 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113401 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-31android: Don't mark doc changed on keypress in readonly modeMichael Weghorn
Since input etc. is otherwise ignored in readonly mode, also don't mark the document as changed on keypress. This e.g. avoids an unnecessary dialog whether or not to save the document after opening a document with experimental editing mode disabled, then pressing a key (on hardware keyboard, soft keyboard isn't shown in readonly mode) and then pressing the "Back" button to close the document again. Change-Id: I095c79549719d3760666605e1c642c58e6b1bb9d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113417 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2021-03-31android: Drop some unused importsMichael Weghorn
Change-Id: If72949f949cba23397d87c8f67b9434861f9bb7c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113414 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2021-03-31tdf#55058 tdf#141394 EMF FILLRGN record is not displayed correctlyBartosz Kosiorek
The EMR_FILLRGN record fills the specified region by using the specified brush. After deep analyse of [EMF] documentation, it seems that bounds from RegionDataHeader was treated as first rectangle of region. As a result whole bounds was treated as the Region. Change-Id: Ie34877b71292c05a1f17381a6de51aaed2386565 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113423 Tested-by: Jenkins Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2021-03-31android: Don't require that user presses 'Back' twice to exitMichael Weghorn
Drop the "Press back again to quit" info shown when pressing "Back" in the file selection dialog in Android Viewer and just quit the app right away. It was originally added in commit d1f671e053864d0bf54d04a855761b43a7f5a9c4 Date: Wed Jun 10 19:04:22 2015 +0200 tdf#87434: android: system back key to go one level up Added an additional check so back has to be pressed twice on the root folder to actually leave the application. It's a check seen in many other apps. but I don't really see any need to bother the user about pressing "Back" again. Nothing is lost at this stage when quitting the app, and I haven't seen anything similar in many current apps myself (but have rather seen some extra confirmation dialogs disappear from desktop applications over the last years). The original request in tdf#87434 to go one level up in the directory hierarchy is unaffected by this, though this only applies for the custom widgets to browse the file system, which will potentially be dropped in the future anyway, now that support for the system file picker has been added in commit d678ee309b02b4cc8af29a097bf5053b8b1b4e06 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Fri Mar 19 14:29:36 2021 +0100 tdf#129833 android: Allow opening files using system file picker Change-Id: Ib324b7f0b82427b04c7708665ff7492a758eec9b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113413 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2021-03-31android: Use system file picker to create new docsMichael Weghorn
Similar to the way that existing documents can be opened from within the Android Viewer app using the system file picker by using 'Intent.ACTION_OPEN_DOCUMENT', use the system file picker via 'Intent.ACTION_CREATE_DOCUMENT' to create new docs as well, instead of providing a custom dialog to insert a file name. As described at [1], this allows to save files in locations supported by any existing DocumentsProvider (e.g. a Nextcloud share, if the Nextcloud app is installed and set up), not just locally. This also allows to further unify the handling in LOMainActivity. Just like for the cases where an existing document is opened using the system file picker or a document is passed from a third-party app, the document URI is now set in the Intent, a temporary file is used and writing back to the actual URI happens on save. Drop LibreOfficeMainActivity's method 'showSaveStatusMessage', which was only meant to be used when a new file was created, but was called from the more generic 'LOKitTileProvider::saveDocumentAs'. Change that to show a more general error message when saving fails. Since the actual file is now created by the DocumentsProvider, LOKitTileProvider only operates on the temporary copy anyway. Side note: With this change in place, overwriting existing files also no longer just happens silently, as used to be the case when typing the name of an existing file in the custom dialog for creating new files earlier. Since 'Intent.ACTION_OPEN_DOCUMENT' was introduced in SDK version 19 (Android 4.4), restrict creating new docs to corresponding devices. [1] https://developer.android.com/training/data-storage/shared/documents-files Change-Id: I8932cb892ca8ac97a04d15cbd1540d0ee68350da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113408 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2021-03-31android: Only update file path for "real Save As"Michael Weghorn
Follow-up for commit a1abf2c865228e6ed33e99ab73b94357ddbc590f (tdf#139350 android: Add param to allow a "real" "Save As"). The file path should only be updated when the newly saved doc is actually used (i.e. 'takeOwnership=true'), not when just saving a copy or exporting to a different file format. Change-Id: Ia3120a94b7fcc79c1a740a10bade8721f6771d78 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113404 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2021-03-31android: Drop unused 'newDocumentType' memberMichael Weghorn
It appears to have been unused since it was added in commit 78098b8494be7123bc4a8b50faa13445e5afd8ce Date: Mon Mar 27 22:26:47 2017 +0530 Add BottomSheetBehavior to formatting toolbar Change-Id: I43cc75e0b7a1bcebd01bd77fc7132a39510c70ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113400 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2021-03-31tdf#140343 sw page rtl gutter margin: add DOC filterMiklos Vajna
The import's tokenizer was there since commit 3e13e053749e1bf19179bf83bdf0a18a9488b5e8 (#i2408# Import and export set/ask references fields as set/input, change references to bookmarks to show variable as appropiate, 2002-02-04), but it tried to read 2 bytes, not 1 byte, so it was broken. This did not cause problems in practice till commit b897cc4dfc7111eb8dfd5d8aa8c970f21ab035d6 (consistently track amount of buffers remaining, 2017-04-10) started to check for not reading past the end of the buffer. The export was missing, since we previously tried to handle this at import time, so the doc model didn't have the info anymore. Change-Id: I0d15a16893de96104812b0cba4566c53f92673ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113415 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-03-31Initial version of script to install dependenciesNoel Grandin
Change-Id: I2002d3c2c522a4cd027417f894bd03e03b85eeb0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113336 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-31remove internal 4bit scanline formatsNoel
since we have already removed the 4-bit internal bitmap formats. Change-Id: Ie481aaa8e25642a47e30beb6f37e2d3beda304e9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113412 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>