summaryrefslogtreecommitdiff
path: root/sc/inc/address.hxx
AgeCommit message (Collapse)Author
2020-09-23ScRefAddress::GetRefString never passed a null ScDocument*Caolán McNamara
so the nullptr check can be removed and some more along that vein Change-Id: Ic0c1f98564b6bd457edd0d3ba2a4382b7945e806 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103217 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-23some places where ScDocument* is never passed a nullptrCaolán McNamara
allow some never-hit null checks to be dropped Change-Id: I27a3979af19b556bc9a8e4f893bf0e65cdc439a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103215 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-18cid#1466690 ScDocument* arg is never nullCaolán McNamara
So the various fallback null checks are shown to be redundant and can be removed. Change-Id: I93b3c3a9b124b7de48acebcb348a1261c1b0037c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102978 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-18ScAddress::Parse never passed a null ScDocument*Caolán McNamara
Change-Id: I8832f2cc4311b30b9a15883e831260a19d089a57 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102974 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-17ScRange::Parse never passed a null ScDocument*Caolán McNamara
Change-Id: I2c504f051f77c89f7e2e6d54990d030351824121 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102956 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-17provide a ScDocument arg for ScRange::ParseCaolán McNamara
been like this since the initial import. It seems reasonable to pass the available ScDocument to ScRange::Parse to bring this use of ScRange into line with all the other cases. Change-Id: I1c9c4813b3bd2b09acc123e8814edbacddbd5f25 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102680 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-15ConvertSingleRef never passed a null ScDocument*Caolán McNamara
Change-Id: I1ce4f369d8078e1950204b3046457582d9d67397 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102736 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-15ConvertDoubleRef never passed a null ScDocument*Caolán McNamara
Change-Id: I37702a7070fdafc3c9db962a9746ac9e97adf7de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102719 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-15ScRangeList::ParseAny ScDocument* argument dereferenced on all used pathsCaolán McNamara
Change-Id: Ie41a1b58f8bec0e8197aa49aa92522f11de40a28 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102667 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-13ParseCols never passed a null ScDocument*Caolán McNamara
Change-Id: I2276af9d49226bd3ef6514910ead9a7f4c263fe8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102583 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-13ParseRows never passed a null ScDocument*Caolán McNamara
Change-Id: Id9eb2c87ebe583f2024d5b8d8d6fd496dc90c7c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102582 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-08-15tdf#133853 Large spreadsheets have 16385 columns instead of 16384Aron Budea
MAXROW_JUMBO/MAXCOL_JUMBO should be max - 1, similarly to MAXROW/MAXCOL. Since f6064b13586aa8681907b69e4f43643251f9b803. Change-Id: I3d300e916b9584a2231f39bec5a044bd82c81752 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100777 Tested-by: Jenkins Reviewed-by: Aron Budea <aron.budea@collabora.com>
2020-05-09compact namespace in scNoel Grandin
Change-Id: I05ffad6b92883d3eb6d337fe75f5fc7864485861 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93860 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-03cid#1456608 Dereference after null checkCaolán McNamara
Change-Id: I47f41b1eae327a0140f4e59184db7a0d7f5b0f67 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86196 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-12-14sc: rowcol: convert mark dataNoel Grandin
with this patch I can finally load a 3201 column document Change-Id: I880d485b3f628836e7aed92c276e660466a3b19c Reviewed-on: https://gerrit.libreoffice.org/85139 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-14sc: rowcol: tdf#50916 convert Valid* methodsNoel Grandin
which means we end up passing around ScDocument* __everywhere__ Change-Id: I44d235ca5e9d57519f068b6880ee7d66f3ceb529 Reviewed-on: https://gerrit.libreoffice.org/83548 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-13sc: rowcol: tdf#50916 create ScSheetLimits to hold by rtl::ReferenceNoel Grandin
ScTokenArray sometimes outlives the ScDocument that created it, which means it accesses dead data when it tries to validate columns and rows. So create the ScSheetLimits class, which ScTokenArray can hold by reference counted pointer. Change-Id: Ic5771734fe4962d12f024fc1b29232124c14208a Reviewed-on: https://gerrit.libreoffice.org/85117 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2019-12-11sc: rowcol: tdf#50916 initial conversion of Valid* methodsNoel Grandin
just default the params for now Change-Id: I13ee78aeaa1133a167d57520b334d5e644e28ece Reviewed-on: https://gerrit.libreoffice.org/84926 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-14cid#1455325 establish that pDoc cannot be null thereCaolán McNamara
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-11-14Details always dereferences ScDocument argumentCaolán McNamara
Change-Id: If56c03af49606ffe6b5d4d782bd4a848aa79d8c2 Reviewed-on: https://gerrit.libreoffice.org/82695 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-11-12Resolves: tdf#122232 Move TabStartCol logic to ScTable::GetNextPos()Eike Rathke
... instead of blindly applying it to every move if set. Change-Id: Ief2efb4eb2288cd479852d5a250c2523715de38b Reviewed-on: https://gerrit.libreoffice.org/82513 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2019-11-11cid#1455326 MoveSticky always has a non-nullptr pDocCaolán McNamara
Change-Id: I84d9a81e9e8a544dbc50b9d6b40a7b9030f2a987 Reviewed-on: https://gerrit.libreoffice.org/82425 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-29sc: rowcol: tdf#50916 convert core/toolNoel Grandin
Change-Id: I0fe5a7ef4a79d0832802945ce1b9da4752f1d5fc Reviewed-on: https://gerrit.libreoffice.org/81598 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-26size some stringbuffer to prevent re-allocNoel Grandin
I started with 32 and kept doubling the size until the site did not need re-alloc, but clamped it at 512 (e.g. in emfio/). Change-Id: Ib7caf35a1b7e42b0e4ed8aa812493449e3eefc8f Reviewed-on: https://gerrit.libreoffice.org/81540 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-30reduce number of calc column constants slightlyNoel Grandin
and add some comments Change-Id: If71a3dff151fea249337668cf25b9c91d200d401 Reviewed-on: https://gerrit.libreoffice.org/79829 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-25cid#1242793 Untrusted value as argumentCaolán McNamara
help coverity know this is sanitizing its argument Change-Id: I54eb64bae73ef55e7431f6764536304c298a28c9 Reviewed-on: https://gerrit.libreoffice.org/78070 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-05-18tdf#125254 Performance: A spreadsheet opens too slow, part2Noel Grandin
Optimise bulk construction of ScMarkArray. This takes the opening time from 46s to 40.5s for me. Change-Id: I3955fe9b2c3113dac2ae3cda97d692de1975e762 Reviewed-on: https://gerrit.libreoffice.org/72418 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-05sc hash functions, use 64-bit range when availableNoel Grandin
Change-Id: If4d5b302343991122290ae64ec62b6f0bcfa97a3 Reviewed-on: https://gerrit.libreoffice.org/70305 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2019-04-05tdf#50916 Makes numbers of columns dynamic.Noel Grandin
With this commit we are making numbers of columns dynamic, but the number of maximum supported columns will be the same (1024). Such approach will allow us to check issues (eg. performance, LO format etc.), and improve it. Increasing number of maximum columns, will be done in separate commit. Change-Id: Ibac4101e9ffc05e3548eca1c198f6319ac7ff9aa Reviewed-on: https://gerrit.libreoffice.org/44802 Tested-by: Jenkins Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2019-03-05Introduce o3tl::underlyingEnumValueStephan Bergmann
Change-Id: I6554eb86326159b0da707539f45c411f61c0f3de Reviewed-on: https://gerrit.libreoffice.org/68761 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-12-08Clean up LIBO_INTERNAL_ONLY uses of SAL_WARN_UNUSED_RESULTStephan Bergmann
Change-Id: I98b2d90c8345f07010f6defd82557188d5cd35c7 Reviewed-on: https://gerrit.libreoffice.org/64808 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-11-08tdf#42949 Fix IWYU warnings in sc/source/core/data/*cxxGabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I3e3bf3160fe3627cd105d8b69ff165c0577d8c9b Reviewed-on: https://gerrit.libreoffice.org/62807 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-09-11Use [[nodiscard]] in SAL_WARN_UNUSED_RESULT where availableStephan Bergmann
...which required some lax placements of SAL_WARN_UNUSED_RESULT to be fixed. Also, Clang unfortunately is rather picky about the relative order of SAL_WARN_UNUSED_RESULT expanding to [[nodiscard]] and uses of the DLLPUBLIC macros (expanding to __attribute__(...) resp. __declspec(..) for clang-cl). Change-Id: Iae6ca36bef97f1864873aefdb5f05c7f5e045ad3 Reviewed-on: https://gerrit.libreoffice.org/60274 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-08-01add operator+=(OUStringBuffer) method to OUStringNoel Grandin
to reduce needless object creation and copying some more And fix what looks like a bug in CSS hex color parsing at line 609 in sw/../parcss1.cxx that has been there since commit 7b0b5cdfeed656b279bc32cd929630d5fc25878b "initial import" Change-Id: Ibad42b23721a56493bd1edcd7165e6104494a5c3 Reviewed-on: https://gerrit.libreoffice.org/58357 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-19Fix typosAndrea Gelmini
Change-Id: Ica623a5312196ff6a3538027e7c72ba4afe92f5c Reviewed-on: https://gerrit.libreoffice.org/57604 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2018-03-15don't use heap for elements in ScRangePairListNoel Grandin
no need to store small objects like this out of line. And use std::array for ScRangePair, so we get range checking in debug mode. Change-Id: Ie4690edbb4c3fdc4e08206cb016b8167a399d95a Reviewed-on: https://gerrit.libreoffice.org/51268 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-10don't use heap for elements in ScRangeListNoel Grandin
no need to store small objects like this out of line. Also - add move constructor and move assignment operator - drop Assign method since it now has the same signature as push_back Change-Id: I9a8647d3a11f24166a83d399a358a2bce3b2cb79 Reviewed-on: https://gerrit.libreoffice.org/50899 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2018-02-12Fix typosAndrea Gelmini
Change-Id: I141de4716df406f2cbcbc77e454dbadf0fb8c164 Reviewed-on: https://gerrit.libreoffice.org/49586 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-15More loplugin:cstylecast: scStephan Bergmann
Change-Id: Iaaa5b99cdff49bc1e88443ee23d98c005ff84911
2018-01-15convert a<b?a:b to std::min(a,b)Noel Grandin
with something like git grep -nP '(.*)\s*<\s*(.*)\s*\?\s*\g1\s*:\s*\g2' -- *.?xx Change-Id: Id5078b35961847feb78a66204fdb7598ee63fd23 Note: we also convert a>b?b:a Reviewed-on: https://gerrit.libreoffice.org/47736 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-10use std::swap instead of own implementationMarkus Mohrhard
Change-Id: Iabc0eee868a2ad5623a1ac39b26bb2bc5981e829 Reviewed-on: https://gerrit.libreoffice.org/43249 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-10-02lok - sc: lift row limit to 500kMarco Cecchetti
Due to previously intruduced optimizations, it is safe and fast enough to navigate through a 500k rows speadsheet. Change-Id: I865d0b60629b5bbf796e9e48df6ff21242a13e5a Reviewed-on: https://gerrit.libreoffice.org/40454 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
2017-10-02lok: sc: overlays and edit view misplaced by other view actionsMarco Cecchetti
The edit view, the cell cursor and the cell selection overlays become misplaced when another user inserts, deletes or resizes a row. The same is true for columns. The solution takes care of the current tab each view is displaying and of undo/redo actions. Change-Id: I24c94f774f3b18028c9356a904e1b14b07c5c61a Reviewed-on: https://gerrit.libreoffice.org/40016 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
2017-09-14Add debugging output operator<< for ScRangeTor Lillqvist
2017-08-29Use 1-based numbers in the ScAddress debugging output operator <<Tor Lillqvist
Change-Id: If9f685bc504d9da8011c1788dfb90dc29b86e9ea
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-08-23loplugin:constparam in sc part2Noel Grandin
Change-Id: I4fd18096d7d22d8c146a2437906187d5df1cb268 Reviewed-on: https://gerrit.libreoffice.org/41447 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-16Add note about order or row, column, and tab as fields vs. parametersTor Lillqvist
Change-Id: I45e0f9a95da20c1a3b6bdf2ac1387b3c14e3dad4
2017-08-04Add debug output operator<< for ScAddressTor Lillqvist
2017-07-02ScRange::ParseCols/Rows pDoc parameter is unusedStephan Bergmann
...ever since the code's introduction with f4e75ed9b00a4d8410fe685aae66735ec82837ec "INTEGRATION: CWS scr1c1", despite the "we may need this later" claim that also originated there Change-Id: I88e2b2a8d01fda8adf942ff78f84b6d8638dc154