summaryrefslogtreecommitdiff
path: root/avmedia
AgeCommit message (Collapse)AuthorFilesLines
2023-04-02Revert "avmedia : use std::mutex instead of osl::Mutex"Michael Stahl1-7/+6
This reverts commit 477fa6c3cb92f578032dee60482718efdb8f44f2. MissingPluginInstaller requires a recursive lock: Thread 2 (Thread 0x7f8e73d69700 (LWP 29931)): 0 __lll_lock_wait () at /lib64/libpthread.so.0 ... 5 std::unique_lock<std::mutex>::lock() (this=0x7f8e73d65a88) at /opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/bits/std_mutex.h:267 6 std::unique_lock<std::mutex>::unique_lock(std::mutex&) (this=0x7f8e73d65a88, __m=...) at /opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/bits/std_mutex.h:197 7 avmedia::gstreamer::(anonymous namespace)::MissingPluginInstaller::detach(avmedia::gstreamer::Player const*) (this=0x7f8e644c6be0 <rtl::Static<avmedia::gstreamer::(anonymous namespace)::MissingPluginInstaller, avmedia::gstreamer::(anonymous namespace)::TheMissingPluginInstaller>::get()::instance>, source=0x75d2fa0) at avmedia/source/gstreamer/gstplayer.cxx:187 8 avmedia::gstreamer::Player::disposing() (this=0x75d2fa0) at avmedia/source/gstreamer/gstplayer.cxx:334 9 cppu::WeakComponentImplHelperBase::dispose() (this=0x75d2fa0) at cppuhelper/source/implbase.cxx:104 10 cppu::PartialWeakComponentImplHelper<com::sun::star::media::XPlayer, com::sun::star::lang::XServiceInfo>::dispose() (this=0x75d2fa0) at include/cppuhelper/compbase.hxx:90 11 cppu::WeakComponentImplHelperBase::release() (this=0x75d2fa0) at cppuhelper/source/implbase.cxx:79 13 rtl::Reference<avmedia::gstreamer::Player>::~Reference() (this=0x7f8e7c028f20) at include/rtl/ref.hxx:129 ... 21 std::__debug::set<rtl::Reference<avmedia::gstreamer::Player>, std::less<rtl::Reference<avmedia::gstreamer::Player> >, std::allocator<rtl::Reference<avmedia::gstreamer::Player> > >::clear() (this=0x7f8e644c6cd8 <rtl::Static<avmedia::gstreamer::(anonymous namespace)::MissingPluginInstaller, avmedia::gstreamer::(anonymous namespace)::TheMissingPluginInstaller>::get()::instance+248>) at /opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/debug/set.h:426 22 avmedia::gstreamer::(anonymous namespace)::MissingPluginInstaller::report(rtl::Reference<avmedia::gstreamer::Player> const&, _GstMessage*) (this=0x7f8e644c6be0 <rtl::Static<avmedia::gstreamer::(anonymous namespace)::MissingPluginInstaller, avmedia::gstreamer::(anonymous namespace)::TheMissingPluginInstaller>::get()::instance>, source=..., message=0x7cdb400) at avmedia/source/gstreamer/gstplayer.cxx:156 23 avmedia::gstreamer::Player::processSyncMessage(_GstMessage*) (this=0x75abfe0, message=0x7cdb400) at avmedia/source/gstreamer/gstplayer.cxx:536 24 avmedia::gstreamer::pipeline_bus_sync_handler(_GstBus*, _GstMessage*, void*) (message=0x7cdb400, data=0x75abfe0) at avmedia/source/gstreamer/gstplayer.cxx:382 25 gst_bus_post () at /lib64/libgstreamer-1.0.so.0 Change-Id: Ia8e7fef4d4cee2dde7189702af6dddf883b6cceb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149233 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit 621143588b3cb438baf27fb6893ab02e7b06f9dd) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149297 Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2022-09-10unique_ptr->optional for GraphicNoel Grandin1-7/+7
Graphic is just a wrapper around shared_ptr, so no need to allocate this separately Change-Id: Ie657dea1c021e66a6876e814090a44cb6f995b91 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139739 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-26tdf#149971 avmedia: implement video crop support in the gsteamer backendMiklos Vajna4-1/+39
If a media shape had cropping defined, we already took that into account when presenting a preview for it, but not during video playback. The reason for this is that the preview may be set by a file importer (e.g. PPTX) explicitly, in which case the preview is a bitmap we get without any video processing. As a start, implement video crop for the gstreamer backend (used on Linux), and also pass in the media item (containing crop and other properties) both during the edit view (MediaWindowImpl) and presenting (ViewMediaShape). We pass in the whole media item, so in case later other filters (e.g. black-and-white) are wanted, we have all that info in the backends already. Other backends (avmediaMacAVF and avmediawin) are untouched so far. svx/qa/unit/data/video-snapshot.pptx is modified to have a yellow border when cropping is unimplemented, which is now not visible with the gtreamer backend, matching PowerPoint behavior. PPTX export was working out of the box already. Change-Id: If26b7a4391bcffe9cbddd9933e1bab69be52924e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138867 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-08-25Related: tdf#149971 avmedia: add doc model and render for crop of media objectsMiklos Vajna1-0/+17
It is possible to provide an explicit preview of media objects since commit 8fa1d453c94cdbb03dac646fb8db2ebd1a0e84bd (Related: tdf#149971 svx: support explicitly provided snapshots for media shapes, 2022-08-24), however they can't be cropped. This means that media shapes from PPTX with cropping show unexpected content and can also have a buggy aspect ratio. Extend avmedia::MediaItem to store cropping and take it into account when returning the preview bitmap in SdrMediaObj::getSnapshot(). PPTX import works out of the box, as oox/ already tried to set a cropping property on the media shape. This is just the preview, the cropping of the video itself is not yet implemented. Change-Id: I8db3e0dcf252613d56eb0e6139adf097e53b15cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138808 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-08-25avmedia gtk: Fix build for Gtk >= 4.7.2 ('-Werror=deprecated-declarations')Michael Weghorn1-0/+4
Failed like this: .../libreoffice/avmedia/source/gtk/gtkplayer.cxx: In member function ‘virtual com::sun::star::uno::Reference<com::sun::star::media::XPlayerWindow> avmedia::gtk::GtkPlayer::createPlayerWindow(const com::sun::star::uno::Sequence<com::sun::star::uno::Any>&)’: .../libreoffice/avmedia/source/gtk/gtkplayer.cxx:346:38: error: ‘void gtk_picture_set_keep_aspect_ratio(GtkPicture*, gboolean)’ is deprecated: Use 'gtk_picture_set_content_fit' instead [-Werror=deprecated-declarations] 346 | gtk_picture_set_keep_aspect_ratio(GTK_PICTURE(m_pVideo), false); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/gtk-4.0/gtk/gtk.h:196, from .../libreoffice/avmedia/source/gtk/gtkplayer.cxx:28: /usr/include/gtk-4.0/gtk/gtkpicture.h:73:17: note: declared here 73 | void gtk_picture_set_keep_aspect_ratio (GtkPicture *self, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1plus: all warnings being treated as errors make[1]: *** [.../libreoffice/solenv/gbuild/LinkTarget.mk:337: .../libreoffice/workdir/CxxObject/avmedia/source/gtk/gtkplayer.o] Error 1 make: *** [Makefile:289: build] Error 2 Corresponding Gtk commit [1]: commit d8a73cbd03118e94bd75f5fa183a646fecb053ce Author: Marco Melorio <marco.melorio@protonmail.com> Date: Fri Jul 15 18:18:26 2022 +0200 picture: Add content-fit property It allows to specify the resize mode of the paintable inside the GtkPicture allocation. This also deprecates the keep-aspect-ratio property. Fixes #5027. While the doc [2] says its deprecated for 4.8, that sems to refer to stable Gtk version only and it's already the case for the unstable version 4.7.2 (as packaged in Debian testing now): $ git tag --contains d8a73cbd03118e94bd75f5fa183a646fecb053ce 4.7.2 Use `gtk_picture_set_content_fit` with `GTK_CONTENT_FIT_FILL` that results in the same behavior for Gtk >= 4.7.2. [1] https://gitlab.gnome.org/GNOME/gtk/-/commit/d8a73cbd03118e94bd75f5fa183a646fecb053ce [2] https://docs.gtk.org/gtk4/method.Picture.set_keep_aspect_ratio.html Change-Id: I9fc527e6674cb8e4774adbe7d14cce2a264a5a67 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138797 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-18Move tools/diagnose_ex.h to comphelper/diagnose_ex.hxxStephan Bergmann2-2/+2
...so that its TOOLS_WARN_EXCEPTION can be used in comphelper/source/misc/logging.cxx in a follow-up commit. (And while at it, rename from diangose_ex.h to the more appropriate diagnose_ex.hxx. The comphelper module is sufficiently low-level for this immediate use case, so use that at least for now; o3tl might be even more suitable but doesn't have a Library until now. Also, for the immediate use case it would have sufficed to only break DbgGetCaughtException, exceptionToString, TOOLS_WARN_EXCEPTION, TOOLS_WARN_EXCEPTION_IF, and TOOLS_INFO_EXCEPTION out of include/tools/diagnose_ex.h into an additional new include/comphelper/diagnose_ex.hxx, but its probably easier overall to just move the complete include file as is.) Change-Id: I9f3222d4ccf1a9ac29d7eb9ba1530d53e2affaee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138451 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-08-15Fix typoAndrea Gelmini1-1/+1
Change-Id: I1bc4d4649fbf4d2cfe8e93bc3a4fca64804de6b7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138241 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-07-07elide some string copiesNoel Grandin1-4/+4
Change-Id: I3e0d9f7e5a446689e007b9d01fb1c6bf9bc068e9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136880 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-28improve debug output for gstreamer backendNoel Grandin1-2/+24
Change-Id: I9fd7af5726ebbca933d69a38669281f40c6c0319 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136576 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-02clang-tidy modernize-pass-by-value in avmediaNoel Grandin1-2/+3
Change-Id: Ia579341951d3fa0a227cdfa888c380b032e2ee2c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135312 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-19tdf#148923 PPTX import: fix incorrect image in media fileTünde Tóth1-1/+7
Linked media file was imported with incorrect image, if the Impress couldn't play the media file. Regression from commit 9564747d2fd5d2c859a359dd7fa6242c6859c0d7 (tdf#53970 PPTX: fix import of linked media files). Change-Id: Ib277a61e83c3794376d2c090b7f742707e779832 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134394 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2022-05-05Just use Any ctor instead of makeAny in avmediaStephan Bergmann1-4/+4
Change-Id: Ib43fa3be2e63de8ad6967682c2b00e702eb527ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133850 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-04-29use more string_view in INetURLObjectNoel Grandin1-1/+1
Change-Id: I4462f7cf4740fa4d1b129d76a0775f4250f41bbd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133555 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-13Fix typoxuenhua1-1/+1
Change-Id: I77ee60e6e7c5482f49cb671d793687f831856628 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132918 Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2022-04-10loplugin:stringview check for getToken and trimNoel Grandin1-3/+4
since we now have o3tl versions of those that work on string_view. Also improve those o3tl functions to support both string_view and u16string_view Change-Id: Iacab2996becec62aa78a5597c52d983bb784749a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132755 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-29tdf#145614 Convert #define to constexprofftkp1-2/+2
Change-Id: I2c57e2021a224fb7f69d1de5cf0f809a7d2422b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132151 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2022-03-22Move BSTR wrapper to systools, and fix some wrong BSTR usesMike Kaganski1-8/+2
BSTR is documented [1] to be prefixed by a 32-bit integer specifying its length *in bytes* (not characters), so passing wchar_t* as BSTR is wrong, and the length member of rtl_uString can't substitute the proper BSTR length, since rtl_uString::length specifies length in characters. Any code taking BSTR and using SysStringLen to get its length would only get half of the passed OUString data. In dbaccess/source/ui/dlg/adodatalinks.cxx, the abovementioned error was implemented. OTOH, OLEVariant::getByteSequence() in connectivity/source/drivers/ado/Aolevariant.cxx passed BSTR from tagVARIANT to ctor of OLEString, which resulted in the BSTR being freed in both dtors of OLEString and OLEVariant (the latter calls VariantClear, which itself clears string when vtfield is VT_BSTR). [1] https://docs.microsoft.com/en-us/previous-versions/windows/desktop/automat/bstr Change-Id: Iedbd62b20133644258af3660616add7b63cac258 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131950 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-03-22Simplify CoCreateInstance / CoGetClassObject with COMReferenceMike Kaganski2-2/+2
Change-Id: Ieb1035410c3c6c4b40ea779e829a940460d19b5a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131922 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-03-04Fix typosAndrea Gelmini1-1/+1
Change-Id: I4b26b105e4c16b1860389deb7a629ff139bd260c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130976 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-03-01gtk4: media dimensions are only reliably available asyncCaolán McNamara3-53/+224
this is also the case for the direct gstreamer use in gtk3 but more egregious when abstracted away from it in gtk4 Change-Id: If90069308d67929585722c079c482cd4ad196e1f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130468 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-21gtk4: get getPreferredPlayerWindowSize workingCaolán McNamara1-44/+55
Change-Id: I5e5b02be6a902232c24120db513cdf3fc68b4421 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130224 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-21gtk4: get XFrameGrabber to workCaolán McNamara1-31/+40
Change-Id: I737fd72d11b11d0c3592857113e422f29da76e77 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130223 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-19update video pos and size after change if currently playingCaolán McNamara1-4/+4
I'd prefer if it changed size during the resizing/repositioning, but at least make it immediately take the final size after the resize/reposition has happened. Change-Id: Ic3b4dd23921ad5cf6092f1514dd6538f9946998a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130178 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-19gtk4: use gtk_widget_set_can_target so the video can be picked up and movedCaolán McNamara1-1/+3
at least the rect it should stick to can be picked up and moved Change-Id: I71b53865049fef8dc3efa09dd441d66003ed1f47 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130177 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-19gtk4: the assumption is that video is supposed to fit to the windowCaolán McNamara1-0/+1
Change-Id: Iacc31ee978a1279c23ac895fb6f8fd610ab3113d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130176 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-18first cut at using Gtk4 built in video playbackCaolán McNamara11-3/+638
Change-Id: Ib996cd3f5ddbf20a81cdbe4b1c6546d6df478fde Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129783 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-18there's only one media backend per platform currentlyCaolán McNamara2-14/+1
Change-Id: I8722395617929f7d710713934dd619134a318071 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130170 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-14update play/pause/stop when one of the other changesCaolán McNamara1-18/+29
so (esp under gtk) that when pause is enabled and pause is clicked again that it remains visually enabled Change-Id: I779bb1491d2473db926b8075a0b574ef5767337d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129909 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-14Related: tdf#34759 ditch PlayPending hack and use GST_STATE_TARGETCaolán McNamara2-18/+4
which seems to resolve the various problems here like that pressing stop makes it rewind to start but continue to play and that rewind/seek makes it start when it shouldn't Change-Id: I3df44f82205b7e81ecbc4ac86240e02d52a92e62 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129907 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-14Related: tdf#100007 pause state not always updating "play" state to offCaolán McNamara3-62/+74
if I press pause then the UI gets stuck with both pause and stop pressed in, the check against time here seems insufficient so change merge and the setters to return true if there was a real change and use that as the guard to update the UI Change-Id: I550624fa3dcd5655d715a1f965bba9345b25ded7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129906 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-14can drop unneeded TODOCaolán McNamara1-2/+0
Change-Id: I58d65b1da1aa54716b84fc31af7550037817194a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129908 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-11these label properties are already set to this text in the .uiCaolán McNamara3-14/+0
so we're just wastefully overwriting with the same string Change-Id: Ib03d5ae2cf48aa00f5f31256427afef58b684177 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129802 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-01-17tdf#145538 - Use range based for loopsVaibhavMalik41871-7/+7
Change-Id: I5bf5a88d40f9633d9af9c40df2ee927130701f91 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128318 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2022-01-13Recheck modules [a-c]* with IWYUGabor Kelemen2-1/+2
See tdf#42949 for motivation Change-Id: I74a3c3a67c3639376e2251c3eb917fa4139dfbd0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127808 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-01-05Disable epoxy test with --disable-guiJan-Marek Glogowski1-2/+0
Instead of always testing for DISABLE_GUI, just disable the epoxy test and handle !ENABLE_EPOXY in RepositoryExternal.mk. Change-Id: I38213ffa77353bc93f32caa1b4164c5fa88170ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127999 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2022-01-02avmedia : use std::mutex instead of osl::MutexArnaud Versini3-13/+16
Change-Id: I0e779db4ef32ac74b9df18d1e162b49236b44b88 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124122 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-21Keep GUI with --enable-avmedia and --disable-guiJan-Marek Glogowski1-1/+1
So I thought I could come up with a rich MediaItem and can get rid of all the GUI elements. But all the still needed features require a MediaWindow. Probably not for real, but there are multiple levels of createPlayer (some static) in MediaWindow and priv::MediaWindowImpl. Untangling this will require more time, so just return to the old --disable-gui state with actually keeping all the GUI elements. Regression from commit f9e79a91f15e10ededad0f103c4ffe0ca38fcb31 ("Fix --disable-avmedia for DESKTOP build")... Change-Id: I2b04459003d474cd3abf8b086f2f20f17274a7ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127226 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-12-21Use sal::systools::CoInitializeGuard and sal::systools::ThrowIfFailedMike Kaganski4-11/+11
Change-Id: Ifb40e7672671df03b5ffc89905ad1e7b68451b68 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127232 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-12-21loplugin:flatten in accessibility..basicNoel Grandin1-28/+28
Change-Id: If2cc282c2b135d634daf393a082c29049b10a677 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127223 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-21no need to take solar mutex hereNoel Grandin1-5/+0
Application: :Post* will already do that Change-Id: If116ddd79b4ba30ce983d467161b8fab32dbd1cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127214 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-21Introduce sal::systools::COMReference::TryCoCreateInstanceMike Kaganski2-2/+2
Helps fixing uncaught exceptions introduced in commit 00eb9b8954a129fb365191ce8cdcbc4cf66a7333. TryCoCreateInstance returns HRESULT, because it allows to pass the info to the caller, which must check the result (either HRESULT, or validity of the reference) anyway. In case of failure, the previous contents of com_ptr_ is kept, which would be consistent with existing code in connectivity/ado replaced in a follow-up patch. Change-Id: I4c94695de96861ec312247acaa0c8fd35a23010a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127192 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-12-20Use more sal::systools::COMReferenceMike Kaganski3-79/+23
Change-Id: I29bf304d90db968682c2b0791372d0ea41375096 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127132 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-12-18use more cppu::BaseMutexNoel Grandin2-4/+4
Change-Id: I9defebeb9cb0ba22df3578c8aae7501add36a11c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127078 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-10Generally determine Rdb content from gb_*_set_componentfile callsStephan Bergmann4-4/+4
...instead of by listing the content somewhat redundantly in the Rdb_*.mk files, to avoid duplication of logic for components that are only built conditionally (and thus should only be included conditionally in the corresponding Rdb). To achieve that, add an "rdb" parameter to gb_ComponentTarget_ComponentTarget (and to the gb_*_set_componentfile macros that internally call gb_ComponentTarget_ComponentTarget), which is used to make the appropriate gb_Rdb_add_component call internally from within gb_ComponentTarget_ComponentTarget. (As a special case, gb_CppunitTest_set_componentfile shall not call gb_Rdb_add_component, as that has already been done by the corresponding gb_Library_set_componentfile call, so allow the gb_ComponentTarget_ComponentTarget "rdb" parameter to be empty to support that special case.) Most Rdb_*.mk files are thus mostly empty now. One exception is i18npool/Rdb_saxparser.mk, which duplicates some of the Rdb_services content as needed during the build in CustomTarget_i18npool/localedata. 1c9a40299d328c78c035ca63ccdf22c5c669a03b "gbuild: create services.rdb from built components" had already tried to do something similar (in addition to other things) under a new --enable-services-rdb-from-build option. However, that approach had four drawbacks that this approach here addresses (and which thus partly reverts 1c9a40299d328c78c035ca63ccdf22c5c669a03b): 1 Rdb_services shall not contain the component files of all libraries that are built. While that commit filtered out the component files that go into Rdb_ure/services (ure/Rdb_ure.mk), it failed to filter out the component files that go into others like Rdb_postgresql-sdbc (connectivity/Rdb_postgresql-sdbc.mk). 2 The code added by that commit to Makefile.gbuild codified the knowledge that there is an Rdb_services, which is brittle. 3 The code added by that commit to solenv/gbuild/Rdb.mk codified the knowledge (for gb_Rdb__URECOMPONENTS) that there is an Rdb_ure/services, which is brittle. 4 Introducing an --enable-services-rdb-from-build option needlessly provided two different ways how the content of Rdb_services is assembled. The changes done here would leave --enable-services-rdb-from-build as a misnomer, as it no longer controls how Rdb_services is assembled. I thus renamed it to --enable-customtarget-components, as that is apparently what it still does now. Change-Id: Ia5e8df4b640146c77421fcec6daa11a9cd260265 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126577 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-12-04Fix --disable-(avmedia|scripting)TheRock Builder1-5/+5
So it's not a good idea to change the patch without testing it again. I'm still hoping for a better usable MediaItem then the previous dummy. The ODF stores a preview image and it should allow to export the media. The scripting fix feels like a workaround. somehow the final class specifier triggers something that makes the linker fail with missing destructors for all std::unique_ptr objects derivated from SbxFactory. Implementing these as virtual overrides didn't help, neither as {} or = default. So this removes them in the !"#if HAVE_FEATURE_SCRIPTING" case. Change-Id: I9f6751f44e0247ed31c27be0ee816239795e9372 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126330 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-12-01Fix --disable-avmedia for DESKTOP buildJan-Marek Glogowski3-112/+17
Probably additional bits can be removed, but this now passes. Change-Id: I366bec43cfd6fb02e914c85c711b3b19586d534d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126161 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-11-17loplugin:stringliteraldefine in avmediaNoel Grandin4-15/+14
Change-Id: Ie34a45a745ac9546208444b2e499b581e18d449f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125275 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-16Drop redundant 'using rtl::OUString'Mike Kaganski1-2/+0
obsoleted by 6080259862ee9886d1dabcb7c06132268a398cc6 Change-Id: I246dc6050fe7adf60ab3c836db3cfa781578d483 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125142 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-11-10new loplugin:stringliteraldefineNoel Grandin1-3/+3
look for #define FOO "foo" that can be converted into OUStringLiteral. This is the first pass of this plugin, only doing those #define which are local to a single compilation unit. Change-Id: Ic8610e29ec42c36d03db5014a93c244315d5bbea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124962 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-08use more OUStringLiteral in MediaDescriptorNoel Grandin1-5/+5
Change-Id: I0567d103db8db401c737fed98483912a39352929 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124835 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>