summaryrefslogtreecommitdiff
path: root/sc/inc/dbdata.hxx
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>
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-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>
2021-10-11loplugin:moveparam in scNoel Grandin
Change-Id: I4b9d45a6b0231841a5fe00d0193a8530b9e05559 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123389 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-07Blind fix crash in ScDBData::UpdateReference(), tdf#126926 follow-upEike Rathke
Crash reports at https://crashreport.libreoffice.org/stats/signature/ScDBData::UpdateReference(ScDocument%20const%20*,UpdateRefMode,short,long,short,short,long,short,short,long,short) No reproducer yet, for a possible reproducer see https://bugs.documentfoundation.org/show_bug.cgi?id=126926#c12 but creating such a scenario with 8 AutoFilters / sheets wasn't sufficient. However, ScDBCollection::NamedDBs (maNamedDBs) uses a std::set so after erase(iterator++) iterator is still valid, but ScDBCollection::AnonDBs maAnonDBs uses a std::vector for which after erase(iterator++) iterator may be invalid if vector was shrunk and reallocated. So use the iterator returning erase() instead to have a valid following iterator, and for consistency do that for both. A reproducer may need a bunch of sheets / anonymous AutoFilter for a vector to shrink and be reallocated, and it may depend on the plattform/compiler's implementation. Change-Id: Ib57294d8af9f486b734f4294d8d310ce0fa20551 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123224 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2021-07-30tdf#126926 sc DBData: delete the database rangeTünde Tóth
if some part of the reference became invalid. Change-Id: I4b10af46e92a0a1ba9b6eb5e49df1d3f9a4be6a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119354 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2021-04-29tdf#48025 sc: fix broken filter criteria when deleting columnsTünde Tóth
The autofilter criteria weren't remain with the filtered column when we deleted a column left of the filtered column or the filtered column itself. Change-Id: I0eb103ea5569d82eac4d81bce1b31b0c3bbcbf41 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114483 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-03-23tdf#124176 Use pragma once in s*Vincent LE GARREC
sc, scaddins, sccomp, scripting Change-Id: Ia99fec9e238033821cb784810edd4762c09bd5db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112049 Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2020-09-23some places where ScDocument* is never passed a nullptrCaolán McNamara
and so some nullptr checks can be removed Change-Id: I7dedc2c6d054d9749db9766eaa3a5681842b2b69 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103239 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-08tdf#95640 XLSX: import/export of custom sort listsSerge Krot
Change-Id: If5ffef39770bf7abd6e75e8de998d4a2b4749a0d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97399 Tested-by: Jenkins Tested-by: Serge Krot <Serge.Krot@cib.de> Reviewed-by: Serge Krot <Serge.Krot@cib.de> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2019-12-05make some classes module privateNoel Grandin
Mark some stuff SAL_DLLPUBLIC_RTTI in include/vcl/metaact.hxx in order to make ASAN happy. Change-Id: I97febe0968bf58b9cbe60ce647f0ada25e6f4bb0 Reviewed-on: https://gerrit.libreoffice.org/84202 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-01loplugin:finalclasses in sc/incNoel Grandin
Change-Id: I6a08a86262deae4bed3a05f77d3041a568f23595 Reviewed-on: https://gerrit.libreoffice.org/81853 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-03The -fvisibility-ms-compat hack is no longer needed for UBSan on Linux...Stephan Bergmann
...with latest Clang trunk towards Clang 9. All the no-longer necessary hacks are made conditional on new NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY, which is still set for UBSan builds with older Clang on Linux (but which should eventually be purged). Various classes needed additional SAL_DLLPUBLIC_RTTI annotations, as building with UBSan instrumentation can generate references to RTTI symbols from additional places like outside a dynamic library that used to hide those symbols by default (but used to not hide them for old UBSan builds thanks to the -fvisibility-ms-compat hack). The odr-violation suppressions in solenv/sanitizers/asan-suppressions (which is not referenced from anywhere in the code base, but meant to be included in an ASan/UBSan build's ASAN_OPTIONS env var) are also no longer needed when NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY is false. Change-Id: I24ec3e388b0cbab50dbe2bf008d9569bff7bf25a Reviewed-on: https://gerrit.libreoffice.org/70829 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-10-08use more std::unique_ptr in ScDBCollection::NamedDBsNoel Grandin
Change-Id: I5825208435fd179e9515e731a24a6e5bf1c94431 Reviewed-on: https://gerrit.libreoffice.org/61436 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-20Resolves: tdf#119954 do not copy the old parent, init with new parent insteadEike Rathke
The parent is always the ScDBCollection that contains the ScDBCollection::NamedDBs container, not the one the ScDBCollection::NamedDBs was copy-constructed from. Change-Id: Ia409347f3aeb9ad7a5e68da7af727adfac98d6a2 Reviewed-on: https://gerrit.libreoffice.org/60833 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2018-05-10tdf#42949 Fix IWYU warnings in sc/inc/d*Gabor Kelemen
Found with bin/find-unneeded-includes Mostly removal proposals are dealt with here and a few trivial substitutions in small headers Change-Id: Ic4b2e48f1e55fc5d10e3dab16cfee1e358a8e917 Reviewed-on: https://gerrit.libreoffice.org/54005 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-03-27ofz#7121 NamedDBs::insert takes ownership of its argumentCaolán McNamara
at one point this was based on std::auto_ptr and didn't free its arg on failure Change-Id: I8aeed6876d80b7ebe4ebb5e2cfd12e00420bd207 Reviewed-on: https://gerrit.libreoffice.org/51932 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-02-15Resolves: tdf#115046 don't restore a sheet-local DBData from temporaryEike Rathke
And don't clear AutoFilter button flags in the new temporary range. Change-Id: I273de1e04632ac99c267523b2843665d257fd361
2017-12-08Adapt description to realityEike Rathke
Change-Id: I24133fb6c52bd7500037364120cb11d1b1f099c2
2017-08-24loplugin:constparam in sc part3Noel Grandin
Change-Id: I8abc44b9f0bcd5e39fd8a94abafaf80aadcd26ca Reviewed-on: https://gerrit.libreoffice.org/41496 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-07C++11 remove std::binary_function bases from functorsJochen Nitschke
std::binary_function is deprecated since C++11 and removed in C++17 90% done with regexp magic. removed obsolete <functional> includes. The std::binary_function base class was used by deprecated std::bind2nd, this was solved in individual commits. The members first_argument_type and second_argument_type were used in chart2/source/controller/dialogs/DataBrowserModel.cxx: DataBrowserModel::implColumnLess and are inlined in this commit. Change-Id: I60ded60a8d4afd59e15ac15a58e18d2498c9be5a Reviewed-on: https://gerrit.libreoffice.org/39659 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-23drop the SCsROW/SCsCOL/SCsTAB typedefsNoel Grandin
which are exactly the same as the regular SCROW/etc typedefs, and have been this way since commit 43a21999a92c99867bc3417291719996776b0647 Author: Oliver Bolte <obo@openoffice.org> Date: Fri Jun 4 09:00:39 2004 +0000 INTEGRATION: CWS rowlimit (1.1.2); FILE ADDED Change-Id: Ia7f75d71227ca3167b5fd56019bb9bdf0697d1b0 Reviewed-on: https://gerrit.libreoffice.org/37911 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-05-18Revert "Fix typos"Stephan Bergmann
This reverts commit 26a67002fcb9381b54de6cae1aaa37120d49066a. "Iff" is not a typo, see 2a65bf32ec270484dcea4d22d3c93552dc0c24dd "Revert 'Typo: iff->if'".
2017-05-18Fix typosAndrea Gelmini
Only replaced "iff" with "if" Change-Id: Ib9dfa5c12b05500043147fe3b65f923b1b12a581 Reviewed-on: https://gerrit.libreoffice.org/37782 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-02-16remove unused HEADER from ScDBDataPortion enumNoel Grandin
Change-Id: I744a945f9aab152c8cddac2bd88567610540471c
2016-09-13loplugin:override: No more need for the "MSVC dtor override" workaroundStephan Bergmann
The issue of 362d4f0cd4e50111edfae9d30c90602c37ed65a2 "Explicitly mark overriding destructors as 'virtual'" appears to no longer be a problem with MSVC 2013. (The little change in the rewriting code of compilerplugins/clang/override.cxx was necessary to prevent an endless loop when adding "override" to OOO_DLLPUBLIC_CHARTTOOLS virtual ~CloseableLifeTimeManager(); in chart2/source/inc/LifeTime.hxx, getting stuck in the leading OOO_DLLPUBLIC_CHARTTOOLS macro. Can't remember what that isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.) Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
2016-04-12clang-tidy performance-unnecessary-value-param in scNoel Grandin
Change-Id: Ia2255e1e3f7a8834a4b5d2a6bbab2c6dd498d356
2016-02-03tdf#34873 : Better way to show autofilter countDennis Francis
This patch modifies the commit 3536fe8f4cdbacf5702e743407f34d918b6f4d38 by keeping the filtered row count inside ScDBData instead of ScTable as suggested by Eike Rathke. This significantly reduced the code complexity involved. Change-Id: I30ac26061d9665ce7a749e23a636f7fb3f69b176 Reviewed-on: https://gerrit.libreoffice.org/21720 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2015-10-12Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-09-18boost->stdCaolán McNamara
Change-Id: I7f3bb094f116103c1146a7d60e3af94c0b37d9ea Reviewed-on: https://gerrit.libreoffice.org/18677 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-09-17revert for mac and win unit case crashes after boost->stdCaolán McNamara
Change-Id: I82c7084f203a834c2d42f9527705288e6036019b
2015-09-17boost->stdCaolán McNamara
Change-Id: I1e6a7fd66f90e6acd803c6cd464f1d73252f7bcb
2015-09-08factor out duplicated code into NamedDBs::initInserted()Eike Rathke
Change-Id: Idc95d4b8acae9dcd4ed0092c43986e6687f06c11
2015-09-07TableRef: move swap to empty names to InvalidateTableColumnNames()Eike Rathke
Change-Id: I495377786bd0add1521d37490c8c57d4d30f541e
2015-09-07TableRef: introduce InvalidateTableColumnNames()Eike Rathke
Change-Id: I3dcefc3ba55c33f9cfef6ff4bf9aa2242a866c14
2015-09-06loplugin:returnbyref (Fix TB Linux F19-x86-64)Julien Nabet
Change-Id: Ibf00b617a10e2bbe1c1e722c235bb2b75dee79a6 Reviewed-on: https://gerrit.libreoffice.org/18354 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2015-09-04use GetHeaderArea() for simplificationEike Rathke
Change-Id: Ib06b35a117db3c02826cb18754f7ca11875c91c8
2015-09-04TableRef: update table column names when cell content changedEike Rathke
Change-Id: Id699358c7dae635b13ed4b981326a6490255a4d4
2015-09-03remove unused ScDBCollection::RefreshTableColumnNames(const ScRange&)Eike Rathke
Change-Id: Ia97d6913351a012d62f9d991dd42c54d8247a824
2015-09-03TableRef: add RefreshTableColumnNames() from rangeEike Rathke
Change-Id: I32a47e306469aec5fe366a6621129e14b0d49c13
2015-09-02TableRef: introduce ScDBDataPortion enumEike Rathke
... to replace * bool bStartonly=false with ScDBDataPortion::AREA * bool bStartonly=true with ScDBDataPortion::TOP_LEFT and provide means to look at header row only with ScDBDataPortion::HEADER as needed for TableRef. Change-Id: I9f6affd04c15a6204193687b2379160eb975f56e
2015-09-01TableRef: fall back to stored table column name if header cell is emptyEike Rathke
... during token string creation, as an empty column specifier is the last thing we want to see.. which still can happen though if the stored name was synced with the existing cell data and copying the older original name was not possible, for example due to name clashes. Change-Id: I6a0d313a02efafc092f0bbf7725fb3b3e77e486f
2015-08-31TableRef: refresh table column names before savingEike Rathke
... to match reality and be able to re-load structured references in range names once we save TableRefs as well. Change-Id: I5f8fc858be2a773d7841816c3e4bf21590d37e64
2015-08-31TableRef: write OOXML tableColumns,tableColumnEike Rathke
Change-Id: I535f2dc600f3b4fdac2c7fa817eb8430848bbae6
2015-08-19sc: replace boost::ptr_vector with std::vector<std::unique_ptr>Michael Stahl
Change-Id: I2a56ebf8edb30b5f16e09237f9480484a699170e Reviewed-on: https://gerrit.libreoffice.org/17861 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2015-08-19sc: replace boost::ptr_set with std::set<std::unique_ptr>Michael Stahl
Change-Id: I93bdb33a442a358b0067d57499b11d73bfbaa2d9 Reviewed-on: https://gerrit.libreoffice.org/17860 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2015-07-22loplugin:unusedmethods scripting,scNoel Grandin
Change-Id: I0016aefce1aad3a89bd23dcec6fbab58a7c844d7 Reviewed-on: https://gerrit.libreoffice.org/17263 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-16Resolves: tdf#88402 remember sort "has headers" at anonymous database rangesEike Rathke
Change-Id: I4a126f40589fd401f3a63f74be5e86e3df947ef6
2015-06-25TableRef: add ScDBData::GetColumnNameOffset()Eike Rathke
Change-Id: Id80b9e8d1f54a8b795d0f4209bdf2f980f9a5344
2015-06-25TableRef: invalidate table column names on most sheet operationsEike Rathke
Kept only on insertions and deletions, but even that may not be useful as the names aren't updated at any time so even a mere cell change will bring this out of sync. But serves as a starting point for further implementation. Change-Id: Idfede4b03b9f554cd35f984502fce625c725853c