summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2022-10-28add infobar to prompt to refresh to replace old formatCaolán McNamara
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131976 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit bbd196ff82bda9f66b4ba32a412f10cefe6da60e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132307 Reviewed-by: Sophie Gautier <sophi@libreoffice.org> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> (cherry picked from commit c5d01b11db3c83cb4a89d3b388d78e20dd3990b5) (cherry picked from commit df05d27336927373bf83664a90156fbe505fc546) Change-Id: Id99cbf2b50a4ebf289dae6fc67e22e20afcda35b
2021-11-17ofz#37796 limit to numeric_limits<int>::maxCaolán McNamara
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121230 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 72da4c623baf60eb2b7073697cd36ffb3022847d) Change-Id: I6e09226fad1e566ba2758d0084042b603b84d221 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125384 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-10-13xmlsecurity: add test for timestampsMichael Stahl
Change-Id: I6ce64ca7c59639684779144ed0ed8d36c4aca32b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113182 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-07-26Adapt to "libstdc++: Implement LWG 1203 for rvalue iostreams"Stephan Bergmann
<https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=aa475c4ac80733f85ba47b109fc1900f05e810e2> towards GCC 12, so that now "the return type is the original rvalue stream type not its base class." (And which would thus have caused issues like > sfx2/source/control/bindings.cxx:1323:19: error: dynamic_cast from rvalue to reference type '::std::ostringstream &' (aka 'basic_ostringstream<char> &') > ? SAL_STREAM("File: " << pFile << " Line: " << nLine) : "")); > ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > include/sal/log.hxx:198:6: note: expanded from macro 'SAL_STREAM' > (dynamic_cast< ::std::ostringstream & >(::std::ostringstream() << stream).str()) > ^ > include/sal/log.hxx:341:20: note: expanded from macro 'SAL_INFO' > SAL_WHERE, stream) > ~~~~~~~~~~~^~~~~~~ > include/sal/log.hxx:155:68: note: expanded from macro 'SAL_DETAIL_LOG_STREAM' > SAL_DETAIL_LOG_STREAM_PRIVATE_(level, area, where, stream); \ > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ > include/sal/log.hxx:133:45: note: expanded from macro 'SAL_DETAIL_LOG_STREAM_PRIVATE_' > ::sal::detail::StreamStart() << stream) == 1) \ > ^~~~~~ now. While the issue with old libstdc++ that originally prompted the dynamic_cast was > sfx2/source/control/bindings.cxx:1323:19: error: no member named 'str' in 'std::basic_ostream<char>' > ? SAL_STREAM("File: " << pFile << " Line: " << nLine) : "")); > ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > include/sal/log.hxx:194:40: note: expanded from macro 'SAL_STREAM' > (::std::ostringstream() << stream).str() > ^ > include/sal/log.hxx:336:20: note: expanded from macro 'SAL_INFO' > SAL_WHERE, stream) > ~~~~~~~~~~~^~~~~~~ > include/sal/log.hxx:155:68: note: expanded from macro 'SAL_DETAIL_LOG_STREAM' > SAL_DETAIL_LOG_STREAM_PRIVATE_(level, area, where, stream); \ > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ > include/sal/log.hxx:133:45: note: expanded from macro 'SAL_DETAIL_LOG_STREAM_PRIVATE_' > ::sal::detail::StreamStart() << stream) == 1) \ > ^~~~~~ .) The libstdc++ macro _GLIBCXX_RELEASE is reportedly available since GCC 7.1. Change-Id: I1ee6eabb66355c1f28b9d305cbd85bac50d6b0e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115121 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit 1f3dddd6f21d91c429190ae314dadeec409f35f4, plus follow-up 95e26d3dce4f5a3b2d010d5ca47b4e450905a100 "tdf#142326: Adapt to 'libstdc++: Implement LWG 1203 for rvalue iostreams'") Change-Id: I7c8fef25e15fcfa9b83924467dc86dc2957fbd7d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116447 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 428206c3c1c54d01435cf4e4a07174cfbd567335) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119425 Tested-by: Thorsten Behrens <thorsten.behrens@allotropia.de> Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2021-07-26At least MSVC 19.15.26726 (VS 2017 15.8.1) needs the SAL_STREAM fix tooStephan Bergmann
...that was originally introduced for libc++ in 691b6ea8e100fc55f0ff70a82511722733113a07 "Make the SAL_STREAM thing compile with clang++ -std=c++11 -stdlib=libc++". MSVC and clang-cl builds now started to fail like > [build CXX] sfx2/source/control/bindings.cxx > C:/lo-clang/core/sfx2/source/control/bindings.cxx(1333,19): error: dynamic_cast from rvalue to reference type '::std::ostringstream &' (aka 'basic_ostringstream<char, char_traits<char>, allocator<char> > &') > ? SAL_STREAM("File: " << pFile << " Line: " << nLine) : "")); > ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > C:/lo-clang/core/include\sal/log.hxx(169,6): note: expanded from macro 'SAL_STREAM' > (dynamic_cast< ::std::ostringstream & >(::std::ostringstream() << stream).str()) > ^ > C:/lo-clang/core/include\sal/log.hxx(306,20): note: expanded from macro 'SAL_INFO' > SAL_WHERE, stream) > ~~~~~~~~~~~^~~~~~~ > C:/lo-clang/core/include\sal/log.hxx(120,53): note: expanded from macro 'SAL_DETAIL_LOG_STREAM' > ::sal::detail::StreamStart() << stream) == 1) \ > ^~~~~~ [...] Change-Id: Icb311c8a61cd7e7f450a45fc7f07327e94b5d186 Reviewed-on: https://gerrit.libreoffice.org/59833 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit 965ac9915280e3d570d7b32ff20799507f4e42eb) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119424 Tested-by: Thorsten Behrens <thorsten.behrens@allotropia.de> Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2021-06-01include cstddef for gcc11Jeff Law
Change-Id: I2f845ce9bb660ad6c1eea80ea81dd71add2c0db1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107191 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 8830cf86b146b1252ac37f351a23246088d569b0) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115979 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-03-31xmlsecurity: replace OOXMLSecParser implementationMichael Stahl
This is similar to 12b15be8f4f930a04d8056b9219ac969b42a9784 and following commits, but OOXMLSecParser has some differences to XSecParser, such as using a ds:Manifest, and requires a couple extra namespaces. Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113381 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> (cherry picked from commit cc1d19f7bbaefa5fb22ebd1344112755068b93c9) Change-Id: I56e39d9609db8fcad50ca1632ff482c1f0a30ff5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113411 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-03-29xmlsecurity: improve handling of multiple X509Data elementsMichael Stahl
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 <michael.stahl@allotropia.de> (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 <michael.stahl@allotropia.de> (cherry picked from commit 5af5ea893bcb8a8eb472ac11133da10e5a604e66) xmlsecurity: add EqualDistinguishedNames() Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111545 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (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 <michael.stahl@allotropia.de> (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 <michael.stahl@allotropia.de> (cherry picked from commit ca98e505cd69bf95d8ddb9387cf3f8e03ae4577d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111910 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit a1cf770c2d7ca3e153e0b1f01ddcc313bc2bed7f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113058 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Change-Id: I9633a980b0c18d58dfce24fc59396a833498a77d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113180 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-03-29Fix commentsSamuel Mehrbrodt
Signature lines is no longer ooxml specific Change-Id: I092dbc31b30d30bf68b4cb733cb7cb8520c99738 Reviewed-on: https://gerrit.libreoffice.org/55058 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> (cherry picked from commit 8fe7198466011a411b46295cb646338b8745308c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113178 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-03-29xmlsecurity: XSecParser confused about multiple timestampsMichael Stahl
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 <michael.stahl@allotropia.de> (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 <michael.stahl@allotropia.de> (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 <caolanm@redhat.com> (cherry picked from commit abe77c4fcb9ea97d9fff07eaea6d8863bcba5b02) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113175 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-03-29xmlsecurity: replace XSecParser implementationMichael Stahl
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 <michael.stahl@allotropia.de> (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 <michael.stahl@allotropia.de> (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 <michael.stahl@allotropia.de> (cherry picked from commit cfeb89a758b5f0ec406f0d72444e52ed2f47b85e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111907 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit ad5930e87e788780a255523f106deb1dde5d7b37) Change-Id: I03537b51bb757ecbfa63a826b38de543c70ba032 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113174 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-03-26tdf#123747 xmlsecurity, ODF sign roundtrip: preserve invalid reference typeMiklos Vajna
Only add the correct type to new signatures to avoid breaking the hash of old ones. (cherry picked from commit 8a9d8238bd8f903393ff1184aa37f8973c81e2ba) Conflicts: xmlsecurity/qa/unit/signing/signing.cxx Change-Id: I30f892b292f84a0575a3d4ef5ccf3eddbe0090ca Reviewed-on: https://gerrit.libreoffice.org/70451 Tested-by: Jenkins Tested-by: Xisco Faulí <xiscofauli@libreoffice.org> Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> (cherry picked from commit f82e3b03162bff8ecd0409be21744f2c2b2c9144) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113092 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-03-20Related tdf#97694 Check Base macro signatures on loadSamuel Mehrbrodt
Change-Id: I45c6eae633c41585c6c7e4c5fff0b187a6dc1f60 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90908 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> (cherry picked from commit f2f93434f4795646255e5d8edd31fa08b8b2ffab) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91916 Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2021-03-02Improve macro checksSamuel Mehrbrodt
Change-Id: Ie40801df8866b52c1458e020ffa9cba120720af7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109552 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de> (cherry picked from commit 1dc71daf7fa7204a98c75dac680af664ab9c8edb) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110280 Tested-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2021-02-26tdf#127471 Detect&Correct EMF/WMF with wrong FontScaleArmin Le Grand (Allotropia)
Before correcting our EMF/WMF export to write the Windows- specific data in the case of FontScaling, we wrote these files with wrong FontScaling. This change tries to detect and correct this at import, so that newer versions of the office on all plattforms can again load old, from us but not on Windows written EMF/WMF files. With this change we can read again all new and old EMF/WMF files (see table in task, comment 80). Change-Id: I1a0b0ab5f57c7cd40520401568af05cab4ecb4c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111399 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com> (cherry picked from commit 3d33e4ce3987ea17e73a72e84f7f0df7af8101a6) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111429 Tested-by: Thorsten Behrens <thorsten.behrens@allotropia.de> Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2021-02-22tdf#127471 correct EMF/WMF im/export for scaled fontArmin Le Grand (Allotropia)
If FontScaling is used, system-dependent data is held at vcl::Font Width(). Already if not scaled, we have three definitions: Width is zero, Width is equal to Height (unx) or - on Windows - Width equals avgFontWidth. If used it is W!=H where on unx Width equals Height multiplied with the scale factor. On Windows, this is Width multiplied with the only there existing avgFontWidth. Unfortunately that is ex/imported (since ever) undetected to EMF/WMF thus making EMF/WMF files containing FontScaling system-dependent - on which system was LO running when creating the file? The error can be seen when loading such a EMF/WMF on the vice-versa system, the FontScale is very ugly and wrong. Since EMF/WMF *are* Windows-specific formats the Windows-like definition is the correct one. This change makes all other systems export that now, and adapt on import to their system- specific definition (assuming coming from Windows). As can be seen, the difficulty is that these adaptions are necessary on non-Windows plattforms, but these do not have that avgFontWidth available. Thus I made a deep-dive investigation and multiple experiments to create a as similar as possible value to apply the needed calculations. For details and discussion refer to the bug description. Change-Id: I983fb6d882e2e8fccf9c8460f01509201d8157f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111000 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com> (cherry picked from commit 9d161857f1d4afcb772b477455797a2da0e47a9b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111147 Tested-by: Thorsten Behrens <thorsten.behrens@allotropia.de> Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2021-01-25ofz#20622 oomCaolán McNamara
Change-Id: Id77d90197e98d29787a40966f248dd769c9dac28 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90175 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 1e95c2c17a49349caba1e62b4de3752c5f767f01)
2020-12-07Remove unused ScrollBarBox from tabpageSamuel Mehrbrodt
This displays an empty rectangle at the upper left of the tabpage. Change-Id: I8424a3f8ec4896814b135aa2c86012f0b33ee1be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106479 Tested-by: Michael Weghorn <m.weghorn@posteo.de> Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107139 Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-12-07Create tabpage scrollbars only on demandThorsten Behrens
Otherwise glade-ui code gets confused to find controls it never generated. Change-Id: Iaf9a6e6aa5080f7a49bb754fe967e6a85e80cfae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105572 Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107136
2020-12-07Permit scrollable AWT tab pages a la scrolled DialogThorsten Behrens
UNO dialogs since LibreOffice 4.0 permitted setting HScroll / VScroll properties to enable scrolling for too large a content. Conceptually clone this code over to TabPage as well, and register necessary UNO properties in the toolkit UNO wrappers. Add missing API documentation also to UnoControlDialogModel, plus the new properties to the UnoControlTabPageModel. Change-Id: Iff90f60d0152ca21e4fe61c31315b9e1feab0dea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103999 Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104714
2020-12-04xmlsecurity: reject a few dangerous annotation types during pdf sig verifyMiklos Vajna
(cherry picked from commit f231dacde9df1c4aa5f4e0970535c4f4093364a7) Conflicts: xmlsecurity/source/helper/pdfsignaturehelper.cxx Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105926 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit fcab45e0e22f4cf46e71856dba7ae5abd6f99bc5) Change-Id: I950b49a6e7181639daf27348ddfa0f36586baa65 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107118 Tested-by: Michael Stahl <michael.stahl@cib.de> Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-12-03xmlsecurity: handle MDP permission during PDF verifyMiklos Vajna
(cherry picked from commit 586f6abee92af3cdabdce034b607b9a046ed3946) Conflicts: include/vcl/filter/PDFiumLibrary.hxx vcl/source/pdf/PDFiumLibrary.cxx xmlsecurity/source/helper/pdfsignaturehelper.cxx Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105785 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 00479937dc071246cc27f33fd6397668448a7ed9) Change-Id: I626fca7c03079fb0374c577dcfe024e7db6ed5b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107085 Tested-by: Michael Stahl <michael.stahl@cib.de> Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-09-12xmlsecurity: pdf incremental updates that are non-commenting are invalidMiklos Vajna
I.e. it's OK to add incremental updates for annotation/commenting purposes and that doesn't invalite existing signatures. Everything else does. (cherry picked from commit 61834cd574568613f0b0a2ee099a60fa5a8d9804) Conflicts: include/vcl/filter/PDFiumLibrary.hxx vcl/source/pdf/PDFiumLibrary.cxx xmlsecurity/qa/unit/signing/signing.cxx Change-Id: I4607c242b3c6f6b01517b02407e9e7a095e2e069
2020-09-12pdfium: only init pdfium library once and destroy on LO exitTomaž Vajngerl
With more and more usage of PDFium, it is hard to keep track of the life-time of the PDFium library, so it can happen that a FPDF_DestroyLibrary happens when we still have another instance where PDFium is still use. The result of this is a crash. To prevent this, just initialize the library once and delete, when on LO exit. This can be improved in the future to only keep the library active when in actual use. [ Leaving out the vector graphic search bits, the motivation is to just have this in libreoffice-7-0, so that recent pdf sig verify improvements can be backported. ] (cherry picked from commit 067a8a954c8e1d8d6465a4ab5fb61e93f16c26c2) Conflicts: vcl/source/graphic/VectorGraphicSearch.cxx svx/source/svdraw/svdpdf.cxx svx/source/svdraw/svdpdf.hxx vcl/Library_vcl.mk vcl/qa/cppunit/pdfexport/pdfexport.cxx vcl/source/filter/ipdf/pdfread.cxx Change-Id: I5c7e5de7f8b97d10efb394c67c7a61b976c8d57c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102317 Tested-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com> (cherry picked from commit b7de766b4dc5b4810277069bcf53a9f3737e87da)
2020-09-10xmlsecurity: avoid saying OK when the signature is partialMiklos Vajna
That's reserved for valid signatures (digest match, certificate validates and the signature covers the whole document). Also avoid "invalid" in the dialog when the digest matches and the signature is just incomplete. This now uses wording which is closer to Acrobat and also uses the same wording on the infobar and in the dialog. Conflicts: xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx Change-Id: I26e4781d555b65cf29aa8df2232e286917235dc1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101926 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102188 Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 46efad443472679b93b282c8e08b807d7e8f1a78)
2020-07-29xmlsecurity: detect unsigned incremental update between signaturesMiklos Vajna
(cherry picked from commit 7468d5df5ec79783eae84b62bdc5ecf12f0ca255) Conflicts: vcl/source/filter/ipdf/pdfdocument.cxx xmlsecurity/source/pdfio/pdfdocument.cxx Change-Id: I269ed858852ee7d1275adf340c8cc1565fc30693 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99480 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99563 Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-07-22tdf#103602 xmloff,sw: ODF 1.3 import: PageStyle with drawing-page styleMichael Stahl
Associate a style of family "drawing-page" with a style:master-page. This fixes the small part of the draw:fill attribute problem that is covered by OFFICE-3937 in ODF 1.3. This is the import part. Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93670 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de> (cherry picked from commit 4e98ba4ba5c17ab8ae1170662af645b9d2bfde84) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94587 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit ca9a719169fa444b5d82942ae1d5600fa0114002) Change-Id: I4c86fa24c36407b64ce33f0890e5da8c26c5292a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99156 Tested-by: Michael Stahl <michael.stahl@cib.de> Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-07-18differentiate between 8bit and any-bit grey palette (tdf#121120)Luboš Luňák
Only the grey palette with 256 colors means that pixel values map directly to color values. Tdf#121120 has an image with 2-bit palette where color index 1 is (255,255,255), but that means the pixel value 1 cannot be just treated as color. Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97283 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com> (cherry picked from commit 29dc1029be6d8d02f4b639b32274a286afd0b1b3) Change-Id: Ifbd953af7f291e4fb8032ea0f4c33c0514770856 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98933 Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-05-04tdf#131936 Correctly detect OOXML variant on importSamuel Mehrbrodt
Change-Id: I29a6b0454bf741ce8ad49078597b3412a83dedb9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92278 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> (cherry picked from commit ff93e4977cb1e23f355d248a77e8d0e56bb0f4b9) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92766 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit 66331ed8f549cd9fad331b7d2a1d7dcf3498a553) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92996 Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-04-28tdf#129708 speed-up: check if we could create outline instead of creation of itSerge Krot
Conflicts: include/svx/svdotext.hxx oox/source/export/drawingml.cxx oox/source/export/vmlexport.cxx sd/source/ui/slidesorter/controller/SlsSlotManager.cxx sd/source/ui/view/drviews7.cxx sd/source/ui/view/outlnvsh.cxx svx/source/accessibility/AccessibleShape.cxx svx/source/inc/cell.hxx svx/source/sdr/primitive2d/sdrattributecreator.cxx svx/source/svdraw/svdotext.cxx svx/source/table/accessiblecell.cxx svx/source/table/cell.cxx svx/source/table/tablertfexporter.cxx svx/source/unodraw/unoshtxt.cxx sw/source/filter/ww8/rtfsdrexport.cxx sw/source/filter/ww8/wrtw8esh.cxx Change-Id: I0629b4e6ccae4ab9be0142fe39c627f2f9a8f5ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86199 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92650 Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-03-02Delete google_breakpad::ExceptionHandler before calling _exit()Mike Kaganski
While debugging tdf#129712 on Windows, I saw this sequence: 1. nullptr was dereferenced (the reason for tdf#129712). 2. ExceptionHandler::HandleException was called (in workdir/UnpackedTarball/breakpad/src/client/windows/handler/exception_handler.cc). 3. It called ExceptionHandler::WriteMinidumpOnHandlerThread. 4. Minidump was created in ExceptionHandler::ExceptionHandlerThreadMain. 5. Document Recovery dialog was shown in Desktop::Exception (in desktop/source/app/app.cxx). 6. After closing dialog, _exit() was called in Desktop::Exception. 7. All threads except main were terminated. 8. Another access violation was thrown in the "minimal CRT cleanup". 9. ExceptionHandler::HandleException called again. 10. ExceptionHandler::WriteMinidumpOnHandlerThread hung on WaitForSingleObject because handler thread that should release the semaphore was terminated already at step 7. The process had to be killed manually. This change destroys the breakpad handler at the start of Desktop::Exception, which de-registers itself (on Windows it uses SetUnhandledExceptionFilter). Other than preventing the hang, the rationale also is that keeping the handler after first minidump creation is wrong: even if the second minidump creation succeeded, uploading it to crashdump server would give not the actual problem, but some unrelated stack. Change-Id: If12d0c7db519693f733b5ab3b8a288cef800a149 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86104 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit 12b5892cf9c78dd917f2e50672cd250478e6c7d6) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89690 Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-02-16tdf#130325 Fix listbox used as dropdownSamuel Mehrbrodt
In this case, the listbox is not used as a static widget, also not as a combobox with dropdown. Instead the listbox is placed in a popup to choose values from. Need to handle this case similiar to the combobox dropdown (Cursor movement only travels through items, Return selects one item). Regression from 7de9417d5f65d35227c7f80f6d587c2a56bde4e0 Change-Id: Idadc3da5847e12e1408203b13ab59eb53fe14eea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88581 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> (cherry picked from commit d92463c88a557eea7a439def39659b1409772583) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88504 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit f475d0574a2df630b2940f0204bb13199f823706) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88690 Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-01-23tdf#127711 - A runtime-switch for the MiniCrashDumpJuergen Funk
- in soffice.ini (sofficerc) the entry "CrashDumpEnable" default is "true" - when false then the Dump.ini and the dump-file are not written - when the switch --disable-crashdump is set, then the switch "CrashDumpEnable" set to "false" - when the entry "CrashDumpEnable" is missing, in this case is the default true, too - the checkbox under Options-General "Send crash reports to ..." is deactive and shows off (only view, not change the config) - when set the environment variable "CRASH_DUMP_ENABLE" to any char then the switch "CrashDumpEnable=false" are overrules with true and the Dump.ini and dump-file are write Reviewed-on: https://gerrit.libreoffice.org/79273 Tested-by: Jenkins Reviewed-by: Juergen Funk (CIB) <juergen.funk_ml@cib.de> (cherry picked from commit 2215be5268a646d3cc7d138a0184c6826585b7fb) §§{JNKCMD:NoBuild}§§ Change-Id: I34e7795640eb95d111e18b0ad46ec67b2c126b19 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87263 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-01-23Refactoring of the class CrashReporterJuergen Funk
- remove double code - using of all the methode of the CrashReporter-Class - all methode only active when crash-dump enable except the addKeyValue With this change the handling for the patch tdf#127711 A runtime-switch for the MiniCrashDump would be simpler Reviewed-on: https://gerrit.libreoffice.org/79272 Tested-by: Jenkins Reviewed-by: Juergen Funk (CIB) <juergen.funk_ml@cib.de> (cherry picked from commit 8fe03eef707561bb0b9e1655292619ec3cd347f5) Conflicts: desktop/source/app/crashreport.cxx vcl/opengl/x11/X11DeviceInfo.cxx vcl/source/app/salplug.cxx §§{JNKCMD:NoBuild}§§ Change-Id: I339b3b8e06f7fc2cd3c0d34ece112a6fd352913a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87262 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-01-23crashreport: change addKeyValue to lower-case camelJuergen Funk
Reviewed-on: https://gerrit.libreoffice.org/79601 Reviewed-by: Juergen Funk (CIB) <juergen.funk_ml@cib.de> Tested-by: Juergen Funk (CIB) <juergen.funk_ml@cib.de> (cherry picked from commit b5adb2433de4f376c253a813a632e982c7ac90c5) Conflicts: vcl/opengl/x11/X11DeviceInfo.cxx vcl/source/app/salplug.cxx §§{JNKCMD:NoBuild}§§ Change-Id: Ife5775d3a570da1fc2e4dd627456523705b64e1d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87260 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2019-11-21warn on load when a document binds an event to a macroCaolán McNamara
a) treat shared/Scripts equivalently to document scripts This doesn't automatically warn/block running those scripts when used in a freshly loaded document on its own however because DocumentMacroMode::checkMacrosOnLoading will see at... if ( m_xData->m_rDocumentAccess.documentStorageHasMacros() || hasMacroLibrary() ) that the document contains no macros and flip the allow macros flag to true so that potentially new uses of macros added by the user during the edit are allowed to run b) so, add an additional flag to indicate existence of use of macros in a document c) for odf import, set it when a script:event-listener tag is encountered d) for html import when registerScriptEvents or SwFormatINetFormat::SetMacroTable is called e) for doc import when Read_F_Macro or StoreMacroCmds is called as well for good measure f) for xls import when registerScriptEvent or ScMacroInfo::SetMacro is called g) for oox import when VbaProject::attachMacros is called Reviewed-on: https://gerrit.libreoffice.org/77387 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> (cherry picked from commit 35fe064a67b54b0680b4845477c9b8751edda160) Change-Id: Ic1203d8ec7dfc217aa217135033ae9db2888e19b Reviewed-on: https://gerrit.libreoffice.org/83348 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2019-10-07tdf#118967 Batch all a11y notificationsPaul Trojahn
Currently all a11y notifications get send out immediately, which often ends up formatting the document before it is ready. With the current EnterBlockNotifications()/LeaveBlockNotifications() system it is difficult to find all places that need blocking and any change in the a11y code might require additional blocking in unpredictable places. By queueing all notifications by default and only sending them out when the document is ready, we can make sure that it can't be corrupted. Change-Id: I9599c7b57eb5b8f8f0575de57fcc8bab171f78ff Reviewed-on: https://gerrit.libreoffice.org/58703 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit 6b669c9d9ee61c5c37c384c3a546467a048f5636) Reviewed-on: https://gerrit.libreoffice.org/80378 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Michael Weghorn <m.weghorn@posteo.de>
2019-10-07Revert series of LogicalFontInstance refactoringsKatarina Behrens
that cripple MM on Windows. They were backported in anticipation of backporting kde5 vclplug to 6.1 but otherwise add ~no value. Those are the reverted changes: e1266add9454 qt5: hold LogicalFontInstance with rtl::Reference ef759d03610b fixup 3eb3f0d9bc7fa94510 dbc1d2fe423b hold LogicalFontInstance with rtl::Reference Change-Id: Ieb0790797630c59ba233145c2ec075cf99725f8c Reviewed-on: https://gerrit.libreoffice.org/80247 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2019-09-17disable 'quit' menu entry when modal dialog waiting responseCaolán McNamara
Traditionally when a modal dialog is active, the quit menu entry of all LibreOffice toplevel frames, not just those which are themselves modal, is get disabled. This has come unstuck because its implemented by dialogs emitting MouseNotifyEvent::[END]EXECUTEDIALOG on its parent, and SfxFrameWindow_Impl listening for that event. But if the dialog parent is the toplevel parent of SfxFrameWindow_Impl then it doesn't get seen by the SfxFrameWindow_Impl child. Reviewed-on: https://gerrit.libreoffice.org/73975 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 252239ae30313142195b3da81aea45a89b2d6674) Conflicts: include/vcl/event.hxx include/vcl/window.hxx sfx2/source/view/frame2.cxx vcl/source/window/dialog.cxx vcl/source/window/window.cxx Change-Id: I0c4a5472d16d9169e68f6b0c230d039f1119489a Reviewed-on: https://gerrit.libreoffice.org/79040 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Michael Weghorn <m.weghorn@posteo.de>
2019-07-28expand LibreLogo check to global eventsCaolán McNamara
Reviewed-on: https://gerrit.libreoffice.org/76189 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 4a66c7eda6ccde26a42c4e31725248c59940255d) Change-Id: I7f436983ba0eb4b76b02d08ee52626e54b103d5f Reviewed-on: https://gerrit.libreoffice.org/76305 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2019-07-28Related: tdf#118735 introduce FormulaError::LinkFormulaNeedingCheck (Err:540)Eike Rathke
To indicate why the result isn't available ("External content disabled") and in future maybe signal to the formula cell that it could keep the hybrid string result, see source code comment. Change-Id: Ic5d336b8489e8776f7b640b7e46815e71d0a82a4 Reviewed-on: https://gerrit.libreoffice.org/57738 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins (cherry picked from commit da9a6f426b61937d9cda17f5be3f82d2e15e6ecd) Reviewed-on: https://gerrit.libreoffice.org/76302 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2019-06-06Revert temp fix of Basic editor crash and fix properlyKatarina Behrens
to do that, backport part of commit 0adbc69c81cc287386b31b25b2dc89780933e2b1 Turns out that this particular VclEventId (WindowChildCreated) is unused i.e. listeners for such event type don't exist and an attempt to find them via GetComponentInterface was causing the crash Change-Id: I57c59bde021cf802f01eaa6fd14e2ce3f6c73a1c Reviewed-on: https://gerrit.libreoffice.org/73623 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2019-05-03Merge branch 'libreoffice-6-1'Thorsten Behrens
into distro/lhm/libreoffice-6-1+backports Change-Id: I6b21f26c55149b5ac59b65d403612a4612ece58b
2019-04-24lazy image loading shouldn't read the entire .xls file (tdf#124828)Luboš Luňák
b11188835d3b87cd changed msfilter to use GraphicFilter::ImportUnloadedGraphic() to lazy-load images from the document. However, that function in some cases simply reads the entire rest of the passed SvStream, which in this case is the entire .xls file. And the document from tdf#124828 is ~50MiB and contains ~4000 images => 100+ GiB memory required. Reviewed-on: https://gerrit.libreoffice.org/71136 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> (cherry picked from commit af84fc9d906626255aaf136eefc5e55236e0e8a6) Reviewed-on: https://gerrit.libreoffice.org/71221 Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Change-Id: I74926383204ec642eabb28b62e2cf2e1ff8054a9 Reviewed-on: https://gerrit.libreoffice.org/71225 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-04-05tdf#124329 Add API to make cell anchored graphic resize with cellSamuel Mehrbrodt
Change-Id: Ib2335b1eb26e55fcfcfb964d0f3fe3dd267bdd0d Reviewed-on: https://gerrit.libreoffice.org/70067 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com> (cherry picked from commit 823c77a98ffbc1c819a81687ca7e13d91277bca5) The following commits have been squased into this one: Improve sc shape test Actually test anchoring the shape to a cell and to a page again Change-Id: I2d625b9a4f04aaf61dd8c1e8d10c639cbb4f0da5 Reviewed-on: https://gerrit.libreoffice.org/70110 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> (cherry picked from commit 67c5fb957f585772e23678fdcc6e24734b9fbc48) tdf#124329 Test setting ResizeWithCell via UNO API Change-Id: Iab8733e5a5df2b189197df89c3e08cd3463f2ec7 Reviewed-on: https://gerrit.libreoffice.org/70111 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> (cherry picked from commit 8603d7029b0d62032a5c9d2e039117799be9e798) Split large test method in two Change-Id: If1b915f721a5768b682c63dc9c08b708ba37a705 Reviewed-on: https://gerrit.libreoffice.org/70116 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> (cherry picked from commit 8ecdaecfa8f8665b0c8c9e3e909f683a6c198797) tdf#124329 Keep ResizeWithCell value when anchoring to a different cell Change-Id: I62010b4882268aae135a406eb27634c3335d72cf Reviewed-on: https://gerrit.libreoffice.org/70118 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> (cherry picked from commit c8e1f2fb1e5576dd85a1172d064480734e21d96e) Reviewed-on: https://gerrit.libreoffice.org/70264 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2019-03-26tdf#124263 Respect XSidebarPanel::getMinimalWidthSamuel Mehrbrodt
even if it's larger than max sidebar width (increase max sidebar width in that case). Change-Id: I2efbd546596f756df205196fae3e545beddd2f7c Reviewed-on: https://gerrit.libreoffice.org/69551 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> (cherry picked from commit d0c73ce13c02c37fcc094ac6612d6a8eee2a4026) Reviewed-on: https://gerrit.libreoffice.org/69647 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2019-03-26tdf#124255 Make maximum sidebar width configurableSamuel Mehrbrodt
Also change the default max width to 500px (instead of 400px). Reviewed-on: https://gerrit.libreoffice.org/69545 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> (cherry picked from commit 2a41c31a0627bf752a625f23a64eaf4d3fe82fb9) Change-Id: Idece5aadaf4c4165cc873b4605d2c0f026c89c6e Reviewed-on: https://gerrit.libreoffice.org/69646 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2019-03-13tdf#123293 sfx2: fix metadata loss when loading from streamMichael Stahl
The problem is that when loading from a stream, there is no BaseURL and also no storage for the document. Due to the lack of BaseURL, the sfx2::createBaseURI() throws and loading RDF metadata fails, which also pops up an annoying warning dialog. Try to handle this in a similar way than a newly created document (see GetDMA()), by using the vnd.sun.star.tdoc scheme URL for the document; this however currently requires that the document has a XStorage, which is also not the case here. So add another UNO method to tdoc UCP's tdoc_ucp::ContentProvider, to split out the creation of the tdoc schema URL from the creation of the ucb Content, to get rid of the XStorage requirement. Change-Id: Ica62743f9d21db0b1464b70db1a62ebc61989ef8 Reviewed-on: https://gerrit.libreoffice.org/67882 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> (cherry picked from commit 0a5ca5768f56db481dd3b947b3dddaab7ed96450) Reviewed-on: https://gerrit.libreoffice.org/69174 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2019-03-12Merge branch 'libreoffice-6-1'Michael Weghorn
into distro/lhm/libreoffice-6-1+backports Change-Id: If99b94efb048e5eb4d8b92832ff5ce59022da817
2019-03-04Related: tdf#117761 oox smartart: backport fixes related to picture stripMiklos Vajna
This is a combination of 7 commits. This is the 1st commit: oox smartart, picture strip: handle bitmap fill of pres nodes There were two problems here: 1) We did not import bitmap fill from presentation nodes. 2) Presentation nodes contained properties with reference semantics, so if you set a bitmap fill for a first and a second shape, then at the end both shapes contained the second bitmap. With this, both bitmaps are imported exactly once. (cherry picked from commit 333e9ea15bb57cf1c87ac2ea150de1e3fd79cfcb) This is the commit #2: oox smartart, picture strip: fetch # of children only once in snake algo No functional changes intended. (cherry picked from commit 90372d52fdcc378473b89f4e6f2de0e206c110ef) This is the commit #3: oox smartart, picture strip: expose aspect ratio of children for snake algo The aspect ratio request of the Shape is not yet used in AlgAtom::layoutShape(), though. The heavy-lifting is needed, because the number of cols/rows in the snake algorithm depends on the aspect ratio request from the child algorithm, so need to transfer the aspect ratio from child algorithm -> layout node -> shape -> parent algorithm. Still no functional changes intended. (cherry picked from commit a1e10b7968fbf4dba962349be8a6dfb0cb1d3176) This is the commit #4: oox smartart, picture strip: fix too many columns with aspect ratio request The bugdoc has 3 items in the picture strip and PowerPoint laid this out as a single column with 3 rows (as a snake algorithm). We used to put the first two items to the first row and the third item to the second row. Improve out layout by taking into account what aspect ratio the child algorithms request: this way it's obvious that we should use a single column in case we have a large enough aspect ratio and few enough items. (PowerPoint also uses multiple columns without the aspect ratio request.) (cherry picked from commit 159e33ec661b2ce038b2642b2f30600ce7901d1b) This is the commit #5: oox smartart, picture strip: fix lack of spacing around the picture list The snake algorithm in PowerPoint seem to interpret spacing as follows: if you have N elements, then there should be the requested amount of spacing between the elements, and also double amount of spacing around the actual list of elements. With this, the SmartArt and the title shape in the bugdoc no longer overlaps. (cherry picked from commit 0a29c928afa74123bca05dc089c751603d368467) This is the commit #6: oox smartart, picture strip: fix lack of margin in text shapes Shape text has two kind of spacing inside the shape's bounding box: the shape-level margin and the paragraph-level one. Only the second was handled in the tx algorithm so far, add support for the first. The margins taken from constraints were way large by default: the only explanation I found for that is that SmartArt layout sometimes calculates in MMs, sometimes in Points, and the ratio between the two is exactly the Impress / PowerPoint margin. So assume that indeed that unit difference is the reason for the smaller in-PowerPoint margin values and do the same on our side. (cherry picked from commit 279c7f83a57c4d3991930ee80e9d9c287c21270a) This is the commit #7: oox smartart, picture strip: fix too wide child shapes Once the constraints determine the size, the aspect ratio may shrink one dimension to achieve the requested ratio. Implement the case where a >1 ratio shrinks the width, so the container of the image-text shape pair has correct aspect ratio. (cherry picked from commit f4fbb127897ea6afe27055d3b6cfcb0441080902) Change-Id: I7bac764c031e80bac532c4f97ebd5b5096401096 Reviewed-on: https://gerrit.libreoffice.org/68687 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>