summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/select.cxx
AgeCommit message (Collapse)AuthorFilesLines
2024-11-24Turn SC_MOD macro to a functionMike Kaganski1-9/+8
Change-Id: I5fc11037902bc6200fdaf4749260efe8e658bdce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177070 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-04-06Disable dragging in readonly view mode.Gökay Şatır1-0/+3
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com> Change-Id: I962d68b85897c156bba6d1898cf78b5fcd85540a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164866 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> (cherry picked from commit 0cdafeb746196f9f1e9ad271a77f5911694ff07d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165726 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-10-25tdf#114441 - Convert use of sal_uLong to better integer typessahil1-6/+6
nUpdateInterval (sal_uLong --> sal_uInt64) because it is passed as argument to Timer::SetTimeout function that takes a sal_uInt64 func CalcUpdateInterval (sal_uLong --> sal_uInt64 return type) because this function is only being called once, and in that call, the return value is passed to a function which takes sal_uInt64 type int. line 412 (https://opengrok.libreoffice.org/xref/core/sc/source/ui/view/select.cxx?r=b6b26421#412) two lines after which it is passed to a function ... and the function changed in vcl/source/window/seleng.cxx is the one to which the value of nUpdateInterval is being passed as explained in the lines above. Change-Id: I73441c2d3520a222ddb39b8c0c205b4dd61d4751 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156015 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2023-08-02split Point/Size/Rectangle into AbsoluteScreenPixel* typesNoel Grandin1-2/+2
to attempt to make it obvious in code what kind of coordinate system we are dealing with. The idea is that by doing this, the compile-time type checking will flush out inconsistencies between different code. I started with vcl::Window::OutputToAbsoluteScreenPixel and worked outwards from there. Change-Id: Ia967d7a0bb38886695f3a761b85c8b9340ddb1c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154676 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-06-28sc: prefix m_* ScViewFunctionSet class membersHenry Castro1-134/+134
.. Signed-off-by: Henry Castro <hcastro@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153405 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> (cherry picked from commit 8276b9593a2a9e3a0d5aaeaadd64369667120303) Change-Id: Ic16ae0fc6580e350444576a087c333d52296ec5e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153663 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com>
2023-04-21tdf#154578 sc fix: fill square is reduced when pulling selection with CTRLBalazs Varga1-0/+3
Return from DestroyAnchor in case of fill mode, because we should not modify the refmode or blockmode in that case. Change-Id: Id5b4b2207ddd9e1b1d82afc773d2d1b3e97dbbc6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150645 Tested-by: Jenkins Tested-by: Gabor Kelemen <kelemeng@ubuntu.com> Tested-by: Balazs Varga <balazs.varga.extern@allotropia.de> Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
2022-08-18loplugin:moveitNoel Grandin1-1/+1
Change-Id: I34de7408553e4ca702cab9aa611c03dc60b9b6a1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138472 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-15lok: sc: introduce LocalStartDrag methodHenry Castro1-0/+4
Update the mouse mode to start drag, otherwise it will conflict with normal cell selection. Change-Id: I6d4939b704114e7de1c9c051459fd02100a7536c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118874 Tested-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118203 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com>
2022-02-10replace various sal_uLong that might overflow with huge sheetsLuboš Luňák1-1/+1
16Mx16k cells is more than 32bit, so things like cell counts or progress -> sal_uInt64. Height/widths of complete rows/columns -> tools::Long. Change-Id: I8077ec0c97782310db024c20c335cfcbc3833227 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129634 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-04-09Recheck include/ with IWYUGabor Kelemen1-0/+1
See tdf#42949 for motivation Change-Id: Ifc253bf800bb1468b5774663a93f4fb30bec81d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113657 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-02-07prevent reference range resetting on panning in mobilePranam Lashkari1-1/+12
Change-Id: Ic6cabe1d4e5a1e7c4d42294550d654e38e27db22 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110458 Tested-by: Jenkins Reviewed-by: Pranam Lashkari <lpranam@collabora.com>
2021-02-07LOK: stop range selection with mouse/touch move in mobilePranam Lashkari1-1/+4
Change-Id: I0a7b3a5fc89bcbced4acee18415308ed8aa57ba2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109035 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> (cherry picked from commit 408e59359b5b67af119059a5d3f47bc807f81300) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110434 Tested-by: Jenkins Reviewed-by: Pranam Lashkari <lpranam@collabora.com>
2021-01-07ScTable::GetProtection and ScDocument::GetTabProtection can be constMike Kaganski1-1/+1
Change-Id: Ic30a3fe10ae6206e876a05bed5dc189a9516b452 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108851 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-10-20use tools::Long in scNoel1-4/+4
Change-Id: I8f37a8d1174ed816df971b8cee036d4e88d4a7fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104526 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-09-15establish that ScViewData::GetDocument can always return ScDocument&Caolán McNamara1-19/+19
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-08-14loplugin:simplifybool moreNoel Grandin1-1/+1
look for expressions like !(a && !b) which can be expanded out Change-Id: I72515a9638762b050f9a258c08da39ebfa2ef8e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100579 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-08-12loplugin:flatten in sc/ui/viewNoel Grandin1-47/+47
Change-Id: I0ea33fc076a280e5f4559eea8420b1b7fa442361 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100400 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-14sc: rowcol: tdf#50916 convert Valid* methodsNoel Grandin1-2/+2
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-10-19sc: rowcol: tdf#50916 chip away at some more call sites.Michael Meeks1-2/+2
Change-Id: Ia56c712deaaef5581a7f3f544843b44fc5c485da Reviewed-on: https://gerrit.libreoffice.org/81000 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
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-2/+0
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>
2018-08-24loplugin:useuniqueptr in ScTransferObjNoel Grandin1-5/+3
Change-Id: I43f813b11fc0ed27cab9c97a7e25124aaae1d398 Reviewed-on: https://gerrit.libreoffice.org/59540 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-10Resolves: tdf#116813 Height/Width swappedCaolán McNamara1-2/+2
Change-Id: I9b41a4b65fda895ed73fa346fb0b8e13df010706 Reviewed-on: https://gerrit.libreoffice.org/52688 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-03-16Resolves: tdf#115923 try a different approach to solving tdf#46637Caolán McNamara1-5/+20
Try scrolling to the cell the mouse is over if its not fully visible already and this is not autofill selection. To avoid the mouse over the autofill handle which overflows into neighbours scrolling the neighbour cell into view before its truly desired to be selected when the mouse passes the center point in other words, for autofill go back to how it always was Change-Id: I6f67ad0f49c2d4087949f71f38322f06ced13c79 Reviewed-on: https://gerrit.libreoffice.org/51361 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-02-14loplugin:changetoolsgen in scNoel Grandin1-2/+2
Change-Id: Ic24332cac65e665b55b9e1bbaf09ee56066875fd Reviewed-on: https://gerrit.libreoffice.org/49703 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-24loplugin:unused-returns in vclNoel Grandin1-8/+6
Change-Id: I507320900a47f604d17ed7d402d531a7cbdf744e Reviewed-on: https://gerrit.libreoffice.org/48331 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-12More loplugin:cstylecast: scStephan Bergmann1-1/+1
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable loplugin:cstylecast for some more cases" plus solenv/clang-format/reformat-formatted-files Change-Id: I987ac3a6d062600a5e21c3462c70595dfaa51796
2017-10-23loplugin:includeform: scStephan Bergmann1-9/+9
Change-Id: I2ed763e0584a188032c80fde60890de3c6985cbd
2017-05-23drop the SCsROW/SCsCOL/SCsTAB typedefsNoel Grandin1-28/+28
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-12remove unused uno::Reference varsNoel Grandin1-3/+2
found by temporarily marking Reference as SAL_WARN_UNUSED. Change-Id: I18809b62654467f890016adcc92576980ced393b Reviewed-on: https://gerrit.libreoffice.org/37511 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-31tdf#82580 tools: rename Rectangle to tools::RectangleMiklos Vajna1-2/+2
Mostly generated using make check COMPILER_EXTERNAL_TOOL=1 CCACHE_PREFIX=clang-rename-wrapper RENAME_ARGS="-qualified-name=Rectangle -new-name=tools::Rectangle" Except some modules have their own foo::tools namespace, so there have to use ::tools::Rectangle. This commit just moves the class from the global namespace, it does not update pre/postwin.h yet. Change-Id: I42b2de3c6f769fcf28cfe086f98eb31e42a305f2 Reviewed-on: https://gerrit.libreoffice.org/35923 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-03-23loplugins:redundantcast teach it about c-style typedef castsNoel Grandin1-1/+1
Change-Id: I1ac11a2481c0f4d8be1e1fd7c7637ac0ece3d65c Reviewed-on: https://gerrit.libreoffice.org/35558 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-15convert ScUpdateMode to scoped enumNoel Grandin1-1/+1
and drop unused SC_UPDATE_CHANGED. I can't find anything in our git history to even indicate when it was last in use. Change-Id: Iec6192a3d02132d15b3f392264e81f36b1fd4fad
2017-01-09New loplugin:externvar: scStephan Bergmann1-2/+0
Change-Id: I6f9df997a957a1fa49161add2adafe228d036a30
2016-09-26convert HASATTR constants to typed_flags_setNoel Grandin1-1/+1
Remove unused constant RTL. Inline PAINTEXT constant since it is only used in one place. Change-Id: I7b2c15e7579fc5bc475d00fe714f17592bd5e2a1
2016-07-11Related: tdf#100573 try a different approach to solving tdf#46637Caolán McNamara1-3/+8
Try scrolling to the selected cell if its not fully visible already in SetCursorAtPoint to get the cell fully visible if possible Change-Id: I7ba6ee4196a2fab989a5a4ca1e391c863945176b
2016-06-20tdf#96540 dragging between sheets can change the current cursor positionCaolán McNamara1-0/+1
so the at position at time of drop may not be that at the start of the drag. So set the current cursor position to ScTransferObj when the drag starts and retrieve it later Related to: commit ac3b66057ba677903b6de354317417b267be0fa0 Author: Kohei Yoshida <kyoshida@novell.com> Date: Thu Sep 16 11:09:29 2010 +0200 calc-selection-fixed-cursor.diff: Migrated n#502717, i#21869, i#97093, when making selection, don't move the cursor position and commit c433fa0639ccf5caeb0c128c8a3794322e2a1c81 Author: Markus Mohrhard <markus.mohrhard@googlemail.com> Date: Fri Jul 6 02:04:44 2012 +0200 adjust the calculation of the cursor pos if ALT is used, fdo#48869 Change-Id: I6316717c860d999270aa7f0fb50af5f6dfc7efd7 I haven't used SetSourceCursorPos everywhere a ScTransferObj is created, just where its created through a drag event Change-Id: I50c36b4a2ba45426edebc1f1dfa5e262db3c5d03 Reviewed-on: https://gerrit.libreoffice.org/26512 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-05-30Convert SelectionMode to scoped enumNoel Grandin1-2/+2
Change-Id: I86c435de3918540cb54a0cb24568e58456c2f9d1 Reviewed-on: https://gerrit.libreoffice.org/25611 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-22loplugin:commaoperator in sc/Noel Grandin1-8/+36
Change-Id: Id3f21f80c1ce83293d10c29c8035a0e74e076f80
2016-02-17use consistent #define checks for the Windows platformNoel Grandin1-2/+2
stage 2 of replacing usage of various checks for the windows platform with the compiler-defined '_WIN32' macro In this stage we focus on replacing usage of the WIN macro Change-Id: Ie8a4a63198a6de96bd158ecd707dadafb9c8ea84 Reviewed-on: https://gerrit.libreoffice.org/22393 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-12-15Bin silly 'STATIC DATA' commentsTor Lillqvist1-2/+0
Change-Id: I50e3772b7b479d2cf1eb644c7334d0f987874ccb
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann1-2/+2
Change-Id: I765d2a600f9c57da50c85354688e3ae796750d94
2015-10-19loplugin:defaultparamsStephan Bergmann1-1/+1
Change-Id: I9bfa7be4a8035d6dfbd0bd13505ba13c3d085455
2015-09-20convert SC_FILL constants to scoped enumNoel Grandin1-7/+7
Change-Id: Ib5399440c4f63ec6b3753ffafd243626aef65d49 Reviewed-on: https://gerrit.libreoffice.org/18723 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-08-14loplugin: defaultparamsNoel Grandin1-4/+4
Change-Id: If342e813063eb0a17f7a8f8e872290f056964e05
2015-05-13convert ENDTRACK_ constants to scoped enumNoel Grandin1-1/+1
Change-Id: Iaccd9c3be1ae24f7f9861f9049cd5b52f155170f
2014-09-23fdo#82577: Handle WindowNoel Grandin1-4/+4
Put the VCL Window class in the vcl namespace. Avoids clash with the X11 Window typedef. Change-Id: Ib1beb7ab4ad75562a42aeb252732a073d25eff1a
2014-06-24new compilerplugin returnbyrefNoel Grandin1-1/+1
Find places where we are returning a pointer to something, where we can be returning a reference. e.g. class A { struct X x; public X* getX() { return &x; } } which can be: public X& getX() { return x; } Change-Id: I796fd23fd36a18aedf6e36bc28f8fab4f518c6c7
2014-05-19Register OpenGL windows to ScGridWindow upon file load.Kohei Yoshida1-0/+1
Change-Id: I6fdce232ef41079f20a983dc72da032196078858
2014-05-05simplify ternary conditions "xxx ? yyy : false"Noel Grandin1-1/+1
Look for code like: xxx ? yyy : false; Which can be simplified to: xxx && yyy Change-Id: Ia33c0e452aa28af3f0658a5382895aaad0246b4d