summaryrefslogtreecommitdiff
path: root/embeddedobj
AgeCommit message (Collapse)AuthorFilesLines
2019-09-03LOK: Proper use of isMobile() on embedded chartsMuhammet Kara1-7/+0
We are moving the isMobile() check to a higher layer, to avoid changing a published API method This is the follow-up of the commit feae0c186e700f6a48c3fad124fb4795ad1a8f83 (cherry picked from commit 9083a07e98a32e3ce7af4bd1a817f2b870df0f55) Change-Id: Ia84baa36d66d5832e00e6466f5206631df0de443 Reviewed-on: https://gerrit.libreoffice.org/78310 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2019-09-03LOK: per-view support for isMobile()Muhammet Kara1-1/+1
embeddedobj/source/commonembedding/embedobj.cxx will have a follow-up patch, which also removes the -1 case. It is left out because it has many call-sites, and inheritance/override relations. (cherry picked from commit f8b2a27365b858ab5653edad75fd089b39d016d8) Conflicts: comphelper/source/misc/lok.cxx sc/source/ui/condformat/condformatdlg.cxx sc/source/ui/condformat/condformatdlgentry.cxx Change-Id: Iaf00530916f3772f7aec151cbd358f255b7aab24 Reviewed-on: https://gerrit.libreoffice.org/78309 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2019-09-03lok: Disable chart editing on mobileTamás Zolnai1-0/+7
Disabled editing of all embedded objects. [ Miklos: motivation is that the UI is complex and the small mobile screen is not suitable to expose this functionality as-is. Disable till a more compact UI can be exposed. ] (cherry picked from commit e56d143c36af028825a8e824201a3aa193862af4) Change-Id: Id1c598c84adc12b8b52d006992d85dcae5601ad9 Reviewed-on: https://gerrit.libreoffice.org/78308 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2018-12-14tdf#117295 WIN no main loop shortcut for OLE dialogJan-Marek Glogowski1-0/+5
Normally we handle Idle events directly without posting events to the main event queue, as there seem to be no way to post them to the end of the queue and this starves system events. This prevents using this short-cut, as the default Windows event processing doesn't know of this special handling. Eventually this hack should be removed by simply always processing all pending events... This patch includes the follow-up commit 7b148b0edfb2 ("WIN move native dialog hack into WinScheduler"). Change-Id: If9ae81ca7e847743f9251343e106dbf566371584 Reviewed-on: https://gerrit.libreoffice.org/65040 Reviewed-on: https://gerrit.libreoffice.org/65100 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit 5bb798a99e7b178ac57ee8c15238534723000bf9) (cherry picked from commit 7b148b0edfb217196c171f8e64e79b49669fc36f) Reviewed-on: https://gerrit.libreoffice.org/65065
2018-11-15Fix typoAndrea Gelmini1-1/+1
Change-Id: I9ccd24ad6baf3e3ebe6c988ad14df0f5f7c96ca0 Reviewed-on: https://gerrit.libreoffice.org/63392 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2018-11-14sw: fix modification of ole obj native data during HTML importMiklos Vajna3-2/+25
It is expected that if you load an OLE2 storage (from reqif-xhtml) and you save it as ODT, the OLE2 data is not modified. This was almost the case, but we insisted on removing the OLE2 preview from the storage. Add a new flag to OleEmbeddedObject, so import filters can opt in for not modifying the OLE2 data. [ The nice situation is that we already had a test file which had a preview stream in the OLE2 storage, so we can easily assert there that the size doesn't change. ] Change-Id: I9b8b29f015dd4f2513e51a1066767218580cb5d8 Reviewed-on: https://gerrit.libreoffice.org/63381 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2018-11-09Fix sd toolbar manager lock underflowsJan-Marek Glogowski1-15/+15
Regressions from commit 45519023aa44 ("Resolves: tdf#119997 toolbar layout unlock doesn't refresh ui"), commit c5977a89c28b ("Resolves: tdf#96451 do magic to enable embedded chart sidebar only for chart") and commit faed29cac93f ("for now show chart sidebar"). It also adds an assert for the underflow, as nobody cared for the underflow warnings since some years. Change-Id: I86bb093987f084c85a7b640a846dfe0aefea9e48 Reviewed-on: https://gerrit.libreoffice.org/63204 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2018-11-07embeddedobj win32: avoid owning a lock while calling out to event listenersMiklos Vajna1-3/+8
The deadlock happens from time to time, when converting documents containing OLE objects via remote UNO (from Java) -- after the conversion, when closing the document. The relevant stacktraces are: >Debug.ListCallStack /ShowLineOffset /AllThreads Callstack for Thread 8 (Thread Id: 32912 (0x8090)): ... 6 sal3.dll!osl_acquireMutex(_oslMutexImpl * Mutex) Line 75 7 [Inline Frame] emboleobj.dll!osl::Mutex::acquire() Line 56 8 [Inline Frame] emboleobj.dll!osl::Guard<osl::Mutex>::{ctor}(osl::Mutex &) Line 129 9 emboleobj.dll!OleComponent::OnClose_Impl() Line 1399 10 emboleobj.dll!OleWrapperAdviseSink::OnClose() Line 119 Callstack for Thread 11 (Thread Id: 21088 (0x5260)): ... 11 ole32.dll!00007fffc5e44e83() 12 [Inline Frame] emboleobj.dll!OleComponent::CloseObject() Line 1012 13 emboleobj.dll!OleComponent::Dispose() Line 484 14 emboleobj.dll!OleComponent::close(unsigned char bDeliverOwnership) Line 1463 15 emboleobj.dll!OleEmbeddedObject::GetRidOfComponent() Line 239 16 emboleobj.dll!OleEmbeddedObject::Dispose() Line 275 17 emboleobj.dll!OleEmbeddedObject::close(unsigned char bDeliverOwnership) Line 497 ... 26 swlo.dll!SwXTextDocument::close(unsigned char bDeliverOwnership) Line 617 OleComponent::OnClose_Impl() taking a lock is fine, but OleComponent::close() takes a lock and then later it still calls out (via OleComponent::CloseObject()), which is a no-go. Fix the problem by making sure that callers of Dispose() own no lock at the time of the function call, and taking the lock in Dispose() only after the CloseObject() call (which invokes event listeners). Change-Id: I53befee21478188c7f79723b7d7596e66077d1c2 Reviewed-on: https://gerrit.libreoffice.org/63014 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-10-28tdf#120703 PVS: V547 Expression is always true/falseMike Kaganski1-54/+49
Fixed the logic broken since commit 5d64757c7a5df2d3cb9b36d18f44932df15e5b3f with what seems to be the original idea. Change-Id: I1a25cfb27d7d9a1af4e024c2989ea4959014455f Reviewed-on: https://gerrit.libreoffice.org/62462 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-10-27tdf#120703 PVS: V530 The return value of function is required to be utilizedMike Kaganski1-2/+2
Change-Id: Ifc170a45e25b3fd5b7f561cc50afb6452bb359bd Reviewed-on: https://gerrit.libreoffice.org/62420 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-10-20clarify this code a littleCaolán McNamara1-4/+1
Change-Id: I10a9f29add5cefa866cbe87e5c6164738ca57d04 Reviewed-on: https://gerrit.libreoffice.org/62019 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-17loplugin:staticvar in editeng..frameworkNoel Grandin1-1/+1
Change-Id: I8e555a98f74f61e6e40122564b7ad19ca07a8a91 Reviewed-on: https://gerrit.libreoffice.org/61866 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-15add SvStream::TellEndNoel Grandin1-2/+2
and simplify callsites to use it instead of the current "seek to end, find pos, seek back to original pos" pattern Change-Id: Ib5828868f73c341891efc759af8bd4695ae2f33c Reviewed-on: https://gerrit.libreoffice.org/61738 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-08tdf#42949 Fix IWYU warnings in include/comphelper/[m-z]*Gabor Kelemen1-0/+1
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I04c5ba277d5b3398c07de6ae66713d977636088d Reviewed-on: https://gerrit.libreoffice.org/61347 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-09-24loplugin:external (clang-cl)Stephan Bergmann3-8/+8
Including: * expanding STDAPI to its definition (as per <https://msdn.microsoft.com/library/ms686631(vs.85).aspx> "STDAPI"), to add __declspec(dllexport) into its middle, in extensions/source/activex/so_activex.cxx; as discussed in the comments at <https://gerrit.libreoffice.org/#/c/60691/> "Get rid of Windows .def files in setup_native, use __declspec(dllexport)", having a function both listed in a .def file EXPORTS and marking it dllexport is OK, and the latter helps the heuristics of loplugin:external; however, the relevant functions in extensions/source/activex/so_activex.cxx probably don't even need to be exported in the first place? * follow-up loplugin:salcall in sal/osl/w32/file-impl.hxx Change-Id: Ida6e17eba19cfa3d7e5c72dda57409005c0a0191 Reviewed-on: https://gerrit.libreoffice.org/60938 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-09-17loplugin:simplifyconstruct (clang-cl)Stephan Bergmann1-1/+0
Change-Id: I7cae6b3f31b10efc72884bce4bda7bf6b380cbc2 Reviewed-on: https://gerrit.libreoffice.org/60597 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-09-17New loplugin:externalStephan Bergmann3-4/+4
...warning about (for now only) functions and variables with external linkage that likely don't need it. The problems with moving entities into unnamed namespacs and breaking ADL (as alluded to in comments in compilerplugins/clang/external.cxx) are illustrated by the fact that while struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } returns 1, both moving just the struct S2 into an nunnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { namespace { struct S2: S1 { int f() { return 1; } }; } int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } as well as moving just the function f overload into an unnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; namespace { int f(S2 s) { return s.f(); } } } int main() { return f(N::S2()); } would each change the program to return 0 instead. Change-Id: I4d09f7ac5e8f9bcd6e6bde4712608444b642265c Reviewed-on: https://gerrit.libreoffice.org/60539 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-09-10tdf#42949 Fix IWYU warnings in include/cppuhelper/*Gabor Kelemen3-0/+3
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 editeng..extensionsNoel Grandin2-4/+1
Change-Id: I646a24382554312d92a4a8746d5267767353a53f Reviewed-on: https://gerrit.libreoffice.org/60169 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-01Add missing sal/log.hxx headersGabor Kelemen7-0/+7
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 dbaccess to extensions Change-Id: I4d15aa35e11664ef78c836ffc2937c7e0bb6ea59 Reviewed-on: https://gerrit.libreoffice.org/58165 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-07-25Resolves: tdf#118919 crash on double click ole objectCaolán McNamara1-1/+1
Change-Id: Id7b3df447db56f6f80d6255dabdcc7f6ab149e95 Reviewed-on: https://gerrit.libreoffice.org/57953 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-07-22Fix typosAndrea Gelmini1-1/+1
Change-Id: Ia78310bd85c9a582245074bd46154516a1f21c86 Reviewed-on: https://gerrit.libreoffice.org/57826 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-07-17remove the GL based 3D chartsMarkus Mohrhard1-2/+1
Change-Id: Ia578c71ae70aa0a85b49fa50138edf90f961b1e9 Reviewed-on: https://gerrit.libreoffice.org/57533 Tested-by: Jenkins Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2018-06-28Fix typosAndrea Gelmini1-1/+1
Change-Id: I1b966b636f67a549718ca19c00c2820e8d168c7a Reviewed-on: https://gerrit.libreoffice.org/56589 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-06-08look for unnecessary calls to Reference::is() after an UNO_QUERY_THROWNoel Grandin1-2/+1
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 Nitschke4-3/+1
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-05-30sw HTML filter: handle embedded ODF content in xhtml/reqif modeMiklos Vajna1-0/+4
Embedded native data (what we don't parse just carry on) and real OLE2 embedding already worked, this adds the case where the actual content is ODF, just inside OLE2. The DOC import/export had support for handleing ODF content inside OLE2, so reuse that code: add new functions to SvxMSDffManager for import purposes and reuse SvxMSExportOLEObjects for export purposes. Change-Id: I0acf65d4bf29af896b8f1dd625e8672050aae350 Reviewed-on: https://gerrit.libreoffice.org/55088 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2018-05-30embeddedobj: document OCommon/DummyEmbeddedObjectMiklos Vajna2-0/+8
Change-Id: Ia0024945fa88c14dce4da571ddfd3281e1e41da7 Reviewed-on: https://gerrit.libreoffice.org/55022 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-05-25Improve re-throwing of UNO exceptionsNoel Grandin3-8/+17
(*) 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-07loplugin:useuniqueptr in OleEmbeddedObjectNoel Grandin3-8/+7
Change-Id: Ia455b86ec14320234935bce32c0bc33a88db036a Reviewed-on: https://gerrit.libreoffice.org/53875 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-03pass area param to DBG_UNHANDLED_EXCEPTIONNoel Grandin1-2/+2
and update sallogareas plugin to enforce this Change-Id: Id0782c8a1f619372e10d931aec3c6a4743a4c86a Reviewed-on: https://gerrit.libreoffice.org/52249 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-01remove unused processfactory.hxx includesJochen Nitschke3-3/+0
and fix fallout Change-Id: Id06bf31f2075111e426ba40c84c885ae70697bee Reviewed-on: https://gerrit.libreoffice.org/52206 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2018-03-23sw XHTML import: support OLE2-in-RTF objectsMiklos Vajna2-1/+16
If you like layering things on top of each other, then this commit message is for you. So it's possible to have a PPTX file in the following wrappers: - wrap PPTX in a binary OLE2 container - wrap that in an OLE1 container - wrap that in an RTF fragment - wrap that in an XHTML fragment (in a ReqIF file) Turns out that only the RTF and OLE1 unwrapping was missing, the rest worked already, so implement the missing piece in a new SwReqIfReader namespace. Finally extend OleEmbeddedObject to be able to read its native data stream when the object is opened, reading it from the storage would fail, as the object already opened the storage stream. Change-Id: I2934c9fb7474e981ff6bb2f7eb253a3a86cfd98b Reviewed-on: https://gerrit.libreoffice.org/51772 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2018-03-17Use for-range loops in embeddedobj, embedserv and formulaJulien Nabet1-5/+2
Change-Id: I56e1bace8ab8312524e681d3865a1a89d523812d Reviewed-on: https://gerrit.libreoffice.org/51459 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-03-02lok - chart - state switch issue triggers an OLE general error msg boxMarco Cecchetti1-15/+19
Change-Id: I6addd95d1ad3461b6e21328512cbd1301a36cd19 Reviewed-on: https://gerrit.libreoffice.org/50368 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/50482 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
2018-02-01embeddedobj: MSVC: pragma warning: make more specific, remove obsoleteMike Kaganski1-9/+0
Change-Id: Iefcaf1f5ae73050300879fff0855f709c5f8a30d Reviewed-on: https://gerrit.libreoffice.org/48975 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-01-29tdf#114677 Correct title in Base forms cleanupSzymon Kłos1-8/+5
Change-Id: I224858ffce50b00273d80f915831ec7789cfa64a Reviewed-on: https://gerrit.libreoffice.org/48819 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2018-01-29tdf#114677 Correct title in Base formsSzymon Kłos1-4/+7
Change-Id: I07bdb46cce88e876583e1d4217dff3f77f2f3814 Reviewed-on: https://gerrit.libreoffice.org/48801 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2018-01-23More loplugin:cstylecast on WindowsStephan Bergmann2-28/+28
Automatic rewrite (of loplugin:cstylecast and loplugin:unnecessaryparen) after cab0427cadddb3aaf1349c66f2fa13a4234ba4b2 "Enable loplugin:cstylecast for some more cases" and a409d32e7f6fc09e041079d6dbc3c927497adfed "More loplugin:cstylecast" Change-Id: Ib3355159dd08333e1b7a8d091caf2069cdcc7862 Reviewed-on: https://gerrit.libreoffice.org/48317 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-22loplugin:unnecessaryparen (clang-cl)Stephan Bergmann1-1/+1
Change-Id: Iff2b28120e0c43f13d4fb21a75746f2a289214c7 Reviewed-on: https://gerrit.libreoffice.org/48312 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-15convert a<b?a:b to std::min(a,b)Noel Grandin2-3/+3
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-12More loplugin:cstylecast: embeddedobjStephan Bergmann3-14/+14
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: I16cbffa66d6b9bcc4ca68f0dd8f6bf3f4966a77f
2018-01-11convert (a>b?a:b) to std::max(a,b)Noel Grandin1-2/+2
with something like: git grep -nP '(.*)\s*>\s*(.*)\s*\?\s*\g1\s*:\s*\g2' Change-Id: I60b9a3a2a09162bc0de4c13fdde2c209696e5413 Reviewed-on: https://gerrit.libreoffice.org/47602 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-04Remove redundant control flow branchMike Kaganski1-5/+1
Change-Id: I5f63f2a7ad6eb6bf85b21b6936a1488ce13ccc93 Reviewed-on: https://gerrit.libreoffice.org/47394 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-12-29loplugin:passstuffbyref improved return in variousNoel Grandin2-2/+2
Change-Id: I0a8282d8e0d9575b055243073fc89a7d6b67b560 Reviewed-on: https://gerrit.libreoffice.org/47173 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-20loplugin:salcall (clang-cl)Stephan Bergmann2-6/+6
Change-Id: Iebbbd8e20ef8d5eb28d8594e142ea323aaa63a82 Reviewed-on: https://gerrit.libreoffice.org/46835 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-12-14No need to keep these whitelisted functions decorated with SAL_CALLStephan Bergmann6-24/+24
The only effect SAL_CALL effectively has on LO-internal code is to change non- static member functions from __thiscall to __cdecl in MSVC (where all other functions are __cdecl by default, anyway). (For 3rd-party code, it could be argued that SAL_CALL is useful on function declarations in the URE stable interface other than non-static member functions, too, in case 3rd-party code uses a compiler switch to change the default calling convention to something other than __cdecl. But loplugin:salcall exempts the URE stable interface, anyway.) One could argue that SAL_CALL, even if today it effectively only affects non- static member functions in MSVC, could be extended in the future to affect more functions on more platforms. However, the current code would already not support that. For example, 3af500580b1c82eabd60335c9ebc458a3f68850c "loplugin:salcall fix functions" changed FrameControl_createInstance in UnoControls/source/base/registercontrols.cxx to no longer be SAL_CALL, even though its address (in ctl_component_getFacrory, in the same file) is passed to cppuhelper::createSingleFactory as an argument of type cppu::ComponentInstantiation, which is a pointer to SAL_CALL function. Change-Id: I3acbf7314a3d7868ed70e35bb5c47bc11a0b7ff6 Reviewed-on: https://gerrit.libreoffice.org/46436 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-12-11loplugin:salcall fix functionsNoel Grandin2-2/+2
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-11-22Help old GCCStephan Bergmann1-1/+1
Change-Id: I29093aa7975394b74952a4856632e8e657b33ae0
2017-11-22fuzzing: common case of embedded charts in docxCaolán McNamara1-1/+8
Change-Id: Idc6fdc221ce60e33e6b9fcb1689840dd96570d6b Reviewed-on: https://gerrit.libreoffice.org/45089 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>