summaryrefslogtreecommitdiff
path: root/sw/source
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 Vajna2-9/+21
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-13sw: emit LOK_CALLBACK_VIEW_CURSOR_VISIBLE as part of registerCallback()Miklos Vajna1-0/+3
Have a graphic selection (and thus a hidden text cursor) in the first view, create a second view. The view text cursors should be hidden in the second view as well. Change-Id: Ic22db84aab62c8f43c2da3d4a19b56c993c9f012 Reviewed-on: https://gerrit.libreoffice.org/28836 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit ab6dcd326ad7bf8c47a820514440bf8ac5f0d5f3)
2016-09-13sw: implement SdrMarkView::GetSfxViewShell() APIMiklos Vajna3-1/+9
With this, the graphic selection is no longer lost when creating a new view. That happened as the SwView ctor calls SdrMarkView::SetMarkHandles() while the new view is not yet current, which resulted clearing the graphic selection in the old view, not in the new one. A side-effect of introducing SwDrawView::GetSfxViewShell() is that now SwView::getPart() is called from the SwView dtor, guard against doing any real work there in that situation to avoid potentially reading already deleted data. Change-Id: I4fab39a907d2cbe228c0fc8d44bedc64893387d1 Reviewed-on: https://gerrit.libreoffice.org/28832 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 65828fa693507d699369f0dbc3c0bfc31638d945)
2016-09-02sw lok: avoid hiding / showing sdr mark handles on focus changeMiklos Vajna1-2/+5
For one, this is unwanted: in the LOK case we want to switch between the windows without any side effect to be able to e.g. paint tiles. For another, this caused an invalidation loop when two views selected the text frames or images in Writer. The loop looked like: 1) Press a key in view #1, so a setView(0) + paintTile() is necessary in view #0. 2) SfxLokHelper::setView(0) to switch from view #1 to view #0. 3) SwFEShell::ShellLoseFocus() on view #1, which hides sdr marks -> invalidate. 4) SwFEShell::ShellGetFocus() on view #0, which shows sdr marks -> invalidate. 5) paintTile() in view #0. 6) SfxLokHelper::setView(1) to paint tiles due to 3). (Generates invalidations in both views.) 7) SfxLokHelper::setView(0) to paint tiles due to 4). And so on, this way a call to SfxLokHelper::setView(0) resulted in an another (async) call to SfxLokHelper::setView(0) all the time. Change-Id: Ice855b9128f61bb7b823b499cad366998f297b5d Reviewed-on: https://gerrit.libreoffice.org/28611 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 91733eff7fba157daf88b092189d842f9d6f1b68)
2016-09-01Resolves: tdf#100094 hyperlink tabpage put hyperlink name in wrong fieldCaolán McNamara1-1/+1
mismerge of commit 74593273655e475017bb2bd45aba3c6b132e372d Date: Thu Jan 9 12:59:28 2014 +0000 Resolves: #i123988# assure that hyperlink attribute... Change-Id: I45391b112666a07a0edfa49b2a8682c446a92cf4 (cherry picked from commit 98294d715c72751d9dd47fd1995865e04b2bdf5a) Reviewed-on: https://gerrit.libreoffice.org/28549 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com> (cherry picked from commit a7b4f0efb90417922bfed3fc257ea7d02500c444)
2016-09-01Revert "fftester: non-contiguous cells"Michael Stahl1-10/+13
This reverts commit 9accbfa0a52433cf03fe186fc69334d387981eb9. ... and the code change of "avoid crashing on load of fdo54724-1.rtf" commit 4ee3eabd0f058b26544c84b2b5aaf5478d921817. It's much simpler to detect early in convertToTable that there is a row with no cells in it, which should not be allowed. Change-Id: Iff6d235b29514edd57cc55addeefb24242595d88 (cherry picked from commit dc83b3ae470914dbcb08fe1f0a4a4e1a1d3d8e19) Reviewed-on: https://gerrit.libreoffice.org/28512 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 217640264a62bd78b153b131b2cd158d4f8da620) Reviewed-on: https://gerrit.libreoffice.org/28539 (cherry picked from commit ad95040240bb8fe1fe56c6143cffcebf51b8b96f)
2016-09-01fftester: empty tabbox protectionCaolán McNamara1-0/+2
Change-Id: I56b0845205d6968355b3327721bf9ca0930903e1 (cherry picked from commit b3533883fd0397dbe9110145d62ef35944b64f69) Reviewed-on: https://gerrit.libreoffice.org/28425 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com> (cherry picked from commit e3cc5adb5999c51aa732befdfbe328c8e885fb22)
2016-09-01Resolves: tdf#100901 crash pressing tab in r-o document with hyperlinkCaolán McNamara1-1/+3
rather odd union in use here. Trying to call SwTextField::GetStart on SwTextINetFormat blows up under visual studio. Change-Id: Ic8145d7645bd6a68ef19e018311a4de6e6958bcb (cherry picked from commit 3196e949bb23a33bdb8700dbe27782e0e6c8f1e6) Reviewed-on: https://gerrit.libreoffice.org/28244 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com> (cherry picked from commit 299f223295913a60fed33f9adb08a15f4f83a6d3)
2016-09-01CppunitTest_sw_filters_test: fix ASan buildMiklos Vajna1-1/+2
MaybeNotifyModification() should be called only in the POS_INSIDE case, not when POS_EQUAL gets there via the fallthrough. Change-Id: I8a05ee508a14f62b12e93799b2e98a33041d6f33 Reviewed-on: https://gerrit.libreoffice.org/28582 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 3a897f7cbf44f44f2baa750f85d9aecbbbd2b6f9)
2016-09-01sfx2 lok: introduce SfxViewShell::NotifyCursor()Miklos Vajna3-4/+24
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-08-30sw: use SwModule::GetRedlineAuthor() in SwTextShell::ExecField()Miklos Vajna1-4/+3
This avoids some code duplication, and also means that the redline author set by SwDocShell::SetView() affects the inserted Writer comments as well, while those were 'Unknown Author' in the LOK case. Change-Id: Ib51183302ee6904fdf69fb16f27ecfe6df39e6cb (cherry picked from commit e2c240627c8a1a9cea1f9eedfb064214c8e93a39)
2016-08-30sw lok: emit REDLINE_TABLE_ENTRY_MODIFIED when deleting self-added charactersMiklos Vajna1-0/+1
This doesn't work out of the box via SwRangeRedline::SetStart/End, because the range of the redline is adjusted when redlining is disabled by sw::DocumentRedlineManager::AppendRedline() when it compresses the insert and delete redlines into a single reduced insert redline, and then the redline is updated implicitly via SwIndex. Change-Id: I4b652348b256df75e4c774ea5f3fdd78f59deb01 Reviewed-on: https://gerrit.libreoffice.org/28454 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit d017362bc68fe40c4bd79db76614d84aa9be913d)
2016-08-30Emit notification to a LibreOfficeKit client also when a redline is modifiedTor Lillqvist1-6/+42
Work in progress, not all modifications to a redline record cause notifications yet. (cherry picked from commit 8f96ab602a9e7cad1215abb693f33824a7b37679) Conflicts: sw/source/core/doc/docredln.cxx Change-Id: I01614cd6ede9576e9cc329889fef86342567325f
2016-08-19sw redlines: expose description as part of the UNO/LOK APIMiklos Vajna3-1/+12
A redline can have a manual comment and also an autogenerated description, like "Insert 'abc'". Expose this later property as well, as it provides useful additional information, especially when the comment property is empty. Change-Id: Id0f0ff62aef58d96b9b6071706c6f5b4a0d74800 (cherry picked from commit 9e310a4705ce956551059040696166aefb2388cb)
2016-08-19sw lok: add callbacks for redline table insertion / removalMiklos Vajna3-4/+50
An alternative would be to follow the Manage Changes dialog approach and subscribe to the SFX_HINT_DOCCHANGED notification in SwDocShell, cache the old redline table and find out the differences to the current one, but that way sound much more complex without benefits. (cherry picked from commit 0bc553f3ef3c188a96ea4875f4722ad4d40da4a3) Conflicts: sw/source/core/doc/docredln.cxx Change-Id: I20a45285b88255ccea9d6646c0b5288ac1c91879
2016-08-19sw: remove never read SwViewShell::mbInLibreOfficeKitCallbackMiklos Vajna2-4/+2
This was read in the now removed SwViewShell::libreOfficeKitCallback(), so add a similar flag to SfxViewShell instead, and restore the lost condition. This fixes paint/invalidation loops when inserting the first comment to a Writer document in gtktiledviewer. Reviewed-on: https://gerrit.libreoffice.org/28236 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 8b4705e0e0c76503b1ca61cb567d222f49466fc5) Conflicts: sfx2/source/view/viewsh.cxx Change-Id: Iad5ef90848f3b309ef8db4553760dd36d9b8a37c
2016-08-19sw: fix indentation in DocumentRedlineManager::AppendRedline()Miklos Vajna1-4/+4
Change-Id: I61cc418378ef6135c3da15cfa47b85fb422a7b34 (cherry picked from commit 0b95e19d257d2afc1ec161c712e213aedfd6ccbe)
2016-08-19tdf#101592 sw: track changes state is doc-specific, not view-specificMiklos Vajna1-0/+8
So update the bindings of all views after changing it. Reviewed-on: https://gerrit.libreoffice.org/28233 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit d890ec2f130188af9d998abf5968f06e7218b7a4) Conflicts: desktop/qa/desktop_lib/test_desktop_lib.cxx Change-Id: I5355f40ba27be521dcdf343b08305f3736979bbb
2016-08-19sw: fix accepting/rejecting a change by index when cursor is not at a redlineMiklos Vajna1-3/+6
When there is no index, then the cursor position is used to find out which redline to accept/reject. LOK uses the index parameter instead, so there never disable the command. Change-Id: Icbe0905e4ebd170c6f33fe383cd3042d812a2eb0 (cherry picked from commit b6011f07254f8003929320ad842d8d09daca0e09)
2016-08-19sw redlining: support per-view authorsMiklos Vajna4-0/+30
In case there are multiple SwView instances and SetRedlineAuthor() is called with a non-empty string on them, switching views will keep the SwModule redline author string up to date as expected. (cherry picked from commit cb9362faad9fe702031c5e657a31b1963ad4d374) Conflicts: sw/source/uibase/uno/unotxdoc.cxx Change-Id: I363221049dbacd67d7c8f4ff3e778f8032a3bc43
2016-08-18sw: allow accept/reject of redline by indexMiklos Vajna1-3/+17
Previously .uno:AcceptTrackedChange / .uno:RejectTrackedChange always worked by cursor position, but redlines are stored in the redline table, so they have a unique index. Allow specifying that index when invoking the command, and in that case ignore the cursor position. The index is not stable after an insertion / deletion. Reviewed-on: https://gerrit.libreoffice.org/28192 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 087b71f423cf6c047137fb1316527132bb47fc05) Conflicts: sw/qa/extras/uiwriter/uiwriter.cxx Change-Id: I493a22e84800ded224fb6b9c61261744dc0fb64f
2016-08-16sw lok: limit undo/redo in SwDrawTextShellMiklos Vajna3-3/+64
So that one view can only undo/redo its own changes. This is used when editing shape text, as that doesn't use sw::UndoManager::GetLastUndoInfo(). Change-Id: Ibc3d6fcbd18398569190f06ed9b7399c54bb7d41 (cherry picked from commit 40231526b6a0d6d8713932b3ae60d665f615833c)
2016-08-15sw undo: add a Repair argument to the .uno:Undo/Redo commandsMiklos Vajna3-3/+33
Undo/redo is limited to undo actions created by the same view in the LOK case, this argument removes this limit. This can be used by a client for "document repair" purposes, where undo/redo of others' changes is intentional. The sfx command dispatch has support for FASTCALL slots (a state function is not called, the command is always enabled) and also has support for state functions, but those functions only get the ID of the slots, not its parameters. What is needed here is a command that's disabled by default, but in case a Repair argument is used, then it's unconditionally enabled. So handle that case in the sfx dispatcher directly for now. Change-Id: I96c1130bf51abcdd722684b1fa4a8277f92fd555 (cherry picked from commit e9bcd3475131b24b0b8818cfdfa256854ca5a59d)
2016-08-10sw lok: limit undo/redo access to undo actions created by the same viewMiklos Vajna5-12/+38
So one view can't undo the changes of an other view by accident. If this is found to be useful in the desktop case, perhaps a dedicated config option can be added for it; for now the behavior is LOK-only. Change-Id: I7ff505d021bd6f6be36953ecc8f8bb971ce8927e Reviewed-on: https://gerrit.libreoffice.org/28007 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 5d8639aaf2f60157c99c3ee3a8bfa78e4efd010a)
2016-08-03editeng: make SfxUndoAction::GetViewShellId() interface availableMiklos Vajna1-1/+1
Extend the existing OutlinerViewCallable interface to be able to obtain the view shell ID of a view shell, even from editeng. Reviewed-on: https://gerrit.libreoffice.org/27788 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 0762a119fc0a17b80dab1e49fb832a2214f85fdc) Change-Id: I13708b0e4f58ee86643b913c7d21de022a685223
2016-08-02svl: implement SfxUndoAction::GetViewShellId() interface in SfxListUndoActionMiklos Vajna3-2/+25
Client code in sw, sd, sc and svx is adapted, the rest is just a placeholder for now. With this, e.g. the undo item for Writer's insert comment properly tracks which window was used for the insertion. Reviewed-on: https://gerrit.libreoffice.org/27781 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 4cbaa49c0ee707a2e1e1d842279b32473e8c8a28) Conflicts: sc/source/ui/view/viewfun3.cxx Change-Id: Idad587e6ca07ba69bf59aa7013b251af8bf95bab
2016-08-01sw undo: implement SfxUndoAction::GetViewShellId() interfaceMiklos Vajna38-124/+157
With this, it's possible to tell which view shell created which undo actions. It's visible only in the doc model xml dump only, though. Reviewed-on: https://gerrit.libreoffice.org/27693 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit d60708c5116b4c48b30b94095aafd3e77de46f6a) Conflicts: sw/source/core/undo/unsort.cxx Change-Id: Ia76d218a1d8b578aaad00ab733c772b10dda39f0
2016-07-29Related: tdf#100813 crash in this doc on scrolling past page 44Caolán McNamara1-2/+2
Change-Id: Ib9f1f6f43229ce29e7db7e3fcdacaa10fb692ca4 (cherry picked from commit e1b90609d50b9b8bb48e7c6548b197ed7de77253) Reviewed-on: https://gerrit.libreoffice.org/27361 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit be1cd0aded725d307ee9b53529c1122655b2a391)
2016-07-29sw layout xml dump: mention SfxViewShell addressesMiklos Vajna2-3/+19
Change-Id: I2e5c8102684494fd3d7c1c70971a09d0c940a124 Reviewed-on: https://gerrit.libreoffice.org/27637 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 73c8bc849c0024d5d81ab0370cffa6aa24b56d22)
2016-07-29tdf#101168 sw: fix missing repaint on undo with multiple windowsMiklos Vajna1-4/+8
Need to lock / unlock all view shells, not just the current one. Change-Id: I754214a202c6bbb74daac6f933481cb3fe7b9dbb Reviewed-on: https://gerrit.libreoffice.org/27620 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 1e21c32a2f81b4ae5302fc8d537e4f200a1a3e76)
2016-07-29sw: rename generic rSh in SwBaseShell::ExecUndo()Miklos Vajna1-8/+8
So that it's a bit more obvious it's not a base shell nor a view shell. Change-Id: I723a6394c59f4013576e3c4e2ff3016369d2227c Reviewed-on: https://gerrit.libreoffice.org/27616 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 9e903fc1d477e2f65653b36364de0c46a5151955)
2016-07-22sw: add new LOK_CALLBACK_VIEW_LOCK callbackMiklos Vajna2-0/+16
When we're after SdrBeginTextEdit(), but before SdrEndTextEdit(), and have multiple views, then only the active view paints the edited text, the other views look like the shape has no text at all. Add a new callback that exposes the position and size of the rectangle where the shape text will be painted after text edit ended, so clients can draw some kind of locking indicator there. This way the rendered result can differ in the "shape has no text" and the "shape text is edited in an other view" cases. Reviewed-on: https://gerrit.libreoffice.org/27441 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 897189cfc6b3f6f3a9a0148b060ea25e5f8d9eaa) Conflicts: libreofficekit/source/gtk/lokdocview.cxx Change-Id: I6096479a8a05c2547d15222e6d997b848af02945
2016-07-22sc: provide size in the payload of LOK_CALLBACK_DOCUMENT_SIZE_CHANGEDMiklos Vajna1-2/+2
The sw implementation does so, and the API documentation also says clients can depend on this. Change-Id: Ib4d25d7207fd8358de2ec1186d4ca2306e996497 Reviewed-on: https://gerrit.libreoffice.org/27379 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 27aac319ca9f2d580aea45542c5d0428616f7e0b)
2016-07-21sfx2 lok: expose part number in SfxLokHelper::notifyOtherViews()Miklos Vajna2-7/+15
This way a client can decide if the view cursor it gets is relevant (the views show the same part) or not. Change-Id: I7b274b28f0c4f0509df5071831acf50512eff640 Reviewed-on: https://gerrit.libreoffice.org/27311 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 299b9377469473abd8f58ba7f1054794491bdc56)
2016-07-21lok::Document::destroyView: clean up view cursors/selectionsMiklos Vajna1-0/+7
(cherry picked from commit bc9b4fd4c83af3532204237157821d4884c42d8e) Conflicts: sd/source/ui/view/ViewShellBase.cxx sw/source/uibase/uiview/view.cxx Change-Id: Icd3f96a922e7d1aec0d52e90df87ec45790c9807
2016-07-21sw lok: fix shape text editing with multiple viewsMiklos Vajna1-6/+3
When changing the active view shell, sw::DocumentLayoutManager::GetCurrentViewShell() is not instantly updated, only when e.g. the focus changes. This means that calling setView() + paintTile() pairs on random views typically did not use the matching view shell, but the last one. This has a visible effect when editing shape text, as the non-text-edit views had the outdated shape text visible, unlike on the desktop. Fix the problem by using SwDocShell::GetWrtShell() instead. Change-Id: Ia4b67d0a8931692ed4fc5c5e97cc1a09ef81e647 (cherry picked from commit 5a3653f87502e40cf00d8f1ed1c0ecf5a979e67d)
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-20sw lok: mix missing invalidation due to page calc in visible cursor changeMiklos Vajna1-1/+3
Steps to reproduce in gtktiledviewer: - two windows, then enable edit in both - view #0: go inside a word - view #1: select the same word - press Del in view #1 -> no invalidation Fix the problem by changing the LOK-specific GetPageNum() call in SwVisibleCursor::SetPosAndShow(), so that it doesn't re-calculate the frame, that way later when SwLayAction::TurboAction_() attempts to re-calculate the layout, then the frame will be still invalid, and that re-calculation then triggers the necessary invalidations. Change-Id: I8c4472b9809537fcbd4a20c73f39be7ebca16b1f Reviewed-on: https://gerrit.libreoffice.org/26802 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 6168f10b6280b2d60de44a333f3f1dc23cbb9bcf)
2016-07-20Remove unused SfxObjectShell::libreOfficeKitCallback()Miklos Vajna1-4/+0
All clients have been converted to use SfxViewShell::libreOfficeKitViewCallback() instead. Change-Id: I793dad5194769f331037b12a1b1afba96ddea4ba Reviewed-on: https://gerrit.libreoffice.org/26584 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit ed2d342e97e43ff25f450ab6a5752baded6813e4)
2016-07-20Remove no longer needed ImpEditView::mpLibreOfficeKitSearchableMiklos Vajna1-12/+0
All clients has been ported to use ImpEditView::mpLibreOfficeKitViewCallable instead. Change-Id: I3a2513ac5900f801a2e7aec79807f4e333dfba3d Reviewed-on: https://gerrit.libreoffice.org/26561 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 03e83de83bcc640cf359fe7997edcdadb5067b36)
2016-07-20sw lok: add LOK_CALLBACK_TEXT_VIEW_SELECTIONMiklos Vajna1-20/+3
So a view can be aware where selections of other views are. Change-Id: I5026b1ff2b99a4eedfd0bde32a05ceb8e2f424bc Reviewed-on: https://gerrit.libreoffice.org/26542 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 9f66db9c474f71f43d7a3667230241fd4fa4183f)
2016-07-20Remove no longer needed vcl::ITiledRenderable::registerCallback()Miklos Vajna1-4/+0
All clients has been changed to use SfxViewShell::registerLibreOfficeKitViewCallback() instead. Reviewed-on: https://gerrit.libreoffice.org/26540 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit e65b5c19985d725779d8381cc3bd75c441c0ff2e) Conflicts: include/vcl/ITiledRenderable.hxx Change-Id: I2538268dc9c4b449f68b5d2b05a72de584c29fd0
2016-07-20Remove no longer needed SdrModel::libreOfficeKitCallback()Miklos Vajna3-24/+2
All former clients are changed to call SfxViewShell::libreOfficeKitViewCallback() instead. Reviewed-on: https://gerrit.libreoffice.org/26521 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 3f6ad98c4764402dc6e876106867e49e3e888f8f) Change-Id: Ic5dcf0a8a4241338fcd6941f13ce438157676481
2016-07-20sw lok: add LOK_CALLBACK_INVALIDATE_VIEW_CURSORMiklos Vajna2-11/+22
So a view can be aware where cursors of other views are. Reviewed-on: https://gerrit.libreoffice.org/26513 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit c544a8b674dd7ac9dd466a84a440ede030942438) Change-Id: I6133fb55aa2869843c0284b7d76264bab3b3d5da
2016-07-20sw: prefix members of SwWriteTableMiklos Vajna3-148/+148
Change-Id: I4e8885b9fd85fdecec4f936c3c306887f1964c4b Reviewed-on: https://gerrit.libreoffice.org/26498 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit aab2af1557d00a76258899c97bc024e85adb0ba0)
2016-07-20comphelper lok: remove the g_bViewCallback globalMiklos Vajna9-91/+21
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)