summaryrefslogtreecommitdiff
path: root/framework/source
AgeCommit message (Collapse)AuthorFilesLines
2018-02-06Unused include pngread/write (framework)Julien Nabet2-4/+0
Change-Id: I14358ba06a4a7eb7ad01b0e7cc73455daec917a2 Reviewed-on: https://gerrit.libreoffice.org/49293 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-02-05tdf#108523 Removed @author annotations.Manuj Vashist1-2/+0
Change-Id: I6a60128c413beab6cabb857c073607e15ddbc98f Reviewed-on: https://gerrit.libreoffice.org/49215 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-02-02loplugin:datamembershadow in PopupMenuToolbarControllerNoel Grandin1-2/+1
this looks like an oversight, just use the baseclass member Change-Id: Ida36be64266bbc33a6bd1d89dcb665d24a6dd83f Reviewed-on: https://gerrit.libreoffice.org/49075 Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-25Initialize more for sharing during pre-init.Michael Meeks1-0/+3
Change-Id: I12b90504ec9161318683ebad8f8e4dd1e614da89 Reviewed-on: https://gerrit.libreoffice.org/46120 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/48510
2018-01-24loplugin:useuniqueptr in ImageListsDescriptorNoel Grandin2-5/+5
Change-Id: I165af348b6d8863a4b1e5dd164d92c29f49d09c0 Reviewed-on: https://gerrit.libreoffice.org/48423 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-24loplugin:useuniqueptr in LayoutManagerNoel Grandin3-12/+10
Change-Id: I93383fcb5f0093416914722e25cd0faf70c040eb Reviewed-on: https://gerrit.libreoffice.org/48422 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-19loplugin:unusedmethods also check for functions returning boolNoel Grandin2-3/+2
we were previously excluding them Change-Id: I48a68799b0de60b4995fae541eb363e043d4dd11 Reviewed-on: https://gerrit.libreoffice.org/48167 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-18framework: disable layout manager in hidden framesMiklos Vajna5-12/+38
The point of hidden frames is that they are not visible on the UI, only their doc model / layout is accessible via the API or file format conversion. That means that laying out the UI elements like menus and toolbars is pointless. So change Frame::initialize() and Frame::setLayoutManager() to not enable the layout manager for hidden frames. To do this, we need a new window style flag, as both hidden and visible frames have an underlying hidden window at the time the framework layout manager would be enabled. Times for 200 hello world inputs: 5780 -> 5054 ms is spent in XHTML-load + ODT export + close (87% of original). Change-Id: I841507bbb62f8fc2979d20e2d579d0bb47b98f37 Reviewed-on: https://gerrit.libreoffice.org/48068 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2018-01-15Fix typoAndrea Gelmini2-13/+13
Change-Id: I51c97356c9c2939f2d94d6388c829a179ca00daa Reviewed-on: https://gerrit.libreoffice.org/47853 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-01-15More loplugin:cstylecast: frameworkStephan Bergmann6-65/+65
Change-Id: Iffd183cb21b43aaa66dd55cc6c453ebeae36a3e1
2018-01-15convert a<b?a:b to std::min(a,b)Noel Grandin1-1/+1
with something like git grep -nP '(.*)\s*<\s*(.*)\s*\?\s*\g1\s*:\s*\g2' -- *.?xx Change-Id: Id5078b35961847feb78a66204fdb7598ee63fd23 Note: we also convert a>b?b:a Reviewed-on: https://gerrit.libreoffice.org/47736 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-14Fix typosAndrea Gelmini5-14/+14
Change-Id: I2b4988e1d81fe60f7699362480cd739d2620c053 Reviewed-on: https://gerrit.libreoffice.org/47856 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-14Fix typosAndrea Gelmini11-19/+19
Change-Id: I2a578961837076ebce3c1fb2681b0785d1d490ac Reviewed-on: https://gerrit.libreoffice.org/47857 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-12More loplugin:cstylecast: frameworkStephan Bergmann27-51/+51
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable loplugin:cstylecast for some more cases" plus solenv/clang-format/reformat-formatted-files Change-Id: I8981ef6de675bf10c103e1af0afccd620762268d
2018-01-11loplugin:redundantcast: frameworkStephan Bergmann1-5/+5
(after a to-be-committed improved loplugin:cstylecast would have rewritten the C-style casts into static_casts) Change-Id: I726159d62e748678f8d739db2d3f97c80a5181c3
2018-01-05Fix typosAndrea Gelmini4-6/+5
Change-Id: I766862d255ac285329ae423629c7445837ddd55f Reviewed-on: https://gerrit.libreoffice.org/47280 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2018-01-04drop CmdToXGraphicNameAccess typedefNoel Grandin1-19/+17
Change-Id: I76dc73c5a6c62b0ec0fff274ae57f084ccdb8c70 Reviewed-on: https://gerrit.libreoffice.org/47347 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-03tdf#107039: Avoid deadlock by locking the SolarMutex early on in one placeTor Lillqvist1-0/+1
See bug report for backtraces of the deadlocking threads. Change-Id: I0334118e173c37b6f9596249e1e2f0d196bbab3f Reviewed-on: https://gerrit.libreoffice.org/47249 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2018-01-03Fix typosAndrea Gelmini1-2/+2
Change-Id: I3f4ad9eff0730d3deea96b37fa7f36dfd038b214 Reviewed-on: https://gerrit.libreoffice.org/47301 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-12-29Fix typosAndrea Gelmini1-1/+1
Change-Id: I0e56430afa65b6b5826d56212ac501c0244fce9b Reviewed-on: https://gerrit.libreoffice.org/47145 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-12-29Fix typosAndrea Gelmini2-2/+2
Change-Id: I3d16dc162e5fa2e08134d848a835eb392e64056e Reviewed-on: https://gerrit.libreoffice.org/47126 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-12-26loplugin:passstuffbyref improved return in basic,frameworkNoel Grandin2-2/+2
Change-Id: Ib19836febb59f4e2bb07dc874cfc6baabc653237 Reviewed-on: https://gerrit.libreoffice.org/47065 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-22lokdialog: Allow switching language of some of the ResMgr's.Jan Holesovsky1-2/+1
This way, it is possible to have all the strings translated in dialogs even when different users use different languages. [It was already possible to have different languages previously, but not everything in the dialog has switched - like the buttons at the bottom of the dialogs etc.] Change-Id: I29a5ae6d31a370eec60397884200b684ec1bf5b9 Reviewed-on: https://gerrit.libreoffice.org/46417 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/46979 Tested-by: Jenkins <ci@libreoffice.org>
2017-12-21Fix typosAndrea Gelmini1-1/+1
Change-Id: I5c6e252072089a06f0be4292d51aed020cbc67fe Reviewed-on: https://gerrit.libreoffice.org/46888 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-12-20Related: tdf#79657 Different approach to disable the context menuMaxim Monastirsky1-1/+0
... in the overflow toolbar. Using ToolBoxMenuType::NONE is wrong as it might affect the layout. Can be easily triggered here by adding FloatWinPopupFlags::GrabFocus to StartPopupMode (which likely will be needed to fully solve tdf#79657). Another case was fixed in 91053763a7189c8ac03a59dc996e6333404f846e ("Fix sub-toolbar tearoff for .uno:ChooseControls"), but without providing a solution for the context menu. Change-Id: I4a0b4560fe49106613fa2337b5dd83eb7fa29f47 Reviewed-on: https://gerrit.libreoffice.org/46837 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2017-12-20Fix typosAndrea Gelmini1-1/+1
Change-Id: I28d73221ea83d89f73460f591723c6f80594ff15 Reviewed-on: https://gerrit.libreoffice.org/46822 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-12-19Fix typosAndrea Gelmini1-1/+1
Change-Id: Ibffe19c1dfda9d0f4ba8d2a0761ad1222491007f Reviewed-on: https://gerrit.libreoffice.org/46599 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-12-17Fix typosAndrea Gelmini2-7/+7
Change-Id: I4630ba4a93a32c47753422b29535c36b53ff3d5e Reviewed-on: https://gerrit.libreoffice.org/46635 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-12-17tdf#98058 Respect menu:style="text" settingMaxim Monastirsky1-12/+5
It was implemented on the xml handling side, but ignored by the menubar code. In addition, make the menu:style attribute survive customization (similar to tdf#114261). Change-Id: I92a3517ee7ba2fe7a0782985d89fb5d0fdbac246 Reviewed-on: https://gerrit.libreoffice.org/46627 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2017-12-13Make loplugin:salcall look into macros tooStephan Bergmann1-1/+1
"Indirect" calls to isSallCallFunction (for canonic and overridden FunctionDecls) already needed to handle many cases of FunctionDecls spanning macros, so it isn't that much more work to make that also work for cases called directly from VisitFunctionDecl. Change-Id: I529f148c8872b86aa1ef082c6cb73db8ab1866e7 Reviewed-on: https://gerrit.libreoffice.org/46367 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-12-13sal_uLong->void* for userdata in MenuNoel Grandin6-18/+18
Change-Id: I58fb10136a23c445edfd63a1f86ace3995524704 Reviewed-on: https://gerrit.libreoffice.org/46350 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-11Fix typos and grammarIlmari Lauhakangas1-1/+1
Change-Id: I4143da3c5a809118d57849664f6ab1d2e775837f Reviewed-on: https://gerrit.libreoffice.org/46253 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-12-11loplugin:salcall fix functionsNoel Grandin40-55/+55
since cdecl is the default calling convention on Windows for such functions, the annotation is redundant. Change-Id: I1a85fa27e5ac65ce0e04a19bde74c90800ffaa2d Reviewed-on: https://gerrit.libreoffice.org/46164 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-08cppcheck: fix some reportsJulien Nabet1-1/+1
variableScope reports in comphelper/drawinglayer/editeng +filter/framework/l10ntools Change-Id: I4575428773e8b9b3efedabb44fdcd6d8175ac46a Reviewed-on: https://gerrit.libreoffice.org/46116 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-12-06Remove unused #include <vcl/metaact.hxx> from vcl/outdev.hxxStephan Bergmann2-2/+2
...and fix the fallout Change-Id: Ie514bd95d5a9f990a887566619031e9844c40b92 Reviewed-on: https://gerrit.libreoffice.org/45195 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-12-05loplugin:salcall fix non-virtual methodsNoel Grandin7-16/+16
first, since those are safer to change than virtual methods Change-Id: Ie3b624019d75ee2b793cee33b3c5f64e994e8bfe Reviewed-on: https://gerrit.libreoffice.org/45798 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-03loplugin:unnecessaryparenStephan Bergmann1-1/+1
Change-Id: Ie87cb60e2340a0bc21163b0b6c02ed0d2c6c3765
2017-11-30loplugin:unnecessaryparen: signed numeric literalsStephan Bergmann1-2/+2
Change-Id: I75c8224452ca9c3711a2ccaca9ecf549fa59cb64 Reviewed-on: https://gerrit.libreoffice.org/45549 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-30tdf#114025 framework: avoid deadlock between Desktop init ...Michael Stahl1-5/+25
... and SolarMutex: the problem is that rtl::StaticWithArg will first lock the implicit mutex of the C++11 static variable, and then the SolarMutex. So if one thread creates the Desktop singleton with SolarMutex locked and another thread without SolarMutex locked, this can deadlock. If we use rtl_Instance directly with SolarMutex, then there is still a static variable, but the SolarMutex will always be locked first, preventing this deadlock. Change-Id: Ibd37fdfa96a4a2b57f661be3814dd597eb52d338 Reviewed-on: https://gerrit.libreoffice.org/45508 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-11-29related tdf#113911: better statement to identify Writer appHenry Castro1-21/+6
Also remove duplicate code that I forgot from my drafts Thanks for help Maxim Monastirsky Change-Id: If9e26dfd6702f167c831296f0280ae5fe955a8a9 Reviewed-on: https://gerrit.libreoffice.org/45435 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2017-11-28sc, sd: rework UI Text Language "More" button, tdf#113911Henry Castro1-28/+75
Calc and Impress handle different uno command to set language Change-Id: Ic0ffef6a8fee5078b29873934001819a384c8f3a Reviewed-on: https://gerrit.libreoffice.org/45366 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Henry Castro <hcastro@collabora.com>
2017-11-27loplugin:unnecessaryparen check for (f1()).f2Noel Grandin2-2/+2
Change-Id: I93257b0ddd41c649875124d6d5c5faeaa431bae3 Reviewed-on: https://gerrit.libreoffice.org/45218 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-24set new document window as parent for dialogs during loadCaolán McNamara1-7/+29
and exit typedetection early and completely if application quits while detecting During typedetection, before loading proper, we have the hidden window as parent so warnings are not modal to existing windows and they are cancelled on exit. Once we do have a window, then reinit interaction handler to have that window as the parent for any further dialogs. Change-Id: I5c6711557266bf7d1eb9291f1c454cbfaf766886 Reviewed-on: https://gerrit.libreoffice.org/45148 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-23Related: tdf#113160 set a temporary dialog parent during type detectionCaolán McNamara1-23/+8
to get warning dialogs that don't block the existing windows but whose lifecycle can be controlled to avoid crashes during exit Change-Id: I57965301c3d8a031acb33e83bf7715fe132385d0 Reviewed-on: https://gerrit.libreoffice.org/45044 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-23move preventduplicateinteraction from framework to sfx2 consumerCaolán McNamara1-232/+0
Change-Id: I1388a88ba20b5cde65cd1d88694775b071a0dff6 Reviewed-on: https://gerrit.libreoffice.org/45099 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-23loplugin:simplifybool for negation of comparison operatorNoel Grandin4-6/+6
Change-Id: Ie56daf560185274754afbc7a09c432b5c2793791 Reviewed-on: https://gerrit.libreoffice.org/45068 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-22Make loplugin:unnecessaryparen warn about (x) ? ... : ... after allStephan Bergmann1-3/+3
...which had been left out because "lots of our code uses this style, which I'm loathe to bulk-fix as yet", but now in <https://gerrit.libreoffice.org/#/c/45060/1/> "use std::unique_ptr" would have caused an otherwise innocent-looking code change to trigger a loplugin:unnecessaryparen warning for pFormat = (pGrfObj) ? ... (barring a change to ignoreAllImplicit in compilerplugins/clang/unnecessaryparen.cxx similar to that in <https://gerrit.libreoffice.org/#/c/45083/2> "Make not warning about !! in loplugin:simplifybool consistent", which should also have caused the warning to disappear for the modified code, IIUC). Change-Id: I8bff0cc11bbb839ef06d07b8d9237f150804fec2 Reviewed-on: https://gerrit.libreoffice.org/45088 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-20look for =() in loplugin:unnecessaryparenNoel Grandin5-9/+9
Change-Id: I4f9b71ff7767e90987bb40358fc46ed5d1d571d0 Reviewed-on: https://gerrit.libreoffice.org/44944 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-15sc: disable context menu of the language status bar itemHenry Castro1-1/+3
Change-Id: Ifa4de8abff37179aca57b3890337f2475e5775eb Reviewed-on: https://gerrit.libreoffice.org/44745 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Henry Castro <hcastro@collabora.com>
2017-11-13Fix typosAndrea Gelmini3-5/+5
Change-Id: I677512213d97d01832bebe162fbf7de2998bf4d0 Reviewed-on: https://gerrit.libreoffice.org/44664 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>