summaryrefslogtreecommitdiff
path: root/sd
AgeCommit message (Collapse)Author
2017-09-13Enable -Wunreachable-codeStephan Bergmann
...motivated by <https://gerrit.libreoffice.org/#/c/41565/2> adding dead code at the end of a switch statement, after the last case's "break". -Wunreachable-code appears to work well on Clang, while it appears to have no effect on GCC. Most of the affected places are apparently temporary/TODO/FIXME cases of disabling code via "if (false)", which can be written with an extra set of parentheses as "if ((false))" to silence -Wunreachable-code on Clang (which thus needed loplugin:unnecessaryparen to be adapted accordingly). In some cases, the controlling expression was more complex than just "false" and needed to be rewritten by taking it out of the if statement to silence Clang. One noteworthy case where the nature of the disabled code wasn't immediately apparent: Sep 12 16:59:58 <sberg> quikee, is that "if (false)" in ScExponentialSmoothingDialog::ApplyOutput (sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx) some work-in- progress or dead code? Sep 12 17:02:03 <quikee> sberg: WIP, but you can remove it Sep 12 17:04:47 <sberg> quikee, I'll wrap the false in an extra set of parentheses for now, to silence -Wunreachable-code (I wouldn't want to remove it, as I have no idea whether I should then also remove the "Initial value" comment preceding it) Sep 12 17:07:29 <quikee> sberg: both are different ways to calculate the "intital value"... so no Another case where the nature of the dead code, following while (true) loops without breaks, is unclear is sd/source/ui/remotecontrol/BluetoothServer.cxx, where I added TODO markers to the workarounds that silence the warnings for now. basic/source/sbx/sbxvalue.cxx had a variable of type double, of automatic storage duration, and without an initalizer at the top of a switch statement. Clang warning about it is arguably a false positive. Apart from that, this didn't find any cases of genuinely dead code in the existing code base. Change-Id: Ib00b822c8efec94278c048783d5997b8ba86a94c Reviewed-on: https://gerrit.libreoffice.org/42217 Tested-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-09-12clang-tidy modernize-use-emplace in sdNoel Grandin
Change-Id: I2e3000f7bd0f3beed8309e0e3dd18e6ed4b8feee Reviewed-on: https://gerrit.libreoffice.org/42184 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-10cppcheck: unsignedLessThanZeroJulien Nabet
Change-Id: Ia3880fc200e885ba99ff1fc054b424f486b01d67 Reviewed-on: https://gerrit.libreoffice.org/42132 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-09-09Fix typoAndrea Gelmini
Change-Id: I7fe64a0dccdd52550558463b834e31c652ef51ec Reviewed-on: https://gerrit.libreoffice.org/42106 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-09-08-Werror,-Wtautological-compare with latest clangNoel Grandin
Change-Id: I073f1893b759f8d31a24187f542b031b86dc4b8a error: comparison of unsigned enum expression >= 0 is always true [-Werror,-Wtautological-compare] Reviewed-on: https://gerrit.libreoffice.org/42103 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-08Actually this would be better as SAL_WARN.Jan Holesovsky
Change-Id: I11c92f451ec5dcc77a7dadb948c61680c3cce444
2017-09-08set parent for file dialog helperCaolán McNamara
Change-Id: I3994ee48dcb5b2732cb27cb9ccb54926abf0828a Reviewed-on: https://gerrit.libreoffice.org/42048 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-08Disable test on Linux x86 that makes plain 'make' fail due to -mpfmath=387Stephan Bergmann
...rounding issues, and thus caused LO Flathub builds to fail, see <https://flathub.org/builds/#/builders/3/builds/280>. Change-Id: I91e8662e0a85b4ed8b16719eed4ade3397edfa0c
2017-09-08loplugin:constantparamNoel Grandin
Change-Id: Ic87f0cc863490858b7cc7e74a7f90ec31992dd53 Reviewed-on: https://gerrit.libreoffice.org/42089 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-07tdf#112280: Unit test.Jan Holesovsky
Change-Id: I70d7f388c1573ed34bb3d93b480fe1ccaa97076f Reviewed-on: https://gerrit.libreoffice.org/42075 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2017-09-07tdf#112280: Export spin animation in PPTX.Jan Holesovsky
Change-Id: I9f13bbc2bd3a3de582491ea5b2ad16535589420a Reviewed-on: https://gerrit.libreoffice.org/42074 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2017-09-07Fix typosAndrea Gelmini
Change-Id: I855b26e447a8406cbab6f4c7f918b3319debba35 Reviewed-on: https://gerrit.libreoffice.org/42034 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-09-07tdf#106867: Unit test for the export of embedded videos.Jan Holesovsky
Change-Id: Ibbc3da56ace2eaaf4670e869a34ec4c1bad4bf5d Reviewed-on: https://gerrit.libreoffice.org/41982 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2017-09-07tdf#106867: Export videos in PPTX.Jan Holesovsky
Change-Id: I7f4f389a72aa7ecef65d87f07bb69ba8f3374a14 Reviewed-on: https://gerrit.libreoffice.org/41979 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2017-09-06tdf#111834: hide useless background controls in Handout Viewblendergeek
Change-Id: Ia51c671f17dbb8cc36a73ee662c1c57e23e7818f Reviewed-on: https://gerrit.libreoffice.org/41968 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2017-09-06const correctness in o3tl::array_viewNoel Grandin
Change-Id: I44c1ace97ae44069c5a0c6a247aa8a0b49896ad3 Reviewed-on: https://gerrit.libreoffice.org/41985 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-06tdf#106867: Implement pptx export of AnimationNodeType::COMMAND.Jan Holesovsky
This is still not enough to make PowerPoint happy with the test file. Change-Id: Icadcb640b44100ffb3482de57723576e4d843e7a Reviewed-on: https://gerrit.libreoffice.org/41977 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2017-09-06related tdf#111884: GroupShapes are now handled in oox.Jan Holesovsky
Change-Id: Iee960e3d4a5c3dc37fa62b4fec8e52fe7c314ec0 Reviewed-on: https://gerrit.libreoffice.org/41978 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2017-09-06crashtesting: bazillion presentation format crashesCaolán McNamara
Change-Id: I2476f411275978dbdb1060c015658535ef803d50
2017-09-06loplugin:unnecessaryparen include case statementsNoel Grandin
Change-Id: I79fb3eec0d5d466e33b2e18621a7169695edf82f Reviewed-on: https://gerrit.libreoffice.org/41920 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-05Drop lazywrite property, which is silently ignored by configmgr anywayStephan Bergmann
...at least ever since the "new" configmgr reimplementation, 6b849a6aeeb9ea8b1e25e28d5a8be390e425f84e "#i101955# initial work in progress of a configmgr reimplementation (for now in an extra module 'configmgr2')" et al Change-Id: I43430d991647fb2e26762463d51175247db0604b
2017-09-04SmartArt: separate unit testsGrzegorz Araminowicz
Change-Id: I9bf522caae155de354c2d28dd92d85e4c016aa14 Reviewed-on: https://gerrit.libreoffice.org/41877 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2017-09-04loplugin:unnecessaryparen include c++ castsNoel Grandin
Change-Id: I132d3c66f0562e2c37a02eaf4c168d06c2b473eb Reviewed-on: https://gerrit.libreoffice.org/41874 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-04New loplugin:dyncastvisibilityStephan Bergmann
...to find uses of dynamic_cast where the static (base) type has hidden visibility while the dynamic (derived) one has default visibility, and which may thus fail at least on macOS like happened in d5ed3cd6dbd22bb18542778f1c48f4d5b3ae0f95 "Make WinMtfFontStyle's base class EMFIO_DLLPUBLIC, too". libcxxabi's __dynamic_cast takes static_type and dst_type arguments. Now, if dst_type (the derived type, with default visibility) is taken from .so A (and thus references the version of the base type info hidden in .so A) but the __dynamic_cast call is made from .so B, it passes for static_type the base type information hidden in .so B, and __dynamic_cast will consider the cast to fail. I'm not sure whether hidden intermediary types (in the hierarchy between the dynamic_cast's base and derived types) acutally cause a problem too, but lets flag them with the plugin anyway. The fixes use SAL_DLLPUBLIC_RTTI. For one, there appear to be no other reasons than type visibility to make those classes SAL_DLLPUBLIC. For another, this nicely avoids any actual changes on Windows (where SAL_DLLPUBLIC expands to nothing, and many of the affected classes were explicityl introduced into class hierarchies as "MSVC hacks"). Change-Id: Ia85a9635cebffb1009a9efc1484b8bd4025585d4 Reviewed-on: https://gerrit.libreoffice.org/41802 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-09-04tdf#89130 Draw: Better UI for handling layer attributesUlrich Gemkow
This is a RFC to implement comment#2 in tdf#89130: Add shortcuts to change layer attributes and make the current attribute values visible in the tab layer name. Already implemented is that pressing LeftMouse+Shift toggles layer visibility. When a layer is not visible its name is displayed in blue. This patch adds that pressing LeftMouse+Ctrl toggles layer locked/unlocked and LeftMouse+Ctrl+Shift toggles layer printable/not printable. The name of a locked layer is displayed italic. The name of a nonprintable layer is underlined. This also adds an Undo action for all changes to mirror the behavior of the layer attribute change dialog box. Change-Id: I5d8fa0585d4f088768716956583e324e66e29602 Reviewed-on: https://gerrit.libreoffice.org/41366 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-09-03set parent for insert media file dialogCaolán McNamara
Change-Id: I71eace1995b229caa75e61df363fd8bad981bed1 Reviewed-on: https://gerrit.libreoffice.org/41851 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-02Typos for "available"Julien Nabet
Change-Id: I8050b1f2ea5414b6e6da3392e8e22d330c794ff5 Reviewed-on: https://gerrit.libreoffice.org/41836 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-09-02convert SHAPEFLAG defines to scoped enum ShapeFlagJochen Nitschke
they were defined in escherex.hxx as SHAPEFLAG_* and in msdffimp.hxx as SP_*. Added include for escherex.hxx to msdffimp.hxx. Filled the missing flag bits. ShapeFlag::Deleted is not used at the moment. Convert ADD_SHAPE macro to lambda. Fix horizontal/vertical mixup in RtfSdrExport::AddLineDimensions. Comments for flag Connector were wrong. The flag applies to shapes which ARE connectors. MSO definition: "connector: A line that is used to connect two or more shapes and that remains connected to those shapes." So Rectangles and such with Connector flag don't make sense. Change-Id: I735de00110411b280a302840dc0fcdfac5156399 Reviewed-on: https://gerrit.libreoffice.org/41754 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-02tdf#109052: Crash after PPT import when undo is disabledTamás Zolnai
It was not a good idea to enable undo unconditionally. Use the saved undo state instead. Change-Id: I60875da23466b6ef54f034b447d636bdbab38151 Reviewed-on: https://gerrit.libreoffice.org/41823 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2017-09-02tdf#109261: Crash when adding a video to a slide with zero undo stepsTamás Zolnai
When undo is disabled (no undo steps), ReplaceObjectAtView() method frees pPickObj, so we need to save it's reused data first. Change-Id: Icbc800d4d33cf229006aecde7d62aa2a7ea35879 Reviewed-on: https://gerrit.libreoffice.org/41822 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2017-09-01Replace some lists by vectors in sd moduleJulien Nabet
Change-Id: I07d20af39985da0a340d482e769d98cbe073a826 Reviewed-on: https://gerrit.libreoffice.org/41801 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-09-01bump FileDialogHelper to XFilePicker3Caolán McNamara
Change-Id: I726676aaa8944bc3b6418abe305ad03f8ec96c59 Reviewed-on: https://gerrit.libreoffice.org/41783 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-01tdf#111884: Unit test.Jan Holesovsky
Change-Id: I2ab432d4a2a64d88493e8f37b4a36934800fbf30 Reviewed-on: https://gerrit.libreoffice.org/41767 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2017-09-01tdf#111884: Implement export of group shapes in pptx.Jan Holesovsky
Change-Id: If12984c0670db6396cbfd0dcb8ae1f5a9b591705 Reviewed-on: https://gerrit.libreoffice.org/41766 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2017-08-30loplugin:constparam in variousNoel Grandin
Change-Id: I6821a3946f2e8fabf26558a84370c16ac8827fed Reviewed-on: https://gerrit.libreoffice.org/41721 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-29Related tdf#111892: use unique_ptrJulien Nabet
Change-Id: I8de0704cae36805737033c38950ac45be13198da Reviewed-on: https://gerrit.libreoffice.org/41650 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-29tdf#112008 Assert when starting an empty slideshowNoel Grandin
Init() is called via at least two different code patchs, from BasicViewFactory::CreateView and PresentationViewShell::FinishInitialization. But we only call EndListening() once in the destructor, so lets just check before calling StartListening() Change-Id: Ia6757a17934cc2665c635e21ee0305a810c624c1 Reviewed-on: https://gerrit.libreoffice.org/41701 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-29sd: delete the global CacheConfiguration timer on shutdownMichael Stahl
Crashes in SchedulerMutex::acquire if destroyed from __run_exit_handlers Change-Id: Ie8bbb399183d118d92c94a40f55cc9c650baf742 Reviewed-on: https://gerrit.libreoffice.org/41629 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-08-28sd: AccessibleSlideSorterView: don't register twice at ViewShellMichael Stahl
Triggers assert in SfxListener::StartListening() Change-Id: I17f165d600fa789d7ce8d7b2296988064c5d5844
2017-08-27convert code-class in ErrCode to scoped enumNoel Grandin
Change-Id: I9aa8703921308d6fee8bae9ee2d7b29e19181cc7 Reviewed-on: https://gerrit.libreoffice.org/41601 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-27replace magic numbers for ppt view typesJochen Nitschke
Change-Id: I0cd234cd039a2117fe49e6de3461becdbfa07e30 Reviewed-on: https://gerrit.libreoffice.org/40475 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2017-08-26PPTX export tests for flipped shapesPaul Trojahn
Change-Id: Ib159cdde381ebe906b54070245dedcb6decbe44e Reviewed-on: https://gerrit.libreoffice.org/41587 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2017-08-25Drop gratuitous initial :: from comphelper::ProfileZoneTor Lillqvist
Change-Id: Iae7d86b857d0563d9ed9d9b4187e009554698412
2017-08-25tdf#100387 tdf#100389 OOXML animation export fixesPaul Trojahn
The second cTn tag needs to have a dur="indefinite" attribute, otherwise the last element is hidden immediately after being shown. Also the value of all fill attributes with the value freeze needs to be hold, otherwise only one animation node is shown at a time. Change-Id: Ie4ecf69f5a3a1c56d8b3b489351dc2882efd6328 Reviewed-on: https://gerrit.libreoffice.org/41463 Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2017-08-24tdf#111798 Fix deformed export of flipped custom shapes to pptxPaul Trojahn
Shapes were deformed because flipping wasn't considered when removing the rotation. Also WriteShapeTransformation needs information about flipping to convert the angle correctly. Change-Id: I7d485e93c00e02b9ec6c73ad6ae2876e5bc6360a Reviewed-on: https://gerrit.libreoffice.org/41462 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2017-08-24tdf#108926: Notes placeholder text boxes not shown in PPTsTamás Zolnai
Regression from: acb2943c8125f4ceed74f35f31776929dedeb8d8 Call this placeholder related code not only for normal slide pages. Change-Id: Iae185ac7e5d2505554692045516cc51dbdcd735b Reviewed-on: https://gerrit.libreoffice.org/41517 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2017-08-24SmartArt: implement dir and maxDepth if node functionsGrzegorz Araminowicz
Change-Id: I4ef05b5bab1188cf349d1c7f5bbc9022bc79b21c Reviewed-on: https://gerrit.libreoffice.org/41452 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-08-24Consistently use OUString in test::DirectoriesStephan Bergmann
Change-Id: Ia5fd8af34ee9d2f37e4450ab241f6bb9a06445b2 Reviewed-on: https://gerrit.libreoffice.org/41466 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-08-23Fix WID rangesStephan Bergmann
Change-Id: I50e7f6b16d835ec86e8a98e6d94ee812391a37d4
2017-08-23convert message box style bits to scoped enumNoel Grandin
and fix harmless bug in ImpSVGDialog::ImpSVGDialog, which there since commit 6456f1d81090dd5fe44455c09ae3ede7ec6ac38a Date: Fri Feb 4 14:52:54 2011 +0100 ka102: added/removed files for SVG import and module cleanup Change-Id: I66b2ec2b029431ab453e54e962863e4ed7d78962 Reviewed-on: https://gerrit.libreoffice.org/41412 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>