summaryrefslogtreecommitdiff
path: root/embeddedobj
AgeCommit message (Collapse)Author
2019-09-10Fix typosAndrea Gelmini
Change-Id: I4671d0f13e67b1272fd7c24bb6a2a7679c75f20b Reviewed-on: https://gerrit.libreoffice.org/78797 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-29LOK: Proper use of isMobile() on embedded chartsMuhammet Kara
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 Change-Id: Ia84baa36d66d5832e00e6466f5206631df0de443 Reviewed-on: https://gerrit.libreoffice.org/78277 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-08-29LOK: per-view support for isMobile()Muhammet Kara
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. Change-Id: Iaf00530916f3772f7aec151cbd358f255b7aab24 Reviewed-on: https://gerrit.libreoffice.org/78272 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-08-29lok: Disable chart editing on mobileTamás Zolnai
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. ] Change-Id: Id1c598c84adc12b8b52d006992d85dcae5601ad9 Reviewed-on: https://gerrit.libreoffice.org/78270 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-08-17tdf#88205 Adapt uses of css::uno::Sequence to use initializer_list ctorJulien Nabet
in cppuhelper, desktop, drawinglayer, embeddedobj, extensions Change-Id: I4c970f08c0723299f79c9e18bc71b7372a7092e4 Reviewed-on: https://gerrit.libreoffice.org/77636 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-17tdf#88205 Adapt uses of css::uno::Sequence to use initializer_list ctorJulien Nabet
in embeddedobj and filter Change-Id: I2da3fa1df8782e449852358d1c86f5e4bc79ea1a Reviewed-on: https://gerrit.libreoffice.org/77627 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-16tdf#126877 crash on inserting floating frameNoel Grandin
regression from commit 5043421fdc527d18d18121ec5fe2d4e009c8191a Date: Fri Jul 19 14:05:10 2019 +0200 loplugin:referencecasting in embeddedobj OSpecialEmbeddedObject is playing games and effectively "unimplementing" an interface it's superclass implements by doing custom stuff in OSpecialEmbeddedObject::queryInterface. So lets rather implement this in a more direct and obvious way. Change-Id: I341b8e0b6acafac80cbd55f745811b73d2593585 Reviewed-on: https://gerrit.libreoffice.org/77580 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-15embeddedobj: allow controlling if PDF documents are converted to Draw or notMiklos Vajna
This is a bit custom, since it's not a Microsoft filter. At the moment this affects only Insert -> Object -> OLE Object -> from file. Change-Id: If79602742a533db1b04e11a90890f8768186046d Reviewed-on: https://gerrit.libreoffice.org/77520 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-08-15embeddedobj: allow controlling if Visio documents are converted to Draw or notMiklos Vajna
At the moment this affects only Insert -> Object -> OLE Object -> from file. Change-Id: I8d1c6456481610491916e3be3766b0bb04dfa296 Reviewed-on: https://gerrit.libreoffice.org/77489 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-08-14embeddedobj: add initial CppunitTest_embeddedobj_generalMiklos Vajna
Fails with commit 88afec70112c95a016e92e26c1d06d7dd002e4e8 (embeddedobj: respect config for Insert -> Object -> OLE Object -> from file, 2019-08-14) reverted. Change-Id: I64f81642260f6eab5a86219d94553f09b67b3555 Reviewed-on: https://gerrit.libreoffice.org/77461 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-08-14embeddedobj: respect config for Insert -> Object -> OLE Object -> from fileMiklos Vajna
Tools -> Options -> Load/Save -> Microsoft Office has config options to decide that Word/Excel/PowerPoint formats are loaded into our doc models (default) or handled via external OLE applications instead. This is used in the MSO import/export filters, but in case the UI is used to insert a new file as an embedded object, then we ignored this setting, and the embedding type depended on if we found an import filter for the data or not (if yes, load it; handle externally otherwise). Fix this inconsistency by checking for the usual MSO import filter names and respect the existing configuration in those cases, so the user can choose to not handle these formats internally if wanted. Change-Id: I6bce8b5467768ef3f21d97b4e0fe3f4d18d9466b Reviewed-on: https://gerrit.libreoffice.org/77449 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-07-31Improved loplugin:stringconstant (now that GCC 7 supports it): embeddedobjStephan Bergmann
Change-Id: Id3d255d48a8a72f760dae3c372e0e1a97d0aa508 Reviewed-on: https://gerrit.libreoffice.org/76681 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-07-19loplugin:referencecasting in embeddedobjNoel Grandin
Change-Id: I11a80e540b2a7da8d8037ba45e176d5c4d85374c Reviewed-on: https://gerrit.libreoffice.org/75951 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-15loplugin:logexceptionnicely in editeng..extensionsNoel Grandin
Change-Id: I50b9d7e92ef057c985d0d6e76dfeb62591d404f6 Reviewed-on: https://gerrit.libreoffice.org/74047 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-31Use hasElements to check Sequence emptiness in [e-i]*Arkadiy Illarionov
Similar to clang-tidy readability-container-size-empty Change-Id: I79e31919db8f4132216f09a7868d18835eeb154b Reviewed-on: https://gerrit.libreoffice.org/71795 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-23Fix typoAndrea Gelmini
Change-Id: Ia5d0623c51c259fdbc3cfbc1d4d2432439282bae Reviewed-on: https://gerrit.libreoffice.org/72856 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-05-23Fix typoAndrea Gelmini
Change-Id: I2aa6ead1a1c369a7111af69e75d7bb86f97a1734 Reviewed-on: https://gerrit.libreoffice.org/72862 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-05-22Fix typoAndrea Gelmini
Change-Id: If7a5e779716e9423e94c22d11fc0f029fb89401f Reviewed-on: https://gerrit.libreoffice.org/72754 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-05-22Fix typoAndrea Gelmini
Change-Id: I257313aa1744f8c70ea9888cd19adde149c1ce64 Reviewed-on: https://gerrit.libreoffice.org/72716 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-05-22Fix typoAndrea Gelmini
Change-Id: Ibaafe29797523290f0fe17be7304c99a70752eda Reviewed-on: https://gerrit.libreoffice.org/72712 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-05-22Fix typoAndrea Gelmini
Change-Id: I627d0d9899226eb39a19bde1ecf79f04ca26e633 Reviewed-on: https://gerrit.libreoffice.org/72717 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-05-22Fix typoAndrea Gelmini
Change-Id: I69c3a6b6ca8d5a568ec7f052c742335dd50bda5b Reviewed-on: https://gerrit.libreoffice.org/72714 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-05-13fix wrong SET/QUERY flags passed to uno::ReferenceNoel Grandin
By creating deleted methods for the wrong calls. Avoids the compiler needing to construct a temporary Change-Id: I3b8c648d6bb22d22827bf74f21ea5a2a17fc0f6a Reviewed-on: https://gerrit.libreoffice.org/72103 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-13loplugin:sequentialassign in embeddedobj..l10ntoolsNoel Grandin
Change-Id: I69377e2f96a376a7a5ccaec268c4f92c00a250f7 Reviewed-on: https://gerrit.libreoffice.org/70705 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-10clang-tidy: Fix suspicious catches of WIP unhandled-self-assignment checkTamás Zolnai
Change-Id: I1cb16b180f4cc5bf4d65485f03c44a06414d3580 Reviewed-on: https://gerrit.libreoffice.org/70481 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2019-04-08Use osl_atomic_increment/osl_atomic_decrement to change m_refCountMike Kaganski
Change-Id: Ia24441d3671102fdeeb797547396c25ee2a6ffd3 Reviewed-on: https://gerrit.libreoffice.org/70382 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-04-07Don't use resettable/clearable guard where plain guard is enoughMike Kaganski
Also use scope where possible. This allows to limit guard scope at language level; visualises the scope clearly; and helps avoiding errors like fixed in commit 61e4437c857854b331fa01da6f39b2b3b58a800b. Change-Id: Ifeca96e2df8e8a0897770d9546b2536806275f41 Reviewed-on: https://gerrit.libreoffice.org/70376 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-04-01Fix typoAndrea Gelmini
Change-Id: Ic73d7ad86787defee6cfdb860a9c7d7b8926cbbc Reviewed-on: https://gerrit.libreoffice.org/70020 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-03-31tdf#120703 PVS: GetBitmapBits does not return required buffer sizeMike Kaganski
... unlike GetMetaFileBitsEx or GetEnhMetaFileBits, which are used in the other branches. The implementation is trying to pass nullptr to the function since commit 41e72962df83a410986fb48250aaaf1adc827c13 Just calculate the required buffer size using BITMAP struct filled by GetObject call. V575 The null pointer is passed into 'GetBitmapBits' function. Inspect the third argument. Change-Id: I0d164694c99d805fd59b65ea1b4df4919a89e130 Reviewed-on: https://gerrit.libreoffice.org/70012 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-03-27loplugin:typedefparam (clang-cl)Stephan Bergmann
Change-Id: I07604028845c49cc084927e21db7f21c5d053bab Reviewed-on: https://gerrit.libreoffice.org/69796 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-03-17tdf#120703 PVS: remove redundant static castsMike Kaganski
V572 It is odd that the object which was created using 'new' operator is immediately cast to another type. Change-Id: I6d1523e71b3e06be1cf41abaabb44e49fe11cd8e Reviewed-on: https://gerrit.libreoffice.org/69369 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-02-08loplugin:indentation in editeng..extensionsNoel Grandin
Change-Id: If7d7c400fb5d24e48b6cd02b364a8ac7fa23505d Reviewed-on: https://gerrit.libreoffice.org/67538 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-24Clean up dead uses of DISABLE_ATLStephan Bergmann
...after e597ef0489d9d5504721d21eefa15c65da0fb240 "No need for --disable-activex and --disable-atl any longer" Change-Id: I6ea0026fd18e0097aaaf0c1b05618e2a9ddf1a94 Reviewed-on: https://gerrit.libreoffice.org/66871 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-12-13WIN move native dialog hack into WinSchedulerJan-Marek Glogowski
The "hides" the hack for native Windows dialogs introduced in commit 5bb798a99e7b ("tdf#117295 WIN no main loop shortcut for OLE dialog") in its own header. Change-Id: I1f36aad20dec50ae1f296001b51085989afb19f6 Reviewed-on: https://gerrit.libreoffice.org/65100 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2018-12-12tdf#117295 WIN no main loop shortcut for OLE dialogJan-Marek Glogowski
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... Change-Id: If9ae81ca7e847743f9251343e106dbf566371584 Reviewed-on: https://gerrit.libreoffice.org/65040 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2018-12-08Remove obsolete SAL_FALLTHROUGH completelyStephan Bergmann
...after 7ffdd830d5fb52f2ca25aa80277d22ea6d89970b "HAVE_CPP_ATTRIBUTE_FALLTHROUGH is always true now" Change-Id: I54e5ff4e036a6bb3e5774d1c0524158aae18e937 Reviewed-on: https://gerrit.libreoffice.org/64800 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-12-05loplugin:unnecessaryparen include more assignmentsNoel Grandin
Change-Id: I9fb8366634b31230b732dd38a98f800075529714 Reviewed-on: https://gerrit.libreoffice.org/64510 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-01tdf#120703 PVS: V560 A part of conditional expression is always true/falseMike Kaganski
Change-Id: I38f3e3243f8cb891c9a0fe2f4c68bc76acd1ef44 Reviewed-on: https://gerrit.libreoffice.org/64020 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-11-15Fix typoAndrea Gelmini
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 Vajna
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 Glogowski
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 Vajna
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 Kaganski
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 Kaganski
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 McNamara
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 Grandin
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 Grandin
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 Kelemen
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 Bergmann
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 Bergmann
Change-Id: I7cae6b3f31b10efc72884bce4bda7bf6b380cbc2 Reviewed-on: https://gerrit.libreoffice.org/60597 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>