summaryrefslogtreecommitdiff
path: root/svtools
AgeCommit message (Collapse)Author
2023-12-24Remove unused headers found by bin/find-unusedheaders.shGabor Kelemen
Change-Id: I859138dee575ef7fd76db28b619c673782914782 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161235 Tested-by: Jenkins Reviewed-by: Gabor Kelemen <kelemeng@ubuntu.com>
2023-12-21Revert "tdf#100584 - Arrange sheets in the tab bar depending on the RTL ↵Andreas Heinisch
settings" This reverts commit be86c8f2432623fdb8ed4f22ca08c35121fd8bec. Reason for revert: To many regressions. Change-Id: Id3fb8dc5d4edb84c0008b7834a80887aaa7d9f83 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161154 Tested-by: Andreas Heinisch <andreas.heinisch@yahoo.de> Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2023-12-21Revert "tdf#100584, tdf#157784 - Arrange sheets depending on the RTL settings"Andreas Heinisch
This reverts commit 4f1b3c16f5530a2a190cab07c07c7bf63acf42c7. Reason for revert: To many regressions. Change-Id: I7352bb3c192d5e6c72e95c387ee551764007e97b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161152 Tested-by: Andreas Heinisch <andreas.heinisch@yahoo.de> Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2023-12-19Drop some wrapper methods from SvtOptionsDrawinglayerGabor Kelemen
just use the wrapped officecfg methods instead of: IsSolidDragCreate IsRenderDecoratedTextDirect IsRenderSimpleTextDirect GetQuadratic3DRenderLimit GetQuadraticFormControlRenderLimit IsTransparentSelection Change-Id: Ie0f3ec0f8fdbbf08facfff1a372c666c8a0c8979 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160654 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2023-12-16Drop some wrapper methods from SvtOptionsDrawinglayerGabor Kelemen
just use the wrapped officecfg methods instead of: GetMaximumPaperWidth GetMaximumPaperHeight GetMaximumPaperLeftMargin GetMaximumPaperRightMargin GetMaximumPaperTopMargin GetMaximumPaperBottomMargin Change-Id: Id11782a306ca9118cc65607265be516ba9f0abda Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160653 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2023-12-16Drop some wrapper methods from SvtOptionsDrawinglayerGabor Kelemen
just use the wrapped officecfg methods instead of: GetStripeLength Change-Id: Id29c0b1ecbc513b5d778140b6e59139a507035d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160652 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2023-12-13Drop some wrapper methods from SvtOptionsDrawinglayerGabor Kelemen
just use the wrapped officecfg methods instead of: IsOverlayBuffer IsPaintBuffer IsOverlayBuffer_Calc IsOverlayBuffer_Writer IsOverlayBuffer_DrawImpress IsPaintBuffer_Calc IsPaintBuffer_Writer IsPaintBuffer_DrawImpress Change-Id: I2bd340b8c9c711c33c19fb1d764ce20bade0476e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160651 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2023-12-12tdf#158320 restore Live Preview for font hoveringCaolán McNamara
a) announce Preview when a 'selected' font preview is requested b) move EndPreview to when the dropdown popups down, rather than listen to ESC Change-Id: I68916769150c23c0ec18aae084cdf3cafb7352a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160609 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-10cid#1545177 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1545179 COPY_INSTEAD_OF_MOVE cid#1545187 COPY_INSTEAD_OF_MOVE cid#1545188 COPY_INSTEAD_OF_MOVE cid#1545189 COPY_INSTEAD_OF_MOVE cid#1545196 COPY_INSTEAD_OF_MOVE cid#1545197 COPY_INSTEAD_OF_MOVE cid#1545204 COPY_INSTEAD_OF_MOVE cid#1545223 COPY_INSTEAD_OF_MOVE cid#1545236 COPY_INSTEAD_OF_MOVE cid#1545239 COPY_INSTEAD_OF_MOVE cid#1545253 COPY_INSTEAD_OF_MOVE cid#1545274 COPY_INSTEAD_OF_MOVE cid#1545286 COPY_INSTEAD_OF_MOVE cid#1545309 COPY_INSTEAD_OF_MOVE cid#1545311 COPY_INSTEAD_OF_MOVE cid#1545345 COPY_INSTEAD_OF_MOVE cid#1545358 COPY_INSTEAD_OF_MOVE cid#1545361 COPY_INSTEAD_OF_MOVE cid#1545365 COPY_INSTEAD_OF_MOVE cid#1545367 COPY_INSTEAD_OF_MOVE cid#1545372 COPY_INSTEAD_OF_MOVE cid#1545373 COPY_INSTEAD_OF_MOVE cid#1545377 COPY_INSTEAD_OF_MOVE cid#1545392 COPY_INSTEAD_OF_MOVE cid#1545399 COPY_INSTEAD_OF_MOVE cid#1545404 COPY_INSTEAD_OF_MOVE cid#1545408 COPY_INSTEAD_OF_MOVE cid#1545430 COPY_INSTEAD_OF_MOVE cid#1545439 COPY_INSTEAD_OF_MOVE cid#1545449 COPY_INSTEAD_OF_MOVE Change-Id: I3afe836a0bbc8bd70937035e60eb020435e413d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160539 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-10cid#1545975 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1545955 COPY_INSTEAD_OF_MOVE cid#1545954 COPY_INSTEAD_OF_MOVE cid#1545952 COPY_INSTEAD_OF_MOVE cid#1545948 COPY_INSTEAD_OF_MOVE cid#1545943 COPY_INSTEAD_OF_MOVE cid#1545935 COPY_INSTEAD_OF_MOVE cid#1545930 COPY_INSTEAD_OF_MOVE cid#1545928 COPY_INSTEAD_OF_MOVE cid#1545925 COPY_INSTEAD_OF_MOVE cid#1545922 COPY_INSTEAD_OF_MOVE Change-Id: I28d830504337f417829c675b1eb9c763b83b30c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160522 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-10cid#1546281 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1546278 COPY_INSTEAD_OF_MOVE cid#1546276 COPY_INSTEAD_OF_MOVE cid#1546247 COPY_INSTEAD_OF_MOVE cid#1546244 COPY_INSTEAD_OF_MOVE cid#1546243 COPY_INSTEAD_OF_MOVE cid#1546220 COPY_INSTEAD_OF_MOVE cid#1546209 COPY_INSTEAD_OF_MOVE cid#1546207 COPY_INSTEAD_OF_MOVE cid#1546206 COPY_INSTEAD_OF_MOVE cid#1546205 COPY_INSTEAD_OF_MOVE cid#1546197 COPY_INSTEAD_OF_MOVE cid#1546180 COPY_INSTEAD_OF_MOVE cid#1546172 COPY_INSTEAD_OF_MOVE cid#1546165 COPY_INSTEAD_OF_MOVE cid#1546164 COPY_INSTEAD_OF_MOVE cid#1546158 COPY_INSTEAD_OF_MOVE cid#1546151 COPY_INSTEAD_OF_MOVE cid#1546135 COPY_INSTEAD_OF_MOVE cid#1546132 COPY_INSTEAD_OF_MOVE cid#1546129 COPY_INSTEAD_OF_MOVE cid#1546128 COPY_INSTEAD_OF_MOVE cid#1546122 COPY_INSTEAD_OF_MOVE cid#1546117 COPY_INSTEAD_OF_MOVE cid#1546113 COPY_INSTEAD_OF_MOVE cid#1546106 COPY_INSTEAD_OF_MOVE cid#1546099 COPY_INSTEAD_OF_MOVE cid#1546091 COPY_INSTEAD_OF_MOVE cid#1546085 COPY_INSTEAD_OF_MOVE cid#1546069 COPY_INSTEAD_OF_MOVE cid#1546063 COPY_INSTEAD_OF_MOVE cid#1546062 COPY_INSTEAD_OF_MOVE cid#1546058 COPY_INSTEAD_OF_MOVE cid#1546056 COPY_INSTEAD_OF_MOVE cid#1546051 COPY_INSTEAD_OF_MOVE cid#1546040 COPY_INSTEAD_OF_MOVE cid#1546030 COPY_INSTEAD_OF_MOVE cid#1546028 COPY_INSTEAD_OF_MOVE cid#1546015 COPY_INSTEAD_OF_MOVE cid#1546001 COPY_INSTEAD_OF_MOVE Change-Id: Ib954c92a300fc323b29f27880fdf8bc46ed98862 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160520 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-07simplify and modernise ScopedBitmapAccessNoel Grandin
(*) Make all of it use a "Scoped" paradigm (*) pass by value, no need to allocate on heap (*) make all of the construction go via the *Access constructors, instead of it being some via the constructors and some via the Acquire*Access methods. (*) take the Bitmap& by const& in the constructor, so we can avoid doing const_cast in random places. Change-Id: Ie03a9145c0965980ee8df9a89b8714a425e18f74 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160293 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-28Always send theme-change in kit-mode even if the global theme is the sameCaolán McNamara
Kit explicitly ignores changes to the global color scheme, except for the current ViewShell, so an attempted change to the same global color scheme when the now current ViewShell ignored the last change requires re-sending the change. In which case individual shells will have to decide if this color-scheme change is a change from their perspective to avoid unnecessary invalidations. Add ConfigurationHints::OnlyCurrentDocumentColorScheme as the hint that only the document color scheme has changed, so individual shells can see if their document color scheme is different to this new color scheme and not invalidate if unnecessary. So dark/light mode changes work properly without reintroducing unwanted invalidations. Change-Id: I5ebb4878694ceb6b9afe26286a30da06ea6ff3ef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160002 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-11-25Simplify HtmlWriterMike Kaganski
And add some asserts, to make sure we don't add attributes outside of opening tags. Make sure that HtmlWriter closes its opened elements. Replace one occurrence where this was deliberately not done, with a use of HTMLOutFuncs::Out_AsciiTag. Change-Id: I3a3f4b963432bf95b36afa62cac2144503837378 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159935 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-11-24Fix HtmlWriter::charactersMike Kaganski
This method may be called after an end(), and then it shouldn't try to close a tag again. Also in this case the characters shouldn't be considered in the next start()/characters()/end() run. Clarify the meaning of the previous mbElementOpen, by renaming it to mbOpeningTagOpen. The old mbCharactersWritten flag was redundant. Change-Id: Ie0ac6ddd88be774853a1fc152742b51793af798b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159932 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-11-20c++20: use std::erase(_if) instead of std::remove(_if)+erase (svtools)Julien Nabet
Change-Id: I53a244ac751dbe9d40e8f541fcb6d7ff89ff83f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159701 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-11-19Extended loplugin:ostr: svtoolsStephan Bergmann
Change-Id: I4aa6ab1c132a5666b0ee4a4e9f68aaca58a38ceb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159672 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-18tdf#157716 - Rename "Language settings" to "Languages and Locales"t-aswath
Change-Id: Idd31b18c87998b03d884e7aa17197c459241abf9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159315 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2023-11-09tdf#146386 fpicker,svtools: remove FTP from Remote Files dialogMichael Stahl
Change-Id: I76ba8e275033c4d0a3c04964828dc640827cb7cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159073 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-11-09tdf#114441 Convert sal_uLong to better integer typesYli875
The maximum value of the width in BrowserColumn is LONG_MAX. tools::Long value range is the closest among other integer types. It is widely used in these files. Also, other parameter types and return types have been changed to match the width type. Change-Id: Ia8b941a8ea02075a0d9b4d44675d5809005738bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157477 Tested-by: Hossein <hossein@libreoffice.org> Reviewed-by: Hossein <hossein@libreoffice.org>
2023-11-07tdf#158083: RTF: drop export for \pgdsctblVasily Melenchuk
This table is not standard extension to RTF format. It is not described in RTF specification and even is not used by Writer on import these days. Change-Id: I52f27dfd30877d461ad535b7847f40dd4c6f4ea5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158986 Tested-by: Jenkins Tested-by: Gabor Kelemen <kelemeng@ubuntu.com> Reviewed-by: Gabor Kelemen <kelemeng@ubuntu.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-11-02Drop SvxHtmlOptions::IsPrintLayoutExtensionGabor Kelemen
as it is just now a simple wrapper over officecfg Change-Id: If41c7c9db191af7ebede9072fd995d015056bf1f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158779 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-10-31tdf#100584, tdf#157784 - Arrange sheets depending on the RTL settingsAndreas Heinisch
The tab bar's position should be determined globally based on the RTL settings, rather than being individually set for each sheet. Change-Id: I0690b01c842d2da6d49b57d1adad0a8e0844087f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158730 Tested-by: Andreas Heinisch <andreas.heinisch@yahoo.de> Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2023-10-31Revert "tdf#100584, tdff#157784 - Arrange sheets depending on the RTL settings"Andreas Heinisch
This reverts commit a90d89d5b2dae2b4c3fd6a411de2160a3bf20779. Reason for revert: Typo in the commit message Change-Id: I58f184e2733d91aa827396868fb4f7b8e9d47a48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158693 Tested-by: Andreas Heinisch <andreas.heinisch@yahoo.de> Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2023-10-31tdf#100584, tdff#157784 - Arrange sheets depending on the RTL settingsAndreas Heinisch
The tab bar's position should be determined globally based on the RTL settings, rather than being individually set for each sheet. Change-Id: I0906f85058a5b4250540dda07740eec61f46d299 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158675 Tested-by: Andreas Heinisch <andreas.heinisch@yahoo.de> Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2023-10-23Implement PreserveSpaces boolean HTML/ReqIF export filter optionMike Kaganski
This option changes how HTML/ReqIF export handles paragraphs with leading/trailing spaces, or multiple sequential spaces. Normally export may insert newlines every ~256 characters, in place of normal space characters; this relies on default processing of spaces, where leading/trailing spaces are trimmed, and runs of spaces are reduced to a single space. When PreserveSpaces is true, HTML/ReqIF export takes care to not alter spaces inside paragraphs. For that, it checks if paragraphs contain sequences of spaces that normally would be reduced; and for those paragraphs, it adds "white-space: pre-wrap" to style (in HTML), or 'xml::space="preserve"' attribute (in ReqIF). Import of 'xml::space' attribute and "white-space: pre-wrap" style is implemented; when paragraph has these, it keeps the spaces read from HTML/ReqIF intact. Import does not currently support this attribute/style in elements other than 'p'. Change-Id: I62dba5eaf313b965bf37d8fa5e3f5bbb8f5e8357 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158362 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-10-23Extended loplugin:ostr: Rewrite some O[U]StringLiteral -> O[U]StringStephan Bergmann
...in include files. This is a mix of automatic rewriting in include files and manual fixups (mostly addressing loplugin:redundantfcast) in source files that include those. Change-Id: I1f3cc1e67b9cabd2e9d61a4d9e9a01e587ea35cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158337 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-20Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: svtoolsStephan Bergmann
Change-Id: Ib4d0e05b802776c682676a7bdaebb5123f6c5013 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158224 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-20tdf#114441 Convert use of sal_uLong to better integer typesAdam Seskunas
In ctrlbox.cxx, nCount and i were changed to sal_uInt32 because aFontSizeNames.Count() returns sal_uInt32. In valueset.cxx, nFirstItem and nLastItem are only used in a comparison with a value of size_t. They were both changed to size_t because nLastItem contains the product of tools::Long mnVisLines and sal_uInt16 mnCols where tools::Long can be 64 bit in some cases. Change-Id: Ib3f10cdf6ae81e96f28f13a0bb32699f26c8a0cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157109 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2023-10-12Make NC_ constexpr-friendlyStephan Bergmann
...by moving the char8_t -> char reinterpret_cast out of any potential constexpr paths into a new TranslateId::getId. And demonstrate constexpr'ability by making the aCategories var in OApplicationIconControl::Fill (dbaccess/source/ui/app/AppIconControl.cxx) constexpr. (And there might be more such cases that could now be made constexpr.) Change-Id: I0b4e3292faf8f6b901f9b9e934e1aa6bf0f583ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157862 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-11Drop o3tl::span, can use C++20 std::span directly nowStephan Bergmann
Change-Id: Ic21ff7bf48f07f7277979d52e99d2c5c268de83f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157825 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-07jsdialog: cache only best quality font previewsSzymon Kłos
to keep single cache for all the views, we downscale result if needed when we draw on a target Change-Id: I3b57ec08b2260029ff469a13da725feff04555d0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156190 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157671 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2023-10-07jsdialog: enable font name & size comboboxSzymon Kłos
This enables font selector with font rendering in Online Change-Id: I2b57c0831e84a957374c2b1733f6526ca80ac7bd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156242 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157503 Tested-by: Jenkins
2023-10-07ofz#63032 urp stack too deepCaolán McNamara
Change-Id: I13496c629e48128e3d916f3033394392bca3524c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157656 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-10-06use more ErrCodeMsgNoel Grandin
instead of a sideband mechanism to convey extra error message around Change-Id: Ibd1fc8629c5b10bc6f9e6cbd30e8a20156ac13b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157630 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-10-03tdf#156756 Icon sizes for the toolbar wrong (part2)Noel Grandin
my previous fix commit 715a6ea8cb3aa6c80edbb22909aac3f18b7daec6 Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Mon Oct 2 11:31:09 2023 +0200 tdf#156756 Icon sizes for the toolbar wrong had a bug which broke changing themes Change-Id: Icf19fee5034ec2795354641c62979b6284e1a5d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157506 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-10-03replace ErrorInfo with simpler mechanismNoel Grandin
Instead of returning ErrCode class everywhere, return a new class ErrrCodeMsg, which combines an ErrCode with the other parameters that are used to control the error reporting. I do not change everything that uses ErrCode here, I started from SfxBaseController/SfxMedium and worked outwards. This change serves two purposes (1) Replace the extremely whacky ErrorInfo mechanism we were using to smuggle information into the error handler reporting mechanism with a very straightforward approach of just combining it into the error class. (2) Allow us to capture the source location that produced the error, which makes debugging the source of a problem soooo much easier. Change-Id: I978b8f00c9851b41a216c7ebdef2ef94251d5519 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157440 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-10-02tdf#156756 Icon sizes for the toolbar wrongNoel Grandin
So my change in commit 0558926c2f9201a12b4c46efc36b8a4080af4d46 Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Tue Jun 6 10:42:10 2023 +0200 use more officecfg for SvtMiscOptions Made an existing bug much worse. The underlying bug started in commit fd92b09db497a7dfd594a5418f87856dc3886bf9 Author: Caolán McNamara <caolanm@redhat.com> Date: Tue Feb 14 13:12:38 2023 +0000 tdf#153541 notify listeners when any of the icon sizes change which resulted in changes to icon sizes not being saved to the registry, because the registry layer would throw an exception when called from SvtMiscOptions_Impl::ImplCommit, because it does not like being passed null values for SidebarIconSize and NotebookbarIconSize properties. So I have done two things (1) finish removing handling of SymbolSet from the SvtMiscOptions_Impl code, and just use the officecfg:: layer. (2) Change the ImplCommit code to only pass down properties for which it actually has valid values. Change-Id: Ib7c09cac373060f5437b81c63e9b12411fdc1c68 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157483 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-09-29Use less libxml2 external headers dependencyGabor Kelemen
Change-Id: I1749628e0104dff856161bc0bdfd343ef0db208e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156784 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2023-09-28Improve OleRun error reportingMike Kaganski
1. Pass its error message up the call stack as the exception's message. 2. In case of REGDB_E_CLASSNOTREG, also obtain the object's class name and append it to the message. 3. Show this information in the message displayed for OLE activation error. This introduces a new SetExtendedMessage method in SfxErrorContext to store extra information for specific errors. Change-Id: Id3863276266d992ae407fbfa5568acf5c57aa96f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157372 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-09-13loplugin:unusedmethodsNoel Grandin
Change-Id: I00f228451574ca9f9e352d233c7f326c88e90a95 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156892 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-09-11SvtRulerAccessible does not need to implement XAggreggationNoel Grandin
Checked on jenkins using 'make check' and +void SAL_CALL setDelegator(css::uno::Reference<css::uno::XInterface> const &) final { assert(false); } Change-Id: I49e2c013c82687b71d0b442662ca9de229d0dddb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156795 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-09-11lok: don't prerender font previewsSzymon Kłos
Change-Id: Id83a6804f658d56793913b8e8e07f7ec1f2ff82a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156116 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156812 Tested-by: Jenkins
2023-09-10using decls should come after #includeNoel Grandin
Change-Id: I058551e87bca42adede860f6f299b0f7ae2af3b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156798 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-09-10SvUnoImageMapObject does not need to implement XAggreggationNoel Grandin
Checked on jenkins using 'make check' and +void SAL_CALL setDelegator(css::uno::Reference<css::uno::XInterface> const &) final { assert(false); } Change-Id: I79cf929cc64ea7af7351674e02fb0bc83538c869 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156792 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-09-10GraphicRendererVCL does not need to implement XAggreggationNoel Grandin
Checked on jenkins using 'make check' and +void SAL_CALL setDelegator(css::uno::Reference<css::uno::XInterface> const &) final { assert(false); } Change-Id: Ie2ee4b774167dd5f26ac88b97b0a5013ff379ac3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156793 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-09-10tdf#157160 a11y: Don't assert ValueSetAcc parent on add/removeMichael Weghorn
After commit 2f5e7a07775690e57d639eeca7a1e41733fa93a9 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Thu Sep 7 08:09:31 2023 +0200 tdf#157092 a11y Let only drawing area dispose its ValueSet acc had fixed a crash when using the search feature with the Qt-based VCL plugins, the previous `DBG_ASSERT` that got promoted to a real assert with the above commit got triggered now that a11y CHILD events for removed children are handled since commit be8b031d8b3c66b223ea2478f1129427f3a362bd Author: Michael Weghorn <m.weghorn@posteo.de> Date: Thu Sep 7 09:51:38 2023 +0200 qt a11y: Forward CHILD event for removed child , s. the backtrace in tdf#157160. Since the ValueSet isn't needed for this, and at least removing a listener after the ValueSet has been dropped even seems logical if it's a valid use case to delete the ValueSet before e.g. hiding the window (s.a. comment in above-mentioned 2f5e7a07775690e57d639eeca7a1e41733fa93a9), don't check for it, but only that the object hasn't been disposed yet (as was effectively the case before 2f5e7a07775690e57d639eeca7a1e41733fa93a9, when only a SAL_WARN would have been triggered). Change-Id: I5be0a44decbe4508f4a419ec3dca9f8aaf85e951 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156782 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-09-07tdf#157092 a11y Let only drawing area dispose its ValueSet accMichael Weghorn
Don't dispose the a11y object in the `ValueSet` dtor, because it doesn't own its a11y object, but it is owned by the `weld::DrawingArea` of the `CustomWeld` that the `ValueSet` (as a sub-class of `CustomWidgetController`) belongs to. The `CustomWeld` ctor passes the a11y ref retrieved by `CustomWidgetController::createAccessible` to `weld_drawing_area`, which takes ownership and disposes the object. (For Gtk, see `GtkInstanceDrawingArea::~GtkInstanceDrawingArea`. For non-Gtk, see how the `SalInstanceDrawingArea` ctor passes the reference to `VclInstanceDrawingArea::SetAccessible`/ `vcl::Window::SetAccessible`, so it gets disposed when that `VclInstanceDrawingArea` gets disposed, s. `vcl::Window::dispose`.) Other classes derived from `CustomWidgetController` also don't dispose the a11y object themselves. Still reset the `ValueSet` pointer in `ValueSetAcc` to nullptr when the `ValueSet` gets destroyed and turn the check for a valid pointer from just an `OSL_ASSERT` to a real assert and throwing a `RuntimeException`. But still allow getting the a11y context when only the ValueSet has been deleted but the object has not been disposed yet. Fixes a crash due to a `com::sun::star::lang::DisposedException` being thrown when using the new search feature in the "Tools" -> "Options" dialog (or when just switching to the "LibreOfficeDev Writer/Web" -> "Background" page with the qt6 VCL plugin or on Windows when the NVDA screen reader is running. This happens when the drawing area is hidden and the a11y layer is meant to be notified about this (so the a11y object can be removed). It still seems a bit odd that the `ValueSet` gets destroyed (in `SvxColorTabPage::~SvxColorTabPage`, frame 20 in below backtrace) before the corresponding `vcl::Window` gets hidden (in the base class dtor, `SfxTabPage::~SfxTabPage`, s. frame 19 in the backtrace). Backtrace for how the exception gets thrown: 1 com::sun::star::lang::DisposedException::DisposedException DisposedException.hpp 40 0x7fa385fd9ca9 2 ValueSetAcc::ThrowIfDisposed valueacc.cxx 956 0x7fa385fd9342 3 ValueSetAcc::getAccessibleContext valueacc.cxx 473 0x7fa385fd69fa 4 VCLXAccessibleComponent::ProcessWindowChildEvent vclxaccessiblecomponent.cxx 186 0x7fa3853dc905 5 VCLXAccessibleComponent::WindowChildEventListener vclxaccessiblecomponent.cxx 124 0x7fa3853dc51d 6 VCLXAccessibleComponent::LinkStubWindowChildEventListener vclxaccessiblecomponent.cxx 114 0x7fa3853dc43f 7 Link<VclWindowEvent&, void>::Call link.hxx 111 0x7fa382c56ccf 8 vcl::Window::CallEventListeners event.cxx 296 0x7fa382c53e5b 9 vcl::Window::ImplResetReallyVisible stacking.cxx 719 0x7fa382b51a49 10 vcl::Window::ImplResetReallyVisible stacking.cxx 735 0x7fa382b51b0e 11 vcl::Window::ImplResetReallyVisible stacking.cxx 735 0x7fa382b51b0e 12 vcl::Window::ImplResetReallyVisible stacking.cxx 735 0x7fa382b51b0e 13 vcl::Window::ImplResetReallyVisible stacking.cxx 735 0x7fa382b51b0e 14 vcl::Window::ImplResetReallyVisible stacking.cxx 735 0x7fa382b51b0e 15 vcl::Window::ImplResetReallyVisible stacking.cxx 735 0x7fa382b51b0e 16 vcl::Window::Show window.cxx 2234 0x7fa382d94f7c 17 vcl::Window::Hide window.hxx 880 0x7fa382b23600 18 SalInstanceContainer::move salvtables.cxx 1352 0x7fa3834789f3 19 SfxTabPage::~SfxTabPage tabdlg.cxx 157 0x7fa38928ab47 20 SvxColorTabPage::~SvxColorTabPage tpcolor.cxx 166 0x7fa350950d3e 21 SvxColorTabPage::~SvxColorTabPage tpcolor.cxx 166 0x7fa350950d5a 22 std::default_delete<SfxTabPage>::operator() unique_ptr.h 99 0x7fa350538fdc 23 std::__uniq_ptr_impl<SfxTabPage, std::default_delete<SfxTabPage>>::reset unique_ptr.h 211 0x7fa35080dcbe 24 std::unique_ptr<SfxTabPage, std::default_delete<SfxTabPage>>::reset unique_ptr.h 509 0x7fa350808555 25 SvxAreaTabPage::SetOptimalSize tparea.cxx 155 0x7fa35093db3e 26 SvxBkgTabPage::Create backgrnd.cxx 230 0x7fa350864dbc 27 SwModule::CreateTabPage appopt.cxx 509 0x7fa339e10973 28 OfaTreeOptionsDialog::SelectHdl_Impl treeopt.cxx 1335 0x7fa3507f947a 29 OfaTreeOptionsDialog::ShowPageHdl_Impl treeopt.cxx 625 0x7fa3507f4782 30 OfaTreeOptionsDialog::LinkStubShowPageHdl_Impl treeopt.cxx 623 0x7fa3507f4763 31 Link<weld::TreeView&, void>::Call link.hxx 111 0x7fa3834b18f1 32 weld::TreeView::signal_changed weld.hxx 953 0x7fa3834aa10d 33 SalInstanceTreeView::SelectHdl salvtables.cxx 5276 0x7fa38349363e 34 SalInstanceTreeView::LinkStubSelectHdl salvtables.cxx 5272 0x7fa3834935fb 35 Link<SvTreeListBox *, void>::Call link.hxx 111 0x7fa382b8a339 36 SvTreeListBox::SelectHdl treelistbox.cxx 452 0x7fa38307f5c2 37 SvTreeListBox::Select treelistbox.cxx 2111 0x7fa383085b4a 38 SvImpLBox::SetCursor svimpbox.cxx 614 0x7fa3830a66c3 39 ImpLBSelEng::SetCursorAtPoint svimpbox.cxx 2575 0x7fa3830aeaa8 40 SelectionEngine::SelMouseButtonDown seleng.cxx 172 0x7fa382d09354 41 SvImpLBox::MouseButtonDown svimpbox.cxx 2004 0x7fa3830ac9f8 42 SvTreeListBox::MouseButtonDown treelistbox.cxx 2260 0x7fa383086422 43 ImplHandleMouseEvent winproc.cxx 707 0x7fa382daed00 44 ImplHandleSalMouseButtonDown winproc.cxx 2340 0x7fa382db5c5d 45 ImplWindowFrameProc winproc.cxx 2685 0x7fa382db6f7e 46 SalFrame::CallCallback salframe.hxx 310 0x7fa378ca4edc 47 QtFrame::CallCallback QtFrame.hxx 230 0x7fa378ca6418 48 QtWidget::handleMouseButtonEvent QtWidget.cxx 181 0x7fa378cf959b 49 QtWidget::mousePressEvent QtWidget.cxx 186 0x7fa378cf95f3 50 QWidget::event qwidget.cpp 8978 0x7fa376a2f327 51 QtWidget::event QtWidget.cxx 730 0x7fa378cfb2f6 52 QApplicationPrivate::notify_helper qapplication.cpp 3287 0x7fa3769a666a 53 QApplication::notify qapplication.cpp 2774 0x7fa3769a4539 54 QCoreApplication::notifyInternal2 qcoreapplication.cpp 1125 0x7fa3783a5ed0 55 QCoreApplication::sendSpontaneousEvent qcoreapplication.cpp 1573 0x7fa3783a6a1d 56 QApplicationPrivate::sendMouseEvent qapplication.cpp 2358 0x7fa3769a31a2 57 QWidgetWindow::handleMouseEvent qwidgetwindow.cpp 627 0x7fa376a5f7cb 58 QWidgetWindow::event qwidgetwindow.cpp 241 0x7fa376a5dcfd 59 QApplicationPrivate::notify_helper qapplication.cpp 3287 0x7fa3769a666a 60 QApplication::notify qapplication.cpp 3238 0x7fa3769a647a 61 QCoreApplication::notifyInternal2 qcoreapplication.cpp 1125 0x7fa3783a5ed0 62 QCoreApplication::sendSpontaneousEvent qcoreapplication.cpp 1573 0x7fa3783a6a1d 63 QGuiApplicationPrivate::processMouseEvent qguiapplication.cpp 2315 0x7fa3775f21cd 64 QGuiApplicationPrivate::processWindowSystemEvent qguiapplication.cpp 2061 0x7fa3775f15cf 65 QWindowSystemInterface::sendWindowSystemEvents qwindowsysteminterface.cpp 1109 0x7fa37769ce23 66 xcbSourceDispatch qxcbeventdispatcher.cpp 57 0x7fa376064df7 67 ?? 0x7fa37df2b5b4 68 ?? 0x7fa37df2e607 69 g_main_context_iteration 0x7fa37df2ebfc 70 QEventDispatcherGlib::processEvents qeventdispatcher_glib.cpp 395 0x7fa3787b6b33 71 QXcbGlibEventDispatcher::processEvents qxcbeventdispatcher.cpp 96 0x7fa37606502c 72 QtInstance::ImplYield QtInstance.cxx 421 0x7fa378cc7502 73 QtInstance::DoYield QtInstance.cxx 432 0x7fa378cc762b 74 ImplYield svapp.cxx 372 0x7fa3835220ea 75 Application::Yield svapp.cxx 456 0x7fa383522e88 76 Dialog::Execute dialog.cxx 1078 0x7fa382c063e1 77 SalInstanceDialog::run salvtables.cxx 1877 0x7fa38347c313 78 weld::DialogController::run weld.hxx 2659 0x7fa3504a26e6 79 OfaTreeOptionsDialog::run treeopt.cxx 2587 0x7fa3508035fd 80 CuiAbstractController_Impl::Execute dlgfact.cxx 144 0x7fa35069d829 81 SfxApplication::OfaExec_Impl appserv.cxx 1463 0x7fa388faf85e 82 SfxStubSfxApplicationOfaExec_Impl sfxslots.hxx 1309 0x7fa388f88faf 83 SfxDispatcher::Call_Impl dispatch.cxx 254 0x7fa3890bfb4a 84 SfxDispatcher::Execute_ dispatch.cxx 753 0x7fa3890c31f4 85 SfxBindings::Execute_Impl bindings.cxx 1061 0x7fa3890aefa0 86 SfxDispatchController_Impl::dispatch unoctitm.cxx 688 0x7fa389185ba6 87 SfxOfficeDispatch::dispatch unoctitm.cxx 250 0x7fa389183867 88 framework::MenuBarManager::Select menubarmanager.cxx 827 0x7fa38a7e2dff 89 framework::MenuBarManager::LinkStubSelect menubarmanager.cxx 791 0x7fa38a7e2ab7 90 Link<Menu *, bool>::Call link.hxx 111 0x7fa382cb0337 91 Menu::Select menu.cxx 358 0x7fa382ca1c90 92 Menu::ImplCallSelect menu.cxx 2135 0x7fa382caa907 93 Menu::LinkStubImplCallSelect menu.cxx 2132 0x7fa382caa8d9 94 Link<void *, void>::Call link.hxx 111 0x7fa382db870d 95 ImplHandleUserEvent winproc.cxx 2287 0x7fa382db57ca 96 ImplWindowFrameProc winproc.cxx 2851 0x7fa382db76f7 97 SalFrame::CallCallback salframe.hxx 310 0x7fa378ca4edc 98 QtInstance::ProcessEvent QtInstance.cxx 484 0x7fa378cc799b 99 operator() salusereventlist.cxx 119 0x7fa383465b7b 100 SalUserEventList::DispatchUserEvents salusereventlist.cxx 120 0x7fa383465e4f 101 QtInstance::ImplYield QtInstance.cxx 410 0x7fa378cc7480 102 QtInstance::DoYield QtInstance.cxx 432 0x7fa378cc762b 103 ImplYield svapp.cxx 372 0x7fa3835220ea 104 Application::Yield svapp.cxx 456 0x7fa383522e88 105 Application::Execute svapp.cxx 350 0x7fa383521ddd 106 desktop::Desktop::Main app.cxx 1601 0x7fa38ca36276 107 ImplSVMain svmain.cxx 204 0x7fa383541e84 108 SVMain svmain.cxx 236 0x7fa383541fb9 109 soffice_main sofficemain.cxx 94 0x7fa38caa1b5d 110 sal_main main.c 51 0x5568fd6859d4 111 main main.c 49 0x5568fd6859ba Change-Id: I247648a7a707f02bf1fdd339d3c329694636d835 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156645 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-09-03tdf#156958: fix crash when clicking out after having selected rename layerJulien Nabet
When renaming and clicking on canvas, LO goes into GetParent()->EndEditMode first time then it calls TabBarEdit::dispose method which resets m_xEntry BUT, on the same thread, LO comes here again so return if already disposed to avoid a crash See bt here: https://bugs.documentfoundation.org/attachment.cgi?id=189316 Change-Id: Id227e8aa32ab52643ab17f714c9e3325ced94907 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156482 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2023-08-31jsdialog: render font previews with hidpiSzymon Kłos
we pass dpi scale, let's use it to determine combobox entry size Change-Id: I4088eca565b301c5693e52b1c05af1a335fc34fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156115 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156251 Tested-by: Jenkins