summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-10-03Log using LOK_WARN instead of std::cerrCaolán McNamara
Change-Id: I3a3cabd90154cb7293949d6a21f599417c364b9b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174370 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Attila Szűcs <attila.szucs@collabora.com>
2024-10-03cool#9992 lok doc sign: avoid storing the sign cert in the model after signMiklos Vajna
Open the signatures dialog in LOK mode, add a signature, close it, you get a (non-async) popup asking if you want to automatically re-sign the document on each save in the future. This makes sense when only one user edits the document, but the LOK mode stores the signing certificates in the view, so this would mean user A can enable this mode, then user B could edit + save, which is not wanted. Fix the problem by just not offering this functionality in LOK mode, where we assume that certificates are per-view and the save works on the model. Change-Id: I180fc2e6078623d44f8414f7891481218df7cebd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174369 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins (cherry picked from commit 1c7f6188eb5b2a2bbf0cf589843d644306e40d6d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174415 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-10-03tdf#163000 don't add any fonts with an 'hvgl' font tablePatrick Luby
macOS Sequoia added a new PingFangUI.ttc font file which contains all of the PingFang font families. However, any fonts loaded from this font file result in the following failures: - Skia renders font with wrong glyphs - Export to PDF contain a damaged embedded font Despite the fact that the fonts in this new font file have a TrueType font type, they are missing a 'glyf' font table and, instead, have a new, undefined 'hvgl' font table. See the following link for more details about the new 'hvgl' font table: https://gitlab.freedesktop.org/freetype/freetype/-/issues/1281 Change-Id: I18170b1b226de86f79402ad0e45df8620c693f83 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174305 Reviewed-by: Patrick Luby <guibomacdev@gmail.com> Tested-by: Jenkins Reviewed-by: Jonathan Clark <jonathan@libreoffice.org> Reviewed-by: خالد حسني <khaled@libreoffice.org> (cherry picked from commit a4e9584c554ea018691b2c97d38cce3d83f8ea9a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174334 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-10-02Get SolarMutex before calling ImplClearAllFontDataCaolán McNamara
to avoid: vcl/source/app/dbggui.cxx:35: void ImplDbgTestSolarMutex(): Assertion `ImplGetSVData()->mpDefInst->GetYieldMutex()->IsCurrentThread() && "SolarMutex not owned!"' failed. Change-Id: I6d56bb05e8a89190838c5437043bc61034607d8e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174356 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-10-02cool#9992 lok doc sign: update sign status after modify the list of trusted CAsMiklos Vajna
Load a document, sign it, "green" icon on the status bar. Reload the document, turns into a "yellow" icon saying the CA is not trusted, when it was already trusted before. The trouble is that the document signature status is calculated on load, and the CA to be trusted is only given later, as part of the initialization of the LOK view. Fix the problem by invalidating the signature state when a new CA is trusted. The test document was produced by signing an empty document using the keys from xmlsecurity/qa/xmlsec/data/, which gives us a way to create a signature that is initially not trusted. (cherry picked from commit 298c2d5c8a6791aa6e5846b698d521079aaa445d) Change-Id: I1e1dbf616ce54c4823d62104f838342de6870f52 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174371 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2024-10-02perf: improve ScFlatUInt16RowSegments::dumpAsString()sopy
Change-Id: Ie4db90ae6e7a40824ad082606e4573e74956fdd8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174142 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins Reviewed-by: vivek javiya <vivek.javiya@collabora.com> (cherry picked from commit 6d949b587b192ca572c187c1131e2a8947269337) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174326 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2024-10-02sidebar: move apply to all slides above repeat settingsSzymon Kłos
Button "apply to all slides" setups properties selected above to all the slides. Repeat options are common to the whole presentation. Let's move repeat section to the bottom so it is less confusing Signed-off-by: Szymon Kłos <szymon.klos@collabora.com> Change-Id: I19bb8d10c3969ceb033e2a6d26489999bb7451c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174357 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: vivek javiya <vivek.javiya@collabora.com>
2024-10-01Revert "Prevent cursor invalidation if the cursor position doesn't change."Szymon Kłos
This reverts commit 6a2071cafae41afdfde56b07817d8674482431f6. Reason for revert: This was causing cypress fails on the online side eg. `make -C cypress_test check-desktop spec=writer/table_operation_spec.js` Change-Id: Ieb1aee314f550bcc49a0b41682a6a475dfbf6008 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174323 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2024-10-01cool#9992 lok doc sign: convert the certificate chooser dialog to asyncMiklos Vajna
1) Move the try-catch around assing a signature inside the block that already got the response from the certificate chooser, it's unlikely that choosing the certificate (and not yet signing) would fail. 2) Convert the dialog to async and allow it to be a jsdialog. 3) Hide not relevant widgets for LOK: we have a single signing certificate, so the search entry is not useful. The refresh button has an unclear purpose, as it was initially added in commit fb9874231fb242b4a6a7d1ce097e66dd4ed8f32e (Caching Certificates in the CertificateChooser dialog session-wise, 2023-08-26), but later commit efe414c4a88fde0e2ee1d4016010f21fbd6d01d7 (Don't reuse CertificateChooser instances, 2024-02-07) disabled this chaching. In any case, the certificate won't change during the lifetime of a single LOK view, so hide that as well. 4) Invoke the inner certificate viewer in an async way, too. (cherry picked from commit ced420ca708eb8df5b20c7d537166bd9ec29a0e5) Conflicts: xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx Change-Id: Ibf618ea7632cf801d1d9180b9aa7dd193c45ffda Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174308 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-10-01fix(lok): Expose the import options dialogSkyler Grey
In a very similar way to the character encoding dialog, handled in Ibd36e695e733e07053bb6e22a510ac988be3ded2, we need to see this dialog before the document opens. I've used the same trick, where I've made the dialog into a JSDialog and registered an early listener, but I haven't asynced it as it's never useful to have more than 1 person using it at once. Change-Id: I1a61660523ae2d4812890b62d16f0e6cef133e67 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174269 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2024-10-01fix(lok): Expose the character encoding dialogSkyler Grey
The character encoding dialog appears when importing a dialog with an ambiguous character encoding. At the point when it appears, the document isn't loaded, so we have to handle it in a similar way to the text import dialog or password prompt dialog, allowing it to function early. It's also required to make the dialog into a jsdialog, as tunneled dialogs do not work this early in the document loading process. I have not asynced the dialog here because there's no point. I did write code where I set up a dialog factory to do this similar to how other modules (sw, sc, sd, etc.) handle dialogs and make them async. Unfortunately, this dialog is not useful with multiple users, since as it's used on opening a document. It may, in the future, be useful to someone to make a patch that asyncs the other writerperfect dialog (epub export) so I have uploaded and abandoned my dialog factory patch as Id8ec474510f3c8637639ad59331156c6e75dafb4. Documents that require this dialog, whether async or not, cause crashes when someone opens the document before the first person has finished responding to this dialog. I still consider this behavior better than crashing whenever we attempt to show this dialog at all. Change-Id: Ibd36e695e733e07053bb6e22a510ac988be3ded2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174044 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2024-09-30Prevent cursor invalidation if the cursor position doesn't change.Gülşah Köse
Signed-off-by: Gülşah Köse <gulsah.kose@collabora.com> Change-Id: Ib8f0a28ff526f161e2f63b0746d72a676cea417f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173726 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2024-09-30cool#9992 lok doc sign: only take sign cert from the view in the cert chooserMiklos Vajna
Have two views, in case both of them haver sign certs configured in the NSS database, then the cert chooser would present both, which is not wanted. The problem is that the NSS database contains sign certs from all views, so working from the database is not what we want for the LOK case. Fix the problem by passing the SfxViewShell from the sign dialog to the certificate chooser dialog, and then the chooser can work from the view in LOK mode. Searching for other uses of getPersonalCertificates(), the comphelper/ one is not relevant for the LOK case (gpg is disabled there); the PDF case is only for the UNO API, so those don't necessarily need adjusting. (cherry picked from commit a581dbf9829d8407a611907c35c8af632b1397b5) Conflicts: xmlsecurity/inc/certificatechooser.hxx xmlsecurity/source/dialogs/certificatechooser.cxx xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx Change-Id: Ic7027b8d218b2bde3c8bf134a4b11c14fd9c3570 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174216 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-09-30tdf#163000 don't add any fonts in the system "reserved fonts" folderPatrick Luby
macOS Sequoia added a new PingFangUI.ttc font file which contains all of the PingFang font families. However, any fonts loaded from this font file result in the following failures: - Skia renders font with wrong glyphs - Export to PDF contain a damaged embedded font macOS Sequoia still has separate, downloadable Type 3 bitmap fonts for the PingFang font family so ignore any fonts in the PingFangUI.ttc font file and, just to be safe, ignore any other font files in the system "reserved fonts" folder that may be added in the future. Change-Id: I8a025c8b6d84a661b173aa7d6d5b261c92452b34 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174160 Reviewed-by: Jonathan Clark <jonathan@libreoffice.org> Reviewed-by: Patrick Luby <guibomacdev@gmail.com> Tested-by: Jenkins (cherry picked from commit 8f3e84133628c420b7cc9896d6e92e2d66eae0b2) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174017 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2024-09-28Fix typo in codeAndrea Gelmini
Change-Id: Id3115847fec65fea5a4060ec0f65fe752eef8f16 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173950 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins (cherry picked from commit 47dda09d3e6046d4da96518e0ec2ee22dba7ab38) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174008 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2024-09-27cool#9992 lok doc sign: conditionally show the add button in the sign dialogMiklos Vajna
Open the sign dialog, the Add button is hidden, even if the LOK clients initializes the view with a working signing certificate. SfxMedium::SignContents_Impl() knows the correct view, but by the time the execution arrives to the DigitalSignaturesDialog ctor, this info is lost, so we don't know what is the current view. Fix the problem by looking up the view of the object shell at UNO command dispatch time, and passing that around, so the signature dialog can also access it. If the view has a signing certificate configured, then allow signing. The certificate chooser triggered by this button still needs fixing. (cherry picked from commit c57434559cf5ffd82c3c72e8a0884d4874885dca) Change-Id: I1fae63cea27ea1e68e938879f4507f53ade484f1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174025 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-09-27desktop lok: fix crash in getStyles()Miklos Vajna
Crashreport backtrace: > program/libmergedlo.so > getStyles > desktop/source/lib/init.cxx:6411 > program/libmergedlo.so > doc_getCommandValues > desktop/source/lib/init.cxx:6666 Which is probably a call on an already disposed document. Fix it similar to how getFonts() does it. Change-Id: I1744bd04b7ebdea1b69ca121b8cfa47314d67528 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174004 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-09-26cool#9992 lok doc sign: fix import of the private keyMiklos Vajna
Once the signing key is taken from the matching SfxViewShell (not yet done), signing with a certificate specified via initializeForRendering() failed with: warn:xmlsecurity.xmlsec:13020:13005:xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx:330: X509Certificate_NssImpl::getPrivateKey() cannot find private key warn:xmlsecurity.xmlsec:13020:13005:xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx:812: Can't get the private key from the certificate. warn:xmlsecurity.xmlsec:13020:13005:xmlsecurity/source/xmlsec/errorcallback.cxx:53: keys.c:1347: xmlSecKeysMngrGetKey() '' '' 45 'details=NULL' warn:xmlsecurity.xmlsec:13020:13005:xmlsecurity/source/xmlsec/errorcallback.cxx:53: xmldsig.c:822: xmlSecDSigCtxProcessKeyInfoNode() '' '' 45 'details=NULL' warn:xmlsecurity.xmlsec:13020:13005:xmlsecurity/source/xmlsec/errorcallback.cxx:53: xmldsig.c:537: xmlSecDSigCtxProcessSignatureNode() '' 'xmlSecDSigCtxProcessKeyInfoNode' 1 ' ' warn:xmlsecurity.xmlsec:13020:13005:xmlsecurity/source/xmlsec/errorcallback.cxx:53: xmldsig.c:301: xmlSecDSigCtxSign() '' 'xmlSecDSigCtxProcessSignatureNode' 1 ' ' The trouble was that we wanted to keep the private key in-memory, presumably because initially the whole NSS database was in-memory for the LOK case. This was changed in commit 87eec1b90b6ecd83455f09168430c23f73c25c86 (NSS: create a temporary database instead of in-memory, 2018-12-31), so there is no problem with a not-in-memory private key anymore. Note that the problematic codepath was only triggered when first the certificate chooser was ran and only then we signed. So the testcase also gets the cert flags before signing, otherwise the test would succeed even without the fix. (cherry picked from commit d95ab8d3a3a102c00b69f0b0b49d7eb49e34051e) Change-Id: I5086b205c91b630ddd343c0eb91bd9e63b3ea238 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173969 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-09-26null-deref seen in testingCaolán McNamara
#2 0x0000000000ac8c3e in std::__glibcxx_assert_fail(char const*, int, char const*, char const*) () #3 0x00007fa92f2fa26f in std::unique_ptr<WindowImpl, std::default_delete<WindowImpl> >::operator* (this=<optimized out>) at /opt/rh/devtoolset-12/root/usr/include/c++/12/bits/unique_ptr.h:443 #4 std::unique_ptr<WindowImpl, std::default_delete<WindowImpl> >::operator* (this=<optimized out>) at /opt/rh/devtoolset-12/root/usr/include/c++/12/bits/unique_ptr.h:443 #5 vcl::Window::CallEventListeners (this=this@entry=0x34eb4f40, nEvent=nEvent@entry=VclEventId::ObjectDying, pData=pData@entry=0x0) at libreoffice/vcl/source/window/event.cxx:272 #6 0x00007fa92f38277a in vcl::Window::dispose (this=0x34eb4f40) at libreoffice/vcl/source/window/window.cxx:159 #7 0x00007fa92f678064 in VclPtr<HelpTextWindow>::disposeAndClear (this=<synthetic pointer>) at libreoffice/include/rtl/ref.hxx:88 #8 ImplDestroyHelpWindow (rHelpData=..., bUpdateHideTime=<optimized out>) at libreoffice/vcl/source/app/help.cxx:576 #9 0x00007fa92f6780f8 in ImplDestroyHelpWindow (bUpdateHideTime=<optimized out>) at libreoffice/vcl/source/app/help.cxx:565 #10 0x00007fa92f679125 in ImplShowHelpWindow (pParent=0x334cfb90, nHelpWinStyle=<optimized out>, nStyle=QuickHelpFlags::NONE, rHelpText="Chart Area", rScreenPos=Point = {...}, rHelpArea=...) at libreoffice/vcl/source/app/help.cxx:532 #11 0x00007fa92f679544 in Help::ShowQuickHelp (pParent=pParent@entry=0x334cfb90, rScreenRect=..., rHelpText="Chart Area", nStyle=nStyle@entry=QuickHelpFlags::NONE) at libreoffice/vcl/source/app/help.cxx:189 #12 0x00007fa91ae862e0 in chart::ChartWindow::RequestHelp (this=0x334cfb90, rHEvt=...) at libreoffice/chart2/source/controller/main/ChartWindow.cxx:227 #13 0x00007fa92e2e88a0 in (anonymous namespace)::LOKPostAsyncEvent (pEv=0x35b4a320) at libreoffice/sfx2/source/view/lokhelper.cxx:1103 #14 0x00007fa92e2e076a in LokChartHelper::postMouseEvent (this=this@entry=0x7ffd226dd650, nType=nType@entry=2, nX=nX@entry=15405, nY=nY@entry=4089, nCount=nCount@entry=1, nButtons=nButtons@entry=0, nModifier=0, fScaleX=fScaleX@entry=0.10000000000000001, fScaleY=fScaleY@entry=0.10000000000000001) at libreoffice/sfx2/source/view/lokcharthelper.cxx:294 #15 0x00007fa92e2e5b80 in SfxLokHelper::testInPlaceComponentMouseEventHit (pViewShell=pViewShell@entry=0x337e52a0, nType=nType@entry=2, nX=nX@entry=15405, nY=nY@entry=4089, nCount=nCount@entry=1, nButtons=nButtons@entry=0, nModifier=0, fScaleX=0.10000000000000001, fScaleY=0.10000000000000001, bNegativeX=false) at libreoffice/include/rtl/ref.hxx:69 #16 0x00007fa91dba1e0e in ScModelObj::postMouseEvent (this=0x4593d10, nType=2, nX=15405, nY=4089, nCount=1, nButtons=0, nModifier=0) at libreoffice/sc/source/ui/unoobj/docuno.cxx:799 #17 0x00007fa92e39567f in doc_postMouseEvent (pThis=0x334b8290, nType=2, nX=15405, nY=4089, nCount=1, nButtons=0, nModifier=0) at libreoffice/desktop/source/lib/init.cxx:5597 #18 0x0000000000578631 in lok::Document::postMouseEvent (nModifier=0, nButtons=0, nCount=1, nY=<optimized out>, nX=<optimized out>, nType=<optimized out>, this=<optimized out>) at libreoffice/include/LibreOfficeKit/LibreOfficeKit.hxx:297 #19 ChildSession::mouseEvent (this=this@entry=0x317e3cf0, tokens=..., target=target@entry=LokEventTargetEnum::Document) at kit/ChildSession.cpp:1906 #20 0x0000000000588485 in ChildSession::_handleInput (this=<optimized out>, buffer=<optimized out>, length=<optimized out>) at kit/ChildSession.cpp:634 Change-Id: Ic67c8b7c4553853d0ab36dd448642564b6b6fb69 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173986 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-09-25Bump version to 24.04.8.1cp-24.04.8-1Andras Timar
Change-Id: Ibe161f8fcf05fb46b732afade96f7f250ef1cc6a
2024-09-25Related: cool#9735 allow LOK_CALLBACK_DOCUMENT_SIZE_CHANGED during paintCaolán McNamara
we want this to get through because of a scenario like #0 ignoreLibreOfficeKitViewCallback (nType=13, pImpl=0xf9bd620) at /home/caolan/LibreOffice/co-24.04/sfx2/source/view/viewsh.cxx:3219 #1 0x00007fd4a2428979 in SfxViewShell::libreOfficeKitViewCallback (this=0xf9bd090, nType=13, pPayload=...) at /home/caolan/LibreOffice/co-24.04/sfx2/source/view/viewsh.cxx:3278 #2 0x00007fd4a23ab80b in SfxLokHelper::notifyDocumentSizeChanged (pThisView=0xf9bd090, rPayload=..., pDoc=0xec53578, bInvalidateAll=true) at /home/caolan/LibreOffice/co-24.04/sfx2/source/view/lokhelper.cxx:711 #3 0x00007fd484eba265 in SwViewShell::SizeChgNotify (this=0xf9bf3c0) at /home/caolan/LibreOffice/co-24.04/sw/source/core/view/viewsh.cxx:1154 #4 0x00007fd484775a62 in AdjustSizeChgNotify (pRoot=0xed16880) at /home/caolan/LibreOffice/co-24.04/sw/source/core/layout/pagechg.cxx:842 #5 0x00007fd48477e029 in SwRootFrame::CheckViewLayout (this=0xed16880, pViewOpt=0x0, pVisArea=0x0) at /home/caolan/LibreOffice/co-24.04/sw/source/core/layout/pagechg.cxx:2436 #6 0x00007fd484775da2 in SwPageFrame::Cut (this=0x120350f0) at /home/caolan/LibreOffice/co-24.04/sw/source/core/layout/pagechg.cxx:914 #7 0x00007fd484779ec8 in SwRootFrame::RemovePage (this=0xed16880, pDelRef=0x7ffe90279548, eResult=SwRemoveResult::Prev) at /home/caolan/LibreOffice/co-24.04/sw/source/core/layout/pagechg.cxx:1511 #8 0x00007fd48477a187 in SwRootFrame::RemoveSuperfluous (this=0xed16880) at /home/caolan/LibreOffice/co-24.04/sw/source/core/layout/pagechg.cxx:1550 #9 0x00007fd4847336b2 in SwLayAction::InternalAction (this=0x7ffe90279a60, pRenderContext=0xf9bb5f0) at /home/caolan/LibreOffice/co-24.04/sw/source/core/layout/layact.cxx:694 #10 0x00007fd4847323b8 in SwLayAction::Action (this=0x7ffe90279a60, pRenderContext=0xf9bb5f0) at /home/caolan/LibreOffice/co-24.04/sw/source/core/layout/layact.cxx:396 #11 0x00007fd484eb5fc2 in SwViewShell::ImplEndAction (this=0xf9bf3c0, bIdleEnd=false) at /home/caolan/LibreOffice/co-24.04/sw/source/core/view/viewsh.cxx:309 #12 0x00007fd483fa3f78 in SwViewShell::EndAction (this=0xf9bf3c0, bIdleEnd=false) at /home/caolan/LibreOffice/co-24.04/sw/inc/viewsh.hxx:637 #13 0x00007fd484ebf56b in SwViewShell::ApplyViewOptions (this=0xeddec90, rOpt=...) at /home/caolan/LibreOffice/co-24.04/sw/source/core/view/viewsh.cxx:2235 #14 0x00007fd484577013 in SwEditShell::ApplyViewOptions (this=0xeddec90, rOpt=...) at /home/caolan/LibreOffice/co-24.04/sw/source/core/edit/editsh.cxx:1094 #15 0x00007fd48574a5cf in SwWrtShell::ApplyViewOptions (this=0xeddec90, rOpt=...) at /home/caolan/LibreOffice/co-24.04/sw/source/uibase/wrtsh/wrtsh1.cxx:2137 #16 0x00007fd484ebe79e in SwViewShell::PaintTile (this=0xeddec90, rDevice=..., contextWidth=1792, contextHeight=768, tilePosX=0, tilePosY=113280, tileWidth=13440, tileHeight=5760) at /home/caolan/LibreOffice/co-24.04/sw/source/core/view/viewsh.cxx:2019 #17 0x00007fd4855fc5f0 in SwXTextDocument::paintTile (this=0xec53280, rDevice=..., nOutputWidth=1792, nOutputHeight=768, nTilePosX=0, nTilePosY=113280, nTileWidth=13440, nTileHeight=5760) at /home/caolan/LibreOffice/co-24.04/sw/source/uibase/uno/unotxdoc.cxx:3145 #18 0x00007fd4a24c5ada in doc_paintTile (pThis=0xed2fa10, pBuffer=0x12871f30 "", nCanvasWidth=1792, nCanvasHeight=768, nTilePosX=0, nTilePosY=113280, nTileWidth=13440, nTileHeight=5760) at /home/caolan/LibreOffice/co-24.04/desktop/source/lib/init.cxx:4431 #19 0x00007fd4a24c6bb3 in doc_paintPartTile (pThis=0xed2fa10, pBuffer=0x12871f30 "", nPart=0, nMode=0, nCanvasWidth=1792, nCanvasHeight=768, nTilePosX=0, nTilePosY=113280, nTileWidth=13440, nTileHeight=5760) at /home/caolan/LibreOffice/co-24.04/desktop/source/lib/init.cxx:4629 #20 0x00000000005f0f0e in lok::Document::paintPartTile (this=0xf521420, pBuffer=0x12871f30 "", nPart=0, nMode=0, nCanvasWidth=1792, nCanvasHeight=768, nTilePosX=0, nTilePosY=113280, nTileWidth=13440, nTileHeight=5760) at /home/caolan/LibreOffice/co-24.04/include/LibreOfficeKit/LibreOfficeKit.hxx:621 #21 0x00000000005c2627 in RenderTiles::doRender(std::shared_ptr<lok::Document> const&, DeltaGenerator&, TileCombined&, ThreadPool&, std::function<void (unsigned char*, int, int, unsigned long, unsigned long, int, int, LibreOfficeKitTileMode)> const&, std::function<void (char const*, unsigned long)> const&, unsigned int, int, bool) (document=..., deltaGen=..., tileCombined=..., pngPool=..., blendWatermark=..., outputMessage=..., mobileAppDocId=3, canonicalViewId=1000, dumpTiles=false) at ./common/RenderTiles.hpp:123 #22 0x00000000005cd29d in Document::renderTiles (this=0xe6eefc0, tileCombined=...) at kit/Kit.cpp:933 where otherwise the browser gets no update of the document size. Change-Id: I396daa9c7ee5c306ee107839f6fba6b26a70683d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173936 Tested-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-09-25cool#9992 lok doc sign: store signing cert in the viewMiklos Vajna
In case signing certificate would be stored in the model (like it happens on the desktop), then the certificate viewer would show all signing certs of the currently editing users, which is far from expected. At the same time, there is just one NSS database per process, so it's hard to not have them in the same database. Fix the problem by storing a reference to the signing key in the view shell, then we can show only that in xmlsecurity/ in LOK mode, and thing else. This is just the sfx2/ side of things, the xmlsecurity/ part still needs implementing. (cherry picked from commit 4787fd4fc86230893a6da309f45964116b3a67df) Change-Id: Id7a56f28598ec60217c6bac095c2ff350f39bc3b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173897 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-09-25tdf#162916 writerfilter TOC: import "no page number" flagJustin Luth
The field command "TOC \n 2-2" means that level 2 entries should not display the page number, so in LO just exclude those portions from the definitions. The impact only becomes noticable when you update the TOC, because the initial content is just read from document.xml. The export part was already handled at LO initial import, since DOC format needed the proper sFieldCmd string. DOC format already imports this just fine. Note that the unit test also specifies 'TOC \o "2-3"' which means that the first level should not show, but I don't think LO supports skipping earlier levels. make CppunitTest_sw_ooxmlexport10 \ CPPUNIT_TEST_NAME=testTdf162916_nastyTOC Change-Id: I9661c56c84bcd28bf1664d808a0e9c38051cf67b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173885 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173886 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-09-25cool#7406 Inform lokit side about the grid state.Gökay Şatır
When grid in impress or draw is turned on, we need to inform libreofficekit. So it can show relevant UI and act accordingly. Same goes for griduse command. Also add a test for the new state callbacks. Signed-off-by: Gökay Şatır <gokaysatir@collabora.com> Change-Id: Ia5737ca0088e434f826eb7c40b0bec59049432af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173855 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2024-09-24prefer the per-ViewShell rendering data for default document bg colorCaolán McNamara
Change-Id: Ie67d6317641d63524c20a3001179ad958ebce300 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173866 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Pranam Lashkari <lpranam@collabora.com>
2024-09-24Don't change focus from sd navigator if it will be immediately refocusedCaolán McNamara
Instead of grabbing focus away from the treeview, and then grabbing focus back to the treeview (which disrupts the vcl treeview's ability to enter inline editing mode on 2nd click), just don't change focus at all if the focus will end up in the initial location. git show -w is your friend here Change-Id: Idb53fa95495f1819cd121079f3f51c39cc629336 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173830 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-09-24cool#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. (cherry picked from commit 90beea9a9a9ab1a5d4a154704acabadfc83870c9) Change-Id: I00e40b3cdd68dbe8994f28861dc7b0f578189643 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173851 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-09-24tdf#163086 Resize SVG pin icons to 24x24 and clean them upIlmari Lauhakangas
Sukapura Dark's pin_document.svg was already 24x24, gets a cleanup anyway. Editing the SVG source, I changed the 64 (and in one case 512) to 24. Then, I opened each one in Inkscape, clicked the lock icon for width and height, input /2.6667 (or 21,3333 in case the viewbox used to be 512) to the end of the existing width and hit Enter to apply. Then in Object - Align and Distribute panel, I set Relative to: Page and centered on vertical and horizontal axes. Finally, I used svgcleaner to clean out all the useless crap in the source. Change-Id: Id5608de8dd735ab8efeee4d2417be07a3109f6d0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173783 Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Tested-by: Jenkins (cherry picked from commit 65773351521b0a3c84d34915e5b0537610effc40) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173789
2024-09-24vcl: mask scale regression in BitmapFastScaleFilterChris Sherlock
Masks are not scaled in the fast scaling filter. The issue occured when migrating to the BitmapFastScaleFilter class - maSize was never set. The size is now calculated in execute() locally. Regression from: commit d246aa574571409046619254292698184c2545a3 date Sun Apr 15 10:14:10 2018 +1000 author Chris Sherlock <chris.sherlock79@gmail.com> vcl: move Bitmap::ImplScaleFast() and Bitmap::ImplScaleInterpolate() Change-Id: I9cc36f609059ae2db9c4cdb169bd5110382cfb21 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173766 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit c32e874a4f13acb87966731dbc5554fc95fa8e2b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173792 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-09-24update creditsChristian Lohmaier
Change-Id: Ia8d537cbfca12e77bc139ab690e734a8e110214a (cherry picked from commit bd47a75cc118a6a0e9460e6bf9cc65ff4c74b34a)
2024-09-24Resolves: tdf#162958 When using formula with Impress Style is lostCaolán McNamara
regression since: commit 125cf1525361c6cd699574f60b4cf12868188568 CommitDate: Thu Sep 7 08:54:56 2023 +0200 add referer to ole objects where these service names changed there should be listed here too so they get the same post-create setup they do on the bare "no-argument" route. Change-Id: I21fb9a92f63cac46e4a0fd46f7c2b8d2956ec829 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173385 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-09-23cool#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. (cherry picked from commit 7bad76c3a5b319f8ede74be8f78e5645f9ffd050) Change-Id: I6291da0c3e56aed7dca1a8dc1446209044cace92 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173811 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2024-09-23tdf#163092 sw: fix broken anotations on save to docxJaume Pujantell
Opening an odt file and saving it as docx would break the comment threads into unconnected comments. This also fixes a regression from commit 3bb2668f5e753e9fa6aa7eea74454bf11cdfc853 where creating a commet thread with multiple children and saving to docx would break it into separate threads. Change-Id: I76a0ec49bd69b953d816b3b5d3cc6d14065d5846 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173681 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2024-09-20SW: Transform DocStruct: Added Log warningsAttila Szűcs
Implemented warning loggings in case of transform charts or content controls. Change-Id: I77398ca5bf04f05743c99d63380a402c394739ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173689 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2024-09-20package: add unit tests with invalid zip packagesMichael Stahl
Change-Id: I687028391833ea48884912b0e5f586b95eee3244 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170054 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Tested-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit aeb92985f58629a112b4d1f4d105de8c372735b8) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173634 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-09-20libtiff: upgrade to release 4.7.0Michael Stahl
Fixes CVE-2023-52356 CVE-2024-7006 ofz65182.patch was apparently merged upstream and then reverted; Caolán suggested to drop the patch and see if ofz still finds a problem there. Change-Id: I0967708f19a7151b020372eca3c906b30f693db9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173602 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit d838b0d4af154b5c31818ceaac4bcdf8b2214c94) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173654 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-09-20ofz#68840 another putcontig8bitYCbCr22tile issueCaolán McNamara
Change-Id: I6e119cf1b3bec609f94784eb0c439835875d6112 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168031 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> (cherry picked from commit 034b68eb3a015553254c7238b13db8f94514080d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173653 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2024-09-20cool#9992 lok doc sign: add password-less mode to create-certs.shMiklos Vajna
Now one can use './create-certs.sh RSA NOPASS' to create signing certs without encrypting them with a password. This is meant to be useful for the case when these certs have to be imported using the LOK API, and not interactively in Firefox, where one could ask for a password. (cherry picked from commit a7830e04f2c33fb8d684d48d00ffc752f7207dea) Change-Id: I4cfc49ac8ff8c2420baa943b553a7a180a71e3bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173692 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-09-19cool#10040: fix: send LOK_CALLBACK_CELLFORMULA with LOK formulabar updateRashesh
- we were not getting the cell content when we are editing cell using formulabar in online. This message is important to autocomplete formulas in online. Change-Id: I62da49cb8800583931ffefcc39ab181ab9562eb6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173333 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2024-09-19upgrade to current Karla font that contains the 'fi' ligatureCaolán McNamara
Change-Id: I4577b3250b8d1366b03d080c49643ef15eeff2fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173665 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2024-09-19lok: getSlideShowInfo: return the slide namesHubert Figuière
This allow finding slides by bookmark Signed-off-by: Hubert Figuière <hub@collabora.com> Change-Id: Ia951aebdd04b67f4138138f7c0e1404078cc23ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173648 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-09-19Update git submodulesLászló Németh
* Update dictionaries from branch 'distro/collabora/co-24.04' to bce5b5c8734daf90467cc5b2cd889e747ff96f44 - Fix Hungarian hyphenation ké=rüg=ma, and not kér=üg=ma, reported by Gellért Gyuris. Change-Id: I2e34d93ab456c6180f80b94c136d32767717bf8e Reviewed-on: https://gerrit.libreoffice.org/c/dictionaries/+/172369 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org> (cherry picked from commit 2ae8fab6fe32bbd3d9817d41a823dc3a9dc6a07f) Reviewed-on: https://gerrit.libreoffice.org/c/dictionaries/+/172747 Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-09-19curl: upgrade to 8.10.1Xisco Fauli
Downloaded from https://curl.se/download/curl-8.10.1.tar.xz Change-Id: If65882b06172e9caf93d941011baa49c84d4f054 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173630 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-09-19tdf#162866 package: fix loading AutoCorrect file with case-insensitiveMichael Stahl
... duplicates; the directory names of AutoCorrect entries are user-editable, so this needs to be supported. AutoCorrect uses an ODF package because the ODF document loading code requires the ODF document to be in an ODF storage with a MediaType property. AutoCorrect writes an empty mimetype file, and if such is present in an .odt file that is being loaded, existing checks will detect it as corrupted, so we can use this to check that the file is an AutoCorrect file and turn off the case-insensitive check. (regression from commit 4833f131243bdb409ddfaff8b4db87d4ed2af98f) Change-Id: I43887f7dad0c8cbb465b4c0f1c38bcc3244a7675 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173477 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Tested-by: Jenkins (cherry picked from commit 9012355a60bd88db582078e38123863a4959b72f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173493 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-09-19xmlsecurity: add unit test with docx that can only be opened with repairMichael Stahl
Change-Id: I4f705dd2124383a90b69d04d8b2de0e37f83a495 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170053 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit 81e0b7e7c05d324fb77da7eda0d736fac5526b3e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173628 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Jenkins
2024-09-19package: tweak password fallback in ZipPackageStream::getDataStream()Michael Stahl
Fallbacks are only useful if an existing file is imported. It looks like it might have been possible to hit this case by storing a new document as ODF 1.1, and that sets m_bIsEncrypted but not m_oImportedAlgorithms (as Mike Kaganski pointed out), haven't tried it. Change-Id: Ia82c2e43372f50aa4e7ad9c2c62878986295c815 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173551 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit e22f1a2993d1c675ed8017090d1557d74d8b2917) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173504 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-09-19tdf#162841 package: fix loading AES-GCM encrypted macros from ODFMichael Stahl
The problem is that ZipPackageStream::GetEncryptionData() doesn't handle the checksum correctly; what is required here is *no checksum* but the check of m_oImportedChecksumAlgorithm results in calling m_rZipPackage.GetChecksumAlgID() instead, so it ends up in invalid situation and assert: package/source/zippackage/ZipPackageStream.cxx:656: virtual bool ZipPackageStream::saveChild(): Assertion `xEncData->m_nEncAlg != xml::crypto::CipherID::AES_GCM_W3C' failed. Refactor this so all the imported algorithm identifiers are in a struct in a std::optional member. (regression from commit 09f23a3dc5cd571df347cba9b003195de35f3ddd) Change-Id: I4b705520cd9bc800ce3c8611f8ad01a1e1008929 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173342 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Tested-by: Jenkins (cherry picked from commit 6e76e8a210e51e7c79e0e845c7a4c0db9fb55abc) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173396 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-09-19tdf#162987: check return value of GetViewBindingsMike Kaganski
Change-Id: Iaeec22ed07e18aa59f2ab87b2ea7d8a0c7ae1467 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173435 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit 7cebd7df0cfcbf906848bfbbdee614fdbd90af8a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173488 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-09-19Check return value of GetViewBindingsMike Kaganski
... as done in all other places where it's called Change-Id: Ic941cf433e96bb8bfa6ea81c52c044cc424100eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173436 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit 5eab23392c5c80ae9cf712c4e7fba21cfff02dae) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173490 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-09-19tdf#162823 package: fix loss of ODF encrypted basic macrosMichael Stahl
The problem is that there is a ZipEntry ZipPackageStream::aEntry which does not necessarily correspond to the values read from the Zip central directory, because of a call to ZipPackageStream::setSize() in ZipPackageStream::successfullyWritten() to override nSize and nMethod for encrypted entries. This triggers the consistency checks in readLOC(), where this aEntry is passed. Refactor things so that ZipPackageStream::aEntry and thus hopefully all ZipEntry instances correspond to the Zip file's central directory. For encrypted entries, store the decompressed size (which is read from manifest.xml) in m_nOwnStreamOrigSize and pass it as a separate parameter to the ZipFile functions that need it, and ultimately to XUnbufferedStream, resolving multiple TODO comments. (regression from commit efae4fc42d5fe3c0a69757226f38efc10d101194) Change-Id: Ib6ea32595c6027b98da9196a2e2bd0a99b62a983 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173273 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Tested-by: Jenkins (cherry picked from commit 33d55465d9f81863b88d649a46353cc4d19cd253) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173297 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>