summaryrefslogtreecommitdiff
path: root/sd
AgeCommit message (Collapse)Author
2021-04-20Comparison between css::uno::WeakReference and css::uno::ReferenceStephan Bergmann
...causes overload resolution ambiguity in C++20, as observed with recent Clang 10 trunk with -std=c++2a: > sd/source/ui/framework/factories/BasicPaneFactory.cxx:327:39: error: use of overloaded operator '==' is ambiguous (with operand types 'css::uno::WeakReference<css::drawing::framework::XConfigurationController>' and 'const ::css::uno::Reference< ::css::uno::XInterface>') > if (mxConfigurationControllerWeak == rEventObject.Source) > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~ > include/com/sun/star/uno/Reference.hxx:425:28: note: candidate function (with reversed parameter order) > inline bool BaseReference::operator == ( const BaseReference & rRef ) const > ^ > include/cppuhelper/weakref.hxx:106:19: note: candidate function > bool SAL_CALL operator == ( const WeakReferenceHelper & rObj ) const An alternative would be to add overloads for combinations of css::uno::WeakReference adn css::uno::Reference, but this was the only case of such an ambiguity across the whole code base, such just resolve it with an explicit .get(). Change-Id: I4689d5ffd4f8993cc1f9401d3c21b24f53f21ccd Reviewed-on: https://gerrit.libreoffice.org/81282 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit 0c3e90d95c2c952265625bcff590599627114ec1)
2020-08-05tdf#39742 tdf#44786 Consider Impress/Draw default printing settingsGabor Kelemen
Default settings can be set under Options - APP - Print but Impress/Draw has not used these as defaults unlike other apps Change-Id: I7d430f8fb24f9626cd628b4fe9e0520d9d42b848 Reviewed-on: https://gerrit.libreoffice.org/76079 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit 844be49e7e511f0c397e1faebca10b4fa25ea937)
2019-10-09tdf#128013: fix Crash when linking an odp fileJulien Nabet
See bt here: https://bugs.documentfoundation.org/attachment.cgi?id=154847 Regression introduced by: https://cgit.freedesktop.org/libreoffice/core/commit/?id=3c86ffd8ded628e6f2b4187948a1b1056f6a0f56 Reviewed-on: https://gerrit.libreoffice.org/80500 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr> (cherry picked from commit 1dc4c8266d45eb2f5c3de303eaa9233e3b52f058) Reviewed-on: https://gerrit.libreoffice.org/80506 Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Change-Id: Id9355958b0c4a56215ff98f0e5be13a3074ce45f Reviewed-on: https://gerrit.libreoffice.org/80539 Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2019-09-30tdf#125585 write default layer status for OLE objectsRegina Henschel
The layer status is taken from the active view, when saving the document. But embedded documents have no view. Error was, that for all layers value 'false' was written in that case. With this patch the defaults (visible, printable, not locked) (true, true, false) are written. Change-Id: I2388ce31cc208fba075083889ec1bb2f874ef482 Reviewed-on: https://gerrit.libreoffice.org/79701 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de> (cherry picked from commit 12f9a9f341fd8f8a98f7cd98f296a8729d279e0d) Reviewed-on: https://gerrit.libreoffice.org/79786 Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2019-08-01tdf#126605: Do not end TextEdit when changing an attributeXisco Fauli
otherwise, pTextEditOutlinerView becomes nullptr in svx/source/svdraw/svdedxv.cxx:2184 Regression from e6c7a018a0cfee395ce2886d41c908a2447ef5cc Change-Id: I9d0645f637dc92b50d01682d119c0db60238e921 Reviewed-on: https://gerrit.libreoffice.org/76712 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-07-25tdf#126197: EndTextEdit on all views before delete/cut shapeXisco Fauli
Change-Id: I3da93e5c72ee6f6f99120758e870d654e01a0ec7 Reviewed-on: https://gerrit.libreoffice.org/75001 Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org> (cherry picked from commit 80db66c4f345ac469943f871308b14b7f5ed0a11) Reviewed-on: https://gerrit.libreoffice.org/75079 (cherry picked from commit e79dbb8c6c4d2cf1ce2cf0ce67c53ed4bb09898b) Reviewed-on: https://gerrit.libreoffice.org/75615 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2019-07-15tdf#126180: EndTextEdit on all views before delete/cut slideXisco Fauli
This also reworks the fixes tdf#125824 and tdf#111522 to use EndTextEdit instead of blocking the undoing Change-Id: I73c2289a9d950465f020f684e9e736148380f5c5 Reviewed-on: https://gerrit.libreoffice.org/74989 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> (cherry picked from commit e6c7a018a0cfee395ce2886d41c908a2447ef5cc) Reviewed-on: https://gerrit.libreoffice.org/75027 Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org> (cherry picked from commit 1aa93766ee3994af9975e96e8ea60e02078de2d8) Reviewed-on: https://gerrit.libreoffice.org/75031
2019-07-02tdf#125824 svx: fix crash with view1 and view2 doing texteditXisco Fauli
Similar to 3a874f1c80c37e8b35666e1d73161ff762eb7e4c Change-Id: I51bffa4d33e82bb90b8a42787f55c12746bcd8c2 Reviewed-on: https://gerrit.libreoffice.org/74931 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> (cherry picked from commit 091f573728e7951d5dc4ef138117499b7480885f) Reviewed-on: https://gerrit.libreoffice.org/74949
2019-06-10Related: tdf#111522 svx: fix crash with view1 doing textedit and resize/rotateMiklos Vajna
The two actually affected functions are SdrEditView::RotateMarkedObj() and SdrDragObjOwn::EndSdrDrag(), but it looks like the other functions in SdrEditView are safe to be changed the same way. I expect IsUndoEnabled() can't be changed, though: that would mean there would be no undo for the text edit itself, either. If other actions still crash, the pattern is the same: put a breakpoint on the SdrUndoAction constructor and see the backtrace to find the function that calls IsUndoEnabled() without calling CanDoSdrUndo() at the same time. Change-Id: If9324e311ec6e9f68a951559e903e14bb72ea31c Reviewed-on: https://gerrit.libreoffice.org/73669 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins (cherry picked from commit 9870ff897f088563426bee9567dd9cb722c2b929) Reviewed-on: https://gerrit.libreoffice.org/73748 Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org> (cherry picked from commit 79cae65f4725d0a8abd5639dc298002d11b2626c) Reviewed-on: https://gerrit.libreoffice.org/73757
2019-06-10tdf#111522 svx: fix crash with view1 doing text edit and view2 doing sdr undoMiklos Vajna
If one view has an active text edit, then current code doesn't handle manipulating the undo text outside the text edit, so avoid problems by simply not adding an undo action to the undo stack for shape creation or move. Other actions might want to do the same in the future: check for CanDoSdrUndo() before calling SdrUndoFactory member functions. [ Found no existing test suite similar to CppunitTest_sw_uiwriter, so added one. ] (cherry picked from commit 3a874f1c80c37e8b35666e1d73161ff762eb7e4c) Change-Id: I3a364bf4fe6f9b0c13aa07283681b1045368cf7a Reviewed-on: https://gerrit.libreoffice.org/73649 Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2019-06-07tdf#125556 URL fragment leaked from one object..Noel Grandin
to another when importing Powerpoint ppt file regression from commit 4245454d0c3d6df2d0e0a75aed6f22f0a26ce3e2 Date: Wed Feb 28 15:50:29 2018 +0200 loplugin:useuniqueptr in SdrPowerPointImport Change-Id: I5f415dfa1f6125629b9f3be1d799cb596c64c605 Reviewed-on: https://gerrit.libreoffice.org/73607 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-04tdf#120774: in 6.2, restrict workaround to kde4 vclplug onlyKatarina Behrens
Fix of tdf#41996 is a workaround of kde4-specific condition and has been since disabled on OS X (as tdf#51023). kde5 comes with a new implementation of DnD and slide sorter in Impress now exhibits exactly the same symptoms as on OS X in tdf#51023 Assuming that in 6.2 kde5 doesn't need this workaround anymore and remaining platforms -- gtk[23] and Win -- never had issues with DnD in slide sorter, keep it active only for kde4 vclplug. We can't kill it with fire in its entirety, because kde4 has been obsoleted only post-6.2 Change-Id: I1fd8bb9e5142effffbd43f3a8bead417832c808c Reviewed-on: https://gerrit.libreoffice.org/73403 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2019-06-03SmartArt: more constraints used in linear algorithmGrzegorz Araminowicz
* both width and height of children and space is taken from constraints * better handling of space between children (not lost in some cases) * children centered in the other axis Change-Id: I25b8360790de0292b2b5c313dfa55e58dc042193 Reviewed-on: https://gerrit.libreoffice.org/73201 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/73259
2019-06-03SmartArt: sort shapes by Z order after layout algorithmsGrzegorz Araminowicz
so that they are laid out in correct order Change-Id: I82baa61311197880654d09f356decc666e6fa4c7 Reviewed-on: https://gerrit.libreoffice.org/73094 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/73255
2019-06-03SmartArt: adjust text size to fit shapesGrzegorz Araminowicz
up to maximal size of primFontSz constraint. Do not override text size changed by user. Change-Id: If7ea6bbb96cb839831d877edc274a1b0eefdaf21 Reviewed-on: https://gerrit.libreoffice.org/73050 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/73251
2019-06-03Resolves: tdf#125447 mnemonic appearing in tooltipCaolán McNamara
Change-Id: I570af8f19468730aad714425492f69d05c0a0cf3 Reviewed-on: https://gerrit.libreoffice.org/72853 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2019-05-31SmartArt: support diagram backgroundGrzegorz Araminowicz
Solved by adding additional shape filling whole diagram. MS PowerPoint does the same when converting SmartArt to shapes. Background shape is also copied when loading from drawingML fallback, appearently there is no background information. Corrected SmartArt import tests, so that they are aware of extra shape. Change-Id: I6154f8e1b34e5867ab582d6fc54459c7c93edbac Reviewed-on: https://gerrit.libreoffice.org/72012 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/73250
2019-05-22PPTX export: save SmartArt as diagram instead of group of shapesGrzegorz Araminowicz
preserving SmartArt allows editing it in PowerPoint after saving as pptx file * moved common parts for docx and pptx export to oox/drawingml * fixed export tests that expected shapes on output Change-Id: I3e70a9f4177bebf5e1671232f4cd0ef0e7212626 Reviewed-on: https://gerrit.libreoffice.org/69598 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/72474
2019-05-21PPTX import: save also OOXDrawing in InteropGrabBagGrzegorz Araminowicz
Change-Id: Ieaf341dd13e06046044f3523c3aad74476160402 Reviewed-on: https://gerrit.libreoffice.org/69328 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/72473
2019-05-21PPTX import: import SmartArt drawing into single GroupShapeGrzegorz Araminowicz
before that there were imported two GroupShapes: - empty one with properties like id, name, InteropGrapBag - second one with actual shapes also fixed tests that relyed on that behaviour Change-Id: I2b94a53e21666b16725c4353448d75e916e4f9df Reviewed-on: https://gerrit.libreoffice.org/69252 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/72472
2019-05-21PPTX import: save SmartArt markup into InteropGrabBagGrzegorz Araminowicz
it will allow to preserve SmartArt when saving PPTX files Change-Id: I9bb66c59d202b4ce426864599014d042d4aa04b0 Reviewed-on: https://gerrit.libreoffice.org/68916 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/72471
2019-05-21tdf#125360: PPTX: Shape fill transparency is not exportedTamás Zolnai
.. if the original shape fill is defined with a theme Override the alpha value with the current value get from FillTransparence API attirbute even if the color is defined with a style or a color scheme. Reviewed-on: https://gerrit.libreoffice.org/72596 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit 259d01a34d27df2fbfd11c3bf6fe9dc508ff6ac2) Change-Id: I09d26238a9c2b501279e6749687dc535e614bbd6 Reviewed-on: https://gerrit.libreoffice.org/72618 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2019-05-19tdf#125346: PPTX export: Shape has wrong fill color comming from themeTamás Zolnai
Write the correct theme path to the InteropGrabBag, the same path what is generated and checked in the export code. Reviewed-on: https://gerrit.libreoffice.org/72500 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit a8bba60e8b655167ad91edcd0c2d1723d525b546) Change-Id: I32617c1a11cf3bafb142f7c8839b498aaac49aa0 Reviewed-on: https://gerrit.libreoffice.org/72521 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2019-05-16tdf#125303 bring back Autofit to textbox commandandreas kainz
Change-Id: I58a7391aec0c5cb3b5b5feb6be1ab3ecac2f0d5e Reviewed-on: https://gerrit.libreoffice.org/72356 Tested-by: Jenkins Reviewed-by: andreas_kainz <kainz.a@gmail.com> (cherry picked from commit 3490c872802b52758b7fd60e6b4530fbb5248fbf) Reviewed-on: https://gerrit.libreoffice.org/72363 Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2019-05-15Resolves: tdf#120423 dispatch against the correct FrameCaolán McNamara
Change-Id: I5ea2e5d7b79efbd2b14d0b528e5a5c3e44e643bc Reviewed-on: https://gerrit.libreoffice.org/72292 Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> Tested-by: Jenkins
2019-05-15Add unit test for pptx import, crop to shapeTamas Bunth
Change-Id: I2a987278320a5685780962de2d3dfc165f3ef3aa Reviewed-on: https://gerrit.libreoffice.org/72311 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-05-15tdf#125285 Use Forward Backward instead of ObjectForwardOne/BackOneandreas kainz
Change-Id: I91186550387e682e23b9cf3feb7a61d1a6973ece Reviewed-on: https://gerrit.libreoffice.org/72296 Tested-by: Jenkins Reviewed-by: andreas_kainz <kainz.a@gmail.com> (cherry picked from commit ac9a59cb77c8ed7d5e2a0bc22787c56b90511271) Reviewed-on: https://gerrit.libreoffice.org/72329 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2019-05-11PPTX: Fix import / export of image transparencyTamás Zolnai
Reviewed-on: https://gerrit.libreoffice.org/71916 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit ae3aabdb951643af8d2f7aee9c9f900245e5b384) Change-Id: Ib07c606083b833389fcb82aac57ca8535d6e861f Reviewed-on: https://gerrit.libreoffice.org/72051 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2019-05-09Resolves: tdf#124927 crash on multiple drawing shapes in animation dialogCaolán McNamara
since... SOSAW080: Added first bunch of basic changes to helpers commit dfefe448c41921f2f1e54d3f69b8b9e89031d055 Date: Thu Mar 1 15:54:32 2018 +0100 Change-Id: I9feba16b5efdbec5c817bebf2772e2f2882bdfe9 Reviewed-on: https://gerrit.libreoffice.org/72055 Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> Tested-by: Jenkins
2019-05-03tdf#125011 large ui scaling factor overflows spinbutton rangeCaolán McNamara
Change-Id: I6e41318a92f02e3cd7fde5c52272582345362533 clamp to target type bounds Change-Id: I8d3f7653b7e9b64a2f433b4ebfb8a0fef1522e93 Reviewed-on: https://gerrit.libreoffice.org/71637 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit ed67b443d1db273818737ef7996330a8f475361b) Reviewed-on: https://gerrit.libreoffice.org/71660 Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2019-05-02Resolve deprecated implicit capture of *this by reference in C++20Stephan Bergmann
...as flagged with -Werror=deprecated by trunk GCC in -std=c++2a mode. But C++17 forbids "this" in combination with a capture-default of "=", so in such cases list any entities explicitly that shall be captured by value. Change-Id: Ic228cd20682277a0f93e3e75798356d0fbbb80d4 Reviewed-on: https://gerrit.libreoffice.org/65241 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit c56a8280bdd605f77f0075a7f2bfa474aa2a26e5) Reviewed-on: https://gerrit.libreoffice.org/71661 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-04-23tdf#123684 PPTX import: fix wrong background color for <p:sp useBgFill="1">Miklos Vajna
Regression from commit 59339dec1ce56213dc74a06af2f0d35ac1c534d7 (tdf#105150 PPTX import: try harder to handle <p:sp useBgFill="1">, 2017-01-06), the problem was that we gave a white solid fill to a shape which is meant to be transparent. Fix the problem by limiting the scope of the mentioned commit to solid colors only, and also extend to code to look for background fill from the masterpage as well. This allows not hardcoding the white solid fill and leaves the fill style of shapes as transparent where the slide background is a bitmap or other more complex fill type. (cherry picked from commit 943a534ac7cb3df513583e226c986dafd8ba246b) Change-Id: I0063e88d510250652d2b14856df3bd431681422d Reviewed-on: https://gerrit.libreoffice.org/71115 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-04-08tdf#112318 sd opengl: fix lack of initial animationMiklos Vajna
Commit 881043d1f01fad663c0a17f11cbe2dab79e31217 (#i98792# Allow frequent calls to slide show update()., 2009-04-27) added a comment in sd::SlideshowImpl::updateSlideShow() talking about an "above" case, when the slideshow update suggests to not wait till the next update, but later commit 12dcf5e6e770b1933252a1f919663ba45ded4cdf (slideshow: cleanup main-loop usage, post-yield listeners, etc., 2015-11-13) removed that handling. That was fine till opengl rendering was introduced, which swaps its backbuffer in an idle handler. Given that OpenGLFlushIdle's priority is TaskPriority::POST_PAINT and SlideshowImpl::maUpdateTimer's priority is TaskPriority::REPAINT, the GL backbuffer is not always painted while an animation is ongoing. This is more visible when tweaking the bugdoc to have an e.g. 5 sec animation, then starting the slideshow results in waiting for 5 seconds and only then the slide shows up, without an animation. Fix the problem by re-introducing the handling of the fUpdate == 0, and processing idle events there, which means the GL backbuffer will be always painted, regardless if fUpdate is a small number or 0. (cherry picked from commit 3e0092031b73bad107e3122d5d4be2f5bd487744) Change-Id: I25b2dc0aa41af62d9bd89617178eb2e9997f5b17 Reviewed-on: https://gerrit.libreoffice.org/70295 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-03-26tdf#122989 remove update check from notebookbar for the momentThorsten Behrens
Temp fix, since update check is an extension, and extensions can't currently modify notebookbars. This needs implementation of something like https://wiki.openoffice.org/wiki/Framework/Article/Addon_Menu_Toolbar_Merging for notebookbar popup menus. Such that Addons.xcs provide some merge points with notebookbar menu IDs, we can then plug into existing popup menus. Change-Id: If30525fec1e7be0429e351588614618c5f56cdd4 Reviewed-on: https://gerrit.libreoffice.org/69735 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit 98174e163348ab44461f114142bc546e97720eec) Reviewed-on: https://gerrit.libreoffice.org/69741 Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de> Tested-by: Katarina Behrens <Katarina.Behrens@cib.de>
2019-03-10Check svg URLs before exportingSamuel Mehrbrodt
Change-Id: I3b86b6b82318b0d201c3d7db516664520eb47bed Reviewed-on: https://gerrit.libreoffice.org/68668 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> (cherry picked from commit 34ec46571701d639d9bc542b2d19f87a21a83648) Reviewed-on: https://gerrit.libreoffice.org/68732 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2019-03-05Related: tdf#117761 oox smartart: backport fixes related to picture stripMiklos Vajna
This is a combination of 7 commits. This is the 1st commit: oox smartart, picture strip: handle bitmap fill of pres nodes There were two problems here: 1) We did not import bitmap fill from presentation nodes. 2) Presentation nodes contained properties with reference semantics, so if you set a bitmap fill for a first and a second shape, then at the end both shapes contained the second bitmap. With this, both bitmaps are imported exactly once. (cherry picked from commit 333e9ea15bb57cf1c87ac2ea150de1e3fd79cfcb) This is the commit #2: oox smartart, picture strip: fetch # of children only once in snake algo No functional changes intended. (cherry picked from commit 90372d52fdcc378473b89f4e6f2de0e206c110ef) This is the commit #3: oox smartart, picture strip: expose aspect ratio of children for snake algo The aspect ratio request of the Shape is not yet used in AlgAtom::layoutShape(), though. The heavy-lifting is needed, because the number of cols/rows in the snake algorithm depends on the aspect ratio request from the child algorithm, so need to transfer the aspect ratio from child algorithm -> layout node -> shape -> parent algorithm. Still no functional changes intended. (cherry picked from commit a1e10b7968fbf4dba962349be8a6dfb0cb1d3176) This is the commit #4: oox smartart, picture strip: fix too many columns with aspect ratio request The bugdoc has 3 items in the picture strip and PowerPoint laid this out as a single column with 3 rows (as a snake algorithm). We used to put the first two items to the first row and the third item to the second row. Improve out layout by taking into account what aspect ratio the child algorithms request: this way it's obvious that we should use a single column in case we have a large enough aspect ratio and few enough items. (PowerPoint also uses multiple columns without the aspect ratio request.) (cherry picked from commit 159e33ec661b2ce038b2642b2f30600ce7901d1b) This is the commit #5: oox smartart, picture strip: fix lack of spacing around the picture list The snake algorithm in PowerPoint seem to interpret spacing as follows: if you have N elements, then there should be the requested amount of spacing between the elements, and also double amount of spacing around the actual list of elements. With this, the SmartArt and the title shape in the bugdoc no longer overlaps. (cherry picked from commit 0a29c928afa74123bca05dc089c751603d368467) This is the commit #6: oox smartart, picture strip: fix lack of margin in text shapes Shape text has two kind of spacing inside the shape's bounding box: the shape-level margin and the paragraph-level one. Only the second was handled in the tx algorithm so far, add support for the first. The margins taken from constraints were way large by default: the only explanation I found for that is that SmartArt layout sometimes calculates in MMs, sometimes in Points, and the ratio between the two is exactly the Impress / PowerPoint margin. So assume that indeed that unit difference is the reason for the smaller in-PowerPoint margin values and do the same on our side. (cherry picked from commit 279c7f83a57c4d3991930ee80e9d9c287c21270a) This is the commit #7: oox smartart, picture strip: fix too wide child shapes Once the constraints determine the size, the aspect ratio may shrink one dimension to achieve the requested ratio. Implement the case where a >1 ratio shrinks the width, so the container of the image-text shape pair has correct aspect ratio. (cherry picked from commit f4fbb127897ea6afe27055d3b6cfcb0441080902) Change-Id: I7bac764c031e80bac532c4f97ebd5b5096401096 Reviewed-on: https://gerrit.libreoffice.org/68679 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2019-03-01tdf#123763 move back break command to graphic context menu for vectorgraphicsandreas kainz
Change-Id: I8af6a0197dc83117d936a7fcf8b794e6d853256a Reviewed-on: https://gerrit.libreoffice.org/68518 Reviewed-by: V Stuart Foote <vstuart.foote@utsa.edu> Tested-by: Jenkins Reviewed-by: andreas_kainz <kainz.a@gmail.com> (cherry picked from commit 576519914588021d6e456128c5dee9496abee282) Reviewed-on: https://gerrit.libreoffice.org/68535 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2019-02-21Related: tdf#117761 oox smartart: backport fixes related to cycle matrixMiklos Vajna
This is a combination of 6 commits. This is the 1st commit: oox smartart, cycle matrix: fix counting presentation children The markup is: <dgm:if name="Name6" axis="ch ch" ptType="node node" st="1 1" cnt="1 0" func="cnt" op="gte" val="1"> Where PowerPoint evaluated the condition to true, but Impress evaluated to false. This means that the undocumented relation between the child lists is "OR" (not "AND"). Also, our code assumed that "node" has to be a data node (not presentation node), but it seems the only way this condition can be true if presentation children is also counted. (The presentation node in question is not a presentation of anything.) (cherry picked from commit e3c6f249c10f7f1bcc528e643f5723288c514b29) This is the commit #2: oox smartart, cycle matrix: handle left/bottom constraint in composite algo The bugdoc has 3 shapes in the "outer" circle which have a position where either x or y is not 0. But these are defined using constraints talking about the right or bottom edge of the shape. Map that to top/left, given that we already know the shape size. (cherry picked from commit b9b4e9223b6c0d6e0b48b694c9aabbe54a250660) This is the commit #3: oox smartart, cycle matrix: fix too large height in composite algo The user-level problem was that the height of the entire smartart was too large. The reason for this was that: - composite algorithm gets the constraint height should be 77% of width, this means 6096000 -> 4693920 EMUs - at the same time the parent container is already smaller, 4064000 EMUs - a few lines later we already limit the max height with std::min(), but in the meantime an incorrect y position is calculated, exactly due to the lack of early limited height Solve the problem by making sure composite algorithm never works with a height (even when using it to calculate vertical center) that exceeds the height of the parent. (cherry picked from commit 5b2e38e0cfc7006d6982f741cf158a8a98dc8630) This is the commit #4: oox smartart, cycle matrix: handle aspect ratio in composite algo This way the 4 quadrant shapes in the center of the SmartArt form a circle, as width is shrinking. It's not height growing, as OOXML spec clearly says "ar" always just shrinks one axis. (>1 and <1 "ar" is to be handled when they are seen in action in an actual document.) (cherry picked from commit 34383064ac061497b0c46c449313877c6b6a2087) This is the commit #5: oox smartart, cycle matrix: handle destination order in connections It is possible to have connections from multiple data nodes to the same presentation node with a presOf type. We use to order these based on as they appear in the data XML, but we need to order them according to the destOrd attribute. Introduce an std::map for that, so get ordering automatically as we iterate. Turn the std::pair into a struct to make the code a bit more readable. (cherry picked from commit ecb733da58b74714eb66d2063a2835ce5c471870) Conflicts: oox/source/drawingml/diagram/diagramlayoutatoms.cxx This is the commit #6: oox smartart, cycle matrix: fix fill and line props of shape The topmost shape may not have 0 depth, but something larger. In that case at least it's safe to still use fill & line properties. The B1 quadrant of the test file now has the proper orange background, and B2's border is also properly orange. (cherry picked from commit 8193e697d286595aa62859011761adeb002244e3) Conflicts: oox/source/drawingml/diagram/diagramlayoutatoms.cxx Change-Id: Iccc5f6993693a0f1cf8f50d163003c24d3ad690e Reviewed-on: https://gerrit.libreoffice.org/68144 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2019-02-21tdf#123090 Handle removed column with gridSpan.Gülşah Köse
This is a combination of 3 commits. (cherry picked from commit 48ef20f2039d1a300a4324072e9b712c9994b406) (cherry picked from commit 00e89430a2f8cd1f9ec702a7583a1e4c886a2b46) (cherry picked from commit 1f0206d940cd8f7fb627a59cfe4165c0bfebaf46) Change-Id: Ic6fa6f335623e2114fc8bea76dc54833284d2a02 Reviewed-on: https://gerrit.libreoffice.org/68150 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2019-02-18sd: fix crashing when adding new effects to media.Mark Hung
Check if the objct has name roperty with hasPropertyByName() before accessing in case some objects ( media, table, control, etc. ) do not have name property. Regression caused by e559d360d0a19 ( related to tdf#90243 ). Change-Id: I05fc45c631f8acd3b9ba8c8305d4bc1e31651824 Reviewed-on: https://gerrit.libreoffice.org/67901 Tested-by: Jenkins Reviewed-by: Mark Hung <marklh9@gmail.com> (cherry picked from commit a18bb779e03217db6e18ba6b8110289b4b3f101d) Reviewed-on: https://gerrit.libreoffice.org/67963 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-02-12tdf#122454 Impress: Correct d'n'd animation selection in WindowsBrian Fraser
Change-Id: I0f17ff657beb2a5b3dfed91856ec45ddfca793a9 Reviewed-on: https://gerrit.libreoffice.org/65939 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/67694 Tested-by: Xisco Faulí <xiscofauli@libreoffice.org>
2019-02-08NB: add print to grouped_compact file drop down menuandreas kainz
Change-Id: I8e6eab164ee864eb56d2ba7184a5587a18d5353a Reviewed-on: https://gerrit.libreoffice.org/67130 Tested-by: Jenkins Reviewed-by: andreas_kainz <kainz.a@gmail.com> (cherry picked from commit 37f7b39ed05c5789d8c09768354e89ba0eb18c57) Reviewed-on: https://gerrit.libreoffice.org/67223
2019-01-24Related: tdf#117761 oox smartart: backport fixes related to org chartMiklos Vajna
This is a combination of 10 commits. This is the 1st commit: oox smartart, org chart: add initial hierChild/Root algorithms hierChild is supposed to align and position its child layout nodes in a linear path under the hierRoot layout node, so initially just use a simple vertical layout algorithm. (cherry picked from commit 3103f9f9461f6eabb61a70be73862ef4be98010e) This is the commit #2: oox smartart, org chart: handle multiple elements in hierChild In case one manager has multiple employees, then we laid out only the first one. Recognize non-assistant type as the node type (as a start) to get the correct number of employees (when there are no assistants), and also render employees on a horizontal (and not on a vertical) path. With this, the 1 manager and multiple employees case looks reasonable. (cherry picked from commit dcd378bf614c99d705312259a0a0a25b40d88e2b) This is the commit #3: oox smartart, org chart: fix font color when defined with quick styles createStyleMatrixContext() assumed that <dgm:style> contains <dgm:fontRef>, but it contains <a:fontRef> instead. This resulted in a 0 mnThemedIdx, which meant that since commit 89206c472ecf18bfde6824cea8004921cd404365 (bnc#862510: PPTX import: Wrong text color inside shape, 2014-12-21) we ignored the theme color in oox::drawingml::Shape::createAndInsert(). (cherry picked from commit 5dfd5755c709e91d2903bd7be4582f7832e89780) This is the commit #4: oox smartart, org chart: fix vertical order of assistant nodes It seems the manager -> assistant -> employees ordering is not part of the file format. The order is stored twice in the file: the hierRoot algorithm has 3 layout nodes as a children, and also the data model has an order of the presentation nodes: both describe that employees go before assistant nodes. In contrast to that, PowerPoint orders XML_asst nodes before XML_node ones, so teach the hierRoot algorithm about this. This requires tracking the data model node type for each in-diagram drawingML shape, so that layout can determine if a hierRoot algorithm children has an assistant node or not. (cherry picked from commit 22086e70c4f3bb41620ff81ecaf57fd2af6ccbce) This is the commit #5: oox smartart, org chart: handle multiple paragraphs on data node This problem was similar to the one fixed in cfa76f538a44d4396574ece59e8a3953c22c6eb7 (oox smartart, accent process: handle multiple runs from a data point, 2018-11-21), but this there we handled multiple runs and this handles multiple paragraphs. It seems some smartart types allow multiple paragraphs in a diagram node, others only allow multiple runs. Org chart is in the former category. (cherry picked from commit dfc97dd381ef516ca4a7e99b29f9da1033a380f4) This is the commit #6: oox smartart, org chart: fix height of manager nodes without employees Employees and/or assistants reduce the height of managers -- this effect is wanted even if there are no employees/assistants. (cherry picked from commit 8638cc1b737195df16a160b148d2cd2c68131174) This is the commit #7: oox smartart, org chart: improve width of non-manager nodes The default case is that all managers have assistants/employees, so nodes under a manager can only use the horizontal space under the manager to avoid overlapping. But in case the previous / next sibling of the manager have no child nodes (assistant/employee) then we can use that space to make the child nodes larger. This improves readability of the chart's text a lot and brings the layout closer to what PowerPoint does for the same input. Handle all this in the hierChild algorithm, i.e. the container for a list of assistants or a list of employees, which means "parent" in this context always refers to a manager node. (cherry picked from commit 3a655975e5ea43417885513d0752da3627dd25ed) This is the commit #8: oox smartart, org chart: implement support for hierBranch conditions The relevant part of the layout is the <dgm:layoutNode name="hierChild2"> element that has a <dgm:choose> with two branches: <dgm:if name="Name34" func="var" arg="hierBranch" op="equ" val="std"> <dgm:if name="Name36" func="var" arg="hierBranch" op="equ" val="init"> The connectors were missing as we took the first branch (ConditionAtom::getDecision() returned true if the arg was hierBranch), even hierBranch on the parent layout node was set to "init". With this, the correct number of connectors are created, previously all employee connectors were missing. Their size / position is still incorrect, though. (cherry picked from commit ae34f471030869dfc0da1784597cae6f9131f8c5) This is the commit #9: oox smartart, org chart: fix shape type of connectors PowerPoint renders these as bent connectors, not as arrow shapes. Also add a bit of vertical spacing between the nodes, otherwise the connectors have no way to be visible. Their position is still incorrect, though. (cherry picked from commit 1791e08e9f27453ac5563ef400c715e30c791133) This is the commit #10: oox smartart, org chart: fix position and size of connector shapes Finally the bugdoc rendering result is reasonable and even looks like a tree as it should. (cherry picked from commit 2bfb9117b287a371066a157267614b9bdb367d71) Change-Id: I4e7a729afd3d2c5af2e7f41903737bd56be406fa Reviewed-on: https://gerrit.libreoffice.org/66693 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-01-16Resolves: tdf#122695 Content Type selector tooltip missingCaolán McNamara
Change-Id: I0ffe6448d865f569fb59d9facbb1582d2152a9ba Reviewed-on: https://gerrit.libreoffice.org/66291 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 423d70f7e45749fad680b3dfe0ccdaed1c1afb19) Reviewed-on: https://gerrit.libreoffice.org/66384 Tested-by: Xisco Faulí <xiscofauli@libreoffice.org>
2019-01-07tdf#122312: Expand ComboboxXisco Fauli
Change-Id: I008c3e93d40ee4b6ad7a75ba8ad730e74cafede7 Reviewed-on: https://gerrit.libreoffice.org/65928 Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2018-12-23tdf#122271 NB Impress use the wrong SpellDialog commandandreas kainz
Change-Id: Ib279e2677b4f58e77c7e03f6cfc21bfa7cbf077c Reviewed-on: https://gerrit.libreoffice.org/65571 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-12-18Related: tdf#103884 remove dangling menubar commandCaolán McNamara
since... commit 08a43cc97ccf88faa9d3a04afc3aacd2c885a2d1 Date: Sat Oct 28 02:28:18 2017 +0200 related: tdf#103884 remove gltf/collada feature Change-Id: I7671746f2b33f8d4eae207448267d0284a3f9804 Reviewed-on: https://gerrit.libreoffice.org/65337 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-12-18NB grouped_compact add impress special view context- elementsandreas kainz
Change-Id: I8c466b04748da44af97b6e21fc8cced7f40304af Reviewed-on: https://gerrit.libreoffice.org/65319 Tested-by: Jenkins Reviewed-by: andreas_kainz <kainz.a@gmail.com>
2018-12-18tdf#121592 add context-Form toolbar to NBandreas kainz
tabbed and groupedbar_compact add context-form support Change-Id: I4a59d4b71bbbc253ee4188c4c15a7353e623e2f1 Reviewed-on: https://gerrit.libreoffice.org/65296 Tested-by: Jenkins Reviewed-by: andreas_kainz <kainz.a@gmail.com>
2018-12-17tdf#122154 add DataSort action to data groupandreas kainz
and update some alignments Change-Id: I8d21e2764805e6b86fce776b7587d7bc0f76ae33 Reviewed-on: https://gerrit.libreoffice.org/65263 Tested-by: Jenkins Reviewed-by: andreas_kainz <kainz.a@gmail.com>