summaryrefslogtreecommitdiff
path: root/embeddedobj
AgeCommit message (Collapse)AuthorFilesLines
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>
2017-11-20look for =() in loplugin:unnecessaryparenNoel Grandin1-1/+1
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-16Fix typosAndrea Gelmini1-1/+1
Change-Id: I7b6c699b46fb71c1f19b5e5548c22a11efe8b864 Reviewed-on: https://gerrit.libreoffice.org/44836 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-10-27loplugin:includeform: embeddedobj (Windows)Stephan Bergmann10-12/+12
Change-Id: I76ed24e2bed461fd25562cce3190a2da8aa7a95d
2017-10-23loplugin:includeform: embeddedobjStephan Bergmann12-21/+21
Change-Id: If8cfe9da299d3d183407c5e7a00240f246f000a5
2017-10-05Rename and move SAL_U/W to o3tl::toU/WMike Kaganski1-13/+14
Previosly (since commit 9ac98e6e3488e434bf4864ecfb13a121784f640b) it was expected to gradually remove SAL_U/W usage in Windows code by replacing with reinterpret_cast or changing to some bettertypes. But as it's useful to make use of fact that LibreOffice and Windows use compatible representation of strings, this commit puts these functions to a better-suited o3tl, and recommends that the functions be consistently used throughout Windows-specific code to reflect the compatibility and keep the casts safe. Change-Id: I2f7c65606d0e2d0c01a00f08812bb4ab7659c5f6 Reviewed-on: https://gerrit.libreoffice.org/43150 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-10-05loplugin:flatten (clang-cl, embeddedobj)Stephan Bergmann2-85/+81
Change-Id: Ic870347b3dc0ce6b7ad223c47a36b54843a26613
2017-10-04add << operator for css::uno::ExceptionNoel Grandin3-7/+3
Change-Id: Ia23dafd07133779144965682df3b7125a3214235 Reviewed-on: https://gerrit.libreoffice.org/43046 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-10-03new loplugin:blockblockNoel Grandin1-48/+46
Change-Id: I7b68b70fa4c7234e8882f7627026959a596968fd Reviewed-on: https://gerrit.libreoffice.org/43025 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-01throw more useful uno::Exception'sNoel Grandin1-3/+3
if we're going to throw the base class of the exception hierarchy, we can at least put a useful message in there to make the source a little bit easier to locate. Change-Id: I2f3106c99ba25125eacef8fa77e2f3a2c89f2566 Reviewed-on: https://gerrit.libreoffice.org/42968 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-09-30loplugin:flatten (clang-cl, embeddedobj)Stephan Bergmann2-25/+22
Change-Id: I842ab53693f87fc9b5151ce9b8b385a9dbd53e11 Reviewed-on: https://gerrit.libreoffice.org/42977 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-09-30Use SAL_W/SAL_U instead of reinterpret_cast btwn wchar_t* and sal_Unicode*Mike Kaganski1-6/+6
This is type-safe, and allows to catch cases where a source type is changed for some reason, but reinterpret_cast masks that Change-Id: Ib64b6fa2e22d94a6bba890f0ccc3e20325c6f0a1 Reviewed-on: https://gerrit.libreoffice.org/42961 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-29loplugin:flatten check for throw in then clauseNoel Grandin1-5/+2
also make the plugin ignore the case where we have var decl's in the clause we want to flatten, which could lead to problematic extension of variable lifetime Change-Id: I3061f7104e8c6a460bf74f5eac325a516ec50c59 Reviewed-on: https://gerrit.libreoffice.org/42889 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-27loplugin:flatten in variousNoel Grandin3-177/+160
Change-Id: I42dca691ffadbddad38a7e8f978b1da9d5d9a7b0 Reviewed-on: https://gerrit.libreoffice.org/42842 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-21loplugin:flatten in editeng..extensionsNoel Grandin6-177/+146
Change-Id: I2b68f5640471ea827c09af1b5a319fb526a53b4b Reviewed-on: https://gerrit.libreoffice.org/42579 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-18Some more WIN32_LEAN_AND_MEANMike Kaganski2-0/+7
Change-Id: Iadb0ebb66809c192fb817b8c7cf2f8cdb4d0b874 Reviewed-on: https://gerrit.libreoffice.org/42419 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-04loplugin:unnecessaryparen include c++ castsNoel Grandin1-3/+3
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-08-31loplugin:constparams: embeddedobj (clang-cl)Stephan Bergmann2-2/+2
Change-Id: Ic6616f432178fe1f972c5f819302a4fb6b4154fd
2017-08-01move resmgr to unotoolsCaolán McNamara1-2/+2
and the vast majority of translations is to the ui language so default ctor with that arg and now drop OModuleResourceClient Change-Id: I3b85a560ffdfe5f019c2271ac56a5fe4a361522b
2017-07-31make IntlWrapper arg to GetPresentation non-implicit and non-optionalCaolán McNamara2-2/+2
which requires explicitly adding null in 1) SdrItemBrowserControl::SetAttributes(const SfxItemSet* pSet, const SfxItemSet* p2ndSet) where SdrItemBrowserControl is only used by SdrItemBrowser and the only use of that is within DBG_UTIL in SdrPaintView 2) SwCursorShell::GetContentAtPos( const Point& rPt, within a #ifdef DBG_UTIL block in 3) SvxSearchDialog::BuildAttrText_Impl( OUString& rStr, bool bSrchFlag ) const where the other branch uses SvxResId 4) SfxPoolItem::dumpAsXml(xmlTextWriterPtr pWriter) const 5) XFillStyleItem::dumpAsXml(xmlTextWriterPtr pWriter) const looks very much like all uses (outside the dumpers) are intended to be in the ui locale results in that INetContentTypes::GetPresentation always called with UI Locale Change-Id: I5a110c107838b4db3c355476426d6532f2b6ce52 Reviewed-on: https://gerrit.libreoffice.org/40538 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>