summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-09-14desktop lok: avoid unnecessary setPart() in paintPartTile()cp-5.1-6Miklos Vajna3-0/+98
If possible, switch views, not parts, that way started Impress text edits don't end as a side-effect. Change-Id: I3f18d4dda6bc24235bf1219416f153248a867fa4 (cherry picked from commit bee4ff508a456a1552aacdf6fc838b8b7cffb9ec)
2016-09-14sd lok draw text: make sure watching views have no cursorsMiklos Vajna2-0/+71
These additional views are only created to follow the updates done in the editing view, not to contribute additional cursors. With this, if the first view edits a shape text and the second view is created, then no unwanted text view cursor is created in the first view for the shape text from the second view. Be precise in the unit test and make sure that cursors from all views are hidden, because even without a fix the cursor of view #2 is hidden, but not from view #3, so the test wouldn't fail without the fix. (But hardcoding the 0-1 and 2-3 view IDs exposed by Impress before/after initializeForRendering() would be ugly.) Change-Id: Idf64f7bfcc35c98a5eada9a0a523a9b45b65a211 (cherry picked from commit eefccb4a103729e73ba7dcb512c615bc161d7b2b)
2016-09-14sfx2: use range-based for loop in lokhelperMiklos Vajna1-4/+2
Change-Id: I7c3421231dd74c8d1e2678a6aee92288fdd3221a (cherry picked from commit ecc29bf323a83b0379ffed31057c8ab409e0d2d2)
2016-09-14missing headerAndras Timar1-0/+1
Change-Id: I7a31c08c25df1b72ac748550ac0c9c22f210941d
2016-09-14Bump version to 5.1-6Andras Timar1-1/+1
Change-Id: I421d2e67ff8b1f94184dfebc02a4475cdf85e13d
2016-09-14fix weird selection problem in desktop editengAndras Timar1-1/+4
Change-Id: I78c68b5a79db816ea4d0bdf3d75dd1ba4c269106
2016-09-14sw draw text: emit LOK_CALLBACK_VIEW_LOCK from registerCallback()Miklos Vajna2-0/+11
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 Vajna5-4/+37
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 Vajna9-8/+95
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 Vajna3-4/+14
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 Vajna4-10/+59
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 Vajna2-0/+11
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 Vajna4-1/+39
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-12gtktiledviewer - Calc fix: selection handlers were not removedMarco Cecchetti1-0/+3
Change-Id: I2b4ad4dbf281458d0994eff176a2f62e20fb603b
2016-09-11LOK: we use callbacks latch for not missing messages sent very earlyMarco Cecchetti3-1/+33
- lok::Document::setCallbackLatch: used on document load for set/unset the latch - now cell cursors of other views are correctly notified to the new view Change-Id: Ife6dca0e3e329b801d44070f55869afe95a2f313 Reviewed-on: https://gerrit.libreoffice.org/28811 Reviewed-by: Marco Cecchetti <mrcekets@gmail.com> Tested-by: Marco Cecchetti <mrcekets@gmail.com>
2016-09-10Revert "LOK: we use callbacks latch for not missing messages sent very early"Marco Cecchetti5-54/+19
This reverts commit 404feac7e9212c57124a1e6219b6d6125c2bbd14. Change-Id: I3d546d31111a119ce008f99fa77b087e32cbe7af Reviewed-on: https://gerrit.libreoffice.org/28810 Reviewed-by: Marco Cecchetti <mrcekets@gmail.com> Tested-by: Marco Cecchetti <mrcekets@gmail.com>
2016-09-09LOK: we use callbacks latch for not missing messages sent very earlyMarco Cecchetti5-19/+54
- lok::Document::setCallbackLatch: used by a child session for set/unset the latch - lok::Document::registerCallback has a new boolean parameter used for setting the latch state just before the callback is actually registered for a (new) view - now cell cursors of other views are correctly notified to the new view Change-Id: I80ae5556f61b1a41e703688491cca1faa8621a43 Reviewed-on: https://gerrit.libreoffice.org/28789 Reviewed-by: Marco Cecchetti <mrcekets@gmail.com> Tested-by: Marco Cecchetti <mrcekets@gmail.com>
2016-09-09LOK: new callback dropping implementationMarco Cecchetti2-34/+168
Now view callbacks have their own collection of last states where the key is made up by both the view id and the callback type. Callback dropping based on the last state is no more handled on queueing but on flushing, since what really matters is the last performed callback (for each callback type). Anyway in order to not modify the order of callbacks, that could be changed when an already queued callback is superseeded, dropping still occurs on queuing too, just by looking for the last queued callback of the same type. The result is a substantial reduction of redundant callbacks and fix the following problem in loleaflet: when there are more views for a speadsheet and cell cursors for two view are placed on the same cell, a continuos swapping between the two cell cursors can occur. That was due to a sequence of "EMPTY" and coordinates messages or cell cursor and cell view cursor messages which were sent in an alternating way. Change-Id: I79e14d11d4e8590aff715181e3410ad88c4e6175 Reviewed-on: https://gerrit.libreoffice.org/28788 Reviewed-by: Marco Cecchetti <mrcekets@gmail.com> Tested-by: Marco Cecchetti <mrcekets@gmail.com>
2016-09-09LOK: tidy up `CallbackFlushHandler::queue`, improved cell view cursorMarco Cecchetti2-79/+108
Rewritten the switch statement in `CallbackFlushHandler::queue`: - Now, the new callback data is emplaced after removing all states overridden by the new one. - View callbacks are checked not only for the same type but even for the same view id: that allowed to fix the following issue: starting from the 3rd view for a spreadsheet it could occur that only the cell cursor of the previous last view was displayed in the new view. Change-Id: I2b63526deb4dca39e3a1f430443ebc5d0f61938d Reviewed-on: https://gerrit.libreoffice.org/28787 Reviewed-by: Marco Cecchetti <mrcekets@gmail.com> Tested-by: Marco Cecchetti <mrcekets@gmail.com>
2016-09-09Fixed several WerrorsMarco Cecchetti3-4/+6
Change-Id: I97617049830dbab0ff04640a2eaecfbe39cf8305 Reviewed-on: https://gerrit.libreoffice.org/28786 Reviewed-by: Marco Cecchetti <mrcekets@gmail.com> Tested-by: Marco Cecchetti <mrcekets@gmail.com>
2016-09-04CppunitTest_xmlsecurity_signing: fix typo in testODFBroken()Miklos Vajna1-1/+1
On a system where the certificate can be validated, the expected result is OK, not PARTIAL_OK (copy&paste problem from OOXML). Change-Id: I1b52921498de24c9a14a780bf48b791ec1e0c706 (cherry picked from commit 08dadbd90ec29011dc2367493f49c57d75f1e51b)
2016-09-03LOK: queue-up events while processing client callsAshod Nakashian2-23/+65
To prevent feedback effects and improve performance, we now queue up events fired during the processing of a client call on the LOK API. This has the advantage of giving us a chance to compress redundant events and to combine others (where possible) into fewer ones. Change-Id: I2f6ea12c5d85205e6495cb130f6a6262534b6bb2 Reviewed-on: https://gerrit.libreoffice.org/28311 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> (cherry picked from commit ce7484ffff5ccb7c41975da1ac453c6cbd49531f) Reviewed-on: https://gerrit.libreoffice.org/28652 Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-09-02sd lok: implement SfxViewShell::NotifyCursor() APIMiklos Vajna11-19/+58
The same API is already implemented in sw and sc already, the sd implementation allows selecting a shape in one view, then creating a second view, and seeing the selection of the first view in the second view, without de-selecting and re-selecting the shape in question in the first view. Change-Id: Ia36e4772584d132f1ff6a7eb07ca4cadaa384ee9 Reviewed-on: https://gerrit.libreoffice.org/28623 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 1e1eb87f36095acefe73579448ceef8442beba5f)
2016-09-02svx: move GetSfxViewShell() to SdrMarkViewMiklos Vajna5-13/+47
... from SdrObjEditView. This way SdrMarkView can avoid SfxViewShell::Current() calls, and it can avoid clearing the LOK graphic selection of the old view when constructing a new view. With this, an existing graphic selection in an Impress LOK view is no longer cleared when creating a new view, thanks to the sd::View::GetSfxViewShell() override. Change-Id: I70a287aa9c2265bf59a9fb18e0c3839b8f119bbc Reviewed-on: https://gerrit.libreoffice.org/28618 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit c152008943160fa901ef8a356515a6a074370ff0)
2016-09-02sw lok: avoid hiding / showing sdr mark handles on focus changeMiklos Vajna3-2/+46
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-01Bump version to 5.1-5cp-5.1-5Andras Timar1-1/+1
Change-Id: I2b39f5bf5462640e59bcd40602f45f4b6cc73af5
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-01sd: fix un-sorted SidArray in FuChar::DoExecute()Michael Stahl1-1/+1
Triggers an assert in SfxBindings::Invalidate(). (regression from ecc7308efa973fd1f1985ff9a0a0f01414b73f2b) Change-Id: Ida5b6c006ef6b8a839962c4f09c8341eee980270 (cherry picked from commit 52bac50deb628cb21c88d5dcab032d4980bb8974) Reviewed-on: https://gerrit.libreoffice.org/28551 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit fb2f68f09750fd54a97fb2eba79bc49ab3ffbca2)
2016-09-01Revert "fftester: non-contiguous cells"Michael Stahl2-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-01Resolves: tdf#83376 do not let linguistic tools fall back to known languagesEike Rathke1-4/+4
Falling back to known locales was necessary before the new language tag implementation that can register "unknown" tags on the fly. In fact here we want to handle tags unknown to us and not fall back to worst case en-US even, so that dictionaries, grammar checkers, thesauri et al for any language tag can be used with such tagged document content. Change-Id: I06e54f41e00e69779b4c0cbbc891f250545a17d2 (cherry picked from commit 04311182b6fadcbdeef7aec15c7eea0240ee628c) Reviewed-on: https://gerrit.libreoffice.org/28505 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 76538731fb60c8563c5538101bdafe5434b681b8)
2016-09-01fftester: empty tabbox protectionCaolán McNamara2-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-01fftester: topcontext checkCaolán McNamara2-1/+2
Change-Id: I2045ce82a1d536ab566e6a1218bea9c6a6696024 (cherry picked from commit a3d74764d89e396dd7e8e7812ea64a062d6aed85) Reviewed-on: https://gerrit.libreoffice.org/28422 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com> (cherry picked from commit b85ce724410ef0a54f63cf68445e0f59641d5ab4)
2016-09-01Resolves: tdf#88953 byref args incorrectly passed in basic->c++Caolán McNamara3-2/+4
partial revert of commit 22b094f5d8e1e82375b135abd3a6f99a9a555244 Date: Tue Jul 14 14:50:07 2015 +0200 loplugin:unusedmethods basic and partial revert of... commit e2080e70fe8b085f18e868e46340454720fa94ca Date: Wed Jun 18 12:14:29 2014 +0200 new compilerplugin returnbyref and revert of... commit 536051f8862203e0e115a5394a6379acd83cc8fe Date: Wed Jul 15 14:04:01 2015 +0200 fix Windows build after commit 22b094f5d8e1e82375b135abd3a6f99a9a555244 "loplugin:unusedmethods basic" Change-Id: I612937334fdb75365080c98a9d4da5ed7ae647e3 (cherry picked from commit 4a647a04a7881964ce13b541399f89e4ab042ea8) Reviewed-on: https://gerrit.libreoffice.org/28250 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com> (cherry picked from commit 4221a87f03d823f9f8c8b92d5fba42bd359152fe)
2016-09-01update creditsChristian Lohmaier1-1490/+1558
Change-Id: I20497f102f212a66525ca7be2771baef4b8b55a5 (cherry picked from commit 1b78ee6fc00924fd8d502dc92b82738a404cee34) (cherry picked from commit d011e37962494c09c25b30aba3a22998d6fd4c74)
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-01sfx2: nullptr pViewShell was seen in SfxLokHelper::getView()Miklos Vajna2-4/+19
I'm not sure how to trigger this reliably, but Pranav got this: #0 0x00007fb2f471bbf0 in SfxLokHelper::getView(SfxViewShell*) (pViewShell=0x0) at sfx2/source/view/lokhelper.cxx:82 #1 0x00007fb2f75edf4f in doc_paintPartTile(LibreOfficeKitDocument*, unsigned char*, int, int, int, int, int, int, int) (pThis=0x7fb290253c40, pBuffer=0x281fbd0 "", nPart=0, nCanvasWidth=1024, nCanvasHeight=256, nTilePosX=0, nTilePosY=11520, nTileWidth=15360, nTileHeight=3840) at desktop/source/lib/init.cxx:1338 Given that SfxViewShell::Current() may indeed return nullptr (e.g. during shutdown), change SfxLokHelper::getView() to return -1 in that case, and adapt client code to handle that. Change-Id: Ia191c843c8a993f3d7157de432af57964c0a8f63 Reviewed-on: https://gerrit.libreoffice.org/28583 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit f96fa389f950dd97bd213402fb5ea6eb114f9ab7)
2016-09-01sc lok: implement SfxViewShell::NotifyCursor() APIMiklos Vajna5-7/+35
This way a new Calc view gets the cell cursors of existing views even if they don't move after registering the LOK callback in the new view. Change-Id: I5babc9921d37217ac199d4c19ed33cbb9620d119 Reviewed-on: https://gerrit.libreoffice.org/28581 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit fcf417a77369853195d6727b2db8df290663256e)
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 Vajna10-20/+56
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-09-01lokdocview: handle empty LOK_CALLBACK_DOCUMENT_SIZE_CHANGED payloadMiklos Vajna1-1/+5
Calc omits the document size in the payload in several cases, and online.git handles that, so handle it in lokdocview as well for now, instead of fixing up all the sc code to always emit the doc size in the payload. Change-Id: Ib2cca1770d2a160e32540e3a3158eb00bf13207b (cherry picked from commit 127a34ef2cf9fe0ac13a273c12c6d45ef57eaf49)
2016-08-31sc lok: implement getCommandValues(.uno:AcceptTrackedChanges) APIMiklos Vajna7-30/+152
Unlike in Writer, there doesn't seem to be an existing UNO API that can be reused here. Change-Id: I011a2f34d4d09ad604991637322ceadf6b2eb181 Reviewed-on: https://gerrit.libreoffice.org/28498 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 3ab2b0625bb8ab8447a508d654d6e8c95d50dbd5)
2016-08-31gtktiledviewer: don't crash on unimplemented tracked change listMiklos Vajna1-0/+3
As it's currently implemented only for Writer. Change-Id: I8c281b2294564472f2c2c5b7de5dd3f86a11a94a (cherry picked from commit 30b84816eb5c6cd44bdee459cac1bb9f90859aec)
2016-08-30sw: use SwModule::GetRedlineAuthor() in SwTextShell::ExecField()Miklos Vajna3-21/+14
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 Vajna3-2/+34
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 Lillqvist4-16/+75
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-23sc lok: fix re-sizing several rows/columns at onceHenry Castro1-6/+24
Reviewed-on: https://gerrit.libreoffice.org/28351 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Henry Castro <hcastro@collabora.com> Conflicts: sc/source/ui/view/cellsh3.cxx Change-Id: I7b3760432aa4b3120bfd586a1abc42a46fff0df8
2016-08-23Look also for "RDPDD Chained DD"Tor Lillqvist1-1/+2
Apparently in some remote desktop situations the device string uses "RDPDD" and not "RDPUDD". No idea what the semantic difference is. Change-Id: I85532b90d759d02fffb73d0f3d22166aefd4edab (cherry picked from commit 1acd165eae7bf39ec89694fa85195b7e56278ef1)
2016-08-23tdf#101077 make double->str conv. locale-agnosticDavid Tardon2-0/+61
Change-Id: Ibb87f4a14fda6957149ca52083387760ff6e60a3 (cherry picked from commit 8d26a169794083f047a57e5c8d3f5da0aaab2583) Reviewed-on: https://gerrit.libreoffice.org/28081 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit fc79186d80ffa8e734727c555456165af6dd51c4)
2016-08-23tdf#96607 'Save as' doesn't update global auto-recovery stateanwilli51-0/+13
The auto-recovery service maintains a list of structures (one for each open document) containing information needed to carry out the auto-save functionality. One such piece of information is the location of the backup file, stored in a struct member named 'OldTempURL'. At every auto-save interval, this list is iterated through and a function (implts_saveOneDoc) is called during each iteration to save the current state of the associated document. The algorithm works as follows: 1. A new backup file URL is chosen so as not to conflict with any already existing backup files in the backup directory. This URL is based on the file name and incorporates a number (starting at 0) that is incremented until a name is chosen that doesn't conflict. 2. The document is saved to this new backup file URL 3. The previous backup file (indicated by its structure's 'OldTempURL') is deleted 4. The new backup file URL is stored (in its structure's 'OldTempURL') for the next time the file needs to be saved. Assuming you start with a new Writer doc and then make some changes, when it is time to auto-save, the backup file name 'untitled_0.odt' (excluding path) will be selected, the latest state of the open file will be written to that backup file, and the full URL for the backup file will be saved into the struct 'OldTempURL' member. The next time changes are made and an auto-save occurs, this algorithm will result in the name 'untitled_1.odt' being selected, the file contents saved into this new file, 'untitled_0.odt' being deleted, and the full URL for the new backup file being saved in 'OldTempURL'. The third time through results in 'untitled_0.odt' being selected (since this file doesn't exist on disk), and subsequent iterations of auto-saving cause the backup file name to alternate between the two aforementioned. The problem occurs during a 'Save as' operation. When this happens, the backup file is deleted (which is fine - it was just saved, and the next auto-save will back it up) but 'OldTempURL' is not properly reset (see below for more info.) During the next auto-save, 'untitled_0.odt' will be selected for the new backup file name (since no file exists by this name), and one of two things will happen (based on how many auto-saves have occurred): 1. 'OldTempURL' points to 'untitled_1.odt', and the algorithm above continues to work correctly (at least in that it continues to backup file contents.) 2. 'OldTempURL' points to 'untitled_0.odt', the name chosen for the new backup file. In this case, the document contents will be saved to this file (step 2) but then the file will be deleted (step 3). 'OldTempURL' will maintain this URL from then on out, causing this case to be hit for all future auto-save intervals. So, 50% of the time (30 minutes out of every hour) auto-save will stop backing up file contents on a 'Save as'. The function that handles the 'Save as' case (implts_markDocumentAsSaved) clears 'OldTempURL' and sets other relavent struct members for a local variable copy of the global struct, but doesn't copy them back. :( These changes are effectively lost when the function returns. There are several other cases where this appears to be happening as well, but more work is needed to determine whether this is actually the case: - implts_prepareSessionShutdown - implts_saveDocs, handling the 'dangerousDocs' and in a few other places - implts_openDocs - implts_resetHandleStates Also, there is some JUnitTest code for auto-save, but it is currently disabled (and fails to run successfully.) It'd be great to get these working again, or to just write python equivalents. Implementing this would like take me a while, though, so for now I just tested manually to ensure that this fixes the issue. When I have some more time I'd like to work more on this, but I wanted to send this patch in for now to address bug #96607. This may also address bug #99890, since some of the struct members that don't make it into the global state relate to the file name. I haven't explicitly tested this case, though. Change-Id: Ic702d6f78e60c7cf828a1564ccca118dd45d152b Reviewed-on: https://gerrit.libreoffice.org/25948 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org> Reviewed-on: https://gerrit.libreoffice.org/27921 Reviewed-by: Eike Rathke <erack@redhat.com> (cherry picked from commit e3759a3154de534a5edfd69f7face5b5c29c1ea9)
2016-08-23Resolves: tdf#101165 crash on deselecting all filtersCaolán McNamara1-1/+4
(cherry picked from commit b101ff56e874824fa9f0d37a8468b07dbf3d002c) Change-Id: I49162bb73bf6dbef5cff68d35d10da2c47d9f2b5 Reviewed-on: https://gerrit.libreoffice.org/28165 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> (cherry picked from commit ecef794528282fa7e9fba93b6eff1dac097dae99)