summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/gridwin5.cxx
AgeCommit message (Collapse)Author
2019-10-02Resolves: tdf#127924 give hyperlink tooltip an areaCaolán McNamara
instead of just a point Change-Id: Ibadecd64f3296264790373528427a7a528646c73 Reviewed-on: https://gerrit.libreoffice.org/80038 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-08-27Remove duplicated sc imagemap functionsSamuel Mehrbrodt
Change-Id: Ie1001abb5b57e73fece9f028041e683143a7008b Reviewed-on: https://gerrit.libreoffice.org/78162 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-08-12tdf#42949 Fix IWYU warnings in sc/source/ui/{view,xmlsource}/*cxxGabor Kelemen
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-07-11Deduplicate URL tooltip creationSamuel Mehrbrodt
Change-Id: I94eb40ff4d727029ad764a381df300beee90481c Reviewed-on: https://gerrit.libreoffice.org/75409 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-07-11tdf#121012 Display "Ctrl-click to follow hyperlink" inside shapes/textfieldsSamuel Mehrbrodt
Change-Id: I8def50f0de20098ebbfd2b0934825a297e1d24d0 Reviewed-on: https://gerrit.libreoffice.org/75408 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-02-11new loplugin writeonlyvarsNoel Grandin
largely based on the relevant portion of the unusedfields loplugin, but adapted for local vars Change-Id: Ic522a941573940e8f75c88f90ba5f37508ca49b1 Reviewed-on: https://gerrit.libreoffice.org/66835 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-27Refactor calc non-linear ViewToDevice transformArmin Le Grand
This change solves the non-linear World-To-View trans- formation that calc uses due to it's screen rendering as good as currently possible (AFAIK). Calcv view is layouted on pixel base (due to better homogen distances and full pixel lines between cells), but this leads to having a non-linear transformation between discrete units (pixels, view) and model coordinates (World). In principle, each cell has it's own (so called) ViewTransformation -> the position on screen depends on the mappings of all cells top/left from it. This is obvioulsly non-linear and can sometimes be seen by producing 'offset' errors when many cells (small and thin) are shown in low zoom stages. No better solution for this comes to mind easily. The extremes are - on the one hand AntiAliasing the whole calc edit view and accept 'unsharp/AAed' lines - on the other hand what we have now. Maybe a future solution could find a mapping that gets close to linear mapping for the full view. On the long run this state is hard to keep correct. Even with this extended solution the mapping of SdrObjects spawning mutiple cells is assumed 'linear' in that area - which is in reality currently not the case (!) Note: This is only true for the screen visualization, print and/or PDF export do not do that pixel-based layouting. Note2: This mechanism is general in DrawingLayer (look for '.*GridOffset.*'. If it is deactivated by providing no offsets, the result is the unchanged, linear mapping. First step: Add interfaces to get a possible GridOffset at ViewObjectContact. There it belongs, we have a view- dependent offset per object and view. Add mechanisms to create on-demand and reach back to the view (aka calc's derivation of it). Second step: Implement the on-demand creation, adapt to use it in ViewObjectContact::getPrimitive2DSequence, add stuff to reset on zoom change, disable temporarily old mechanism -> paint already works. Need to adapt the places from old mechanism where the GridOffset was used, but no longer the geometry creations. Third step: Isolated and disabled old mechanism (by already removing SetGridOffset). Marked all places that possibly need change with '//Z' tag. Main work now will be to adapt in the SdrView implementations in svx to know about having a SdrObject-dependent ViewTransformation at all (currently not known, was hard-coded at some places from the old code, ViewTransformation set as MapMode at a target OutputDevice, not member at SdrView at all...). Fourth step: Adapt the Handles and OverlayObjects to use an evtl. existing GridOffset. The mechanism is that the SdrHdl(s) can be seen as 'Model-Objects', these get converted to OverlayObjects in the ::CreateB2dIAObject() implementations, for all SdrMarkView and SdrPageView, so this is the place where the ObjectContact is known (the SdrPageWindow *is* a ObjectContact) and the view- dependent GridOffset can be calculated per SdrObject. I modified OverlayObject to be able to work with a set Offset that embeds the created visualization using this additionally. Handles get now correctly set and have a working HitTest (due to that already using the primitives). Some inter- action stuff already working, some will need more adaption. We simply have no concept for this stuff... Refactored to not get dependencies to SdrObject in ObjectContact. Fifth Step: Make HitTest work by adding the View-And- Object dependent GridOffset in the View when HitTest is triggered. This is in SdrMarkView::CheckSingleSdrObjectHit where pObj->GetCurrentBoundRect() is used that gets the view-independent form. To make HitTest work, add a possible GridOffset. Since this will be necessary more often in SdrView hierarchy, added a tooling method (getPossibleGridOffsetForSdrObject) at that level after checking that at that level will be reachable at all potential spots. Inside that method the correct ObjectContact will be identified and the object-specific offset requested there. Sixth Step: Adaptions and started some cleanups. Still some adaptions needed: - After creation of new object, need to relocate from used GridOffset setting to WorldCoordinates - Interactions, e.g. start with dragging handles or full object/points Seventh Step: React on EndCreateObj. Here, the created SdrObject is in model coordinates and needs to be adapted to evtl. GridOffset. This is 'tricky' due to calculating the possible offset based on new coordinates 'close' to the target position, but may be in the wrong cell. Nonetheless this is the best we can do here. Last (hopefully) missing are now all interaction viszualizations. They already work and are applied correctly, but wrong visualized. Have taken the time to unify adding OverlayObjects for selection visualization to OverlayManager, see handleNewOverlayObject. This does all needed when adding OverlayObjects in one place where the GridOffset can also be handled. It makles things more safe - not possible to forget one of the three steps for others. Eighth Step: Do the same unification for creating the OverlayGeometry, also rename methods to make usage more clear. We now have SdrHdl::insertNewlyCreatedOverlayObjectForSdrHdl SdrDragMethod::insertNewlyCreatedOverlayObjectForSdrDragMethod which can do the needed GridOffset changes centralized. Needed to get a ObjectContact for this at SdrDragMethod, so adapted ::CreateOverlayGeometry implementations accordingly. Missing is now the implementation in insertNewlyCreatedOverlayObjectForSdrDragMethod to add the GridOffset - if used. This has no SdrObject at this time, so we will need a fallback to do the same using a Range (Rectangle). The stuff doing this for SdrObject already has a fallback and is based on using the Rectangle from the SdrObject anyways, so this will be possible. Ninth Step: Cleanup of old stuff (no more //Z), adapted some usages of OverlayObject creations to use getViewIndependentPrimitive2DContainer instead of the view dependent parts so that offset applied to drag-overlays is correct and not already added. Adapted insertNewlyCreatedOverlayObjectForSdrDragMethod to use calculateGridOffsetForB2DRange. Use now that instead of SdrObject-based approach in calc - is more generic. Getting closer, but still not complete - there is an error with dragging the grepped handle somehow - the offset for drag is somehow wrong. Tenth Step: Corrected that offset error. Of course at interaction start and progress (move) the coordinates are in GrifOffset coordinates and need to be corrected to Model coordinates. Done that at ::BegDragObj and ::MovDragObj, works well. Of course there are exceptions for the crop-handles, so needed to add setting the correct parameters at SdrHdl when these got created, then all works as expected. The strategy is to *not* change the model data itself in any way, instead do all changes/adaptions in the view-only code. This has minimal impact and is needed due to having a 1:n relationship between model and views anyways. There are two directions: All visualizations are adapted to take the GridOffset into account (SdrObjects, overlay, handles, InteractionObjects, ...). In the other direction input like MousePosition is in principle in calc EditView in 'GridOffset'-coordinates and needs to be mapped back before usage. Change-Id: I2ecdd409def96a7248a26a65a22e59eb962880a0 Reviewed-on: https://gerrit.libreoffice.org/64057 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
2018-11-07move SvTreeListBox to vclCaolán McNamara
Change-Id: I04a146d3d8a428ac1678827dc883525c40240a44 Reviewed-on: https://gerrit.libreoffice.org/62787 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-05-12Replace ScGlobal::GetRscString with simple ScResId callsGabor Kelemen
After the gettext migration there is no point to have two APIs for reading the same .mo file. This patch is for sc/source/ui/view/ for easier review. Change-Id: Ic07f7e924236d29f3cafd69c5ee634ae92105459 Reviewed-on: https://gerrit.libreoffice.org/54137 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-02-17Revert "loplugin:changetoolsgen in sc" and reapply pluginNoel Grandin
because I (a) forgot to insert parentheses which changes the meaning of some expressions and (b) I now use the AdjustFoo calls when changing unary operations, which reads much better This reverts commit 95fab7cbf2f0576d0f728bed8898b7ff769d90e6. Change-Id: Icbdcc0f4227d88812be12e18ba6961088db80c3e Reviewed-on: https://gerrit.libreoffice.org/49840 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-14loplugin:changetoolsgen in scNoel Grandin
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>
2017-11-30tdf#113901: Grid offset for notes and temporary notes modified.Vasily Melenchuk
Older calculations for gird offset were incomplete: are not used for notes (only for temporary ones on mouse over), were not taken into account during temporary note disappear and contain duplicated code from ScDrawView::SyncForGrid() New approach elminate described above problems. Change-Id: I5f92971e156f37f052b4e6d47b2f16480bdbaf7e Reviewed-on: https://gerrit.libreoffice.org/44464 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2017-10-23loplugin:includeform: scStephan Bergmann
Change-Id: I2ed763e0584a188032c80fde60890de3c6985cbd
2017-08-26loplugin:constparam in sc part7Noel Grandin
Change-Id: Ica5421ddc343ce18a08f993778f42183b571ed0e Reviewed-on: https://gerrit.libreoffice.org/41578 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-04-06tdf#39468 Translate German commentsJens Carl
Translate German comments and terms in sc/ Change-Id: I93c7cf423325715435910a89420e7522b440c81e Reviewed-on: https://gerrit.libreoffice.org/36192 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-03-31tdf#82580 tools: rename Rectangle to tools::RectangleMiklos Vajna
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-02-15tdf#100726 Improved readability in sc directoryFakabbir Amin
cleaning concatenation in sc directory. Change-Id: I137eb0eaf161edece272b084980e622831200803 Reviewed-on: https://gerrit.libreoffice.org/34288 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2017-02-10convert SvtSecurityOptions::EOption to scoped enumNoel Grandin
and drop unused E_MACRO_DISABLE enumerator Change-Id: I0bd706d4d4e1d8b9004e68c9e77c11410c62a64a Reviewed-on: https://gerrit.libreoffice.org/34067 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-05convert DecodeMechanism to scoped enumNoel Grandin
Change-Id: I5c56634b1bca8e37fa73d02d2428645301b6c547
2016-11-14coverity#703927 Unchecked return valueCaolán McNamara
make these less odd and simply return the thing they selected, rather than a bool that indicates that the rpObj arg was successfully set to non-null, so there's one flag to check not two which both mean the same thing. Change-Id: If70e412f98dea8b7114fb77f26a9c59aab93be50 Reviewed-on: https://gerrit.libreoffice.org/30794 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-08-22convert SdrHitKind to scoped enumNoel Grandin
Change-Id: Ia7a18814fed7787e47ac2d3c02654a3648c5491e
2016-08-19convert SdrEventKind to scoped enumNoel Grandin
Change-Id: I96c298089d9ca75909380843c7dbc255c4953b88
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann
Change-Id: I765d2a600f9c57da50c85354688e3ae796750d94
2015-10-28com::sun::star->css in scNoel Grandin
Change-Id: I7774890f46f9343e944e34db27af8bce3b1d0915
2015-10-20loplugin:defaultparamsStephan Bergmann
Change-Id: If189c1e4254ae00725ec76a5ca6354d24df2d351
2015-10-05tdf#94687: Keep original ordering of overall initialization stepsStephan Bergmann
...between ScGridWindow::CreateAccessible, ScAccessibleDocument ctor, and ScAccessibleDocument::Init, by introducing ScAccessibleDocument::PreInit into which the this-using parts of the ScAccessibleDocument ctor are offloaded now. This is a follow-up to 6f1e77fc600f776433a759172323b4afec3d811e, "rhbz#1264753: Avoid this being release()ed to 0 in ScAccessibleDocument ctor;" turns out my fears that the slight re-ordering of initialization code coulb break something were well-founded after all. Change-Id: Ibf62983030d7abbe4b1ead9ee5add5f9627e7d60
2015-07-19fdo#39468 translated german comments in gridview4.cxx and gridview5.cxxAlbert Thuswaldner
Change-Id: I2537bedfab6856787d9b75e919cd3973a514bd3c Reviewed-on: https://gerrit.libreoffice.org/17184 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2015-06-25loplugin:stringconstant: Flag more inefficienciesStephan Bergmann
Change-Id: Icdd850336caf998e62cdb5a90fc3683eddd04a3e
2015-04-29convert SDRMOUSE constants to scoped enumNoel Grandin
Change-Id: Ia5389095683a1c012a988ed71bf769a1f25d80fb
2015-04-29convert SDRSEARCH_ constants to scoped enumNoel Grandin
Change-Id: I1495dbaf05b642d98f41639d41f831f007601df3
2015-04-23loplugin:staticmethodsNoel Grandin
Change-Id: I6207b475127099872c6f3764331006688129b673
2015-04-07Remove dead INetProtocol::VimStephan Bergmann
...which removes the need to abstract over the standard URI '%' escape prefix vs. the silly vim '=' special case invention. Change-Id: I54a52dd912c3aafc38275a0ac2466a6daeec328f
2015-03-10GridWindow: change pNoteMarker to unique_ptrTomaž Vajngerl
Change-Id: I1e141632172f53ddbd2f5f434206646c9a1e9cf0
2015-01-29callcatcher: large newly detected unused methods post de-virtualizationCaolán McNamara
i.e lots now able to be detected after... commit b44cbb26efe1d0b0950b1e1613e131b506dc3876 Author: Noel Grandin <noel@peralex.com> Date: Tue Jan 20 12:38:10 2015 +0200 new loplugin: change virtual methods to non-virtual Where we can prove that the virtual method is never overriden. In the case of pure-virtual methods, we remove the method entirely. Sometimes this leads to entire methods and fields being eliminated. Change-Id: I605e2fa56f7186c3d3a764f3cd30f5cf7f881f9d
2015-01-05Resolves fdo#87863: Calc tooltip text for hyperlink wrong on OSXJulien Nabet
I copied pasted the Writer way, with "follow" and "link" instead of "open" and "hyperlink" There are still the management of ":" + space (which could be different according to i10n) Change-Id: Ic8516c667b1882030d527add228a98e1081f608f Reviewed-on: https://gerrit.libreoffice.org/13712 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-11-11fdo#84938: replace HELPMODE_ constants with enumNoel Grandin
Change-Id: I44be5567e84cdabd8b10771ea37e28b8a88cc23e Reviewed-on: https://gerrit.libreoffice.org/12333 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-11-07fdo#84938: replace MOUSE_ modifier constants with enumNoel Grandin
and make the two categories of constants non-overlapping, we really don't need to risk confusion in order to save 6 bits in a data structure like this. Change-Id: I2251195d8e45ed04e2a89e47ae9c3e52cf0475c0
2014-10-28loplugin: cstylecastNoel Grandin
Change-Id: I42cd0be78478536322357ca7a03cf30e624b1afc
2014-09-23fdo#82577: Handle WindowNoel Grandin
Put the VCL Window class in the vcl namespace. Avoids clash with the X11 Window typedef. Change-Id: Ib1beb7ab4ad75562a42aeb252732a073d25eff1a
2014-09-10callcatcher: update unused codeCaolán McNamara
Change-Id: Ie31c16318b09699e080484292d489a378e3a6dce
2014-07-23Revert "opengl charts: Move the init from sc to chart2 ...Markus Mohrhard
This reverts commit 46cea34638b371570073c0e86f79969753c543ed. Conflicts: chart2/source/view/charttypes/GL3DBarChart.cxx Change-Id: Ia29ea6a95b8b9eb870d14538d0cadaa40472582f
2014-07-22callcatcher: update unused codeCaolán McNamara
Change-Id: I1dd1b40d807c7c9d9b145aca9f69a67d786ec5ff
2014-06-25remove whitespaceMarkus Mohrhard
Change-Id: Ib15413e73409cc33de01fa92a47b9d1237cfc4b2
2014-05-08fix another crash on exitMarkus Mohrhard
Change-Id: I580d17b16760516b73ac9f882fd8f9707ce6337b
2014-05-07fix crash on exitMarkus Mohrhard
Change-Id: I31374684a09f1b056154efcaa5c7dfe73bcc1a61
2014-04-23sc: sal_Bool->boolNoel Grandin
Change-Id: I70aad0b38979f45a313b8ac36890fb6c64d11bb0
2014-04-06whitespace cleanup in scMarkus Mohrhard
Change-Id: Id1dcadcac179c52977e48a6912ce4d5fd542f60c
2014-04-01Bin pointless INET_HEX_ESCAPETor Lillqvist
Change-Id: I72238e511c2fca4a4aba0be60b0f2d3b1f46e5c2
2014-03-22coverity#983377 Dereference before null checkCaolán McNamara
Change-Id: Ifca7439523d63919b631b24d9edc8e471027a7d3