summaryrefslogtreecommitdiff
path: root/framework
AgeCommit message (Collapse)Author
2018-08-09Toolbar and menu containers are similar enoughMaxim Monastirsky
... to be handled by the same code. Change-Id: I96fae066ccf2bef474fe4faf8068b7290eea8d8b Reviewed-on: https://gerrit.libreoffice.org/58766 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2018-08-06fix for crash in CppunitTest_services on windowsNoel Grandin
after commit 9cceba9a928cf3b3447f293020be2fe76c035ed5 make DBG_TESTSOLARMUTEX available in assert builds bt looks like: #0 0x00007faf569074fd in ImplDbgTestSolarMutex() #1 0x00007faf56904df9 in vcl::EventPoster::~EventPoster() #2 0x00007faf4392b452 in AutoRecovery::~AutoRecovery() #3 0x00007faf4392b589 in AutoRecovery::~AutoRecovery() #4 0x00007faf5d03dfc8 in __run_exit_handlers() Change-Id: If72eece22db89b492d8e69d1abb496168e32cb9d Reviewed-on: https://gerrit.libreoffice.org/58636 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-31Fix typosAndrea Gelmini
Change-Id: If8897807f065a342ef0e7f923199660079a70d22 Reviewed-on: https://gerrit.libreoffice.org/58123 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2018-07-30Add missing sal/log.hxx headersGabor Kelemen
rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx> (and don't make use of it themselves), but many other files happen to depend on it. This is a continuation of commit 6ff2d84ade299cb3d14d4110e4cf1a4b8070c030 to be able to remove those unneeded includes. This commit adds missing headers to every file found by: grep -FwL sal/log.hxx $(git grep -Elw 'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF|SAL_DETAIL_LOG_STREAM|SAL_WHERE|SAL_STREAM|SAL_DEBUG') to directories from filter to jvmfwk Change-Id: I2a73d63f2aaef5f26d7d08957daaa8a30b412ac5 Reviewed-on: https://gerrit.libreoffice.org/58204 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-07-29Fix typosAndrea Gelmini
Change-Id: I246d2f1681a7d833fc5f201bfdbacbe4fc3ae084 Reviewed-on: https://gerrit.libreoffice.org/58286 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-07-29Fix typoAndrea Gelmini
Change-Id: I5daaf19dab60a07033fd28499ba8ad25607777d9 Reviewed-on: https://gerrit.libreoffice.org/58127 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2018-07-27loplugin:returnconstant in frameworkNoel Grandin
Change-Id: Id3009a4b038175625cf8be419deb5ef8a9998850 Reviewed-on: https://gerrit.libreoffice.org/58110 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-27loplugin:stringloop in basic, framework, sax, svtoolsNoel Grandin
Change-Id: I2bad74a8f103e9dc68c8e0d0e6315697068d2f6d Reviewed-on: https://gerrit.libreoffice.org/58135 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-27Related: rhbz#1602589 add comments to coverity annotationsCaolán McNamara
Change-Id: I88c941832a0d682ea4b6028c28edd48cf5df38f7 Reviewed-on: https://gerrit.libreoffice.org/58093 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-07-26framework: avoid -Werror=deprecated-copy (GCC trunk towards GCC 9)Stephan Bergmann
...by removing explicitly user-provided functions that do the same as their implicitly-defined counterparts, but may prevent implicitly declared copy functions from being defined as non-deleted in the future. (Even if such a user-provided function was declared non-inline in an include file, the apparently-used implicitly-defined copy functions are already inline, so why bother with non-inline functions.) Change-Id: Ia4c3442642a2db3ca365a35e56a203a955a415c4 Reviewed-on: https://gerrit.libreoffice.org/58080 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-07-23Fix typosAndrea Gelmini
Change-Id: I4bb060a6a65ca27bba8d16c268660bedef8b0ed5 Reviewed-on: https://gerrit.libreoffice.org/57821 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2018-07-19Fix typosAndrea Gelmini
Change-Id: I7d12fe95d1c65a431325273c6e95943166e2ec58 Reviewed-on: https://gerrit.libreoffice.org/56941 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2018-07-18Fix typosAndrea Gelmini
Change-Id: I5195d13b351c0eebad1eae901f7ce8408a9e5c92 Reviewed-on: https://gerrit.libreoffice.org/57028 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2018-07-13merge IUndoManager into SfxUndoManagerNoel Grandin
SfxUndoManager is the only implementation of the IUnderManager "interface", and it lives in the same header. Plus this way we can get rid of some covariant parameters, which will make using std::unique_ptr easier. Change-Id: I6661b9876b18da830bead78794d237886cd3c5c9 Reviewed-on: https://gerrit.libreoffice.org/57317 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-10pass SvStream around by std::unique_ptrNoel Grandin
and give utl::OStreamWrapper a new constructor so that it knows it is taking ownership of the SvStream, which appears to fix several leaks Change-Id: Idcbcca9b81a4f0345fd8b8c8a2f4e84213686a6b Reviewed-on: https://gerrit.libreoffice.org/57187 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-08Fix typoAndrea Gelmini
Change-Id: I1cc4544e807d7c04aa171358ccd1c204040dff55 Reviewed-on: https://gerrit.libreoffice.org/57078 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-07-02loplugin:constantparamNoel Grandin
Change-Id: I9fbfa6163c1d4650c52b00dc911972f07fe7c0e5 Reviewed-on: https://gerrit.libreoffice.org/56778 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-29Improved loplugin:redundantcast (const-qualified typedefs): frameworkStephan Bergmann
Change-Id: Ibcceaa03a73926b559a297f62b3d1d2676c9f4f0 Reviewed-on: https://gerrit.libreoffice.org/56698 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-06-28tdf#86612: statusbar: hide some elements if width is not sufficientVasily Melenchuk
new statusbar element property mandatory=true/false to determine if this element can be hidden if total statusbar width is not enough to fit all elements. marked some calc and draw statusbar elements as not mandatory. Change-Id: I20e26d3c4bd865e94ea48632a1e97d55f3fa712f Reviewed-on: https://gerrit.libreoffice.org/56443 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-06-26Clean up XMLNamespacesStephan Bergmann
...so that it no longer has a m_aXMLAttributeNamespace member that the user- provided copy ctor did not copy. (Which was presumably by accident, but appears to not have had bad consequences due to how XMLNamespaces::adNamespace is only called before the copy ctor is called in SaxNamespaceFilter::startElement, framework/source/fwe/xml/saxnamespacefilter.cxx). Found by new -Wdeprecated-copy of GCC trunk towards GCC 9. Change-Id: I0701ecdfbef9c078a09ed411f4d9ccd166271aae Reviewed-on: https://gerrit.libreoffice.org/56469 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-06-19Rename nFlags to nSearchFlagsSamuel Mehrbrodt
Change-Id: Ib03046acf3d34fc307a3765d7d0b1b7d9448b507 Reviewed-on: https://gerrit.libreoffice.org/56088 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-06-19tdf#118238 Only disable UI interaction when loading document as hiddenSamuel Mehrbrodt
The "quiet" interaction handler was used unconditionally when loading a document via the loadComponentFromURL API method. So no dialog was shown asking the user whether he wants to enable macros. With this patch, the "quiet" interaction handler is only used, when the document was loaded with the "Hidden" property set. Change-Id: Idd522d0bf605499b071390fb58312181b755dfca Reviewed-on: https://gerrit.libreoffice.org/56086 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-06-18tdf#108523 Remove @author annotationsAbhyudaya Sharma
Change-Id: I85e364da59ce70ddd97fdae9bc03a4ea76b007fc Reviewed-on: https://gerrit.libreoffice.org/55263 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-06-18Fix typosAndrea Gelmini
Change-Id: I77c4c8feb12d7ed6ee4b4eaa6132a91f4e655fbc Reviewed-on: https://gerrit.libreoffice.org/55967 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-06-13WaE: Wmaybe-uninitializedCaolán McNamara
Change-Id: I48e0d84ec0307f9895b5148f9522df8f0c02ac6c Reviewed-on: https://gerrit.libreoffice.org/55758 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-06-12loplugin:constantparamNoel Grandin
Change-Id: Ia769b3176aea287cd57414d7ce8e88c6da43883e Reviewed-on: https://gerrit.libreoffice.org/55622 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-11new loplugin:shouldreturnboolNoel Grandin
look for methods returning only 1 and/or 0, which (most of the time) should be returning bool. Off by default, because some of this is a matter of taste Change-Id: Ib17782e629888255196e89d4a178618a9612a0de Reviewed-on: https://gerrit.libreoffice.org/54379 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-11menubar: framework/startpage sync help menubar entryandreas kainz
Change-Id: I8895c79a65750330600ebf0be19d184736fe2c1c Reviewed-on: https://gerrit.libreoffice.org/55543 Reviewed-by: Heiko Tietze <tietze.heiko@gmail.com> Tested-by: Jenkins <ci@libreoffice.org>
2018-06-08look for unnecessary calls to Reference::is() after an UNO_QUERY_THROWNoel Grandin
Since the previous call would throw if there was nothing to be assigned to the value. Idea from tml. Used the following script to find places: git grep -A3 -n UNO_QUERY_THROW | grep -B3 -F 'is()' Change-Id: I36ba7b00bcd014bdf16c0455ab91056f82194969 Reviewed-on: https://gerrit.libreoffice.org/55417 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-06-06enable incremental linking on windowsNoel Grandin
requires a handful of workarounds Change-Id: I77c25580135eeec437716eceea1412607f8d14ca Reviewed-on: https://gerrit.libreoffice.org/55244 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-05tdf#42949 remove unused compheler includes ..Jochen Nitschke
and fix the fallout Change-Id: I15bc5d626f4d157cbc69a87392078b41e621d14e Reviewed-on: https://gerrit.libreoffice.org/54882 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-06-01drop Image(Bitmap) constructorNoel Grandin
and convert some more code from Bitmap to BitmapEx Change-Id: Icf3c18608e0bb608408fe69722441cfa19f6b161 Reviewed-on: https://gerrit.libreoffice.org/55160 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2018-05-30tdf#117872: Revert "tdf#115284: Unify LibreOffice and system full-screen..."Tor Lillqvist
Instead, never participate in the macOS system full-screen mode. There is just too much complexity involved, and the way LibreOffice works really isn't prepared for the concept of windows having the option from a system point of view to being full-screenable or not. This means that the green bubble in window title bars changes from being a (system) full-screen toggle to being a maximize/restore toggle. Sure, the "maximize" concept also probably can be confused with LibreOffice's own full-screen concept. For instance, the Start Centre window is not expecting to be made full-screen. Still, when you from the Start Centre open a Writer document, it is the *same* window that is re-used as the Writer window, and then suddenly should be prepared to handle going full-screen. Also, it is up to each separate kind of document window whether it can be made full-screen (from the LibreOffice point of view) or not. Writer windows can, but Impress windows can't, for example. The View>Full Screen menu entry is added separately each case. Maybe I will come back to this mess later, or not. Anybody else is welcome to have a go, too, of course. This reverts commit 4b42fd7e9516fbbd8a92d97680524f32dd260fb2. Change-Id: I6983481cbd30c0e5190c450483b1246006c80632 Reviewed-on: https://gerrit.libreoffice.org/55049 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2018-05-25Improve re-throwing of UNO exceptionsNoel Grandin
(*) if we are already throwing a Wrapped*Exception, get the exception using cppu::getCaughtexception. (*) when catching and then immediately throwing UNO exceptions, use cppu::getCaughtException to prevent exception slicing (*) if we are going to catch an exception and then immediately throw a RuntimeException, rather throw a WrappedTargetRuntimeException and preserve the original exception information. Change-Id: Ia7a501a50ae0e6f4d05186333c8517fdcb17d558 Reviewed-on: https://gerrit.libreoffice.org/54692 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-24tdf#115284: Unify LibreOffice and system full-screen concepts on macOSTor Lillqvist
Also tdf#76476, and probably more. Make it so that when a window is in full-screen mode from LibreOffice's point of view, it is also full-screen from the system's point of view, and vice versa. All three ways to enter and leave full-screen mode can now be used with the same end result: The Ctrl-Cmd-F shortcut, the "View > Full Screen" menu entry, and the green bubble on the title bar. Don't disable/deactivate/etc menus while in full-screen mode. The menu auto-hides so there is no harm in having it function normally. Don't display the floating toolbar with a single "Full Screen" button in it as the way to leave full-screen mode. Instead, the same three ways that can be used to enter full-screen mode work to leave it, too. Sadly I could not figure out a way to set a window properly to full-screen at the point where a document window is created and set to be the same size as that kind of document window was the previous time it was open in LibreOffice. Thus don't save state for full-screen windows as we can't properly restore them. At least not for macOS. It is not good to just restore them as non-full-screened but still at the size they had when full-screen. One irritating glitch remains, and I was unable to fix that properly: I now prevent closing the document window that is in full-screen mode. Otherwise, if it is closed, the full-screen mode remains even if no window is open there; the desktop is completely black. Moving the cursor to the top edge, the LibreOffice menu is there, though. I tried to fix that but with no fully satisfying result. (Some attempts even lead to crashes, so just disabling closing is better than crashing at least.) Change-Id: Id909077ef9de9f19d48c8b9ad10d748a65b2417f Reviewed-on: https://gerrit.libreoffice.org/54760 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2018-05-22Fix typosAndrea Gelmini
Change-Id: Idbe136fbfd222e8baad588dc36a2f9b7ce6996ec Reviewed-on: https://gerrit.libreoffice.org/54590 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins <ci@libreoffice.org>
2018-05-17loplugin:unusedfields in formula..registryNoel Grandin
Change-Id: I031654d8bb4f1788d364ef4f8d3bf7a05fadb148 Reviewed-on: https://gerrit.libreoffice.org/54454 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-05Fix typosAndrea Gelmini
Change-Id: I92078fdece135754744d85424956dbb071f3899e Reviewed-on: https://gerrit.libreoffice.org/53638 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-05-03loplugin:useuniqueptr in PathSettingsNoel Grandin
Change-Id: Ib0e6e293e10473b7ada3919f781cfd05ef78749c Reviewed-on: https://gerrit.libreoffice.org/53761 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-03loplugin:useuniqueptr in ImageManagerImplNoel Grandin
Change-Id: I686d68ccee120246c20c2c52977422f49a318af9 Reviewed-on: https://gerrit.libreoffice.org/53762 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-27loplugin:constantparamNoel Grandin
Change-Id: I966dcf87be021520e7cc394338b9c0574bb8afee Reviewed-on: https://gerrit.libreoffice.org/53541 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-27make WB_LINESPACING a bool field on ToolboxNoel Grandin
Change-Id: If9332993a4917b00c230d2a3693daf8c5d3f5559 Reviewed-on: https://gerrit.libreoffice.org/53521 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-21cppcheck: identicalInnerConditionJochen Nitschke
renamed temporary list in EnhancedCustomShape2d.cxx to avoid shadow of a local variable Change-Id: I17a2261dafd2067480fcc5314af4f48765d6b690 Reviewed-on: https://gerrit.libreoffice.org/53244 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2018-04-15Empty ELMENT should say EMPTY in dtd; fixes tdf#116791Kevin Brubeck Unhammer
Change-Id: I27906786edddd37d6e616f1bb5b6e8f6902e8049 Reviewed-on: https://gerrit.libreoffice.org/52878 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-04-15remove some unused comphelper includesJochen Nitschke
and fix the fallout Change-Id: I5d0c2040f57a3ac354a7e277592da31d09a5f359 Reviewed-on: https://gerrit.libreoffice.org/52894 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2018-04-14Remove useless iterator in XCUBasedAcceleratorConfiguration::storeToStorageArnaud Versini
Change-Id: Ibe3c89901e02d495eb367882138f79cb4b7513fc Reviewed-on: https://gerrit.libreoffice.org/52872 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Arnaud Versini <arnaud.versini@libreoffice.org>
2018-04-13Fix typosAndrea Gelmini
Change-Id: If4bc1698af2a43a2dbc45b8518c0f5b736d6abaf Reviewed-on: https://gerrit.libreoffice.org/52278 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-04-11tdf#42949 Remove unnecessary localization headers from frameworkGabor Kelemen
Found by searching for the header names and the localization function: git grep -l -e \<fwkresid.hxx\> -e \<strings.hrc\> framework/ | xargs grep -c FwkResId | grep :0$ | grep -v /pch Change-Id: I026d78b5d1400c66705bd717eca9ed95e8c75366 Reviewed-on: https://gerrit.libreoffice.org/52597 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-04-11new loplugin:unusedvariablemoreNoel Grandin
collection of heuristics to look for local variables that are never read from i.e. do not contribute to the surrounding logic This is an expensive plugin, since it walks up the parent tree, so it is off by default. Change-Id: Ib8ba292241bd16adf299e8bba4502cb473513a06 Reviewed-on: https://gerrit.libreoffice.org/52450 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-07Revert "long->sal_Int32 in tools/gen.hxx"Stephan Bergmann
This reverts commit 8bc951daf79decbd8a599a409c6d33c5456710e0. As discussed at <https://lists.freedesktop.org/archives/libreoffice/2018-April/079955.html> "long->sal_Int32 in tools/gen.hxx", that commit caused lots of problems with signed integer overflow, and the original plan was to redo it to consistently use sal_Int64 instead of sal_Int32. <https://gerrit.libreoffice.org/#/c/52471/> "sal_Int32->sal_Int64 in tools/gen.hxx" tried that. However, it failed miserably on Windows, causing odd failures like not writing out Pictures/*.svm streams out into .odp during CppunitTest_sd_export_ooxml2. So the next best approach is to just revert the original commit, at least for now. Includes revert of follow-up 8c50aff2175e85c54957d98ce32af40a3a87e168 "Fix Library_vclplug_qt5". Change-Id: Ia8bf34272d1ed38aac00e5d07a9d13fb03f439ae Reviewed-on: https://gerrit.libreoffice.org/52532 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>