summaryrefslogtreecommitdiff
path: root/sd
AgeCommit message (Collapse)AuthorFilesLines
2017-04-23ofz#877 reference to stack alloced obj outlives objCaolán McNamara2-12/+9
(cherry picked from commit ae174b009bcf0f84073b9ebbf01ad31b274b789e) Change-Id: I8c854e2f651f8bf0018e8249827aae0fe23057e7 Reviewed-on: https://gerrit.libreoffice.org/35272 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com> (cherry picked from commit e8a070fd1170a7452d57304d6cf979f0c9961a0e)
2017-04-23Resolves: tdf#106557 don't crash on missing line spacing argumentCaolán McNamara1-177/+174
this is all a bit addled, but at least don't crash Change-Id: I19c35205446cebc83b8299839bcab8e02ff7c07d (cherry picked from commit ab10f03ec4dc7d5d7659fb62c59972c80221f733) Reviewed-on: https://gerrit.libreoffice.org/35262 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com> (cherry picked from commit 5d1c37e416d856a07c3dc6a51381eabb13c467ae)
2017-03-23lok sd: Fix crash when searching.Jan Holesovsky1-5/+14
This is a follow-up of ed5450f2a5ed8e72b48b4d976217746cea04a5c9 where the check for the HasView has been removed. Turns out that there are conditions when this really can happen, leading to crashes in the LOK searching. Unfortunately I did not manage to find a reliable reproducer to create a unit test :-( - so I suspect this commit might be more a workaround than a root cause fix. Would be great to find out the exact conditions leading to the situation when the EditEngine does not contain the EditView, and evaluate this fix against that - but that's hard without a reliable reproducer. A unit test for this fix is missing from the same reason. The unit test from ed5450f2a5ed8e72b48b4d976217746cea04a5c9 still passes. (cherry picked from commit 9fc3d9b445d8c2bb8e259b42430cfe089642ab03) Change-Id: I1cca7219817119d27a224b35efb660a84d35b8fa
2017-03-21fixup for 'sd lok: Don't search on master pages & notes in Impress.'Andras Timar1-1/+1
Change-Id: I7049e45b1f1f22e32cc4bcbda89586491c4c5d9b
2017-03-17sd lok: Don't search on master pages & notes in Impress.Jan Holesovsky2-3/+24
Change-Id: I43ed9f53618dca09e0289bffadc2c05056e0eebb
2017-02-10tdf#103567 xmloff: ODF import: fix loss of events on SVG multi-imageMichael Stahl2-0/+47
For SVG there are 2 draw:image children in the draw:frame, and the SdXMLEventContext::EndElement() applies the content of office:event-listeners to the shape created from the last draw:image and then MultiImageImportHelper::solveMultipleImages() throws it away because it's the bitmap fallback of the SVG. Avoid that problem by calling solveMultipleImages earlier: The ODF schema ensures that all the draw:image elements occur before the optional property-bearing child elements of draw:frame, so we just call solveMultipleImages on the first such optional element, so that all subsequent properties get applied to the one surviving shape. (likely regression from 44cfc7cb6533d827fd2d6e586d92c61d7d7f7a70) (cherry picked from commit 791431d7e2485652c96fac7c15f47aa125271ee0) Change-Id: I2be5f6f424dbfd90ca2179ce6f9057929540e762 Reviewed-on: https://gerrit.libreoffice.org/34087 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 bee00eafcf4ade2b5d9139ac751d39429fb52311)
2017-02-10animation duration/scale etc don't fill horizontal spaceCaolán McNamara1-0/+4
(cherry picked from commit d18089ec0a2a8758eda889a7b9b23b66128484d5) Change-Id: Ie211827c2f8231384b98fb08e0371a839e3dc41c Reviewed-on: https://gerrit.libreoffice.org/33997 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 43d64e9b0b634a682f5987bc6401e3207af25598)
2017-02-08tdf#105182 sd: avoid iterating too far in SdOutliner::Initialize()Michael Stahl1-1/+4
Considering the valid indexes are extended by "-1" for backwards iterators and "size()" for forward iterators, it's obvious that a not-yet-at-the-end-in-the-other-direction iterator can be incremented once, but not necessarily twice. Why this code even wants to increment it twice isn't obvious to me. Change-Id: I578c8c6202049ebe6dbed41b8276a6bfa0566bbc (cherry picked from commit aa1ee198b5b55d0a92418eb3294c93553e8513dd) Reviewed-on: https://gerrit.libreoffice.org/32975 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> (cherry picked from commit 5f081ce502e5eeee528049fc76657d623afcee24)
2017-02-08tdf#105199: Keep URL intactStephan Bergmann1-1/+1
(cherry picked from commit 6a68e364faa0d384f1e3bf397f5decaadecf9b3b) Conflicts: sd/source/ui/dlg/PhotoAlbumDialog.cxx Change-Id: I85681fcc81246414332f88dc46ce4a4b60896c97 Reviewed-on: https://gerrit.libreoffice.org/32931 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com> (cherry picked from commit 96e0beb0ef99a0840ecf434c3d726eebaa3c745e)
2017-02-08tdf#103950 Undo does not revert bundled font size changes for table cellsNoel Grandin5-6/+35
Reviewed-on: https://gerrit.libreoffice.org/30902 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 90646b4966c73637ddf592acd05b3091fb3fa41f) Reviewed-on: https://gerrit.libreoffice.org/30956 (cherry picked from commit be2de90a0f32fb6054691cdba4ef533f236a1072) Change-Id: Id41b7777739bfa93610f955e6c31f8bb979b8e2c
2017-02-08tdf#103473: Ensure positive rectangle sizeMike Kaganski2-0/+18
Also remove conversion of both negative scales into rotation, because it is handled by flip; use strict comparison instead of approximate float less because it's correct here, and also because basegfx::fTools::less ultimately uses rtl_math_approxEqual, which description states: attention approxEqual( value!=0.0, 0.0 ) _never_ yields true. Unit test included. Reviewed-on: https://gerrit.libreoffice.org/30373 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit 1c708eee636c0cdf3da2ec62849618f3262044bc) Reviewed-on: https://gerrit.libreoffice.org/30378 (cherry picked from commit 92d0b2bc79033e8f2cd70c298ad746b38b4eea03) Change-Id: Ia878fce360cf8aed539d95f2d4a1a3ad94379978
2017-02-08tdf#103083 - EDITING: Cut and Paste changes bullet point formattingNoel Grandin3-36/+1009
The bug is that, on paste, the incorrect stylesheet is set on a paragraph node, leading to the loss of bullet formatting information. There are two copies of this style-resetting code, one in sd::View::OnEndPasteOrDrop and the other in Outliner::ImplSetLevelDependendStyleSheet. The first one was introduced by: commit 8aa3d1214b17873f6c3d79d95da8bc33d78298c4 Author: Rüdiger Timm <rt@openoffice.org> Date: Fri Jun 6 11:11:54 2008 +0000 INTEGRATION: CWS impressodf12 (1.62.4); FILE MERGED And the second one by: commit a6b3e8c1495151b99c3f2f0eadf5881654cbd3b3 Author: Rüdiger Timm <rt@openoffice.org> Date: Fri Jun 6 11:30:58 2008 +0000 INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED The second one appears to do the right thing, and fixes this bug, so I am deleting the first one. Reviewed-on: https://gerrit.libreoffice.org/30009 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit 7e4887679924df28da2083735e0367ecccb8180b) Reviewed-on: https://gerrit.libreoffice.org/30227 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit c6b34fd6db956a7b3e695c412131715f32a6e2a9) Change-Id: I5eede7fe7bd3aa24696b495e740d1a4df124bd3a
2017-02-06tdf#31488: Background fill changes its color when saving a PPTX file to ODPTamás Zolnai2-0/+34
For a gradient fill we need to generate a name because ODP export works with this name. In case of shapes it works because when fill attribute changes some internal name generation is triggered. The same thing doesn't work for slide background so generate this name explicitely in oox code. Reviewed-on: https://gerrit.libreoffice.org/33937 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit aeece6f198685b96579bdbd1409b3535fb5f09d1) Change-Id: Ic6ebf37ef3d66a9c274747ca04653363b1fe6d02
2017-02-01bnc#946678 tdf#105502 sd increase font size: handle table selectionMiklos Vajna1-0/+43
In part of a table shape is selected, then only operate on the selected cells, not on all of them. (cherry picked from commit cbc84a6599c08e5c79e544212c69c6946d0cdbf0) Conflicts: sd/qa/unit/tiledrendering/tiledrendering.cxx Change-Id: I3a9ba2b99bcaa2e355b6fcdafdd142d4a809bce6 Reviewed-on: https://gerrit.libreoffice.org/33610 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2017-01-04tdf#81754: Unit test for the loss of text on save of pptx.Jan Holesovsky3-1/+42
The problem itself was fixed by commit 2ad50c9a8c8411a57bbbd7a52734e72ffc4cc0ee. Change-Id: Ie7f0781e1f5a4d6c5297882a5f64a68b85558515
2016-12-19lok: refill font list if emptyHenry Castro1-0/+1
After preinit stage the font list is empty when creating documents. Change-Id: Ia6938d521626f4b4022f0f993e77c017e4932415 Reviewed-on: https://gerrit.libreoffice.org/32108 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2016-12-09tdf#104445: PPTX import: Extra bullets are added to placeholder textTamás Zolnai2-0/+53
Reviewed-on: https://gerrit.libreoffice.org/31771 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit cb598029835477326b190bc99abd31a487cc5a91) Change-Id: I25ce98ed391f70292bed6238645b121b9cf50d5e
2016-11-27tdf#104201: PPTX: Group solid fill is not importedTamás Zolnai2-0/+36
Reviewed-on: https://gerrit.libreoffice.org/31263 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit 7c5aaa254f444d54b9ebf6574f0ccd37af548ee5) Change-Id: Iec273714108598d7017e73a9e7d384f8410d6ee1
2016-11-18tdf#104015: PPTX import: Title shape does not inherit fill propertiesTamás Zolnai2-0/+40
...from slide master. The problem caused by that PPTX files contains not a one-level master slide set, but has two levels: one called slide master, other called slide layout. Slide layout inherit properties from slide master and normal slide inherit propetries from slide layout. Bug appeared because, slide layout inherited properties were not forwarded to the normal slide. Reviewed-on: https://gerrit.libreoffice.org/30969 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit 8d613870b2cd2e3e4396b4fa97dbd8080fda8f52) Conflicts: oox/source/drawingml/shape.cxx Change-Id: I587582498cf4315087f9a576c1b7fc41ee23e2fd
2016-11-18Fixed build error in unit test for tdf#103876Marco Cecchetti1-1/+1
Change-Id: I7b1be7d1318385ad57d6fcda828ea61ccba65881
2016-11-17tdf#103876: PPTX import: Title shape's character properties are wrongTamás Zolnai2-0/+21
Text properties are applied on a shape during text insertion, but if a placeholder shape has no text, then it has a placehodler text which should have the right text properties. Reviewed-on: https://gerrit.libreoffice.org/30881 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit 5c7f3e4a7190bf9821bed102f96a926c9a894e59) Conflicts: oox/source/ppt/pptshape.cxx Change-Id: I54175d52dd25915ee4d7153298e01ec07c6be1f6
2016-11-10tdf#103792: No placeholder text imported for empty title shapeTamás Zolnai2-0/+21
Reviewed-on: https://gerrit.libreoffice.org/30731 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit dc024cdd91e3c33eeff8eea22fdef0d90d4dd2c0) Change-Id: I95b4358f0d4311e8f427c8de18863049fb718d9b
2016-10-10Engine() return mpOutliner, so can crash if Engine() used post deleteCaolán McNamara1-0/+4
if Deactivate called during ::dispose (cherry picked from commit 86617760eb8bc6c0b2713b9496ade9203d1077a5) Change-Id: I066dcc52278f12442de0281c8d783353aed5a186 Reviewed-on: https://gerrit.libreoffice.org/29444 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: jan iversen <jani@documentfoundation.org> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 0570ddd7377c825e6cff7e71d07452223d230b6b)
2016-10-10Resolves: tdf#101711 revert attempt to drop unused bg imagesCaolán McNamara3-64/+5
for 5-2/5-1 simply revert the effort Revert "Related: rhbz#1353069 don't clear XATTR_FILL* from stylesheet if..." This reverts commit 19c191a0a92b6ae9ca86aa4ee7afb887fd42a209. Revert "Resolves: rhbz#1353069 don't clear XATTR_FILL* from stylesheet if..." This reverts commit fad4d7877ac8d04ab82e8acd21205f315d6eab1f. Revert "rhbz#1326602 avoid exp. bg bitmaps from deleted slides" This reverts commit fd45334b49c09538598f82f5ffa2f61f6bdd9d24. Change-Id: I591083b6b1d7b08316ee24c0788386799d01724b Reviewed-on: https://gerrit.libreoffice.org/29491 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org> (cherry picked from commit 8127ac5412b0af8ed7985e07ab11b3241a4e659e)
2016-10-04fix bug in DocumentSettings::LoadList when testing result of lastIndexOfNoel Grandin1-1/+1
managed to trigger it in a flat ODF test document of mine. I suspect that this might have something to do with one of the various conversions to OUString, the old String APIs might have returned -LARGE_INTEGER instead of -1. code was introduced in commit cbcfda9b2079ea4ef83b2a42828408b5f70f7692 Author: Michael Meeks <michael.meeks@novell.com> Date: Mon Sep 5 17:22:24 2011 +0100 add XPropertyList enum, factory, and associated cleanup Change-Id: I39b4715cc12ef6366fe0466786589ef198602a98 Reviewed-on: https://gerrit.libreoffice.org/29473 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> (cherry picked from commit 9f0096d934fcdec6cd55e32a15fd438f628f894b) Reviewed-on: https://gerrit.libreoffice.org/29480 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit 85bd2c1145e23b67aafdfcc9c2ca8d720194fe97) Reviewed-on: https://gerrit.libreoffice.org/29508 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2016-10-01Related: rhbz#1353069 don't clear XATTR_FILL* from stylesheet if...Caolán McNamara1-1/+6
This is similar to de4908eb4d2f1f2ce38a37eea18a9efc4a0073b1 where the master page is not the sole owner. Which happens when copying and pasting slides which bring along a duplicate master page to an already existing one, and the attempt to remove the duplicate strips the fill properties from the shared stylesheet in use by the other regression from... commit b876bbe2cacce8af379b10d82da6c7e7d229b361 Author: David Tardon <dtardon@redhat.com> Date: Tue Apr 26 09:17:11 2016 +0200 rbhz#1326602 avoid exp. bg bitmaps from deleted slides Change-Id: I0a3a34ade2ad8464b1edb67a6e28dab45c761a2c (cherry picked from commit 914d72ee1edb351e4975a516240a38696f619217) Reviewed-on: https://gerrit.libreoffice.org/29020 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> (cherry picked from commit 19c191a0a92b6ae9ca86aa4ee7afb887fd42a209)
2016-09-29LOK: conditionally include part number in invalidation payloadMiklos Vajna1-1/+2
Since desktop/ code queues, compresses and only emits callbacks on idle, it's possible that two invalidations are in the queue, and there was a setPart() call between them. In this case it's impossible to tell what part the invalidation was sent for. Fix this by conditionally including the part number in the invalidation payload. It's off by default, a new feature flag is added to request this behavior. gtktiledviewer enables this feature flag by default, though just to show the part number in the debug output. Android doesn't enable it. (cherry picked from commit d5263c2c564c88e3dafe4c1ab8d3d9c1c48ede73) Conflicts: desktop/qa/desktop_lib/test_desktop_lib.cxx Change-Id: I73e6def848c0eb61d64e71026002c7a0e750aab4
2016-09-23sd lok: fix pixel-to-logic conversion in DrawViewShell::MakeVisible()Miklos Vajna3-0/+57
The problem, as seen by the user is that during shape text edit, sometimes just traveling with the cursor causes invalidations, which is unexpected. What happens is sd::Window::KeyInput() invokes sd::DrawViewShell::MakeVisible(), which does a pixel-to-logic conversion, but because the map mode is in general disabled in the LOK case, nothing happens. Then a bit later aVisArea.IsInside(rRect) fails, as it compares pixel and logic units, which results in sd::ViewOverlayManager::UpdateTags() scheduling an async call to sd::ViewOverlayManager::UpdateTagsHdl(), which at the end causes a full invalidation in sd::SmartTagSet::remove(). Fix the situation by temporarily enabling map mode, so we don't detect a visible cursor area as a non-visible one. (cherry picked from commit ba3d6d8a39d31316923d2326059c07b0a7e3c05e) Conflicts: sd/qa/unit/tiledrendering/tiledrendering.cxx Change-Id: I6d16f24d13143dc263a89317fbc38111e652c0ac
2016-09-20disable generation of ole previews in ODF format until after loadCaolán McNamara2-1/+10
so the user update links dialog can control their generation SdrEmbedObjectLink becomes exposed to calc so it can detect if the link dialog needs to be used to update ole links. Reviewed-on: https://gerrit.libreoffice.org/28879 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 74844277cc2194c9e43f5bd7a6f78a9603da32f3) detangle gadzillion checks into something readable no logic change intended (cherry picked from commit fad9786b06d188ba6e354620f57176f3d94a6637) + partial merge of commit c09b3e32372537be739182b02ae83a96386d1e1c Author: Noel Grandin <noel@peralex.com> Date: Tue Mar 8 13:13:59 2016 +0200 loplugin:constantparam in sw for bool bUI is always true in UpdateLinks Unmodified default SdrOle2Obj size is 101x101 svx/source/unodraw/unoshape.cxx sets a css::awt::Size maSize to 100, 100 svx/source/unodraw/unopage.cxx increases that by 1, 1 awt::Size aSize = xShape->getSize(); aSize.Width += 1; aSize.Height += 1; to call SdrObjFactory::MakeNewObject with 101, 101 so default size is 101x101 (getWidth() vs GetWidth() confusion ?) Reviewed-on: https://gerrit.libreoffice.org/28895 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 7f0a219c9ad38ae33b51ff69d545f69659691c1e) b6af93afc1f80b7fc36239c96d5e0a71fcbcb789 4d4375dff64d7b8e236d1a24322e749e04ee530f Reviewed-on: https://gerrit.libreoffice.org/28930 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com> (cherry picked from commit 2ff4c68b63c4842ec85a21287317096b6ca8e66e) Change-Id: Id1dd7ea17342140eab9307d546528747e3a98090
2016-09-20Resolves: tdf#102293 triple click results in visually unselected wordCaolán McNamara1-0/+15
in previously unselected textboxes in impress started happening after... commit 16c7f8916661df24f4681ec82f6bd4d7ad85d141 Date: Tue Jan 12 16:36:49 2016 +0000 tdf#97075 - don't render sdr overlays before we paint in impress instead flush the overlay after activating the edit object if we go on to put the cursor in there. Seems to work. Change-Id: Ib746c36d1074aee09771a3dc1d69834ce80a9c08 (cherry picked from commit 38a61ddaf63768ebe19c92d561eac6f50d67ded7)
2016-09-19sd draw text: emit LOK_CALLBACK_VIEW_LOCK from registerCallback()Miklos Vajna2-0/+15
This is similar to commit 7b784e4e3927d91a96cd0b54fc43c9b488822e47 (sw draw text: emit LOK_CALLBACK_VIEW_LOCK from registerCallback(), 2016-09-14), but this fix is for Impress. Change-Id: I995d2ed223aa6ce7845c440039d176b6beada84e (cherry picked from commit d53bb5c044f039bd2fd38977a85012b03abbe32c)
2016-09-16sd draw text: emit LOK_CALLBACK_TEXT_VIEW_SELECTION from registerCallback()Miklos Vajna2-2/+34
This is basically the Impress equivalent of commit 2ea385a54b53797ab3960869012f3ce3268eab2c (sw draw text: emit LOK_CALLBACK_TEXT_VIEW_SELECTION from registerCallback(), 2016-09-13). Change-Id: Ib138845de6db2a8ad49dc8596af3e05ec5278610 (cherry picked from commit e93b30c9d9f4deba597b73e04df7d4082b779b69)
2016-09-14sd lok draw text: make sure watching views have no cursorsMiklos Vajna1-0/+69
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-02sd lok: implement SfxViewShell::NotifyCursor() APIMiklos Vajna3-1/+31
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 Vajna1-0/+33
... 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-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-08-17sd lok: limit undo/redo access to undo actions created by the same viewMiklos Vajna4-1/+109
Unlike in Writer, the state and the exec method of .uno:Undo is different codepath so for now ignore the Repair argument of the command, assuming that the command is only dispatched if the command is enabled. Change-Id: I3bfe8d72522f32efe436e21c383c99b3612eab6b (cherry picked from commit e0a3269183bf145511361a3968dca07824923dd4)
2016-08-17LOK unit tests: document what is a view callbackMiklos Vajna1-0/+1
Reviewed-on: https://gerrit.libreoffice.org/28168 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit c3c5635b9bbd3de65760409c7f4e72b295b749be) Conflicts: sc/qa/unit/tiledrendering/tiledrendering.cxx Change-Id: Ic605ca12cebfb6fd8239829942bbc6a70f45ac06
2016-08-04sd: track view shell id in SdUndoActionMiklos Vajna3-2/+45
This helps in case of e.g. setting the page size of an Impress slide from the sidebar. Change-Id: I6247d6efcc59f2c6311dcd33d0f989a39fd7b3f9 Reviewed-on: https://gerrit.libreoffice.org/27827 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit f6283cf6b4342a0492f1127c2d7a8597255a75c3)
2016-08-04tdf#89466: Slide Background tabRishabh Kumar2-0/+6
Reviewed-on: https://gerrit.libreoffice.org/17007 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de> (cherry picked from commit 93b4bf647a5899f54ef51f8b4bfed0faa66b466e, just the SID_ATTR_PAGE_SIZE part) Change-Id: Ic3ba6b47a1e5fcaeec76c4e4ff0ba6128653af86
2016-08-04sd doc model dump: include undo manager infoMiklos Vajna2-1/+9
So that it's easy to see where the implementation for a given undo action is. Reviewed-on: https://gerrit.libreoffice.org/24243 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 7a06ef161cc27a3d1bcc8b970928f776500c267e) Change-Id: I93b8603f75d0b5a68922e02540b9db6824f4d0db
2016-08-04svx: track view shell id in SdrUndoActionMiklos Vajna1-0/+13
This is used in Impress e.g. when resizing a picture. Change-Id: I2e0a9228ed0ff9ecfd72696ef84e56f88e4c0f70 Reviewed-on: https://gerrit.libreoffice.org/27822 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 4acac00df5a85ff006ecead06c4018e88caaf401)
2016-08-02svl: implement SfxUndoAction::GetViewShellId() interface in SfxListUndoActionMiklos Vajna13-17/+34
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-02svl: avoid defaulted parameter in SfxUndoManager::EnterListAction()Miklos Vajna12-15/+15
It's a virtual function, and defaulted parameters there are problematic. Reviewed-on: https://gerrit.libreoffice.org/27772 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 6850f4e8454652ec475811860f5e8cf9bdea67a7) Conflicts: sc/source/ui/view/viewfun3.cxx Change-Id: I3f110c7ac36dfda90811b033620286ad9fce1af1
2016-07-29sd: OOoXML import: fix loss of animationsMichael Stahl6-0/+59
There are 2 different animation formats, legacy one used in OOoXML format, based on presentation:animations element, and SMIL based one used in ODF format, based on a node hierarchy with <anim:par presentation:node-type="timing-root"> at the top. The problem is that when the legacy animations are imported, they are not immediately set on the draw-page in the same way as the new animations are imported. "soffice --convert-to odp ooo28334-1.sxi" loses all of the animations, whereas loading the file in the UI and storing it all animations are converted, and if you use API load/store methods some are converted and some not depending on timing. The problem is that there is a necessary conversion step MainSequence::implRebuild() that needs to happen after all the EffectMigration calls for a particular SdPage are finished, which is only triggered by a timer MainSequence::onTimerHdl(). Fix it by forcing a call to implRebuild() from DrawDocShell::Load(). Note: SdDrawDocument::NewOrLoadCompleted() is a horribly misleading function name as it is actually called *before* loading the document. (cherry picked from commit 5206929f3a125a739adb860709586a0f50cb9611) Reviewed-on: https://gerrit.libreoffice.org/27509 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit 4ca12100ef036c6005d799e26801970118f591f4) Change-Id: I9881cb9bf2ae6ccc5fcf06602343f2d0e0704699 Reviewed-on: https://gerrit.libreoffice.org/27538 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit e36acbf3aae7c92c2724b9f3c801735f2321cf05)
2016-07-28svx lok: fix handling of text edit drawing when view/page changesMiklos Vajna2-6/+30
This is a follow-up to commit 9d91d371e92548c7f75a7d0155eecaf3769fdee6 (svx lok: draw text edits in all views, 2016-07-26). Two corner-cases are now handled: 1) When the SfxViewShell is created after begin text edit and 2) When the other draw view is already created, but at the time begin text edit happens, the other draw view shows a different page. And the opposite of these: switching away from a page were we observe a text edit done in an other view or destroying a view that observes a text edit. When the complete view goes away, then SdrObjEditView::HideSdrPage() is not called, so also try to destroy the outliner view of the text edit from SdrObjEditView::DeleteWindowFromPaintView(). The GetSfxViewShell() call in SdrObjEditView::ShowSdrPage() is important, because we let the other draw view create the outliner view, but the outliner view should invoke our view shell, not the view shell of the other draw view. Also improve the SdTiledRenderingTest::testCursorViews() testcase, so that it asserts it managed to begin text edit and use a test document that still has a single slide and shape, but the shape is not auto-sized; otherwise invalidations happen even if outliner views are not created in all draw views, so the test would pass even without the fixes. Change-Id: I2c3bb27826c6887115366db818599fc8adabc5a5 Reviewed-on: https://gerrit.libreoffice.org/27583 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 5f65ca15a2297f298536d07cfa8564a1f7c67abb)
2016-07-28svx lok: avoid SfxViewShell::Current() during constructing a new view shellMiklos Vajna2-0/+11
Currently when a text edit is started, then in the LOK case if there is an other view that shows the same page, then both draw views will have an outliner view showing the text edit. This means that in case a view shell is created after starting the text edit, that won't have an outliner view for the text edit. Before fixing this, calls to SfxViewShell::Current() has to be avoided when we're in the process of setting up a new LOK view. In case of Impress, this is a double initialization, and by the time SdrObjEditView::ImpMakeOutlinerView() is called, we're already in the process of setting up the second SfxViewShell (as part of SdXImpressDocument::initializeForTiledRendering()), but SfxViewShell::Current() still points to the old view shell. Which means that the outliner view would refer to a view shell that's deleted soon, and we crash as soon as it tries to invoke a LOK callback. Fix this by adding a virtual member function to SdrObjEditView, and override it in sd, so in case applications want to provide a more precise way of giving the view shell owning a draw view, then they can. Change-Id: Ie0005f73237d4ff9cf576bf16fa5b46280f13759 Reviewed-on: https://gerrit.libreoffice.org/27561 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit c0f1c0da77cf9f148b3f29aaf0965dfb43b8a32c)
2016-07-25sd: implement LOK_CALLBACK_VIEW_LOCKMiklos Vajna2-1/+63
So that edited shape text doesn't just disappear in other views without any indication. Change-Id: I806051492f7bc247c0e66eceda4df5eba8322aad Reviewed-on: https://gerrit.libreoffice.org/27444 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit ffd9972e2a21f6490f25c712cd0ba49e534238c8)
2016-07-21CppunitTest_sd_tiledrendering: fix undefined behavior, leading to crashMiklos Vajna1-2/+2
Execute() version that takes an std::initializer_list<> is named ExecuteList(). But that's not available in this branch, so make sure that the last argument is a nullptr. Change-Id: Iaa42ac417abec334b1c053fb7d357dce529c6956
2016-07-21sd lok: decouple vcl window focus from cursor visibilityMiklos Vajna2-3/+41
The problem was the the blinking cursor was hidden when another vcl window got its focus, so it wasn't possible to edit two shape text in parallel in two windows. The code path is like this: - show cursor, cursor is created: SdrObjEditView::SdrBeginTextEdit() -> OutlinerView::ShowCursor() - show cursor, focus case: sd::FuText::Activate() -> OutlinerView::ShowCursor() - hide cursor, cursor is deleted: SdrObjEditView::SdrEndTextEdit() -> OutlinerView::HideCursor() - hide cursor, focus case: sd::FuText::Deactivate() -> OutlinerView::HideCursor() So add a new optional bool parameter that allows not emitting the LOK_CALLBACK_CURSOR_VISIBLE callback in the focus change case. Also, if we're at it, make sure that painting emits no show/cursor LOK callbacks. Change-Id: I1068a1b1f5cd76fd09b5a79066834bfb0daebc77 Reviewed-on: https://gerrit.libreoffice.org/27335 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 6ea8084487411feea049f57712979fba4ad2fbce)