summaryrefslogtreecommitdiff
path: root/sfx2
AgeCommit message (Collapse)Author
2023-03-12tdf#149144 Icons for sm Formula Editor in Sidebar DeckRizal Muttaqin
Change-Id: I851e0e45df3331012eddcaa3240c6ffb27054e57 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148520 Tested-by: Jenkins Reviewed-by: Rizal Muttaqin <rizmut@libreoffice.org> (cherry picked from commit db06ae5475bfd64c8acf3073c72193babbd4b822) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148700 Tested-by: Rizal Muttaqin <rizmut@libreoffice.org>
2023-03-07check GetShellXisco Fauli
it might return nullptr Change-Id: I65b43d69f4757b6c331582ca2e256cdea01377af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148194 Tested-by: Jenkins Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 9eb083ab732512c3ab64007c3be1c54be97172f6) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148231
2023-03-07tdf#150045 A few more supplemental labelsAdolfo Jayme Barrientos
Change-Id: Ifc0afe5c04145378b5fe32b12791c774d96f8a9c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146903 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> (cherry picked from commit 41c3c2dfaeee7fbd410fd76d4254ae9696a173a2) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148324 Reviewed-by: Vernon, Stuart Foote <vsfoote@libreoffice.org>
2023-03-07Check iframe target for allowed document URLsSamuel Mehrbrodt
Change-Id: I00e4192becbc160282a43ab89dcd269f3d1012d8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147919 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> (cherry picked from commit 288c0920a8475f9f2c537212e04aa7649192ad8c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148228 Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-02-26tdf#153802: make it possible to change the UI with read-only docsXisco Fauli
Change-Id: I392ae68ef086a8c857e0d9d9e6117e27a85c9ba9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147655 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> (cherry picked from commit c2de9708f1041d230b4688151116ff9c3c9e5184) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147727 Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-02-02sfx2: fix crash in SfxLokHelper::notifyAllViews(...)Aron Budea
Crashreport signature: program/libmergedlo.so SfxLokHelper::notifyAllViews(int, rtl::OString const&) sfx2/source/view/lokhelper.cxx:682 program/libmergedlo.so SfxClipboardChangeListener::ChangedContents() include/rtl/string.hxx:413 program/libmergedlo.so SfxClipboardChangeListener::LinkStubAsyncExecuteHdl_Impl(void*, void*) include/rtl/ref.hxx:128 program/libmergedlo.so ImplWindowFrameProc(vcl::Window*, SalEvent, void const*) include/rtl/ref.hxx:128 program/libmergedlo.so SvpSalInstance::ProcessEvent(SalUserEventList::SalUserEvent) Change-Id: Ibf70f42292d67a3d6cc68f579ee02f671da85acb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146150 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> (cherry picked from commit dc17158c99c8a15fbca57a9a0b0ea7178dcc5a34) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146400 Tested-by: Jenkins Reviewed-by: Aron Budea <aron.budea@collabora.com> (cherry picked from commit b2bd60b8c1937502857e12b0eea42323fd2353c8) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146411 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-01-13tdf#152921 Fix sidebar tabbar tab highlightingJim Raykowski
Makes the highlight state of the tabbar tab behave as expected when the sidebar is in the collapsed or expanded state. When collapsed, the tabbar should never have a highlighted tab. When expanded, the tab in the tabbar corrosponding to the open deck should be highlighted. Change-Id: I0e6c54aff95b1f1e417f147070742e900fd51513 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145251 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com> (cherry picked from commit dc3deffb15f6c924375b38f606eb640fe065089f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145435 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2023-01-08Bump copyright year to 2023Adolfo Jayme Barrientos
Change-Id: I699112a3e554013bab75b82d1eae00098216c886 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144903 Tested-by: Jenkins Reviewed-by: Martin Srebotnjak <miles@filmsi.net> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2022-12-19Resolves: tdf#92051 add tooltips to section/table statusbarCaolán McNamara
Change-Id: I649eabbe266085fdbc0ca9c4a5506c0c2a270721 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144199 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144450 Tested-by: Caolán McNamara <caolanm@redhat.com>
2022-12-17check SfxObjectShell::Current()Caolán McNamara
SfxObjectShell::Current() can return null, it's based on the equally vile SfxViewFrame::Current() Change-Id: Ia5c7783680e9d8e5d3075078f16a2c15cb6f7a47 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144355 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-12-16sfx2: check SfxViewFrame::Current()Caolán McNamara
these ones look potentially worth backporting Change-Id: I9391f266b08e3842f9686db6113b61fa814f3fbb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144257 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-12-12tdf#152266 add an infobar with indicators for macro-like content in docCaolán McNamara
Show "macros" and "events" for now if we know that are present so they can be investigated by the user. There are other things which could potentially be added in the future. Change-Id: I981ee7a8e22791cd15405894f30fee659ba0b7ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143965 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-12-10Related: tdf#152266 open 'event' page by default for SID_CONFIGEVENTCaolán McNamara
Change-Id: I7a3f6def8bda00588ef2846e5d3b5ed5d1da04de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143872 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-12-06sfx2: rename FN_PARAM_1 to FN_NOUPDATEHenry Castro
The parameter is intended to not update the fields from data source otherwise it will reset to the first record. Signed-off-by: Henry Castro <hcastro@collabora.com> Change-Id: I204cd20b8eb0b3f26c204e139c72b479c83bbf0c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142276 Tested-by: Jenkins
2022-12-06sfx2: add log information to catch the exceptionHenry Castro
Add log information for data analysis if the ExportTo fails due to an exception. Signed-off-by: Henry Castro <hcastro@collabora.com> Change-Id: I888545da14f413a970faf50b3ce60d12966f3f9e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142239 Tested-by: Jenkins
2022-12-01sc: move test back where it belongsXisco Fauli
This test was moved from sc/qa/unit/subsequent_filters_test2.cxx to sc/qa/unit/filters-test.cxx in ad40ad91c5400391a0848832e91c596be8fbd811 "CppunitTest_sc_subsequent_filters_test2: inherit from UnoApiXmlTest". As the commit message says: I couldn't find a way to test testTooManyColsRows, move it to sc/qa/unit/filters-test.cxx for the time being The problem is that using loadFromDestkop resets the Error in sfx2/source/doc/sfxbasemodel.cxx:2005 - m_pData->m_pObjectShell->ResetError(); so add a way to log the WarningError in SfxMedium Change-Id: Ieda9bdc9de856b75d4b162248da41d637305e28d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143506 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-12-01tdf#152078 Add a Zoom slider to the Basic IDERafael Lima
This patch adds a ZoomSlider to thee Basic IDE. It has the following characteristics: - The Zoom varies from 50% to 400% considering that 100% is the font size defined in Tools - Options - Fonts dialog. - All open editor windows use the same Zoom factor - The zoom level is saved and restored across sessions Change-Id: I63df02d0dc828fca4360d61b8aa2c7af6610d4db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143159 Tested-by: Jenkins Tested-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2022-11-30sfx2: extend .uno:SetDocumentProperties to update custom doc propsMiklos Vajna
Scripting clients (like the LOK API) had a way to get all custom properties where the name matches a certain prefix, but setting such properties was not possible. .uno:SetDocumentProperties can already show a dialog to edit properties interactively and had a parameter to set some properties in a non-interactive way, but there doesn't seem to be a way to influence custom properties there without using the internal API. Fix the problem by adding a new UpdatedProperties parameter that allows removing all old custom properties matching the prefix and adding new ones with a single UNO command dispatch. This is meant to be the write side of the reading commit 5e8f6dcb8ce00d2d5e35b3cf5654187b3068276c (sw lok, .uno:SetDocumentProperties: expose value of custom document properties, 2022-11-29). Change-Id: Ib7450d4d21285d9a73758e1c172543521fc07cef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143491 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-11-28f'up to the tdf#152172 fix re Safari as default browser on VenturaChristian Lohmaier
Previous patch did only adjust the check in the rarely used version of the function, not in the primarily used signature. D'oh! Change-Id: I019a74651d3ee8bab43a8c3997b8cd05040b7ba4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143410 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2022-11-28sw: add a new .uno:TextFormFields UNO commandMiklos Vajna
Currently .uno:TextFormField can be used to insert a new fieldmark, but then there is no way to update it. Also, there is no way to update several fieldmarks at the same time. Given that the "ADDON" field type in a field mark can be used by extensions like Zotero, it's useful in case these fieldmarks can be not only inserted, but they can be also updated. This works by (in the LOK case) calling getCommandValues() with .uno:TextFormFields, and then once the client generates the new expanded values, there is no way to insert these updated expanded values into the document currently. Fix this by adding a new .uno:TextFormFields UNO command that can update all fieldmarks matching a certain prefix (looking at their field command). This allows e.g. updating all Zotero citations or the bibliography, but the API is generic to support any kind of ADDON fields. Similar to insertion, the content can be multi-paragraph, formatted HTML. This required adjusting SfxUnoAnyItem::CreateDefault(), this way an UNO command parameter can be an array of beans::PropertyValues, which is how the client can provide details of multiple fieldmarks. Change-Id: I44a1b1495ead79b92ccd0c9f6412a34cbec5d68b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143361 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-11-24Remove some unused includesMiklos Vajna
Mostly com/sun/star/frame/Desktop.hpp is unused after inheriting from UnoApiTest. Change-Id: Ifba307353a11a14e033a230a291314bee86b51c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143190 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-11-23tdf#152172 fix help workaround re Safari as default browser on VenturaChristian Lohmaier
the "Rapid Security Response" feature added with macOS 13 (Ventura) makes Safari a stub in a different location. Instead of the traditional /Application/Safari.app/ the call to query the default app will return /System/Volumes/Preboot/Cryptexes/App/System/Applications/Safari.app/ So instead of a full match, just check for the suffix. Change-Id: Ic4abfe33c118827bc0e089e9966e57a0fd8c0526 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143178 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2022-11-22lok: draw Math in-place widget in sdMike Kaganski
Change-Id: If874c0227ec724fa5b1517080db252e64f9597c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143121 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-11-22loplugin:unusedfieldsNoel Grandin
Change-Id: I726b8b9dee3a424f731078cd6b10027423454bee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143086 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-11-22loplugin:unusedfieldsNoel Grandin
Change-Id: I4a7276ffc36b4f954fe1fa39fb5666fa184e66e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143016 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-11-21lok: Notify about last used row and column in CalcSzymon Kłos
We use HelperNotifyChanges::NotifyIfChangesListeners notifier so we know which cell was modified and we can correctly target only affected users. Change-Id: Iaeb68e350e85e4ed1492a7d350a790e68f2d63af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139473 Reviewed-by: Dennis Francis <dennis.francis@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142994 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2022-11-21lok: allow password reset in properties>change passwordSzymon Kłos
Change-Id: I92a3c658e96f602549ff5282b6ed5bc9ee780bbd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141372 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142992 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2022-11-21lok: make properties>change password dialog asyncMert Tumer
* We now can set a password through properties->change password without having to have a password initially only for online because it needs a created file already, online works with files that are created before loading but the desktop does not need this. * The same dialog is still used as non-async for desktop version because it goes through an InteractionHandler and the result is expected not from the dialog but from the interaction handler. Therefore, making it async there did not make sense. Signed-off-by: Mert Tumer <mert.tumer@collabora.com> Change-Id: I3d02822be0b71836b1592abca191b3b1c5f6374e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139884 Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142991 Tested-by: Jenkins
2022-11-20Enable File Properties for JSDialogsNickWingate
- Disable security tab as protect/password subdialog not fully async-ed - Disable custom property tab as still unstable - Hide Digital signatures button - Make duration dialog async - Set location as file name Signed-off-by: NickWingate <nick.wingate@collabora.com> Change-Id: I5843bb7737af8dd6b7d3af273ddd8997f2e35e10 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138010 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142987 Tested-by: Jenkins
2022-11-20Fix opening duration custom property shows textNickWingate
Before saving a duration custom property and then closing and opening file props wouldn't show the duration type and value and instead blank text Signed-off-by: NickWingate <nick.wingate@collabora.com> Change-Id: Ie6536dd75151db40f335985c1ce92236ce77ddc2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138180 Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142986 Tested-by: Jenkins
2022-11-20jsdialogs: added WidgetTestDialog to test different vcl widgets in online siderash419
Signed-off-by: rash419 <rashesh.padia@collabora.com> Change-Id: I27cbb72b4ccd486b58934503b1d3d5d7ff47cbfe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132865 Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142970 Tested-by: Jenkins
2022-11-19lok: masterpage: Introduce mode property to tile renderingSzymon Kłos
This is needed for Impress which can have slides in two Edit Modes: Master Page and Page. Change-Id: I3eca0f51ba7970e793026d1ac6aa09b19b7a904b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137869 Reviewed-by: Ashod Nakashian <ash@collabora.com> Tested-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142969 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2022-11-17Take in-place widget scaling into accountMike Kaganski
This is relevant when the Math OLE object is scaled in parent document (e.g., using Position and Size dialog, disabling its size protection); then the in-place editing widget uses own map mode reverting the OLE scaling; without taking that into account, mouse clicks get misplaced. Change-Id: I961fa8f3993c1b7992857c9f18d79650d078a684 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142822 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-11-16lok: handle mouse/keyboard events in Math embedded in CalcMike Kaganski
And extract the identical code used in all components into static SfxLokHelper methods. Change-Id: I6556b1b996936835ecfc0d59e2c1dd1ef6380db2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142793 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-11-16lok: handle mouse/keyboard events in Math embedded in Impress/DrawMike Kaganski
Since Impress/Draw use mm100, we need to convert object area that SfxInPlaceClient provides, which is in parent units, into twips. TODO: how would taking the units from object shell with Calc, given that it does not call SetMapUnit in ScDocShell ctor? Change-Id: I8de2088a3e0e7f9070d6c3c234b40038b6e00f15 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142777 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-11-15sw: add online accessibility check implementationTomaž Vajngerl
Change-Id: Ic68aa91b1cbf23ac305ad4e361c56b91556757ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141604 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-11-11move password handling from SwModelTestBase to UnoApiTestXisco Fauli
so other places inheriting from UnoApiTest can also import/export protected documents Change-Id: I0e2716204dbb171c9e17e3939b266977e1b96dda Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142592 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-10Simplify and deduplicate SfxBaseController::queryDispatchMike Kaganski
Change-Id: Iffc67ff7e0840bd2402c4ba357f45a1493ff78ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142543 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-11-10Simplify this a bitMike Kaganski
Change-Id: I6162b8f54eb685267aeebe48daa419933b6528a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142542 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-11-10lok: masterpage: use EditMode as parameter in invalidation callbackSzymon Kłos
Change-Id: I3905fc9e6376ca1cef3e438e7a5f229d3720b1f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138961 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Henry Castro <hcastro@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142501 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2022-11-09lok: masterpage: introduce EditMode setter and getter for ViewShellSzymon Kłos
Change-Id: I74d3307aab8fc038bd2409b5f10a2d08db885223 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138957 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Henry Castro <hcastro@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142472 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2022-11-09UnoApiTest: factor out common codeXisco Fauli
Change-Id: I1d84d8c1e371016a4f4f068af1e9c76635f28cf4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142490 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-09sfx2: fix user-after-free in SfxObjectShell::ExecFile_Impl()Miklos Vajna
This happened even with an empty Writer document, on File -> Export As -> Export Directly as PDF, since commit 1e007e8f1703851b01c68884e87c906f6bae5a5e (sw: fix merge mail to direct export as pdf, 2022-10-18). The problem is that SfxObjectShell::ExecFile_Impl() gets a SfxBoolItem* returned by GetSlotState(), and then uses it before and after calling SfxStoringHelper::GUIStoreModel(). But as part of opening the file picker for save, ModelData_Impl::OutputFileDialog() indirectly calls Dialog::Execute(), which starts to process user events on the main loop, which leads to SfxItemDisruptor_Impl::Delete(), which deletes that SfxBoolItem*. Fix the problem by storing the bool value on the stack in SfxObjectShell::ExecFile_Impl(), and work with that after our SfxBoolItem* is gone. The "freed by" backtrace from asan is cut quite early in the gtk3 case. The "gen" case is more helpful, though it's still cut at frame 29. Change-Id: Ib97c7df7c1289730dec478eede3d620f3a33ace8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142492 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-11-08UnoApiTest: simplify code by using tempfile memberXisco Fauli
SwModelTestBase does the same. this will help to make SwModelTestBase inherit from UnoApiTest Change-Id: If1c824cf92f0e8b70253e4d5fdeddcaa521d4632 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142287 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-06Remove double functionalityArmin Le Grand (allotropia)
There was processorfromoutputdevice.cxx|hxx containing createBaseProcessor2DFromOutputDevice that does exactly the same thing as createProcessor2DFromOutputDevice in processor2dtools.cxx|hxx, so I removed one onf them to make handling of future changes easier. Change-Id: Id8d49d1572a1bc39f1d330a742d4697c8c030e75 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142320 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2022-11-05lok: properly treat zoom in LokStarMathHelper::postMouseEventMike Kaganski
Previous naive implementation was dropped in commit 033a342a630dbb6329962156727e621866b77b48 (lok: use twips in Math, Wed Nov 02 11:03:08 2022 +0300). Unlike chart, Math expects twips, so PPT (pixel per twip) factor must be converted into percentage. Change-Id: Icd936e004d961c0abc25c241391d4e24c44e8c14 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142319 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-11-05lok: show Math cursorMike Kaganski
Change-Id: I17a449f0a0662f0433de9cad1522a090434c1e30 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142178 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-11-04Templates: tdf#86483: Add "Localization" category and add a template for zh_CNKevin Suo
This patch adds a new template category named "Localization", to be used for templates created by our l10n team for each locale, so that languages which requires special layout or formatting (such as CJK or CTL) can have their own templates bundled by default. This patch aslo adds a (general purpose) Writer template for the Simplified Chinese language. Chinese language, by convention, need to format the document to have the first line of the paragraph be indented by 2 characters. The font size, line spacing, paragraph margin etc also need special treatment. If the Chinese users start writing using the current default Writer template, they need to adjust the style formatting every time to meet their needs. Although this template can be provided as an "extension" on the extension website, in practice very few people will go to the extension website and look for such templates. Such bundled templates can also be added by other l10n teams. The extras/README.md will be updated in a separate patch to include documentation on how to add such templates and have their template names translatable on weblate. This does not completely resolve the issue in tdf#86483, which requests to "Implement different default templates per locale". However, with this patch, we are a step closer to set a choosen template when the user switch to a certain UI. Change-Id: Ic295482354f343e981eb20908907bd6a945b7120 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140802 Tested-by: Jenkins Reviewed-by: Laurent Balland <laurent.balland@mailo.fr>
2022-11-04tdf#143641 Fix UNO Object Inspector window titleAmarjargal Gundjalam
When detaching the "UNO Object Inspector" window, the title is "LibreOfficeDev 7.x", and not anything related to the window. This change fixes the window title. Change-Id: I3b7c3b547e59acd108b62a537ce7ff24162d745b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142053 Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Tested-by: Hossein <hossein@libreoffice.org> Reviewed-by: Hossein <hossein@libreoffice.org>
2022-11-04sw: fix merge mail to direct export as pdfHenry Castro
In order to export directly to PDF, the document must remove the hidden sections (if format condition), the data source should stay on current selected record finally restore the hidden sections. Signed-off-by: Henry Castro <hcastro@collabora.com> Change-Id: Idf8e2a26d5c9cbe61ddac6c35cc2e1df1175da27 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141520 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>