summaryrefslogtreecommitdiff
path: root/sc/inc
AgeCommit message (Collapse)Author
2022-01-27tdf#145054 Copy named DBs too when copying sheetSamuel Mehrbrodt
Change-Id: I5bf75a7188532776e70c7af64e88371638d76335 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126916 Tested-by: Jenkins Reviewed-by: Kohei Yoshida <kohei@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2022-01-26move ToolBoxItemId into its own headerCaolán McNamara
Change-Id: I34838bee7ad27bfd60d92c26af7eb2de508686b9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128974 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-01-26split two paragraph warning into primary and secondary messagesCaolán McNamara
Change-Id: Ie3bd9205a549ac55a0e5c7b9a444928b0fd80174 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128935 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-01-20sc: ubsan - initialize D&D pointers properly.Michael Meeks
Change-Id: I95c6a9b55ed25cc6d51f9f4544cb9fc016bbec64 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128672 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2022-01-15tdf#146367 reintroduce approxAdd() similar handling with last summandEike Rathke
... to tie result to 0 eliminating opposite sign small equalish fractions. This does not "fix" all interim values of the bug's sample document, which repeatedly adds single values in sequence using SUM() and should use the + operator instead to benefit from approxAdd() for each, but maintains the better accuracy of Kahan summation in the not near equal zero cases. And the dreaded SUM(0.1;0.2;-0.3) also works again resulting in 0 with all permutations. Change-Id: I67188a6abbdb98212f070166ad02319c3d477e28 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128451 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2022-01-10sc: fix typoTomaž Vajngerl
Change-Id: If9a8f7265c17dafa99b51fe6266d935afedfa394 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128207 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-01-10sc: make icon size of cond. formatting same as font sizeTomaž Vajngerl
This makes the behavior of the Calc te same as other spreadsheet programs, where the icon size of the conditional formatting is the same as the font size and not the actual cell height (as it is the behaviour now). Change-Id: I00c96ad83458cd31f67c0b6f566e3d01dd8cd47b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128185 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-01-07remove E3D_INVENTOR_FLAG and convert SdrObjKind to scoped enumNoel Grandin
We don't need E3D_INVENTOR_FLAG, we can just check if the SdrObjKind is in the right range. Which exposes some dodgy code in DrawViewShell::GetMenuStateSel SfxItemState::DEFAULT == rSet.GetItemState( OBJ_TITLETEXT ) || SfxItemState::DEFAULT == rSet.GetItemState( OBJ_OUTLINETEXT ) || which has been there ever since commit f47a9d9db3d06927380bb79b04bb6d4721a92d2b Date: Mon Sep 18 16:07:07 2000 +0000 initial import just remove that. In SwFEShell::ImpEndCreate() move some logic around to avoid using an out-of-range SdrObjKind value Change-Id: I4620bfe61aca8f7415503debe3c84bfe5f4368a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127763 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-05sc: fix crash with document properties dialogTomaž Vajngerl
"ImagePreferredDPI" property was added for impress and writer, but it was not handled in calc, so it document properties dialog crashed (exception because of a non existent property). Change-Id: I9eb3f6aa7cf6d8ab48930b3071b993e073117688 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127942 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-01-04osl::Mutex->std::mutex in ScDocumentNoel Grandin
Change-Id: I163b7e6b7403f9f489b4965861241280cfc37e02 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127917 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-03tdf#129115 Calc functions OPT_* have no Help id'sOlivier Hallot
Change-Id: If275d804fc81b535c422a29ba594eb88ce5e70c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127896 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2021-12-27use comphelper::WeakComponentImplHelper in ScEditFieldObjNoel Grandin
Change-Id: I7e839be0685958b12760ef499bc6c71b5003fcd3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127528 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-27use comphelper::WeakComponentImplHelper in TablePivotChartNoel Grandin
and remove some unnecessary use of SolarMutex Change-Id: I3934d89eb75f47a6b7051a8b737dcdbeecfa0c3a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127529 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-26sc-error-codes: STR_LONG_ERR_NO_VALUE should be "Error: No value"Kevin Suo
rather than Error: Wrong data type. STR_LONG_ERR_NO_VALUE was marked as "Error: Wrong data type" in the source code. It was translated in the en_US UI as "Error: No result", which seems to be intentionally. This causes confusion for other languages. This error code is used for case FormulaError::NoValue and this FormulaError enum entry is used in various places, most of them indicates that it is used because of no value is returned. "Wrong data type" should be a reason why there was "no value" returned, thus "Wrong data type" should be a subset of "No value", but anyway STR_LONG_ERR_NO_VALUE != "Wrong data type". Change-Id: Ie0e355ba02e9800fca2263744ed74ada700bfbeb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127512 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2021-12-22tdf#145057 Fix saving color filter when multiple data ranges in sheetSamuel Mehrbrodt
When mutliple data ranges existed in one sheet, only the first one was considered when exporting color filters. Consider all of them, as any could hold a color filter. Change-Id: I13ae2018057eef7ef24fc8298c814a93df24f74b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127328 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2021-12-19use more cppu::BaseMutexNoel Grandin
Change-Id: Ida8eb69bb90a2ce53a9a783595b1dc0b0c9f334c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127076 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-17tdf#146019 Remove confirmation dialog about applying images EXIF rotationGabor Kelemen
Change-Id: I53553f91eeb5bd56bbad19b80421177a84625d96 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126616 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2021-12-14make sure text operations are not queried by (numeric) valueLuboš Luňák
E.g. SC_CONTAINS is, according to isPartialTextMatchOp(), a text-only operation, so query it as such and not as a numeric value. This fixes/allows e.g. substring queries on dates. Change-Id: I6c612d9934193828b7a7eabed92f2bfeb385e5a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126767 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2021-12-13tdf#92010 sc autoFormula: prefer MRU formulasJustin Luth
Prior to 4.3, only MRU formulas were auto-completed. Then it changed to suggest all formulas - alphabetically for the most part. That 4.3 commit 5b0b7553241bb5150b12bbf7625b4b0b36970272 completely removed all reference to MRU. But it makes sense to prefer an MRU over a strictly alphabetical match. This patch depends on LO 7.4 patch "new ScTypedStrData: typically missed argument in CTOR" Change-Id: Id5d860d1401693f43833719977d1c1e4c386385c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126499 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com> Reviewed-by: Eike Rathke <erack@redhat.com>
2021-12-10Related: tdf#146018 move Top10 below empty/not-empty add add Bottom10Caolán McNamara
Change-Id: I3333c44b84dea8f8b1e61872606b50e9a384d8c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126621 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-12-10tdf#146018 group filtering options under a single dropdownCaolán McNamara
Change-Id: I91afb746485654ed8e1418d17d4b172332b3f1f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126532 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-12-08tdf#146018 merge autofilter color dropdowns into a single dropdownCaolán McNamara
Change-Id: Ie900ed2ebade82198928b3dc2e90ab7aa7f0edd0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126475 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-12-06process broadcasts for adjacent cells together (tdf#119083)Luboš Luňák
The problem in tdf#119083 is that it sets up listening for the range of cells used by VLOOKUP, and when adding a new column changes all those cells, it results in repeated SfxHintId::ScDataChanged broadcasts to the cells with the VLOOKUP formula. This commit makes ScHint include a row count, making it possible to group adjacent rows for SfxHintId::ScDataChanged together and send notifications just once for the range. Change-Id: Ib3439de58a2b1e5e8f01b037a62608e38b8e9125 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126395 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-12-06tdf#145671 Don't open URL twice in cell edit modeSamuel Mehrbrodt
Change-Id: I8a324d6a037c8a5c0efc0b2825657513c2f9841c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126159 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2021-12-06Add image preffered DPI document setting, use it in Writer, ImpressTomaž Vajngerl
This adds a "image preferred DPI" document setting, which is used as a suggestion of the DPI that an image should have in the document. This is currently used when the image is inserted into the document (Writer, Impress/Draw) to resize it to the preferred DPI value. Change-Id: I3ee9d409257e3c6aa2ead05144ecbba7b3b916f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126334 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-12-06make it clearer that ScHint is modifiedLuboš Luňák
It's somewhat confusing that an accessor is provided to give a reference to internal data and then the object is modified indirectly using the reference. It appears to be only for performance reasons, so I thought that inlining the ctor and ctor could help the compiler to optimize this, but apparently it can't move this outside of the loop, so at least make it clearer. Change-Id: I72cf15d1446daa559ac4079b9478e53694d7d198 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126394 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-12-06slightly simpler Intersects() checkLuboš Luňák
For two ranges to intersect, both start points must not be larger than the end points. Change-Id: I69d1c548ff1bac90baea0767e92ca86458808c9f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126393 Tested-by: Luboš Luňák <l.lunak@collabora.com> Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-12-06rename In() to Contains()Luboš Luňák
Similarly to b22d4785310eac35696d, 'A.In(B)' makes it unclear whether the check is for A in B or B in A, as it's actually the latter. Change-Id: Iaccc41d40f4bb105a44c1bb8d9211c06d1a3c127 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126392 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-12-05fix caching of ScQueryItem values for multiple entries (tdf#146037)Luboš Luňák
The code assumed that there would be only one ScQueryEntry. Change-Id: Idf4cc6bdbbf1edad7d13eb9a9643bb67e199dd01 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126368 Tested-by: Luboš Luňák <l.lunak@collabora.com> Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-12-05move entire ScTable::ValidQuery() into (Sc)QueryEvaluatorLuboš Luňák
This reduces the number of arguments passed around, removed the need for ValidQueryCache (as the data can be now cached in the class itself), it'll allow even more optimizations, and it also makes the by now rather large (almost 1000 lines) helper class a proper class instead of tons of inline code. Change-Id: I585cf580b3e7b2d4512aa535176e97c0abfd547a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126367 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-12-04use more OUStringLiteral in scNoel Grandin
Change-Id: I6d9547bd15fa255253e1309fc3f83b4f0ed6491e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126349 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-04loplugin:stringliteraldefine in scNoel Grandin
Change-Id: I49159fa9b525ced9423c9a37d8a31b15cc8b1e98 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126308 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-03Related: ofz#41376 reuse ScExternalRefManager ScDocument in ScExternalRefCacheCaolán McNamara
Change-Id: Iaed5b7929411dc938fe19df02905a9c9faa52051 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126256 Tested-by: Jenkins Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-12-01improve the script for reducing symbol exportsNoel Grandin
And apply some of the results Change-Id: If555476fdd951cbc1d01fb3ef3ab1cbca2b64960 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124896 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-29store ScQueryEntry simply by valueLuboš Luňák
There's not much point in complicating this by allocating them dynamically if they're always treated by value anyway. Change-Id: I8325829201c0ad6c95858916a94c5b4d1d208b1c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126024 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-11-29tdf#132145: Synchronize ScAppCfg with configurationMike Kaganski
Change-Id: Iadf5ff86d043f63355fd30816a9e2011479465c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125990 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-11-28Refactor ScInputCfg a littleMike Kaganski
Make ScInputOptions a private ancestor. This allows to drop OptionsChanged, and avoid potential way to change settings without committing to configuration. Drop ScInputOptions::SetDefaults, and use ctor for that. Change-Id: I8abb7309a72e84ac7c83592f3758f0264cd1cc4e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125905 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-11-28tdf#132145: Synchronize ScPrintCfg with configurationMike Kaganski
Change-Id: I903e8277fea5c223081244ae30dff31bbda7d554 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125904 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-11-27use more OInterfaceContainerHelper3 in scNoel Grandin
Change-Id: I27df936f95ac7727b58ad196201df6d56bceeca9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125943 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-27tdf#132145: Synchronize ScInputCfg with configurationMike Kaganski
Change-Id: I45cc9b6c8cbd9205e185bebff97644f53f5cf0af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125896 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-11-26tdf#133996 speed up opening of ODS with autofilter + conditional formattingNoel Grandin
inline some hot methods, and use OUStringLiteral to avoid repeated construction of an OUString, saves about 3% Change-Id: I6d09ade4e08a94ed5dd49a8882e26bb5786409d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125873 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-25sort, cache and binary search query items if they're many (tdf#136838)Luboš Luňák
This makes autofilter even with tdf#136838 almost instanteous. Change-Id: I94b4b6d6ab6f8e73312d88c8b88c0f393707f117 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125795 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-11-24Rename o3tl::underlyingEnumValue to o3tl::to_underlying to match C++23Mike Kaganski
Change-Id: I1597a8e77199445bf377dbe54adc3134bb04fd51 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125748 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-11-22cache error strings for ScTable::validQuery() (tdf#133835)Luboš Luňák
Avoid calling SharedStringPool::intern() on values that are repeatedly the same. Change-Id: I094f2e777a4ca24536e0c25e6a1c6358ccf49f61 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125660 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-11-22Revert "cache FormulaError::NoRef error string (tdf#144249)"Luboš Luňák
A more generic fix coming. This reverts commit b4c1bb2f91e9ae47820c289e2c08f640a958cf05. Change-Id: Ia7821f1c8585506556708f1bf8526e7f509aafd1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125659 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-11-17sc: Drop 'typedef std::vector<ScMarkArray> MapType'Michael Weghorn
Its only use is in the next line, and it's not even a map anymore, but a vector. Change-Id: Ib7920c420f5e3e18658f3530244097a4b1633951 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125411 Tested-by: Michael Weghorn <m.weghorn@posteo.de> Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2021-11-17SCSTR_FILTER_TEXT_COLOR is used in two different contextsCaolán McNamara
in the autofilter popup and the standard filter combobox. In the autofilter we want title case to match the other entries there, for the standard filter we need the same text as appears in the combobox list Change-Id: I693d3fa8a9fa1bac0803971be593f107d5817e74 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125371 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-11-17use title case for "No Fill" like "Not Empty"Caolán McNamara
Change-Id: If044b8de9a5400b6db61537519afcf5f18dd1cb2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125321 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-11-12Use more o3tl::convert in scMike Kaganski
Change-Id: I624b6c570eff8b6cdc83ffcb2d0dbadf848715b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120330 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-11-11Drop ScGlobal::GetEmptyOUString() and EMPTY_OUSTRINGMike Kaganski
OUString default ctor already uses a static instance (through rtl_uString_new), no need to have another module-specific static. Commit d8037ae18a297229d1b79f8f76331abfd548350d had removed its sw counterpart some time ago. Change-Id: I140fe13bc1f6b0cbe188e83e602fdebe995e467a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125061 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>