summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/cellsh2.cxx
AgeCommit message (Collapse)AuthorFilesLines
45 hourstdf#160338 Calc freeze on Text Attribute dialogNoel Grandin1-7/+3
This reverts commit 76e9023c8abc823447b1128056e55238f90da8d6 Author: Noel Grandin <noelgrandin@gmail.com> Date: Mon Jan 22 08:36:28 2024 +0200 convert more calc dialogs to async I fixed some lifetime issues, but even once that was happy, the Text Attributes dialog was not receiving mouse events properly, something else is unhappy when we mix async and modal dialogs. Change-Id: I4a35d886895c65af2085b606ff5c7a7c02fb5671 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165305 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-01-29tdf#158426 Limit field columns for data form to 32Hossein1-0/+13
Previously, maximum number of field columns for data form was 256, which was too much. But, even with that value, nothing was happening when exceeding that threshold. With this patch, the limit is decreased to 32, and if the user goes beyond this limit by selecting more columns, an error message is displayed. This change is done to prevent LibreOffice hang when excessive number of filed columns are selected and using data form is requested. Change-Id: Ib6189b5b3beffb26a3fd8ba8cd06e4ae213f77da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162488 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2024-01-24convert more calc dialogs to asyncNoel Grandin1-3/+7
Change-Id: I6349942f0a4d6156ef59f43a6e96049128f47524 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162360 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-26use more TypedWhichIdNoel Grandin1-3/+3
Change-Id: Iaa7ce9165da835a638bcc1d633bed0a2ff2c4108 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152308 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-25use more TypedWhichIdNoel Grandin1-2/+1
Change-Id: I6c54c1276b36cbc71417486ffcee2ef9ef0cff7b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152270 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-17SfxViewFrame* arg of SfxRequest ctor always dereferencedCaolán McNamara1-1/+1
change it to take a reference Change-Id: Ib9349f4c2660d297d93ee81256e7fa9873728ba3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147163 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-02-16SfxViewShell::GetViewFrame never returns null, change to a referenceCaolán McNamara1-56/+53
various null checks can be seen to be redundant and removed Change-Id: Icf49c1de4b0302795d2769a370af3abceaad0221 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147147 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-27sal_uLong->sal_uInt32 in ValidationEntryNoel Grandin1-1/+1
we are already using sal_uInt32 in various places, and passing this through SfxUInt32Item Change-Id: Iea06b59edc56632b823729462516a6b5fb74e28a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138917 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-23tdf#148251 Use std::swap instead of using temporary valuesLiu Hao1-6/+2
Change-Id: Ibbc46bfb17d4d27dc40e63c65190b3f3a5f2d9c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138256 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2022-08-07clang-tidy modernize-pass-by-value in scNoel Grandin1-2/+3
Change-Id: Ia7ff651d1cbc119b36a9f8052594d03650988f59 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137848 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-12fix up order of some ScDocument functionsLuboš Luňák1-3/+3
For better or worse the usual order of arguments in Calc is SCCOL, SCROW, SCTAB, so make this consistent. Change-Id: Ie63c75f5ae92f82cb757c0873f7ff569f331e0df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134229 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-03-15tdf#147761 record sort command in macrosSzymon Kłos1-0/+49
fixes regression introduced in: commit 70b81e74d2a14308e1897d840c681404225d328a author Szymon Kłos <szymon.klos@collabora.com> Tue Jul 21 11:40:22 2020 +0200 SfxRequest's Done method records the action. It has to be called. Change-Id: I32529fa11febca3d3829b4afd2cd4e6dd359bf74 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131484 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2022-03-03improve ScMark* classes a bitLuboš Luňák1-1/+1
Bin pointless empty destructors, make trivial functions inline, return value by simply returning it. Change-Id: Ia71e73262802bbe6b022ca4bafb2b958ffdf39f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130915 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-03-01use SfxItemSet::GetItemIfSet in sc/source/ui/view/Noel Grandin1-58/+54
Change-Id: I6c1c3ee4fbb6b105ad67c051ce1fa2dae258df85 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130746 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-10add more TypedWhichIdNoel Grandin1-6/+6
Change-Id: I6401dcf2507ac53a71dbe4de4ba774aed905961e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129731 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-07use SfxItemSetFixed in scNoel Grandin1-1/+1
Change-Id: I5b1d66adb1b9e5dd0e470403ba7095183334cc66 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123182 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-17rather return ref from getLocaleDataPtrNoel Grandin1-2/+2
since we never return a nullptr, and rename to reflect that Change-Id: I694b5198f663842d1362504d60e7191e450a08ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122224 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-13Resolves: tdf#144135 Rework Sort with area extrasEike Rathke1-6/+6
Since commit 774a61afa9fc281290e7bfad4e28c05978b82d73 CommitDate: Wed Apr 14 08:46:03 2021 +0200 tdf#126678 - Consider "Include formats" option during sort a sheet formatted with visible attributes like cell background colour up to the end if for Sort all columns and/or rows are selected lead to an excessive memory allocation and slow execution time if it didn't get killed by the operating system before due to memory exhaustion. The same could had happened already before if graphics or comments were to be included that could had resulted in a similar large range. However, cell formats across sheets are more likely. This changes the strategy how the to be sorted data range is determined (range only with data) and additional area extras ranges without data that are only to be rearranged. Those are then processed in chunks (limited to ~512MB per chunk). Cell formats that are identical within one column's rows range do not even need to be covered as they are not rearranged, in the best case leading to all trailing formats' ranges being excluded from the sort. Additionally optimize the cell gathering of formats, graphics and comments such that for the area extras they are only collected if actually requested. The overall performance gain is in an order of magnitudes even if some extras are to be collected. Change-Id: If3abbaeaa615aaff7d88a82a5b3fc7ac633d770d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122013 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2021-08-13split SvNumberFormatter into it's own headerNoel Grandin1-0/+1
so I can make changes without running into cyclic dependencies between header files Change-Id: I98a91c7cc66002ba745cdb8239e5cc267922a45c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120412 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-19Move svl::Items to include/svl/whichranges.hxx, and unify its usageMike Kaganski1-1/+1
... in WhichRangesContainer and SfxItemSet ctors. Now it's not needed to explicitly use 'value' in WhichRangesContainer's ctor, or create an instance for use in SfxItemSet ctor (svl::Items is already defined as a template value of corresponding type). Instead of WhichRangesContainer Foo(svl::Items<1, 2>::value); SfxItemSet Bar(rItemPool, svl::Items<1, 2>{}); now use: WhichRangesContainer Foo(svl::Items<1, 2>); SfxItemSet Bar(rItemPool, svl::Items<1, 2>); Change-Id: I4681d952b6442732025e5a26768098878907a238 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119157 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-01-11ScFormatShell::pViewData is never nullCaolán McNamara1-70/+67
Change-Id: I29831bae8656aea014dd278c5ee87eb5f9af8db5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109062 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-27tdf#42949 Fix new IWYU warnings in directory sc/Gabor Kelemen1-2/+0
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I217817e2e4a42b096f5a7fb6344568c10d69aab2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106078 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-11-01use officecfg for Experimental flagNoel Grandin1-3/+2
move IsShowOutlineContentVisibilityButton out of header to avoid having to add extra include paths to all the unit test makefiles. Change-Id: I2763390e07cd85b8f09b6f2ad7702039daecb22f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105100 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-09-25change pointers to references where never possible to be nullptrsCaolán McNamara1-1/+1
and drop some null checks then shown not to be needed Change-Id: I2806eeb64f43072a34aecd46424dbd063a119b7c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103356 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-16ScImportExport always dereferences it ScDocument* argCaolán McNamara1-2/+2
Change-Id: I0543c005fdabcf67ae2bfb0fc28dccf2c2a47a7e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102840 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-15establish that ScViewData::GetDocument can always return ScDocument&Caolán McNamara1-44/+42
we can only be ctored with a ScDocShell& or ScDocument&, and ScDocShell provides a ScDocument& from its GetDocument() so we can always have a ScDocument& when a public ctor has completed some null checks can then be seen to be redundant and are removed Change-Id: Ifaf39cb06e8dbce363999c05ee0aeb3ec4f00428 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102775 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-14ScFormulaListener dtor always dereferences its ScDocument* memberCaolán McNamara1-1/+1
Change-Id: I7eb22d693fc61a8ce46bb14c4fc421e7d0454684 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102654 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-07-28Make Sort dialog asyncSzymon Kłos1-50/+15
Change-Id: I914e09e59561e261dc2807ad00615d3b58afa541 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99127 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99351 Tested-by: Jenkins
2020-06-27cid#1401342 Uncaught exceptionCaolán McNamara1-1/+2
Change-Id: Ia22ed8541f1148355d71cd5b90ad13e64c1b50c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97289 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-02-22ScGlobal - change direct access to a static ptr for a getterTomaž Vajngerl1-2/+2
pLocalData and pCharClass static veriables on ScGlobal are always set from SvtSysLocale on init, probably for "faster" access. This can just be made simpler with access through a getter, so this introduces a getter for ScGlobal::getCharClassPtr and ScGlobal::getLocaleDataPtr, where the access is made directly to SvtSysLocale instance. In addition all the usages needed to be fixed, which is all over the calc module. Change-Id: Ie047b158094e25bbaa2aba15074d7998d9541787 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89249 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-01-10use more std::make_sharedNoel Grandin1-2/+2
found using 'git grep', I tried using clang-tidy, but it only successfully found a tiny fraction of these Change-Id: I61c7d85105ff7a911722750e759d6641d578da33 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86526 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-14cid#1455325 establish that pDoc cannot be null thereCaolán McNamara1-2/+2
Change-Id: Ia7bca1e74a8ede90e29ec6cbd63c7fdcaf25b072 Reviewed-on: https://gerrit.libreoffice.org/82696 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-22sc: rowcol: tdf#50916 convert cellshNoel Grandin1-2/+2
Change-Id: If0a44e8bfd3195f2631c2fbcb7c5aa036aae7a40 Reviewed-on: https://gerrit.libreoffice.org/81331 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-19weld ScDataProviderDlgCaolán McNamara1-3/+3
drop changing the button colors, every other button is content not to change its color. fix up some crashes while I'm here. Change-Id: Icec54106441810a5152e7dab3ac7d5a55551ab07 Reviewed-on: https://gerrit.libreoffice.org/80994 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-17weld ScImportAsciiDlgCaolán McNamara1-1/+1
notably the csv control is always LTR even in RTL mode, but the surrounding ScrollingWindow follows the environment direction, except the horizontal scrolling widget itself must LTR scroll. Change-Id: I72ee2b9dade73a11bcc4391e755fdb02886a884d Reviewed-on: https://gerrit.libreoffice.org/80765 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-05Let's bring XML Source out of the list of experimental features.Kohei Yoshida1-6/+1
Change-Id: I872a047fe3791253aa52b19d544fb5f26ff22f9d Reviewed-on: https://gerrit.libreoffice.org/80296 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-by: Kohei Yoshida <kohei@libreoffice.org>
2019-10-05Convert various FID_VALID_* to SfxUInt16ItemNoel Grandin1-6/+6
Change-Id: Ic21ec69513ee520cedc026b8c2d657464beed19b Reviewed-on: https://gerrit.libreoffice.org/80250 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-26loplugin:constmethod in scNoel Grandin1-1/+1
Change-Id: I78c4fb4acf21756f91582caee5e30e3ad1fc2ae4 Reviewed-on: https://gerrit.libreoffice.org/79543 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-12tdf#42949 Fix IWYU warnings in sc/source/ui/{view,xmlsource}/*cxxGabor Kelemen1-6/+2
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ie47dff381392ef57cb857184c179bf82d3b55862 Reviewed-on: https://gerrit.libreoffice.org/77258 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-06-21reference childwins are all weldedCaolán McNamara1-1/+1
Change-Id: I050b4bdff4eaa645316538725c69e83bee4a90c5 Reviewed-on: https://gerrit.libreoffice.org/74526 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-05-12weld ScDataFormDlgCaolán McNamara1-1/+1
Change-Id: I656a11f5f9c55913cede710cf48543384132129d Reviewed-on: https://gerrit.libreoffice.org/72199 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-04-17weld ScTPValidationValue and ScValidationDlgCaolán McNamara1-3/+26
Change-Id: I74b1569fe378f42c1cc78ca8d9b758c6e585c979 Reviewed-on: https://gerrit.libreoffice.org/70845 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-12-25Simplify containers iterations in sc/source/ui/{view,xmlsource}Arkadiy Illarionov1-3/+2
Use range-based loop or replace with STL functions Change-Id: I5604325cd25c099d3b5580956417620f298faa1e Reviewed-on: https://gerrit.libreoffice.org/65572 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-28tdf#120703 PVS: V547 Expression is always true/falseMike Kaganski1-12/+4
Change-Id: Ic92cc594979cac2edac04a085957398672a5dfcc Reviewed-on: https://gerrit.libreoffice.org/62450 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-08-07tdf#42949 Fix remaining IWYU warnings in sc/incGabor Kelemen1-0/+1
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. With this patch, find-unneeded-includes gives no more problems Change-Id: I24e62be7a387d7fd97a36f54eed0ba9d83ddaf0c Reviewed-on: https://gerrit.libreoffice.org/58667 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-07-06add a selection for the DB range to Dataprovider dlgMarkus Mohrhard1-2/+2
Change-Id: I02c63b46e21cd8d04e6b515e2cbbee08743d5657 Reviewed-on: https://gerrit.libreoffice.org/49459 Tested-by: Jenkins Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2018-07-03store the data provider settings in the documentMarkus Mohrhard1-1/+2
Change-Id: I049187432437a4bf2539fae54d44ad1266c54149 Reviewed-on: https://gerrit.libreoffice.org/56787 Tested-by: Jenkins Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2018-06-20tdf#42949 Fix IWYU warnings in sc/inc/[ux]*Gabor Kelemen1-0/+1
Found with bin/find-unneeded-includes Only removal proposals are dealt with here and a bit of fallout management Change-Id: I53d2c5dc9e16a64a143b16316d2aeab05023d866 Reviewed-on: https://gerrit.libreoffice.org/56076 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-06-12simplify calls to *DialogFactory::Create methodsNoel Grandin1-5/+0
we don't need to check for nullptr here, it's never null. Change-Id: I3cc5337a8f4dec6747821679e39ccba3cec20f56 Reviewed-on: https://gerrit.libreoffice.org/55114 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-09remove cargo cult OSL_ENSURE(pFact, "ScAbstractFactory create fail!"(Noel Grandin1-6/+0
Possibly this was useful once upon a time, but now it's just noise. If it failed, we're going to crash on the next line when we call a method on that pointer anyway. Change-Id: Ic601f0c3344f6895f8a6ffb3bc6f8bcb45d00a92 Reviewed-on: https://gerrit.libreoffice.org/55082 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>