summaryrefslogtreecommitdiff
path: root/framework/source
AgeCommit message (Collapse)Author
2018-09-10tdf#42949 Fix IWYU warnings in include/cppuhelper/*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ib420e9216b8313f5ed7634ec375e39ceb741fd45 Reviewed-on: https://gerrit.libreoffice.org/59297 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-09-08loplugin:simplifyconstruct in filter..frameworkNoel Grandin
Change-Id: Ida4307a92dfb1dbd14da5a30b6ee1f0fd6a9455e Reviewed-on: https://gerrit.libreoffice.org/60194 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-06loplugin:useuniqueptr in framework::FrameNoel Grandin
Change-Id: Ic1350d5bff80d4a88d3949a412ee9bf02ad969ba Reviewed-on: https://gerrit.libreoffice.org/60050 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-05clang-tidy performance-inefficient-vector-operationNoel Grandin
Change-Id: Iebcaea7b08c5284946d83b6b6b9ed26b218025d4 Reviewed-on: https://gerrit.libreoffice.org/59992 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-04loplugin:useuniqueptr in AcceleratorConfigurationNoel Grandin
Change-Id: I255005e80ee57638846e353a88477dd54bbbb284 Reviewed-on: https://gerrit.libreoffice.org/59943 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-04loplugin:useuniqueptr in HandlerCacheNoel Grandin
Change-Id: Ic3ba52568cbf1281162b3b4146d8c5d2ce9574b4 Reviewed-on: https://gerrit.libreoffice.org/59942 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-31tdf#119390 Don't focus the toolbar when closing a floating windowMaxim Monastirsky
Toolbar popup windows have the toolbar as their direct parent. This causes problems when such window is teared-off and later closed, as Window::dispose will attempt to move the focus to its parent which is the toolbar, instead of what users expect to have the focus back in the document area, or in whatever was the last focused control. As a solution reparent the window before dispose, similar to what happens with floating toolbars. Also return the focus to the main window when popup mode ends, so we can keep track of the last focused control. This is also a good thing by itself, as WB_OWNERDRAWDECORATION windows don't get the focus by default, which results in neither the floating window nor the document have focus after tear-off. Change-Id: I060b8c45a64db9c612da58b7c35478bab41a4558 Reviewed-on: https://gerrit.libreoffice.org/59811 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2018-08-15loplugin:useuniqueptr in MenuBarManagerNoel Grandin
Change-Id: Iffdd62e8af5fa31caecc6ea01bd5e21de950862c Reviewed-on: https://gerrit.libreoffice.org/59021 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-14create appendCopy method in OUStringBufferNoel Grandin
so we can avoid temporary copies when appending a substring of an OUString to the buffer. I would have preferred to call the method just "append" but that results in ambiguous method errors when the callsite is something like sal_Int32 n; OUStringBuffer s; s.append(n, 10); I'm not sure why Change-Id: I6b5b6641fcb5b26ce2269f89ef06e03c0b6aa76f Reviewed-on: https://gerrit.libreoffice.org/58666 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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-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-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>