summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2024-09-23cool#9992 lok doc sign: handle .uno:SignatureCert/Key/Ca view optionsMiklos Vajna
The desktop way to sign documents is to manually import a .p12 file into your Firefox user profile, and then the signing key is available in all views. The LOK case wants per-view signing certificates, set in a way similar to the name of the user. Start implementing this by: 1) Extending initializeForRendering() to have JSON entries for the signing cert/key/ca chain. 2) Importing the CA chain as trusted certificates, using a new SfxLokHelper::extractCertificates() + test for this. 3) Marking a certificate as trusted is tricky, extract SfxLokHelper::addCertificate() from the existing doc_addCertificate() to do this. 4) Parsing the signing certificate, but just warn if that fails, still need to connect that to the SfxViewShell later. Change-Id: I00e40b3cdd68dbe8994f28861dc7b0f578189643 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173806 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-09-23CairoSDPR: Activate globally to check builds/testsArmin Le Grand (Collabora)
This is to check all builds/tests with activated CairoSDPR to evtl. make needed additional changes as preparation to activate this in the future. adapted for testTdf139000(): Use no AA offset (0.5) for applying mask. Adapted for testDoublePixelProcessing: The trick (hack) to create a PixelProcessor and then attact a metafile to start recording to it does no longer work/make sense since the VclPixelProcessor2D is no longer the only PiyelProcessor you might get. If it is a SDPR one (e.g. CairoSDPR) it *cannot* record metafiles - and is not intended to do so. Since this test was already adapted 6 years ago to the modernized decompose of a double line to just two lines anyways it is OK to now change to use a VclMetafileProcessor2D now initially. Adapted for CppunitTest_svgio: In SvgFeBlendNode::apply execute the calls for convertToBitmapEx without AntiAliasing to get better edges. Input data is SVGToken::FeFlood, so a rectangular area, so no AA needed. Taking this back: The reason must be in the renderer, nothing else changed. Debugged in detail through both, problem is that VclPixelProcessor2D ends up in CairoCommon::drawPolyPolygon and draws the polygon AntiAliased, but just the fill and thus *not* with the AA-offset of 0.5, that is only done for fill. I have to re-consider the AA offset decision for filled polygons. Checked CairoCommon again, indeed AA offset is ony done for lines, not for fill - that corresponds with my thoghts from the weekend. Somehow this must have come in with copy/paste (?). Same is already in D2DPixelProcessor2D, have to remove there, too. Adapted for CppunitTest_sd_png_export_tests: This was a hard one, debugged all the components used for ConvertToBitmap/MaskCreation. Cumulated to be some diff in processTransparencePrimitive2D, but found no error after checking all tranmsformations. The orig errof ro the failing test (tdf#158743) seemed to give a hint, but ObjectTransformation was just handled well. At the end the diff was that VclProcessor2D uses the same processor, while CairoPixelProcessor2D creates local instances (what is cheap). Thus the content rendering for TransparencePrimitive2D was *not* using the set BColorModifierStack. Added as needed to be able to transfer that to the content rendering instance. Adapted for CppunitTest_sd_png_export_tests: Gerrit says PNGExportTests.cxx:1041 asserts, but I cannot reproduce. Maybe at the build system a slightly different font is used. My only idea is to add the mentioned point at (12,120) to the rectangles, obviously the bottom one. Next one is (13,82), again bottom one, adapting. Adapted for CppunitTest_sw_ooxmlexport16: The test 'testTdf136841' uses a WMF that contains XOR paint parts. This showed that that part in CairoSDPR did not work yet as needed. Adapted that, also the test slightly due to the color result slightly changed with CairoSDPR. One last change before activating in master: Add DISABLE_SYSTEM_DEPENDENT_PRIMITIVE_RENDERER in case it urgently needs to be switched off or to be able to simply test if something happening is related to CairoSDPR Change-Id: Idb8237a05d7594efe20edfa1707ca0002185645a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173330 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-09-23svx: prefix members of SdrPolyEditViewMiklos Vajna
See tdf#94879 for motivation. Change-Id: Ib50e86f1ec207de37074f953eb062c2c46c3a2f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173784 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-09-21tdf#130857 VclBuilder: Extract helpers to insert combo/list box itemsMichael Weghorn
Extract code to insert items into the VCL implementations ComboBox and ListBox from VclBuilder::handleObject into a new helper method VclBuilder::insertComboBoxOrListBoxItems. This is in preparation of being able to make `handleObject` reusable for an upcoming QtBuilder, s. WIP Gerrit change [1] (which still duplicates `handleObject` in current patch set 28). [1] https://gerrit.libreoffice.org/c/core/+/161831 Change-Id: Ic6d014e6c9886c34a889b70bbf06a979664daba6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173736 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-09-21tdf#130857 VclBuilder: Extract helpers to set prio/EnumContextMichael Weghorn
Move setting these in a vcl::Window specific way from `BuilderBase::handleObject` to separate helper methods. Change-Id: I2df05e298dc9d2ef5af7b67104ce0b904cce4d1d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173735 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-09-21tdf#130857 VclBuilder: Move handleActionWidget to base classMichael Weghorn
Move the `handleActionWidget` Method from `VclBuilder` to it base class, `BuilderBase` and make `set_response` that gets called by `handleActionWidget` a purely virtual method in the base class. The existing `VclBuilder::set_response` that now overrides the base class one implements the `vcl::Window`-specific handling for it. Change-Id: I7664fc77dc98ab0edca1aa7e6982f28822b7caef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173733 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-09-21tdf#130857 VclBuilder: Move "packing" parsing to base classMichael Weghorn
With previous commit Change-Id: If29cbd7a13da2732c46e4a0b0b50d0963525e729 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Fri Sep 20 12:21:05 2024 +0200 tdf#130857 Refactor VclBuilder::handlePacking/applyPackingProperties having split the XML parsing logic for the "packing" property from applying it to vcl::Window, slightly refactor further to have the XML parsing logic in the new base class method `BuilderBase::collectPackingProperties` that doesn't take any vcl::Window param, and call `VclBuilder::applyPackingProperties` from `VclBuilder::handleChild` instead. Change-Id: I5a52fa85cc8c68a9f7c5c2da1c8d392e031d4fbf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173715 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-09-21tdf#130857 Refactor VclBuilder::handlePacking/applyPackingPropertiesMichael Weghorn
Instead of doing XML parsing in `VclBuilder::applyPackingProperty`, call `BuilderBase::collectProperty` in `VclBuilder::handlePacking` to get a string map of the properties and pass that as a param to the renamed `VclBuilder::applyPackingProperties` that can then work with the key-value pairs right away. This is one step to split XML parsing out of methods that directly work with vcl::Window, in order to be able to reuse the logic for other implementations. (`git show --ignore-space-change` shows the "actual" change more clearly.) Change-Id: If29cbd7a13da2732c46e4a0b0b50d0963525e729 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173714 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-09-21Use '#pragma once' in include/vcl/builder.hxxMichael Weghorn
Change-Id: I7651640bc01cd216a930bdd8b4490ea0f43f5bee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173709 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-09-21tdf#130857 vcl: Move BuilderBase to an own headerMichael Weghorn
Change-Id: If959579996764888b791a32d711dcc828d9771db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173707 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-09-21tdf#143148 Use pragma once in animationnodehelper.hxxMarc Mondesir
Change-Id: Ic9ecff62285292c45af5b6965b10686bf36b68bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173688 Tested-by: Jenkins Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2024-09-20vcl: migrate BitmapArithmeticBlendFilter to use BitmapFilter classChris Sherlock
Change-Id: I524b8c87747b79a8698cce4bd092493ffc9c1235 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173350 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-09-20cool#9992 lok doc sign: extract duplicated code to SfxLokHelperMiklos Vajna
I want to improve extractCertificate() so it can work on a certificate chain, but that's easier when this code is not directly in desktop/, but at some lower level. This allows covering the code with tests from CppunitTest_sfx2_view in a follow-up change. If this code will be needed by some non-LOK area as well, then it can be moved down further, but let's wait for a second area first. Change-Id: I6291da0c3e56aed7dca1a8dc1446209044cace92 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173691 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2024-09-19fix macos build with clang 16Noel Grandin
Undefined symbols for architecture arm64: "o3tl::strong_int<unsigned short, LanguageTypeTag>::strong_int<int>(int, std::__1::enable_if<std::is_integral<int>::value, int>::type)", referenced from: sfx2::(anonymous namespace)::SvxInternalLink::Connect(sfx2::SvBaseLink*) in linkmgr2.o SfxHTMLParser::GetTableDataOptionsValNum(unsigned int&, o3tl::strong_int<unsigned short, LanguageTypeTag>&, rtl::OUString const&, std::__1::basic_string_view<char16_t, std::__1::char_traits<char16_t>>, SvNumberFormatter&) in sfxhtml.o SfxHTMLParser::GetTableDataOptionsValNum(unsigned int&, o3tl::strong_int<unsigned short, LanguageTypeTag>&, rtl::OUString const&, std::__1::basic_string_view<char16_t, std::__1::char_traits<char16_t>>, SvNumberFormatter&) in sfxhtml.o SfxHTMLParser::GetTableDataOptionsValNum(unsigned int&, o3tl::strong_int<unsigned short, LanguageTypeTag>&, rtl::OUString const&, std::__1::basic_string_view<char16_t, std::__1::char_traits<char16_t>>, SvNumberFormatter&) in sfxhtml.o SfxHTMLParser::GetTableDataOptionsValNum(unsigned int&, o3tl::strong_int<unsigned short, LanguageTypeTag>&, rtl::OUString const&, std::__1::basic_string_view<char16_t, std::__1::char_traits<char16_t>>, SvNumberFormatter&) in sfxhtml.o ld: symbol(s) not found for architecture arm64 clang++: error: linker command failed with exit code 1 (use -v to see invocation) make[1]: *** [/Users/noelgrandin/lode/dev/core/sfx2/Library_sfx.mk:20: /Users/noelgrandin/lode/dev/core/instdir/LibreOfficeDev.app/Contents/Frameworks/libsfxlo.dylib] Error 1 make[1]: Target 'build' not remade because of errors. make: *** [Makefile:296: build] Error 2 Change-Id: Ia8c338a89156e18a1c96630ecad2bccbba7bb745 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173652 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-09-19tdf#162955 PDF export: avoid the popup rectangle with zero sizeTibor Nagy
Change-Id: I9a3cdda4d1dfa0b23a3ea6dd99341cb17ca47490 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173580 Tested-by: Jenkins Reviewed-by: Nagy Tibor <tibor.nagy.extern@allotropia.de>
2024-09-19tdf#162963 export property TotalsRow to ODFRegina Henschel
DatabaseRange has got the property TotalsRow with UI and UNO. But this property was not written to ODF. The patch adds this as attribute calcext:contains-footer to <table:database-range> element. Related is issue OFFICE-4169 at OASIS. Change-Id: I99a51198585b9b7dfb840217bdf1312f2462c9bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173612 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2024-09-18cid#1555574 drop unused copy ctorCaolán McNamara
Change-Id: Ibaad87cc2f481f3bc7f726ecde0c466a563a96a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173588 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
2024-09-18.NET Bindings: Native bridge for .NETRMZeroFour
This patch includes all marshalling and proxy handling code on the .NET side as well as the native side needed for a fully functional UNO bridge. It also includes some changes and corrections to net_basetypes and netmaker needed for the bridge to work properly. It also includes the FirstUnoContact example in C# as demonstration. Change-Id: I406932938a4415d24408fb41ddfa7d8eeb5d1f94 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170916 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2024-09-18vcl: test BitmapAlphaClampFilterChris Sherlock
Change-Id: Ie44884a3010cd26b057bac593059a4bd0a3aabc8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173345 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-09-18tdf#130857 VclBuilder: Move m_sHelpRoot member to base classMichael Weghorn
Add a protected getter, `getHelpRoot()` to access it. Change-Id: Idb2f6834e13f6b7d04abe0a3c607444383e6ee1a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173577 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-09-18tdf#130857 VclBuilder: Move TextBuffer bookkeeping to base classMichael Weghorn
This is basically the same as Change-Id: Iba98406817906e36fb8dc723c8e9b4b554eb2258 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Tue Sep 17 19:35:22 2024 +0200 tdf#130857 VclBuilder: Move adjustment bookkeeping to base class , but for the `TextBuffer`s instead of the `Adjustment`s. Change-Id: I0f53718892f70a285a7f8b0d8e9e112d48dedb50 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173575 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-09-18tdf#130857 VclBuilder: Move Adjustment bookkeeping to base classMichael Weghorn
A GtkAdjustment represents a value with an upper and lower bound. Move bookkeeping of the adjustments from `VclBuilder` to the base class `BuilderBase`, so this can be reused by other subclasses in the future. For now, adding adjustments by calling `BuilderBase::addAdjustment` only happens in the (currently still) VclBuilder-specific `VclBuilder::handleObject`, but this is one step towards making it useful outside of it. Change-Id: Iba98406817906e36fb8dc723c8e9b4b554eb2258 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173574 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-09-18tdf#130857 VclBuilder: Move class/id/custom prop extraction to helperMichael Weghorn
Extract parsing of these attributes from `VclBuilder::handleObject` to a new helper method `BaseBuilder::extractClassAndIdAndCustomProperty` in the base class. Change-Id: I248448407db446fd61bf91bf13c9bc187e0706d6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162918 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-09-17Avoid -Werror,-Wcast-function-type-mismatchStephan Bergmann
...as seen when building LOWA (i.e., --disable-dynloading) with a recent Clang with <https://github.com/llvm/llvm-project/commit/999d4f840777bf8de26d45947192aa0728edc0fb> "Split -Wcast-function-type into a separate group (#86131)", where -Wcast-function-type-mismatch generally warns about casts between incompatible function types... > cppuhelper/source/shlib.cxx:294:23: error: cast from 'void *(*)(void *, void *)' to 'ImplementationConstructorFn *' (aka 'css::uno::XInterface *(*)(css::uno::XComponentContext *, const css::uno::Sequence<css::uno::Any> &)') converts to incompatible function type [-Werror,-Wcast-function-type-mismatch] > 294 | = reinterpret_cast<ImplementationConstructorFn *>( > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 295 | map[i].constructor_function); > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ...but not for the special case of casting from/to void(*)(void). (Using the correct function type > css::uno::XInterface * (*)(css::uno::XComponentContext *, css::uno::Sequence<css::uno::Any> const &) throughout would be even better, but doesn't easily fit into this C code that is included in low-level places that don't know those UNO types and is shared between LOWA and Android etc.) Change-Id: Ic4dbabbff0f772b34cf692db968c3ad257c37cb2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173463 Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de> Tested-by: Jenkins
2024-09-17tdf#130857 VclBuilder: Turn extractOrientation into static helperMichael Weghorn
Turn the `extractOrientation` helper function into a static helper method `BuilderBase::hasOrientationVertical` for reuse in the pending WIP Gerrit change to implement a `QtBuilder` [1], which currently duplicates this method in patch set 18. [1] https://gerrit.libreoffice.org/c/core/+/161831/18 Change-Id: I8255188ae66727d0832e8d6b41952649de07a679 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173546 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-09-17cid#1607788 Overflowed return valueCaolán McNamara
Change-Id: I302dc99a70ccaa1c995065df5c72202a7c025dec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173516 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
2024-09-16svx: prefix members of XPolygonMiklos Vajna
See tdf#94879 for motivation. Change-Id: I7541248dbdc911d07167b0041ec571d877c9572f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173429 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-09-16tdf#143148 Use pragma once in BitmapAlphaClampFilter.hxxChris Sherlock
Change-Id: I45a31288207c0b238351c2cd47e3122e1d381a7d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173346 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2024-09-15use more concrete UNO types in dbaccessNoel Grandin
Change-Id: I6cb15b347dae28878110f76064645095d5771e3c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173382 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-09-15Simplify use of connectivity::OConnectionWrapperMike Kaganski
Make it use cppu::WeakComponentImplHelper, because all its derived classes used that template. In the derived classes, switch to use of cppu::ImplInheritanceHelper. That simplifies the hierarchy, and doesn't require to re-implement many basic methods. Change-Id: I40ec05a471af4437098586d20540f9a815677952 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173370 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2024-09-14use more concrete UNO types in svxNoel Grandin
Change-Id: I55fd67a66067f0c4f43ef182101c8d72a22fe3f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173325 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2024-09-13use more concrete UNO types in chart2Noel Grandin
Change-Id: Id2d58ad76b6e8ff569bd7b65f86a7fdd0152f3d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173324 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-09-13sw: add Comments Panel in sidebarMohit Marathe
This commit adds a sidebar deck for comments. It has all the functionalities of the old comments shown via annotation window. Change-Id: Ibab0e21a54c097d0f42bddb1d07da74319970135 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167840 Tested-by: Jenkins Reviewed-by: Sarper Akdemir <sarper.akdemir@allotropia.de>
2024-09-13UBSan CppunitTest_editeng_borderline etc. need more RTTI nowStephan Bergmann
...presumably since 5ba893dfb8838b0ef946b52de9ef1336d2ab0512 "use more concrete UNO type in editeng", > DynamicLibraryManagerException: "Failed to load dynamic library: /home/tdf/lode/jenkins/workspace/lo_ubsan/workdir/LinkTarget/CppunitTest/libtest_editeng_borderline.so > /home/tdf/lode/jenkins/workspace/lo_ubsan/instdir/program/libeditenglo.so: undefined symbol: _ZTIN3vcl9unohelper18DragAndDropWrapperE" (<https://ci.libreoffice.org/job/lo_ubsan/3306/>) Change-Id: I4501c3df9f353d9b1244f92b5bbc6fb2dafc24bd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173311 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-09-12Optimize TokenMap and AttributeList in oox and xoMike Kaganski
Shaves lots of string allocations, and uses optimized code paths Change-Id: I8e33e2aecdc7e0d2f2c31b774daa36304b3973ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173179 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-09-12tdf#156543 sw: Added base text mono feature to Asian Phonetic GuideJonathan Clark
This change adds a new button, Mono, to the Asian Phonetic Guide. Clicking on this button will automatically separate each base text character into its own base text run. Change-Id: I973e2c3259918db59e46dc7b89cb7e8ee4f45469 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173276 Tested-by: Jenkins Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
2024-09-12cool#9992 lok doc sign: allow sign of macros & the document itself in one stepMiklos Vajna
Sign a document with macros (via file -> digital signatures -> digital signatures), realize that you still get a warning on file open, sign the macros in the document (via tools -> macros -> digital signature), realize that you did this in the wrong order, so now you have to re-sign the doc content. The reason for this is that the macro signature only signs the macro parts of the document (so you can still edit the document and the signature is valid, as long as you don't touch macros), while the doc content signature signs everything, including the macro signature, so the order of the two matters. Solve this trouble by adding a new setting that allows doing the two signatures in one step. Do this by extending the doc content signing code with an optional pre-step that first signs the document macros. This is a bit tricky to do, since xmlsecurity/ gets an RW signature stream and a RO document storage from sfx2/, but transferring one more signature stream can solve this trouble. Other tricky parts of the change: 1) The crypto signing is always done by libxmlsec, so DigitalSignaturesDialog::SetScriptingSignatureStream() has to update the storage of the sign manager's sign helper, otherwise, the hashes in the macro signature will be empty. 2) Signing reads the RO storage, so normally the macro signature would not be part of the doc signature when creating both signatures inside a single dialog. (The storage is only committed after the dialog ends.) Fix this problem by extending DocumentSignatureManager::add() and UriBindingHelper::OpenInputStream() to provide kind of an overlay when xmlsecurity/ gets a script signature stream: this way the macro signature will be part of the doc signature while the dialog is in progress. No overlay is needed later, once both streams are committed to the storage on dialog end. Change-Id: Ic2728689997165595991d5ec59c7a2683286e22d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173263 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2024-09-12tdf#162405: check if there's a matching singing cert only when savingSarper Akdemir
previously Save as dialog's "Sign with default certificate" checkbox's senstivity was decided depending on if there was a matching key. Doing that forces a dialog pop-up for password protected NSS databases. Now if there's a value in "/org.openoffice.UserProfile/Data/signingkey", the checkbox is sensitive. Matching key is checked during save, and reported if it isn't found & signing failed. Change-Id: Ia714b70ce6456752200088cc5382ab6374af9587 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173129 Reviewed-by: Sarper Akdemir <sarper.akdemir@allotropia.de> Tested-by: Jenkins
2024-09-12use more concrete UNO classes in unotoolsNoel Grandin
Change-Id: Iaf743ae040a3a7bd808bf3cac033197001c31b18 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173250 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2024-09-12use more concrete UNO classes in comphelperNoel Grandin
Change-Id: I1a81d2264a450c23a5196f980e91a686f69edca8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173248 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-09-12use less dynamic_cast in svx table stuffNoel Grandin
we already statically know the types of all these objects Change-Id: I976dbf2b150fcd2176df18a07c2e9f21b1d2fe65 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173214 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2024-09-12use more concrete UNO type in editengNoel Grandin
Change-Id: I5cad4808a1e5f10022f8a0441eb81a279d9b6386 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173196 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2024-09-12tdf#107184 sw: Added base text group feature to Asian Phonetic GuideJonathan Clark
This change adds a new button, Group, to the Asian Phonetic Guide. Clicking on this button will automatically merge all base text runs into a single base text run. Change-Id: I8bc2881f0c31d501f8a347156145a483bb4c96cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173241 Reviewed-by: Jonathan Clark <jonathan@libreoffice.org> Tested-by: Jenkins
2024-09-11use more concrete UNO type in svlNoel Grandin
Change-Id: I794fba1f111709e0469812d48eb81cc4dc1f11d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173195 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-09-11use more concrete UNO type in frameworkNoel Grandin
Change-Id: I3ee54f3967339ab52c04f48a047bc29fc5161680 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173159 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-09-11these can be constCaolán McNamara
Change-Id: I2d544ff797cc9c9e7dfabb6c30e916d519941d98 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173144 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-09-10use more concrete UNO type in vclNoel Grandin
Change-Id: I157109d11b349e1304a3279471d4ab90b65b5841 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173138 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-09-10Add arguments to Last 4 UNO Commands in CrashReport DumpXisco Fauli
Change-Id: I8ea1e95abb62374b51de7b1d37055c216b29e04c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173125 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Jenkins
2024-09-10tdf#143148 Use pragma once in BitmapConvolutionMatrixFilter.hxxChris Sherlock
Change-Id: If220df8a3bba570e00ba7891f7141892d80da3bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172974 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-09-10cool#9992 lok doc sign: async DocumentDigitalSignatures::ImplViewSignatures()Miklos Vajna
Currently SfxObjectShell::CheckIsReadonly() has a hack for the LOK case to show the signatures dialog read-only, as only that is async. The next step is to make DocumentDigitalSignatures::ImplViewSignatures() async, though that requires all callers of the function to be async, so make DocumentDigitalSignatures::signScriptingContent() async as well. There is also DocumentDigitalSignatures::signPackage(), but turns out that's dead code, so just remove it. Once this is in place, we had a problem that the callbacks tried to interact with libxmlsec, but the dialog was still alive in DocumentDigitalSignatures::ImplViewSignatures() by the time the callback was running, so there were two DocumentSignatureManager instances at the same time, and both assumes it should call the global libxmlsec init/uninit, which resulted in failing to verify the just created signature. Fix this similar to how Tomaz fixed the same problem around pdfium in commit 067a8a954c8e1d8d6465a4ab5fb61e93f16c26c2 (pdfium: only init pdfium library one and destroy on LO exit, 2020-06-03). Change-Id: I3fb63c06195564732e1576dbd755157e676fb762 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173117 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>