summaryrefslogtreecommitdiff
path: root/sw/source/core/crsr/crsrsh.cxx
AgeCommit message (Collapse)AuthorFilesLines
2016-09-14sw draw text: emit LOK_CALLBACK_VIEW_LOCK from registerCallback()Miklos Vajna1-0/+7
With this, in case the first view has an active text edit and a new view is created, then the shape text lock is instantly visible in the second view, even if the first view does not end + begin the text edit again later. Change-Id: I82d98ab1431a54a1a8897d16ce7fa0856baa2a10 (cherry picked from commit 7b784e4e3927d91a96cd0b54fc43c9b488822e47)
2016-09-14sw draw text: emit LOK_CALLBACK_TEXT_VIEW_SELECTION from registerCallback()Miklos Vajna1-0/+3
With this, in case the first view has an active text edit selection and a new view is created, then the text selection is instantly visible in the second view, even if the first view's text selection does not change later. Change-Id: I3255febd5d65d6576ddbc57cf96836bdf0b06a72 (cherry picked from commit 2ea385a54b53797ab3960869012f3ce3268eab2c)
2016-09-14sw draw text: emit LOK_CALLBACK_INVALIDATE_VIEW_CURSOR from registerCallback()Miklos Vajna1-6/+17
With this, in case the first view has an active text edit and a new view is created, then the cursor position is instantly visible in the second view, even if the first view's cursor does not move later. (cherry picked from commit 586789fe757c0eb350c360a49cf90431a0bd5b24) Conflicts: sw/source/core/crsr/crsrsh.cxx Change-Id: Ia82e7dc1ce9bb58c67a280179ecadc74d3b63026
2016-09-14sw: emit LOK_CALLBACK_GRAPHIC_VIEW_SELECTION as part of registerCallback()Miklos Vajna1-3/+6
Have a Writer shape selection in the first view, create a new view, the second view doesn't see the selection. But the same works if the shape selection is created when the second view was created earlier. Emit the svx selection state as part of SwCursorShell::NotifyCursor() to fix the problem, but take care of not sending the status to the new view itself. Reviewed-on: https://gerrit.libreoffice.org/28857 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 786cc8a5a3cd34329c72b867e5fd7896b10a7351) Conflicts: sw/source/core/crsr/crsrsh.cxx Change-Id: Iff3979235e1c12cc64867c3184354967f451370b
2016-09-13sw: emit LOK_CALLBACK_TEXT_VIEW_SELECTION as part of registerCallback()Miklos Vajna1-6/+9
Have a Writer text selection in the first view, create a new view, the second view doesn't see the selection. But the same works if the text selection is created when the second view was created earlier. Emit the selection state as part of SwCursorShell::NotifyCursor() to fix the problem. Reviewed-on: https://gerrit.libreoffice.org/28844 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit c4224e6cafa5aa5c604dfdc0daf7f145aa6c08be) Conflicts: sw/source/core/crsr/crsrsh.cxx Change-Id: I7d71c9b58941c8ca8720b0e63e54bc757b1aaf61
2016-09-01sfx2 lok: introduce SfxViewShell::NotifyCursor()Miklos Vajna1-0/+5
It allows removing the hide/show cursor hack in SfxViewShell::registerLibreOfficeKitViewCallback() introduced in commit 4d211384f048b689f20e46d4d586f342b110cb5c (sfx2 lok: fix missing view cursors in a new view, 2016-06-20), and instead let the application code in sw/sc/sd implement the best way to show existing cursors in a new view. This way the per-app cleanup of view cursors introduced in commit bc9b4fd4c83af3532204237157821d4884c42d8e (lok::Document::destroyView: clean up view cursors/selections, 2016-07-15) has matching per-app init code. This commit just adds the API + adapts existing sw code to use it, sc/sd still has to be implemented. Based on a patch by Marco Cecchetti, thanks! Reviewed-on: https://gerrit.libreoffice.org/28557 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 7167c2b6548830b82280f2f3943d445e9afd6f5e) Conflicts: sw/inc/viscrs.hxx sw/source/core/crsr/viscrs.cxx Change-Id: I38510fa4962f405b1b96a79024206c9e7f33cad2
2016-07-21sw lok: add LOK_CALLBACK_VIEW_CURSOR_VISIBLEMiklos Vajna1-2/+7
With this, in case a text cursor is turned into a graphic selection in view#0, then view#1 can also hide the text cursor of view#0. Change-Id: I7de89b8537ef8b0985336793b719d93733604bff Reviewed-on: https://gerrit.libreoffice.org/27044 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit af8419fa1d3cea57481e0e53518237eea2d9cdad)
2016-07-20comphelper lok: remove the g_bViewCallback globalMiklos Vajna1-8/+2
Its purpose was to allow incrementally migrate all callers of SdrModel::libreOfficeKitCallback() to use SfxViewShell::libreOfficeKitViewCallback() (which allows notifying only the currently active or all views) instead. That is done by now, so it can go. Change-Id: I521bbbe5c638dfd844ebf025153459a37362d3c3 Reviewed-on: https://gerrit.libreoffice.org/26413 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 5b5706f41f97998785e1e7ad356580772da80c42)
2016-07-20sw: we don't have space to spell out "focus" in ShLooseFcs...Michael Stahl1-2/+2
...but we *do* have the space to mis-spell "lose". Change-Id: I0cb55d616dfee614e82975b7b3c25a0dcc37d0d7 (cherry picked from commit c4727a06fe16ed88f2c293aaa3506df8e6523678)
2016-07-20loplugin:commaoperator in sw/Noel Grandin1-7/+14
Change-Id: I9b00755707687e4c10c02bf49866571f2c44d8ba (cherry picked from commit c17ead7dc9c9dce23033fdda9c316f27a0225b17)
2015-11-25bin/rename-sw-abbreviations.shlibreoffice-5-1-branch-pointRobinson Tryon1-952/+952
This commit renames the most annoying abbreviations in Writer (and partially in the shared code too). Change-Id: I77e5134f42f25e3786afa36b7a505c7e3237a9e8
2015-11-13sw: don't show main cursor when editing a postitMiklos Vajna1-0/+10
This is primarily for tiled editing that doesn't know about multiple cursors, so if both the postit cursor and the main cursor is shown for a short period of time, then the main one is hidden, then gtktiledviewer still shows the main one. OTOH if we can avoid showing the cursor in general just to hide it a bit later in general, let's not do that. With this, the "cursor is shown at the comment anchor, not inside the anchor when clicking on the postit" bug disappears. Change-Id: I2383292c5f84604dc8b126510b0797b8426920ae
2015-11-115th step to remove tools/rtti.hxxOliver Specht1-1/+0
tools/rtti.hxx removed completed the interface of some Sdr.* Items and removed pseudo items Change-Id: I0cdcd01494be35b97a27d5985aa908affa96048a Reviewed-on: https://gerrit.libreoffice.org/19837 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Oliver Specht <oliver.specht@cib.de>
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann1-72/+72
Change-Id: I01e11fa956a249974e77dce9deebe79311f098d0
2015-10-22sw: prefix members of SwCrsrMoveStateMiklos Vajna1-27/+27
Change-Id: Iad3c970b263b8ee847cf6a7d2e05c5336cad9b26
2015-10-19loplugin:defaultparamsStephan Bergmann1-1/+1
Change-Id: Ib5b0e87064b6dcff03f6b77287a80ee2a03b8799
2015-10-08editeng, sw, sc: use comphelper::string::join()Miklos Vajna1-5/+11
Change-Id: I9b0a32271a965bc4089720ccb61b26b67ceab7b2
2015-10-06 tdf#94559: 4th step to remove rtti.hxxOliver Specht1-2/+2
replaced use of PTR_CAST, IS_TYPE, ISA in idl, editeng, sc, sd, sw, sfx2, sot, starmath Change-Id: I4a5bba4fdc4829099618c09b690c83f876a3d653 Reviewed-on: https://gerrit.libreoffice.org/19132 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Oliver Specht <oliver.specht@cib.de>
2015-09-29lok: add Document::getPartPageRectangles()Miklos Vajna1-0/+14
Change-Id: I20acd44f7a81471982ba96ad3894a9124e035c5f
2015-09-21sw: implement per-view LOK_CALLBACK_CURSOR_VISIBLEMiklos Vajna1-4/+16
Change-Id: I4e00679547997cfb3dafe603b908f055011a3b30
2015-09-21sw layout dump: show selection ranges from all shellsMiklos Vajna1-0/+14
Change-Id: I89d0f3c66f3939fc6795892d727d782c3f8bbda3
2015-09-18convert Link<> to typedNoel Grandin1-1/+1
Change-Id: Ia0e76911dba6e1e2fd5f01799121c8f4b4219aba
2015-08-20loplugin: defaultparamsNoel Grandin1-8/+8
Change-Id: If105665a016183f08a2be13366e5068060b5954c
2015-06-29SwFrm::Calc: use vcl::RenderContextMiklos Vajna1-1/+1
Change-Id: I98de3f5413756c494c677d592ea921155e4c08be
2015-06-28Fix typosAndrea Gelmini1-1/+1
Change-Id: Ifd126a535f18db79a18aaec61b76cdf26ab33dff Reviewed-on: https://gerrit.libreoffice.org/16522 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2015-06-25SwViewShellImp::GetFirstVisPage: use vcl::RenderContextMiklos Vajna1-2/+2
Change-Id: I7acd380d2e199f042dca61d95596c3bc63c6a206
2015-06-08sw: remove unused CrsrFlag::NOCALRECTMichael Stahl1-32/+24
Change-Id: I985ac3eea9ebb780821ab4fffd460935be5e536d
2015-06-08tdf#91917 tdf#91602: avoid layout recursion differentlyMichael Stahl1-4/+2
(regression from 587006cac508616f486aea45e265a170bcccdc87) Change-Id: I38e00a7469243088e25aa1a91e3581240b3bbdea
2015-06-08loplugin:cstylecast: deal with remaining pointer castsStephan Bergmann1-2/+2
Change-Id: I8d27ae80d209159690182ab91e272cf00e9f863d
2015-06-06tdf#91602: sw: prevent recursive layout crashMichael Stahl1-0/+4
SwCrsrShell::UpdateCrsr() calls SwTextFrm::GetCharRect(), which does layout. It happens that a SdrObject is moved around during layout, which calls SwDrawContact::Changed(), which believes that there is no layout active because there is no SwLayAction and ViewShell::EndAction() has already been called, so we get recursive layout-in-layout action. Change-Id: Iad8df4910e3c661150bdf5ac7d777792e69a8f71
2015-06-04convert SP_EXTEND_RANGE constants to scoped enumNoel Grandin1-1/+1
Change-Id: I4d6ed976f4df63c7c51dd110b45787f2396518e4 Reviewed-on: https://gerrit.libreoffice.org/16069 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-06-02loplugin:cstylecast: deal with those that are (technically) const_castStephan Bergmann1-1/+1
Change-Id: Icb8f62a167cc450bd156f0e3611f30c4d2a57c16
2015-05-27cppcheck: noExplicitConstructorCaolán McNamara1-1/+1
Change-Id: I27c24d3284a8e0678fc5c041426b4a7e71cbd363
2015-05-27tdf#91145: Set Cell Background Color in Table Broken in Writer 5.0Bjoern Michaelsen1-6/+6
- iterate over PaMs, not over Shells - regression from 0ed7c8b55a026d7d98f9c994ad5e8626dd9504b2 Change-Id: I33ea486d416a7e64fd97938ce09492209c102c88
2015-05-26loplugin:unnecessarysuperclass, merge IBlockCursor into SwBlockCursorNoel Grandin1-2/+1
Change-Id: I3c6c0d620cf7ffb11a9ca5e1025d91e59ef66c80 Reviewed-on: https://gerrit.libreoffice.org/15898 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-05-23pass RenderContext into writer paintingTomaž Vajngerl1-2/+2
Change-Id: Ib2d986d05dc7db1b65ed29ea295807d6f20cea4a
2015-05-20bin/rename-sw-abbreviations.shlibreoffice-5-0-branch-pointChristian Lohmaier1-237/+237
renames the most annoying abbreviations in Writer (and partially in the shared code too). Change-Id: I9a62759138126c1537cc5c985ba05cf54d6132d9
2015-05-11loplugin:cstylecast: nop between pointer types of exactly same spellingStephan Bergmann1-1/+1
Change-Id: I0e42e757a6f7b0c28758193aad8b3cb01607b8b1
2015-05-05loplugin:staticmethodsNoel Grandin1-12/+15
Change-Id: I90dd921077bbfc57200e398e7959306f26c65cfe
2015-04-29redundant castCaolán McNamara1-1/+1
Change-Id: Ib812a7cafabc4820946da67fb3f8896b6aad1461
2015-04-07Change "blink times" to be of type sal_uInt64Stephan Bergmann1-5/+4
...and thus consistent with Timer::Get/SetTimeout since 9c7016b5b530ca212b1275f44f9e2fc0527109ee "Scheduler: Changed uLong to uInt32/uInt64." Otherwise, at least JunitTest_forms_unoapi on 32-bit Linux would stay busy forever in vcl::Cursor::ImplTimerHdl, alternating among ImplRestore() and ImplDraw(). Change-Id: Ic3fd349344c105078b52749ca85559fce485d0c4
2015-04-07tdf#90362 sw: config option for ignoring protected areasMiklos Vajna1-1/+2
Change-Id: Idfa62aa5bbccf62ee85f863150e13f80b8b5db90 Reviewed-on: https://gerrit.libreoffice.org/15181 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2015-03-25TyposJulien Nabet1-1/+1
Change-Id: I434be0034b26ac4719590238817538ecd90b8923
2015-03-24Kill dead <touch/touch.h> APITor Lillqvist1-4/+0
Has all been obsoleted by LibreOfficeKit. Only some MOBILE_* constant #defines are now left in touch.h, but probably those are used only by dead code. Change-Id: I646945c4408b4e6cd5510da535cfc12088dd391c
2015-03-09sw: move LOK_CALLBACK_CURSOR_VISIBLE event from SwVisCrsr to SwCrsrShellMiklos Vajna1-8/+8
This should fix the problem that LOK_CALLBACK_CURSOR_VISIBLE is emitted 2 times during every mouse click (hide, then show), while the motivation behind this callback is to just hide the blinking cursor for image selection, i.e. it's never emitted during normal text editing. Change-Id: Id2a2b1102589f8151f640af3fcb50b646d261275
2015-03-09Use SwCrsrShell::SelTblBox()Miklos Vajna1-2/+2
The only user of SwCrsrShell::SelectCell() can actually use SelTblBox() instead. Change-Id: I286a3d8c25834dd08897f0cfc37a3ec31a89ce7a
2015-03-09SwEditWin: when tiled rendering, let double click select an empty cellMiklos Vajna1-2/+2
When not tiled rendering and the user double-clicks on a word, then that's selected. If the double-click happens in an empty cell, nothing happens. When tiled rendering, still try to select a word, but if that doesn't work, then see if we are in a table, and then select just that cell. Then the user can use the usual selection handles to adjust the selection further. Change-Id: I6beabf5c73a02f1eb2ede6f8cf9062c1e6610e9e
2015-02-09Don't hide cursor for Android anymore - makes cursor events workTomaž Vajngerl1-5/+5
Change-Id: I97caadf079c9a5e38c00c80fdc8185aee997f632
2015-02-09Combine DBG_UTIL and header version of Stt{End}CrsrMoveTomaž Vajngerl1-3/+8
Having 2 versions (debug and release) of one method (on top of that in different places - one implemented in header) which are mostly the same is a recipe for disaster. Change-Id: Ia38f900ac076d1c1765fea2c7326147b115e343d
2015-02-04coverity#708922 Use after freeCaolán McNamara1-0/+4
Change-Id: Ied0f1dd16b7f681290c707f1aeb2d1d115612629