[Libreoffice-commits] core.git: avmedia/source basctl/source embedserv/source extensions/source fpicker/source lingucomponent/source sal/osl sal/qa vcl/win

2023-11-08 Thread Stephan Bergmann (via logerrit)
 avmedia/source/win/framegrabber.cxx|2 
 avmedia/source/win/player.cxx  |2 
 avmedia/source/win/window.cxx  |2 
 basctl/source/basicide/baside3.cxx |2 
 embedserv/source/embed/intercept.cxx   |   12 ++---
 extensions/source/config/WinUserInfo/WinUserInfoBe.cxx |   28 +--
 fpicker/source/win32/VistaFilePickerEventHandler.cxx   |4 -
 fpicker/source/win32/VistaFilePickerImpl.hxx   |   40 -
 lingucomponent/source/lingutil/lingutil.cxx|2 
 sal/osl/w32/path_helper.cxx|6 +-
 sal/osl/w32/procimpl.cxx   |3 -
 sal/qa/rtl/process/rtl_Process.cxx |4 -
 vcl/win/dtrans/MimeAttrib.hxx  |   10 ++--
 vcl/win/dtrans/ftransl.cxx |2 
 14 files changed, 59 insertions(+), 60 deletions(-)

New commits:
commit c0e516609b9836f05543591398aeb7e99fe23234
Author: Stephan Bergmann 
AuthorDate: Wed Nov 8 14:22:28 2023 +0100
Commit: Stephan Bergmann 
CommitDate: Wed Nov 8 18:58:40 2023 +0100

loplugin:stringstatic, lopluign:ostr (clang-cl)

Change-Id: I7a928a2385286f6d1ab3887c8d315af3f47c052d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159135
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/avmedia/source/win/framegrabber.cxx 
b/avmedia/source/win/framegrabber.cxx
index 547b3ffa6a59..84e9d1b187e8 100644
--- a/avmedia/source/win/framegrabber.cxx
+++ b/avmedia/source/win/framegrabber.cxx
@@ -41,7 +41,7 @@
 #include 
 
 constexpr OUStringLiteral AVMEDIA_WIN_FRAMEGRABBER_IMPLEMENTATIONNAME = 
u"com.sun.star.comp.avmedia.FrameGrabber_DirectX";
-constexpr OUStringLiteral AVMEDIA_WIN_FRAMEGRABBER_SERVICENAME = 
u"com.sun.star.media.FrameGrabber_DirectX";
+constexpr OUString AVMEDIA_WIN_FRAMEGRABBER_SERVICENAME = 
u"com.sun.star.media.FrameGrabber_DirectX"_ustr;
 
 using namespace ::com::sun::star;
 
diff --git a/avmedia/source/win/player.cxx b/avmedia/source/win/player.cxx
index 5c05dcbc32dc..b52ac8171dfc 100644
--- a/avmedia/source/win/player.cxx
+++ b/avmedia/source/win/player.cxx
@@ -32,7 +32,7 @@
 #include 
 
 constexpr OUStringLiteral AVMEDIA_WIN_PLAYER_IMPLEMENTATIONNAME = 
u"com.sun.star.comp.avmedia.Player_DirectX";
-constexpr OUStringLiteral AVMEDIA_WIN_PLAYER_SERVICENAME = 
u"com.sun.star.media.Player_DirectX";
+constexpr OUString AVMEDIA_WIN_PLAYER_SERVICENAME = 
u"com.sun.star.media.Player_DirectX"_ustr;
 
 using namespace ::com::sun::star;
 
diff --git a/avmedia/source/win/window.cxx b/avmedia/source/win/window.cxx
index 2f453347f7cd..8cf3fee74d3d 100644
--- a/avmedia/source/win/window.cxx
+++ b/avmedia/source/win/window.cxx
@@ -29,7 +29,7 @@
 #include "player.hxx"
 
 constexpr OUStringLiteral AVMEDIA_WIN_WINDOW_IMPLEMENTATIONNAME = 
u"com.sun.star.comp.avmedia.Window_DirectX";
-constexpr OUStringLiteral AVMEDIA_WIN_WINDOW_SERVICENAME = 
u"com.sun.star.media.Window_DirectX";
+constexpr OUString AVMEDIA_WIN_WINDOW_SERVICENAME = 
u"com.sun.star.media.Window_DirectX"_ustr;
 
 using namespace ::com::sun::star;
 
diff --git a/basctl/source/basicide/baside3.cxx 
b/basctl/source/basicide/baside3.cxx
index 4b5d13fb6ecf..4a6b1dfbfb5c 100644
--- a/basctl/source/basicide/baside3.cxx
+++ b/basctl/source/basicide/baside3.cxx
@@ -70,7 +70,7 @@ using namespace ::com::sun::star::resource;
 using namespace ::com::sun::star::ui::dialogs;
 
 #ifdef _WIN32
-OUStringLiteral const FilterMask_All = u"*.*";
+constexpr OUString FilterMask_All = u"*.*"_ustr;
 #else
 constexpr OUString FilterMask_All = u"*"_ustr;
 #endif
diff --git a/embedserv/source/embed/intercept.cxx 
b/embedserv/source/embed/intercept.cxx
index bd849805bc2a..0f1566fd780d 100644
--- a/embedserv/source/embed/intercept.cxx
+++ b/embedserv/source/embed/intercept.cxx
@@ -27,12 +27,12 @@ using namespace ::com::sun::star;
 
 #define IUL 6
 
-constexpr OUStringLiteral IU0 = u".uno:Save";
-constexpr OUStringLiteral IU1 = u".uno:SaveAll";
-constexpr OUStringLiteral IU2 = u".uno:CloseDoc";
-constexpr OUStringLiteral IU3 = u".uno:CloseWin";
-constexpr OUStringLiteral IU4 = u".uno:CloseFrame";
-constexpr OUStringLiteral IU5 = u".uno:SaveAs";
+constexpr OUString IU0 = u".uno:Save"_ustr;
+constexpr OUString IU1 = u".uno:SaveAll"_ustr;
+constexpr OUString IU2 = u".uno:CloseDoc"_ustr;
+constexpr OUString IU3 = u".uno:CloseWin"_ustr;
+constexpr OUString IU4 = u".uno:CloseFrame"_ustr;
+constexpr OUString IU5 = u".uno:SaveAs"_ustr;
 const uno::Sequence< OUString > Interceptor::m_aInterceptedURL{ IU0, IU1, IU2, 
IU3, IU4, IU5};
 
 
diff --git a/extensions/source/config/WinUserInfo/WinUserInfoBe.cxx 
b/extensions/source/config/WinUserInfo/WinUserInfoBe.cxx
index eda77b425ae5..9726c9869525 100644
--- a/extensions/source/config/WinUserInfo/WinUserInfoBe.cxx
+++ b/extensions/source/config/WinUserInfo/WinUserInfoBe.cxx
@@ -61,23 +61,23 @@ public:
 

[Libreoffice-commits] core.git: avmedia/source

2023-11-03 Thread Caolán McNamara (via logerrit)
 avmedia/source/gstreamer/gstframegrabber.cxx |   13 +
 1 file changed, 9 insertions(+), 4 deletions(-)

New commits:
commit af9b546cf5eef3df417e225c8ad87283ab51e1bb
Author: Caolán McNamara 
AuthorDate: Fri Nov 3 16:11:47 2023 +
Commit: Caolán McNamara 
CommitDate: Fri Nov 3 18:15:51 2023 +0100

avoid the neeed to escape url passed to gstreamer

Change-Id: I13d0cee911a3c9af99b494dde16b8d51f78d954a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158889
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/avmedia/source/gstreamer/gstframegrabber.cxx 
b/avmedia/source/gstreamer/gstframegrabber.cxx
index a3b4b3aef5e1..7a6575123318 100644
--- a/avmedia/source/gstreamer/gstframegrabber.cxx
+++ b/avmedia/source/gstreamer/gstframegrabber.cxx
@@ -50,10 +50,9 @@ void FrameGrabber::disposePipeline()
 
 FrameGrabber::FrameGrabber( std::u16string_view rURL )
 {
-gchar *pPipelineStr = g_strdup_printf(
-"uridecodebin uri=\"%s\" ! videoconvert ! videoscale ! appsink "
-"name=sink caps=\"video/x-raw,format=RGB,pixel-aspect-ratio=1/1\"",
-OUStringToOString( rURL, RTL_TEXTENCODING_UTF8 ).getStr() );
+const char pPipelineStr[] =
+"uridecodebin name=source ! videoconvert ! videoscale ! appsink "
+"name=sink caps=\"video/x-raw,format=RGB,pixel-aspect-ratio=1/1\"";
 
 GError *pError = nullptr;
 mpPipeline = gst_parse_launch( pPipelineStr,  );
@@ -64,6 +63,12 @@ FrameGrabber::FrameGrabber( std::u16string_view rURL )
 }
 
 if( mpPipeline ) {
+
+if (GstElement *pUriDecode = gst_bin_get_by_name(GST_BIN(mpPipeline), 
"source"))
+g_object_set(pUriDecode, "uri", OUStringToOString(rURL, 
RTL_TEXTENCODING_UTF8).getStr(), nullptr);
+else
+g_warning("Missing 'source' element in gstreamer pipeline");
+
 // pre-roll
 switch( gst_element_set_state( mpPipeline, GST_STATE_PAUSED ) ) {
 case GST_STATE_CHANGE_FAILURE:


[Libreoffice-commits] core.git: avmedia/source

2023-11-03 Thread Caolán McNamara (via logerrit)
 avmedia/source/gstreamer/gstframegrabber.cxx |5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 1e95b89f8f9910c9f4b3b918aa83cf2185d9c11b
Author: Caolán McNamara 
AuthorDate: Fri Nov 3 14:20:07 2023 +
Commit: Caolán McNamara 
CommitDate: Fri Nov 3 16:51:03 2023 +0100

escape url passed to gstreamer

Change-Id: I3c93ee34800cc8563370f75ef3ef6f8a9220e6ec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158884
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/avmedia/source/gstreamer/gstframegrabber.cxx 
b/avmedia/source/gstreamer/gstframegrabber.cxx
index 4c4b17326860..a3b4b3aef5e1 100644
--- a/avmedia/source/gstreamer/gstframegrabber.cxx
+++ b/avmedia/source/gstreamer/gstframegrabber.cxx
@@ -50,9 +50,8 @@ void FrameGrabber::disposePipeline()
 
 FrameGrabber::FrameGrabber( std::u16string_view rURL )
 {
-gchar *pPipelineStr;
-pPipelineStr = g_strdup_printf(
-"uridecodebin uri=%s ! videoconvert ! videoscale ! appsink "
+gchar *pPipelineStr = g_strdup_printf(
+"uridecodebin uri=\"%s\" ! videoconvert ! videoscale ! appsink "
 "name=sink caps=\"video/x-raw,format=RGB,pixel-aspect-ratio=1/1\"",
 OUStringToOString( rURL, RTL_TEXTENCODING_UTF8 ).getStr() );
 


[Libreoffice-commits] core.git: avmedia/source

2023-10-19 Thread Stephan Bergmann (via logerrit)
 avmedia/source/framework/mediaitem.cxx   |2 +-
 avmedia/source/gstreamer/gstframegrabber.cxx |2 +-
 avmedia/source/gstreamer/gstplayer.cxx   |2 +-
 avmedia/source/gstreamer/gstwindow.cxx   |2 +-
 avmedia/source/gtk/gtkplayer.cxx |2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit c12df614adde52cc558cf3503469efffea02dd5c
Author: Stephan Bergmann 
AuthorDate: Thu Oct 19 10:30:02 2023 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Oct 19 13:07:58 2023 +0200

Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: avmedia

Change-Id: Ib56a05e171f485ad01cb54ed87e01c3536ea733d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158142
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/avmedia/source/framework/mediaitem.cxx 
b/avmedia/source/framework/mediaitem.cxx
index 4699a0454359..320a24bc9bfe 100644
--- a/avmedia/source/framework/mediaitem.cxx
+++ b/avmedia/source/framework/mediaitem.cxx
@@ -469,7 +469,7 @@ bool EmbedMedia(uno::Reference const& xModel,
 uno::Reference const xStorage(
 xSBD->getDocumentStorage(), uno::UNO_SET_THROW);
 
-static constexpr OUStringLiteral media(u"Media");
+static constexpr OUString media(u"Media"_ustr);
 uno::Reference const xSubStorage(
 xStorage->openStorageElement(media, embed::ElementModes::WRITE));
 
diff --git a/avmedia/source/gstreamer/gstframegrabber.cxx 
b/avmedia/source/gstreamer/gstframegrabber.cxx
index 6f41511dc128..4c4b17326860 100644
--- a/avmedia/source/gstreamer/gstframegrabber.cxx
+++ b/avmedia/source/gstreamer/gstframegrabber.cxx
@@ -32,7 +32,7 @@
 #include 
 
 constexpr OUStringLiteral AVMEDIA_GST_FRAMEGRABBER_IMPLEMENTATIONNAME = 
u"com.sun.star.comp.avmedia.FrameGrabber_GStreamer";
-constexpr OUStringLiteral AVMEDIA_GST_FRAMEGRABBER_SERVICENAME = 
u"com.sun.star.media.FrameGrabber_GStreamer";
+constexpr OUString AVMEDIA_GST_FRAMEGRABBER_SERVICENAME = 
u"com.sun.star.media.FrameGrabber_GStreamer"_ustr;
 
 using namespace ::com::sun::star;
 
diff --git a/avmedia/source/gstreamer/gstplayer.cxx 
b/avmedia/source/gstreamer/gstplayer.cxx
index 259185c197ec..fd1407b3ca4f 100644
--- a/avmedia/source/gstreamer/gstplayer.cxx
+++ b/avmedia/source/gstreamer/gstplayer.cxx
@@ -51,7 +51,7 @@
 #include 
 
 constexpr OUStringLiteral AVMEDIA_GST_PLAYER_IMPLEMENTATIONNAME = 
u"com.sun.star.comp.avmedia.Player_GStreamer";
-constexpr OUStringLiteral AVMEDIA_GST_PLAYER_SERVICENAME= 
u"com.sun.star.media.Player_GStreamer";
+constexpr OUString AVMEDIA_GST_PLAYER_SERVICENAME= 
u"com.sun.star.media.Player_GStreamer"_ustr;
 #define AVVERSION "gst 1.0: "
 
 using namespace ::com::sun::star;
diff --git a/avmedia/source/gstreamer/gstwindow.cxx 
b/avmedia/source/gstreamer/gstwindow.cxx
index 5862443da6aa..5f1a9e4acf13 100644
--- a/avmedia/source/gstreamer/gstwindow.cxx
+++ b/avmedia/source/gstreamer/gstwindow.cxx
@@ -24,7 +24,7 @@
 #include "gstwindow.hxx"
 
 constexpr OUStringLiteral AVMEDIA_GST_WINDOW_IMPLEMENTATIONNAME = 
u"com.sun.star.comp.avmedia.Window_GStreamer";
-constexpr OUStringLiteral AVMEDIA_GST_WINDOW_SERVICENAME = 
u"com.sun.star.media.Window_GStreamer";
+constexpr OUString AVMEDIA_GST_WINDOW_SERVICENAME = 
u"com.sun.star.media.Window_GStreamer"_ustr;
 
 using namespace ::com::sun::star;
 
diff --git a/avmedia/source/gtk/gtkplayer.cxx b/avmedia/source/gtk/gtkplayer.cxx
index 47a57e3a4cd2..4dca3e202a24 100644
--- a/avmedia/source/gtk/gtkplayer.cxx
+++ b/avmedia/source/gtk/gtkplayer.cxx
@@ -29,7 +29,7 @@
 
 constexpr OUStringLiteral AVMEDIA_GTK_PLAYER_IMPLEMENTATIONNAME
 = u"com.sun.star.comp.avmedia.Player_Gtk";
-constexpr OUStringLiteral AVMEDIA_GTK_PLAYER_SERVICENAME = 
u"com.sun.star.media.Player_Gtk";
+constexpr OUString AVMEDIA_GTK_PLAYER_SERVICENAME = 
u"com.sun.star.media.Player_Gtk"_ustr;
 
 using namespace ::com::sun::star;
 


[Libreoffice-commits] core.git: avmedia/source

2023-08-08 Thread Arnaud Versini (via logerrit)
 avmedia/source/gstreamer/gstplayer.cxx |   13 +++--
 1 file changed, 7 insertions(+), 6 deletions(-)

New commits:
commit 4d54aeb67a43a42acf8f3cd94d83584f6870ade2
Author: Arnaud Versini 
AuthorDate: Sun Oct 24 16:49:50 2021 +0200
Commit: Arnaud Versini 
CommitDate: Tue Aug 8 14:35:37 2023 +0200

avmedia : use std::recursive_mutex instead of osl::Mutex.

Mostly reverts 621143588b3cb438baf27fb6893ab02e7b06f9dd but using 
recursive_mutex instead.

Change-Id: I4b23410720834e19c5dd28c43bc84ed1b3e08072
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153236
Tested-by: Jenkins
Reviewed-by: Arnaud Versini 

diff --git a/avmedia/source/gstreamer/gstplayer.cxx 
b/avmedia/source/gstreamer/gstplayer.cxx
index 0bd3485efd9a..259185c197ec 100644
--- a/avmedia/source/gstreamer/gstplayer.cxx
+++ b/avmedia/source/gstreamer/gstplayer.cxx
@@ -25,6 +25,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -98,7 +99,7 @@ private:
 
 DECL_STATIC_LINK(MissingPluginInstaller, launchUi, void*, void);
 
-osl::Mutex mutex_;
+std::recursive_mutex mutex_;
 std::set reported_;
 std::map>> queued_;
 rtl::Reference currentThread_;
@@ -110,7 +111,7 @@ private:
 
 
 MissingPluginInstaller::~MissingPluginInstaller() {
-osl::MutexGuard g(mutex_);
+std::unique_lock g(mutex_);
 SAL_WARN_IF(currentThread_.is(), "avmedia.gstreamer", "unjoined thread");
 inCleanUp_ = true;
 }
@@ -138,7 +139,7 @@ void MissingPluginInstaller::report(
 rtl::Reference join;
 rtl::Reference launch;
 {
-osl::MutexGuard g(mutex_);
+std::unique_lock g(mutex_);
 if (reported_.find(detStr) != reported_.end()) {
 return;
 }
@@ -183,7 +184,7 @@ void eraseSource(std::set> & set, 
Player const * source)
 void MissingPluginInstaller::detach(Player const * source) {
 rtl::Reference join;
 {
-osl::MutexGuard g(mutex_);
+std::unique_lock g(mutex_);
 if (inCleanUp_) {
 // Guard against ~MissingPluginInstaller with erroneously un-joined
 // currentThread_ (thus non-empty currentSources_) calling
@@ -257,7 +258,7 @@ void MissingPluginInstallerThread::execute() {
 for (;;) {
 std::vector details;
 {
-osl::MutexGuard g(inst.mutex_);
+std::unique_lock g(inst.mutex_);
 assert(!inst.currentDetails_.empty());
 details.swap(inst.currentDetails_);
 }
@@ -270,7 +271,7 @@ void MissingPluginInstallerThread::execute() {
 args.push_back(nullptr);
 gst_install_plugins_sync(args.data(), nullptr);
 {
-osl::MutexGuard g(inst.mutex_);
+std::unique_lock g(inst.mutex_);
 if (inst.queued_.empty() || inst.launchNewThread_) {
 inst.launchNewThread_ = true;
 break;


[Libreoffice-commits] core.git: avmedia/source chart2/qa compilerplugins/clang cui/source dbaccess/source desktop/source drawinglayer/source fpicker/source jvmfwk/source l10ntools/source oox/qa oox/so

2023-06-27 Thread Noel Grandin (via logerrit)
 avmedia/source/framework/mediaitem.cxx |2 
 chart2/qa/extras/chart2geometry.cxx|   24 +-
 compilerplugins/clang/stringstatic.cxx |  118 +
 compilerplugins/clang/test/stringstatic.cxx|8 
 cui/source/dialogs/scriptdlg.cxx   |2 
 dbaccess/source/ui/dlg/dbadmin.cxx |4 
 dbaccess/source/ui/dlg/dbfindex.cxx|4 
 dbaccess/source/ui/misc/WCopyTable.cxx |2 
 desktop/source/lib/init.cxx|4 
 drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx |   10 -
 fpicker/source/office/fileview.cxx |2 
 jvmfwk/source/elements.cxx |2 
 l10ntools/source/merge.cxx |2 
 l10ntools/source/propmerge.cxx |4 
 oox/qa/unit/export.cxx |2 
 oox/qa/unit/mcgr.cxx   |8 
 oox/source/export/drawingml.cxx|2 
 oox/source/export/vmlexport.cxx|2 
 sc/qa/unit/ucalc.cxx   |2 
 sc/qa/unit/ucalc_formula2.cxx  |2 
 sc/source/filter/excel/xestream.cxx|2 
 sc/source/filter/lotus/lotform.cxx |4 
 sc/source/filter/xml/xmlexprt.cxx  |2 
 sc/source/filter/xml/xmlimprt.cxx  |3 
 sd/qa/unit/export-tests-ooxml1.cxx |   18 +
 sd/qa/unit/export-tests-ooxml2.cxx |8 
 sd/qa/unit/export-tests-ooxml3.cxx |   12 -
 sd/qa/unit/misc-tests.cxx  |   56 +++---
 sfx2/source/appl/sfxhelp.cxx   |2 
 sfx2/source/doc/guisaveas.cxx  |2 
 svl/qa/unit/items/test_IndexedStyleSheets.cxx  |2 
 svtools/source/misc/langhelp.cxx   |5 
 svx/source/svdraw/svdtrans.cxx |6 
 sw/qa/extras/tiledrendering/tiledrendering.cxx |8 
 sw/qa/extras/uiwriter/uiwriter6.cxx|3 
 sw/source/core/crsr/findtxt.cxx|2 
 test/source/screenshot_test.cxx|2 
 ucb/source/core/ucbstore.cxx   |8 
 unotools/source/config/fontcfg.cxx |   10 -
 vcl/qa/cppunit/text.cxx|2 
 vcl/source/filter/FilterConfigCache.cxx|   14 -
 vcl/source/filter/ipdf/pdfdocument.cxx |4 
 writerfilter/source/ooxml/OOXMLDocumentImpl.cxx|   12 -
 writerperfect/source/impress/KeynoteImportFilter.cxx   |4 
 writerperfect/source/writer/EPUBPackage.cxx|2 
 xmloff/source/core/xmlexp.cxx  |2 
 xmloff/source/draw/sdxmlimp.cxx|2 
 xmloff/source/draw/shapeexport.cxx |7 
 xmloff/source/text/XMLIndexTOCContext.cxx  |4 
 xmloff/source/text/txtstyli.cxx|8 
 50 files changed, 245 insertions(+), 177 deletions(-)

New commits:
commit e266d448f45348f27f8291ea5d0542747d7c8168
Author: Noel Grandin 
AuthorDate: Mon Jun 26 16:16:19 2023 +0200
Commit: Noel Grandin 
CommitDate: Tue Jun 27 13:10:44 2023 +0200

loplugin:stringstatic look for more strings

that can be initialised at compile-time instead of runtime

Change-Id: I08d516fdc13a3a79f93c079f89ac44cbc7a1ed71
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153620
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/avmedia/source/framework/mediaitem.cxx 
b/avmedia/source/framework/mediaitem.cxx
index f177c8bea687..4699a0454359 100644
--- a/avmedia/source/framework/mediaitem.cxx
+++ b/avmedia/source/framework/mediaitem.cxx
@@ -469,7 +469,7 @@ bool EmbedMedia(uno::Reference const& xModel,
 uno::Reference const xStorage(
 xSBD->getDocumentStorage(), uno::UNO_SET_THROW);
 
-OUString const media("Media");
+static constexpr OUStringLiteral media(u"Media");
 uno::Reference const xSubStorage(
 xStorage->openStorageElement(media, embed::ElementModes::WRITE));
 
diff --git a/chart2/qa/extras/chart2geometry.cxx 
b/chart2/qa/extras/chart2geometry.cxx
index f560d46ba054..fdd4e6daa11d 100644
--- a/chart2/qa/extras/chart2geometry.cxx
+++ b/chart2/qa/extras/chart2geometry.cxx
@@ -80,9 +80,10 @@ void Chart2GeometryTest::testTdf135184RoundLineCap()
 xmlDocUniquePtr pXmlDoc = parseExport("Object 1/content.xml");
 CPPUNIT_ASSERT(pXmlDoc);
 
-const 

[Libreoffice-commits] core.git: avmedia/source include/unotools sd/source sfx2/source unotools/source vcl/source

2023-06-23 Thread Eike Rathke (via logerrit)
 avmedia/source/framework/MediaControlBase.cxx |7 +--
 include/unotools/localedatawrapper.hxx|8 ++--
 sd/source/ui/slideshow/showwin.cxx|3 ++-
 sfx2/source/dialog/dinfdlg.cxx|   10 ++
 unotools/source/i18n/localedatawrapper.cxx|   21 +
 vcl/source/control/field2.cxx |9 +++--
 6 files changed, 39 insertions(+), 19 deletions(-)

New commits:
commit c20337889469e41cec89bd421fab533f16b4b451
Author: Eike Rathke 
AuthorDate: Fri Jun 23 14:44:44 2023 +0200
Commit: Eike Rathke 
CommitDate: Sat Jun 24 01:20:12 2023 +0200

Change LocaleDataWrapper::getDuration() parameter to tools::Duration

... instead of tools::Time

Change-Id: I8e49de43a1870541d75add34089eec67b7a8be31
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153533
Reviewed-by: Eike Rathke 
Tested-by: Jenkins

diff --git a/avmedia/source/framework/MediaControlBase.cxx 
b/avmedia/source/framework/MediaControlBase.cxx
index d2c254293811..fb8f91066b67 100644
--- a/avmedia/source/framework/MediaControlBase.cxx
+++ b/avmedia/source/framework/MediaControlBase.cxx
@@ -20,6 +20,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -46,9 +47,11 @@ void MediaControlBase::UpdateTimeField( MediaItem const & 
aMediaItem, double fTi
 SvtSysLocale aSysLocale;
 const LocaleDataWrapper& rLocaleData = aSysLocale.GetLocaleData();
 
-aTimeString += rLocaleData.getDuration( tools::Time( 0, 0, static_cast< 
sal_uInt32 >( floor( fTime ) ) ) ) +
+aTimeString += rLocaleData.getDuration(
+tools::Duration( 0, 0, 0, static_cast( floor( fTime 
)), 0)) +
 " / " +
-rLocaleData.getDuration( tools::Time( 0, 0, static_cast< sal_uInt32 >( 
floor( aMediaItem.getDuration() ) )) );
+rLocaleData.getDuration(
+tools::Duration( 0, 0, 0, static_cast( floor( 
aMediaItem.getDuration())), 0));
 
 if( mxTimeEdit->get_text() != aTimeString )
 mxTimeEdit->set_text( aTimeString );
diff --git a/include/unotools/localedatawrapper.hxx 
b/include/unotools/localedatawrapper.hxx
index 5fbdcd0782b7..d6eeb174e735 100644
--- a/include/unotools/localedatawrapper.hxx
+++ b/include/unotools/localedatawrapper.hxx
@@ -42,7 +42,11 @@ namespace com::sun::star::i18n { struct FormatElement; }
 namespace com::sun::star::i18n { struct CalendarItem2; }
 
 class Date;
-namespace tools { class Time; }
+namespace tools
+{
+class Time;
+class Duration;
+}
 class CalendarWrapper;
 
 enum class DateOrder {
@@ -311,7 +315,7 @@ public:
 OUString   getDate( const Date& rDate ) const;
 OUString   getTime( const tools::Time& rTime, bool bSec = true,
 bool b100Sec = false ) const;
-OUString   getDuration( const tools::Time& rTime,
+OUString   getDuration( const tools::Duration& rDuration,
 bool bSec = true, bool b100Sec = false ) const;
 
 /** Simple number formatting
diff --git a/sd/source/ui/slideshow/showwin.cxx 
b/sd/source/ui/slideshow/showwin.cxx
index 8e1f8a6d49cd..4bc0d414307c 100644
--- a/sd/source/ui/slideshow/showwin.cxx
+++ b/sd/source/ui/slideshow/showwin.cxx
@@ -38,6 +38,7 @@
 #include 
 #include 
 #include 
+#include 
 
 using namespace ::com::sun::star;
 
@@ -512,7 +513,7 @@ void ShowWindow::DrawPauseScene( bool bTimeoutOnly )
 SvtSysLocaleaSysLocale;
 const LocaleDataWrapper&aLocaleData = 
aSysLocale.GetLocaleData();
 
-aText += " ( " + aLocaleData.getDuration( ::tools::Time( 0, 0, 
mnPauseTimeout ) ) + " )";
+aText += " ( " + aLocaleData.getDuration( ::tools::Duration( 0, 0, 
0, mnPauseTimeout, 0 )) + " )";
 pVDev->DrawText( Point( aOffset.Width(), 0 ), aText );
 GetOutDev()->DrawOutDev( Point( aOutOrg.X(), aOffset.Height() ), 
aVDevSize, Point(), aVDevSize, *pVDev );
 bDrawn = true;
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index f702c2ec10c1..5c564af981a2 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -19,6 +19,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -745,8 +746,7 @@ IMPL_LINK_NOARG(SfxDocumentPage, DeleteHdl, weld::Button&, 
void)
 m_xCreateValFt->set_label( ConvertDateTime_Impl( aName, uDT, 
rLocaleWrapper ) );
 m_xChangeValFt->set_label( "" );
 m_xPrintValFt->set_label( "" );
-const tools::Time aTime( 0 );
-m_xTimeLogValFt->set_label( rLocaleWrapper.getDuration( aTime ) );
+m_xTimeLogValFt->set_label( rLocaleWrapper.getDuration( tools::Duration() 
) );
 m_xDocNoValFt->set_label(OUString('1'));
 bHandleDelete = true;
 }
@@ -1065,8 +1065,10 @@ void SfxDocumentPage::Reset( const SfxItemSet* rSet )
 const tools::Long nTime = rInfoItem.getEditingDuration();
 if ( bUseUserData )
 {
-

[Libreoffice-commits] core.git: avmedia/source comphelper/source include/comphelper include/svx oox/source sd/source svx/source xmloff/source

2023-04-05 Thread Michael Stahl (via logerrit)
 avmedia/source/framework/mediaitem.cxx |9 ++-
 avmedia/source/inc/mediamisc.hxx   |5 --
 avmedia/source/viewer/mediawindow_impl.cxx |7 +-
 comphelper/source/misc/graphicmimetype.cxx |   68 +
 include/comphelper/mediamimetype.hxx   |   30 
 include/svx/svdomedia.hxx  |2 
 oox/source/export/drawingml.cxx|5 ++
 sd/source/ui/inc/View.hxx  |2 
 sd/source/ui/view/sdview4.cxx  |8 +--
 svx/source/svdraw/svdomedia.cxx|4 -
 xmloff/source/draw/ximpshap.cxx|5 +-
 xmloff/source/text/XMLTextFrameContext.cxx |3 -
 12 files changed, 126 insertions(+), 22 deletions(-)

New commits:
commit a5225ba82e94a549f44420f56a7cb9d7906561cc
Author: Michael Stahl 
AuthorDate: Wed Apr 5 11:50:44 2023 +0200
Commit: Michael Stahl 
CommitDate: Wed Apr 5 14:34:51 2023 +0200

avmedia,*: guess the mime type of media files based on file name

.. at least for the most popular types, and do it automatically in
MediaItem::setURL().

This should work in practice in most cases and is much simpler than
adding some type detection or calling into platform dependent avmedia
backends.

Remove the parameter that was only ever set to
"application/vnd.sun.star.media" anyway, the same value that would be
used if it's missing.

Stop using that silly type for everything, only use it when guessing
fails.

In case an ODF document is loaded, it will use the mime type loaded from
the file (see setting of MediaMimeType in SdXMLPluginShapeContext) and
not guess it because that would require updating the entry in
manifest.xml as well.

Change-Id: I8ce29cf7425678ae11dda1d8c875be818f8623af
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150049
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/avmedia/source/framework/mediaitem.cxx 
b/avmedia/source/framework/mediaitem.cxx
index 77b28918f545..f177c8bea687 100644
--- a/avmedia/source/framework/mediaitem.cxx
+++ b/avmedia/source/framework/mediaitem.cxx
@@ -36,6 +36,7 @@
 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -237,6 +238,7 @@ bool MediaItem::setURL(const OUString& rURL, const 
OUString& rTempURL, const OUS
 m_pImpl->m_URL = rURL;
 m_pImpl->m_TempFileURL = rTempURL;
 m_pImpl->m_Referer = rReferer;
+setMimeType(::comphelper::GuessMediaMimeType(GetFilename(rURL)));
 }
 return bChanged;
 }
@@ -447,10 +449,9 @@ CreateStream(uno::Reference const& 
xStorage,
 uno::Reference< beans::XPropertySet > const xStreamProps(xStream,
 uno::UNO_QUERY);
 if (xStreamProps.is()) { // this is NOT supported in FileSystemStorage
-xStreamProps->setPropertyValue("MediaType", uno::Any(OUString(
-//FIXME how to detect real media type?
-//but currently xmloff has this one hardcoded anyway...
-"application/vnd.sun.star.media")));
+OUString const guessed(::comphelper::GuessMediaMimeType(filename));
+xStreamProps->setPropertyValue("MediaType",
+uno::Any(guessed.isEmpty() ? AVMEDIA_MIMETYPE_COMMON : guessed));
 xStreamProps->setPropertyValue( // turn off compression
 "Compressed", uno::Any(false));
 }
diff --git a/avmedia/source/inc/mediamisc.hxx b/avmedia/source/inc/mediamisc.hxx
index 061a7177f05a..f45f5b50da0b 100644
--- a/avmedia/source/inc/mediamisc.hxx
+++ b/avmedia/source/inc/mediamisc.hxx
@@ -19,6 +19,8 @@
 
 #pragma once
 
+#include 
+
 #include 
 
 #ifdef _WIN32
@@ -31,9 +33,6 @@
 #endif
 #endif
 
-// Mime types
-inline constexpr OUStringLiteral AVMEDIA_MIMETYPE_COMMON = 
u"application/vnd.sun.star.media";
-
 inline OUString AvmResId(TranslateId aId)
 {
 return Translate::get(aId, Translate::Create("avmedia"));
diff --git a/avmedia/source/viewer/mediawindow_impl.cxx 
b/avmedia/source/viewer/mediawindow_impl.cxx
index b74033e33749..82ca1b92821c 100644
--- a/avmedia/source/viewer/mediawindow_impl.cxx
+++ b/avmedia/source/viewer/mediawindow_impl.cxx
@@ -168,7 +168,7 @@ void MediaWindowImpl::dispose()
 Control::dispose();
 }
 
-uno::Reference MediaWindowImpl::createPlayer(const OUString& 
rURL, const OUString& rReferer, const OUString* pMimeType)
+uno::Reference MediaWindowImpl::createPlayer(const OUString& 
rURL, const OUString& rReferer, const OUString*)
 {
 uno::Reference xPlayer;
 
@@ -180,7 +180,8 @@ uno::Reference 
MediaWindowImpl::createPlayer(const OUString& rUR
 return xPlayer;
 }
 
-if (!pMimeType || *pMimeType == AVMEDIA_MIMETYPE_COMMON)
+// currently there isn't anything else, throw any mime type to the media 
players
+//if (!pMimeType || *pMimeType == AVMEDIA_MIMETYPE_COMMON)
 {
 uno::Reference 
xContext(::comphelper::getProcessComponentContext());
 if (Application::GetToolkitName() == "gtk4")
@@ -397,7 +398,7 @@ 

[Libreoffice-commits] core.git: avmedia/source basic/source canvas/source desktop/source extensions/source framework/source oox/source sal/osl scripting/source slideshow/source starmath/source svl/sou

2023-03-23 Thread Noel Grandin (via logerrit)
 avmedia/source/gstreamer/gstplayer.cxx  |   14 +-
 basic/source/runtime/methods.cxx|   10 +
 canvas/source/directx/dx_devicehelper.cxx   |   15 --
 desktop/source/deployment/misc/dp_misc.cxx  |   24 ++-
 desktop/source/deployment/misc/dp_platform.cxx  |   39 +++---
 extensions/source/config/ldap/ldapuserprofilebe.cxx |2 
 framework/source/accelerators/presethandler.cxx |   26 ++--
 oox/source/drawingml/color.cxx  |   12 +
 sal/osl/all/debugbase.cxx   |   12 +
 scripting/source/provider/ActiveMSPList.cxx |6 
 slideshow/source/engine/opengl/TransitionerImpl.cxx |   11 -
 starmath/source/smdll.cxx   |4 
 svl/source/config/ctloptions.cxx|   10 +
 svtools/source/misc/langtab.cxx |   18 +-
 sw/source/uibase/app/swdll.cxx  |   10 +
 unotools/source/config/compatibility.cxx|8 -
 unotools/source/config/fltrcfg.cxx  |   11 -
 vcl/qa/cppunit/canvasbitmaptest.cxx |   13 --
 xmloff/source/style/prstylei.cxx|  128 ++--
 19 files changed, 183 insertions(+), 190 deletions(-)

New commits:
commit e7dbef922a2fc73469f12c520bcc1af54fe038fb
Author: Noel Grandin 
AuthorDate: Thu Mar 23 11:11:48 2023 +0200
Commit: Noel Grandin 
CommitDate: Thu Mar 23 19:49:25 2023 +

rtl::Static to thread-safe-static

Change-Id: Ife02e6d2be3ebfbb08522ab0183ef4aa31a99e19
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149415
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/avmedia/source/gstreamer/gstplayer.cxx 
b/avmedia/source/gstreamer/gstplayer.cxx
index b841c576be17..0bd3485efd9a 100644
--- a/avmedia/source/gstreamer/gstplayer.cxx
+++ b/avmedia/source/gstreamer/gstplayer.cxx
@@ -245,13 +245,15 @@ IMPL_STATIC_LINK(MissingPluginInstaller, launchUi, void 
*, p, void)
 }
 
 
-struct TheMissingPluginInstaller:
-public rtl::Static
-{};
+MissingPluginInstaller& TheMissingPluginInstaller()
+{
+static MissingPluginInstaller theInstaller;
+return theInstaller;
+}
 
 
 void MissingPluginInstallerThread::execute() {
-MissingPluginInstaller & inst = TheMissingPluginInstaller::get();
+MissingPluginInstaller & inst = TheMissingPluginInstaller();
 for (;;) {
 std::vector details;
 {
@@ -330,7 +332,7 @@ Player::~Player()
 
 void SAL_CALL Player::disposing()
 {
-TheMissingPluginInstaller::get().detach(this);
+TheMissingPluginInstaller().detach(this);
 
 ::osl::MutexGuard aGuard(m_aMutex);
 
@@ -532,7 +534,7 @@ GstBusSyncReply Player::processSyncMessage( GstMessage 
*message )
 maSizeCondition.set();
 }
 } else if (gst_is_missing_plugin_message(message)) {
-TheMissingPluginInstaller::get().report(this, message);
+TheMissingPluginInstaller().report(this, message);
 if( mnWidth == 0 ) {
 // an error occurred, set condition so that OOo thread doesn't 
wait for us
 maSizeCondition.set();
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 2835a4915392..986860c935a3 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -3431,7 +3431,11 @@ struct RandomNumberGenerator
 }
 };
 
-class theRandomNumberGenerator : public rtl::Static {};
+RandomNumberGenerator& theRandomNumberGenerator()
+{
+static RandomNumberGenerator theGenerator;
+return theGenerator;
+}
 
 }
 
@@ -3444,7 +3448,7 @@ void SbRtl_Randomize(StarBASIC *, SbxArray & rPar, bool)
 if (rPar.Count() == 2)
 {
 int nSeed = static_cast(rPar.Get(1)->GetInteger());
-theRandomNumberGenerator::get().global_rng.seed(nSeed);
+theRandomNumberGenerator().global_rng.seed(nSeed);
 }
 // without parameter, no need to do anything - RNG is seeded at first use
 }
@@ -3458,7 +3462,7 @@ void SbRtl_Rnd(StarBASIC *, SbxArray & rPar, bool)
 else
 {
 std::uniform_real_distribution dist(0.0, 1.0);
-double const tmp(dist(theRandomNumberGenerator::get().global_rng));
+double const tmp(dist(theRandomNumberGenerator().global_rng));
 rPar.Get(0)->PutDouble(tmp);
 }
 }
diff --git a/canvas/source/directx/dx_devicehelper.cxx 
b/canvas/source/directx/dx_devicehelper.cxx
index 8d984c766b5a..dada6238e0eb 100644
--- a/canvas/source/directx/dx_devicehelper.cxx
+++ b/canvas/source/directx/dx_devicehelper.cxx
@@ -188,22 +188,11 @@ namespace dxcanvas
 return uno::Any();
 }
 
-namespace
-{
-struct DeviceColorSpace: public 
rtl::StaticWithInit,
-DeviceColorSpace>
-{
-uno::Reference operator()()
-{
-return vcl::unotools::createStandardColorSpace();
-}
-};
-}
-
 

[Libreoffice-commits] core.git: avmedia/source

2023-03-22 Thread Michael Stahl (via logerrit)
 avmedia/source/gstreamer/gstplayer.cxx |   13 ++---
 1 file changed, 6 insertions(+), 7 deletions(-)

New commits:
commit 621143588b3cb438baf27fb6893ab02e7b06f9dd
Author: Michael Stahl 
AuthorDate: Tue Mar 21 19:10:14 2023 +0100
Commit: Michael Stahl 
CommitDate: Wed Mar 22 08:25:26 2023 +

Revert "avmedia : use std::mutex instead of osl::Mutex"

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::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::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 ::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::dispose() (this=0x75d2fa0) at 
include/cppuhelper/compbase.hxx:90
11 cppu::WeakComponentImplHelperBase::release() (this=0x75d2fa0) at 
cppuhelper/source/implbase.cxx:79
13 rtl::Reference::~Reference() 
(this=0x7f8e7c028f20) at include/rtl/ref.hxx:129
...
21 std::__debug::set, 
std::less >, 
std::allocator > >::clear() 
(this=0x7f8e644c6cd8 ::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
 const&, _GstMessage*) (this=0x7f8e644c6be0 
::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 

diff --git a/avmedia/source/gstreamer/gstplayer.cxx 
b/avmedia/source/gstreamer/gstplayer.cxx
index 7d7602b5b3eb..b841c576be17 100644
--- a/avmedia/source/gstreamer/gstplayer.cxx
+++ b/avmedia/source/gstreamer/gstplayer.cxx
@@ -25,7 +25,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -99,7 +98,7 @@ private:
 
 DECL_STATIC_LINK(MissingPluginInstaller, launchUi, void*, void);
 
-std::mutex mutex_;
+osl::Mutex mutex_;
 std::set reported_;
 std::map>> queued_;
 rtl::Reference currentThread_;
@@ -111,7 +110,7 @@ private:
 
 
 MissingPluginInstaller::~MissingPluginInstaller() {
-std::unique_lock g(mutex_);
+osl::MutexGuard g(mutex_);
 SAL_WARN_IF(currentThread_.is(), "avmedia.gstreamer", "unjoined thread");
 inCleanUp_ = true;
 }
@@ -139,7 +138,7 @@ void MissingPluginInstaller::report(
 rtl::Reference join;
 rtl::Reference launch;
 {
-std::unique_lock g(mutex_);
+osl::MutexGuard g(mutex_);
 if (reported_.find(detStr) != reported_.end()) {
 return;
 }
@@ -184,7 +183,7 @@ void eraseSource(std::set> & set, 
Player const * source)
 void MissingPluginInstaller::detach(Player const * source) {
 rtl::Reference join;
 {
-std::unique_lock g(mutex_);
+osl::MutexGuard g(mutex_);
 if (inCleanUp_) {
 // Guard against ~MissingPluginInstaller with erroneously un-joined
 // currentThread_ (thus non-empty currentSources_) calling
@@ -256,7 +255,7 @@ void MissingPluginInstallerThread::execute() {
 for (;;) {
 std::vector details;
 {
-std::unique_lock g(inst.mutex_);
+osl::MutexGuard g(inst.mutex_);
 assert(!inst.currentDetails_.empty());
 details.swap(inst.currentDetails_);
 }
@@ -269,7 +268,7 @@ void MissingPluginInstallerThread::execute() {
 args.push_back(nullptr);
 gst_install_plugins_sync(args.data(), nullptr);
 {
-std::unique_lock g(inst.mutex_);
+osl::MutexGuard g(inst.mutex_);
 if (inst.queued_.empty() || inst.launchNewThread_) {
 inst.launchNewThread_ = true;
 break;


[Libreoffice-commits] core.git: avmedia/source chart2/source forms/source sc/source

2022-09-10 Thread Noel Grandin (via logerrit)
 avmedia/source/viewer/mediawindow.cxx|   14 +++
 chart2/source/controller/dialogs/dlg_ObjectProperties.cxx|8 ++--
 chart2/source/controller/inc/dlg_ObjectProperties.hxx|6 +--
 chart2/source/controller/main/ChartController_Properties.cxx |4 +-
 forms/source/component/imgprod.cxx   |   22 +--
 forms/source/component/imgprod.hxx   |7 ++-
 sc/source/filter/html/htmlpars.cxx   |   10 ++---
 sc/source/filter/inc/eeparser.hxx|4 +-
 sc/source/filter/rtf/eeimpars.cxx|6 +--
 9 files changed, 41 insertions(+), 40 deletions(-)

New commits:
commit 16987d2aae9e0ed052de8a8f7155070c4b05cf4a
Author: Noel Grandin 
AuthorDate: Fri Sep 9 20:30:53 2022 +0200
Commit: Noel Grandin 
CommitDate: Sat Sep 10 12:19:13 2022 +0200

unique_ptr->optional for Graphic

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 

diff --git a/avmedia/source/viewer/mediawindow.cxx 
b/avmedia/source/viewer/mediawindow.cxx
index df8110f54e0d..27397fcbcf7a 100644
--- a/avmedia/source/viewer/mediawindow.cxx
+++ b/avmedia/source/viewer/mediawindow.cxx
@@ -369,7 +369,7 @@ MediaWindow::grabFrame(const 
uno::Reference& xPlayer,
const uno::Reference& rGraphic)
 {
 uno::Reference< graphic::XGraphic > xRet;
-std::unique_ptr< Graphic > xGraphic;
+std::optional< Graphic > oGraphic;
 
 if( xPlayer.is() )
 {
@@ -392,22 +392,22 @@ MediaWindow::grabFrame(const 
uno::Reference& xPlayer,
 if( !aPrefSize.Width && !aPrefSize.Height )
 {
 const BitmapEx aBmpEx(AVMEDIA_BMP_AUDIOLOGO);
-xGraphic.reset( new Graphic( aBmpEx ) );
+oGraphic.emplace( aBmpEx );
 }
 }
 }
 
-if (!xRet.is() && !xGraphic)
+if (!xRet.is() && !oGraphic)
 {
 const BitmapEx aBmpEx(AVMEDIA_BMP_EMPTYLOGO);
-xGraphic.reset( new Graphic( aBmpEx ) );
+oGraphic.emplace( aBmpEx );
 }
 
-if (xGraphic)
+if (oGraphic)
 {
 if (rGraphic)
-xGraphic.reset(new Graphic(rGraphic));
-xRet = xGraphic->GetXGraphic();
+oGraphic.emplace(rGraphic);
+xRet = oGraphic->GetXGraphic();
 }
 
 return xRet;
diff --git a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx 
b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
index bc5bc46a82e1..a838f784d1a4 100644
--- a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
+++ b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
@@ -316,10 +316,10 @@ void ObjectPropertiesDialogParameter::init( const 
rtl::Reference<::chart::ChartM
 const sal_uInt16 nNoArrowNoShadowDlg= 1101;
 
 void SchAttribTabDlg::setSymbolInformation( SfxItemSet&& 
rSymbolShapeProperties,
-std::unique_ptr pAutoSymbolGraphic )
+std::optional oAutoSymbolGraphic )
 {
 m_oSymbolShapeProperties.emplace(std::move(rSymbolShapeProperties));
-m_pAutoSymbolGraphic = std::move(pAutoSymbolGraphic);
+m_oAutoSymbolGraphic = std::move(oAutoSymbolGraphic);
 }
 
 void SchAttribTabDlg::SetAxisMinorStepWidthForErrorBarDecimals( double 
fMinorStepWidth )
@@ -511,8 +511,8 @@ void SchAttribTabDlg::PageCreated(const OString& rId, 
SfxTabPage )
 
aSet.Put(OfaPtrItem(SID_OBJECT_LIST,m_pViewElementListProvider->GetSymbolList()));
 if( m_oSymbolShapeProperties )
 aSet.Put(SfxTabDialogItem(SID_ATTR_SET, 
*m_oSymbolShapeProperties));
-if( m_pAutoSymbolGraphic )
-aSet.Put(SvxGraphicItem(*m_pAutoSymbolGraphic));
+if( m_oAutoSymbolGraphic )
+aSet.Put(SvxGraphicItem(*m_oAutoSymbolGraphic));
 }
 rPage.PageCreated(aSet);
 }
diff --git a/chart2/source/controller/inc/dlg_ObjectProperties.hxx 
b/chart2/source/controller/inc/dlg_ObjectProperties.hxx
index c4c1c0d83bf0..4311add0f733 100644
--- a/chart2/source/controller/inc/dlg_ObjectProperties.hxx
+++ b/chart2/source/controller/inc/dlg_ObjectProperties.hxx
@@ -20,9 +20,9 @@
 
 #include 
 #include 
+#include 
 
 namespace com::sun::star::util { class XNumberFormatsSupplier; }
-class Graphic;
 
 namespace chart
 {
@@ -115,7 +115,7 @@ private:
 SvNumberFormatter* m_pNumberFormatter;
 
 std::optional m_oSymbolShapeProperties;
-std::unique_ptrm_pAutoSymbolGraphic;
+std::optionalm_oAutoSymbolGraphic;
 
 double  m_fAxisMinorStepWidthForErrorBarDecimals;
 boolm_bOKPressed;
@@ -133,7 +133,7 @@ public:
 
 //pSymbolShapeProperties: Properties to be set on the symbollist shapes
 

[Libreoffice-commits] core.git: avmedia/source include/avmedia svx/qa svx/source

2022-08-25 Thread Miklos Vajna (via logerrit)
 avmedia/source/framework/mediaitem.cxx |   17 +
 include/avmedia/mediaitem.hxx  |8 ++--
 svx/qa/unit/data/video-snapshot.pptx   |binary
 svx/qa/unit/svdraw.cxx |6 ++
 svx/source/svdraw/svdomedia.cxx|   21 +
 svx/source/unodraw/unoprov.cxx |1 +
 svx/source/unodraw/unoshap4.cxx|   28 ++--
 7 files changed, 77 insertions(+), 4 deletions(-)

New commits:
commit b6f0fd6a2f459ead2268e07bfd86db7e303b323f
Author: Miklos Vajna 
AuthorDate: Thu Aug 25 14:01:43 2022 +0200
Commit: Miklos Vajna 
CommitDate: Thu Aug 25 15:41:34 2022 +0200

Related: tdf#149971 avmedia: add doc model and render for crop of media 
objects

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 
Tested-by: Jenkins

diff --git a/avmedia/source/framework/mediaitem.cxx 
b/avmedia/source/framework/mediaitem.cxx
index 49b400084128..77b28918f545 100644
--- a/avmedia/source/framework/mediaitem.cxx
+++ b/avmedia/source/framework/mediaitem.cxx
@@ -30,6 +30,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -64,6 +65,7 @@ struct MediaItem::Impl
 boolm_bMute;
 css::media::ZoomLevel m_eZoom;
 Graphic m_aGraphic;
+text::GraphicCrop m_aCrop;
 
 explicit Impl(AVMediaSetMask nMaskSet)
 : m_nMaskSet( nMaskSet )
@@ -107,6 +109,7 @@ bool MediaItem::operator==( const SfxPoolItem& rItem ) const
 && m_pImpl->m_Referer == rOther.m_pImpl->m_Referer
 && m_pImpl->m_sMimeType == rOther.m_pImpl->m_sMimeType
 && m_pImpl->m_aGraphic == rOther.m_pImpl->m_aGraphic
+&& m_pImpl->m_aCrop == rOther.m_pImpl->m_aCrop
 && m_pImpl->m_eState == rOther.m_pImpl->m_eState
 && m_pImpl->m_fDuration == rOther.m_pImpl->m_fDuration
 && m_pImpl->m_fTime == rOther.m_pImpl->m_fTime
@@ -193,6 +196,9 @@ bool MediaItem::merge(const MediaItem& rMediaItem)
 if (nMaskSet & AVMediaSetMask::GRAPHIC)
 bChanged |= setGraphic(rMediaItem.getGraphic());
 
+if (nMaskSet & AVMediaSetMask::CROP)
+bChanged |= setCrop(rMediaItem.getCrop());
+
 if( AVMediaSetMask::STATE & nMaskSet )
 bChanged |= setState( rMediaItem.getState() );
 
@@ -275,6 +281,17 @@ bool MediaItem::setGraphic(const Graphic& rGraphic)
 
 const Graphic & MediaItem::getGraphic() const { return m_pImpl->m_aGraphic; }
 
+bool MediaItem::setCrop(const text::GraphicCrop& rCrop)
+{
+m_pImpl->m_nMaskSet |= AVMediaSetMask::CROP;
+bool bChanged = rCrop != m_pImpl->m_aCrop;
+if (bChanged)
+m_pImpl->m_aCrop = rCrop;
+return bChanged;
+}
+
+const text::GraphicCrop& MediaItem::getCrop() const { return m_pImpl->m_aCrop; 
}
+
 bool MediaItem::setState(MediaState eState)
 {
 m_pImpl->m_nMaskSet |= AVMediaSetMask::STATE;
diff --git a/include/avmedia/mediaitem.hxx b/include/avmedia/mediaitem.hxx
index 5d033b7efba1..bbb5e06e49b1 100644
--- a/include/avmedia/mediaitem.hxx
+++ b/include/avmedia/mediaitem.hxx
@@ -33,6 +33,7 @@ namespace com::sun::star::embed { class XStorage; }
 namespace com::sun::star::frame { class XModel; }
 namespace com::sun::star::io { class XInputStream; }
 namespace com::sun::star::io { class XStream; }
+namespace com::sun::star::text { struct GraphicCrop; }
 class Graphic;
 
 enum class AVMediaSetMask
@@ -48,11 +49,12 @@ enum class AVMediaSetMask
 URL = 0x080,
 MIME_TYPE   = 0x100,
 GRAPHIC = 0x200,
-ALL = 0x3ff,
+CROP= 0x400,
+ALL = 0x7ff,
 };
 namespace o3tl
 {
-template<> struct typed_flags : 
is_typed_flags {};
+template<> struct typed_flags : 
is_typed_flags {};
 }
 
 
@@ -120,6 +122,8 @@ public:
 OUStringgetMimeType() const;
 bool setGraphic(const Graphic& rGraphic);
 const Graphic & getGraphic() const;
+bool setCrop(const css::text::GraphicCrop& rCrop);
+const css::text::GraphicCrop& getCrop() const;
 const OUString& getTempURL() const;
 
 const OUString& getReferer() const;
diff --git a/svx/qa/unit/data/video-snapshot.pptx 

[Libreoffice-commits] core.git: avmedia/source

2022-08-25 Thread Michael Weghorn (via logerrit)
 avmedia/source/gtk/gtkplayer.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 53b5b720d33b93b2d05a845b28dbc7709eb4d9e1
Author: Michael Weghorn 
AuthorDate: Thu Aug 25 09:12:11 2022 +0200
Commit: Caolán McNamara 
CommitDate: Thu Aug 25 09:49:49 2022 +0200

avmedia gtk: Fix build for Gtk >= 4.7.2 ('-Werror=deprecated-declarations')

Failed like this:

.../libreoffice/avmedia/source/gtk/gtkplayer.cxx: In member function 
‘virtual com::sun::star::uno::Reference 
avmedia::gtk::GtkPlayer::createPlayerWindow(const 
com::sun::star::uno::Sequence&)’:
.../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 | voidgtk_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 
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 
Reviewed-by: Caolán McNamara 

diff --git a/avmedia/source/gtk/gtkplayer.cxx b/avmedia/source/gtk/gtkplayer.cxx
index bf73f4732c4a..08b5f10c5b6d 100644
--- a/avmedia/source/gtk/gtkplayer.cxx
+++ b/avmedia/source/gtk/gtkplayer.cxx
@@ -343,7 +343,11 @@ uno::Reference<::media::XPlayerWindow>
 return nullptr;
 
 m_pVideo = gtk_picture_new_for_paintable(GDK_PAINTABLE(m_pStream));
+#if GTK_CHECK_VERSION(4, 7, 2)
+gtk_picture_set_content_fit(GTK_PICTURE(m_pVideo), GTK_CONTENT_FIT_FILL);
+#else
 gtk_picture_set_keep_aspect_ratio(GTK_PICTURE(m_pVideo), false);
+#endif
 gtk_widget_set_can_target(m_pVideo, false);
 gtk_widget_set_vexpand(m_pVideo, true);
 gtk_widget_set_hexpand(m_pVideo, true);


[Libreoffice-commits] core.git: avmedia/source

2022-08-15 Thread Andrea Gelmini (via logerrit)
 avmedia/source/gtk/gtkplayer.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit cb954e21aaa9166d762fe6c4a1d956c63820e6d4
Author: Andrea Gelmini 
AuthorDate: Sat Aug 13 22:46:48 2022 +0200
Commit: Julien Nabet 
CommitDate: Mon Aug 15 08:40:47 2022 +0200

Fix typo

Change-Id: I1bc4d4649fbf4d2cfe8e93bc3a4fca64804de6b7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138241
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/avmedia/source/gtk/gtkplayer.cxx b/avmedia/source/gtk/gtkplayer.cxx
index b988e7f19684..bf73f4732c4a 100644
--- a/avmedia/source/gtk/gtkplayer.cxx
+++ b/avmedia/source/gtk/gtkplayer.cxx
@@ -68,7 +68,7 @@ void GtkPlayer::cleanup()
 uninstallNotify();
 
 // shouldn't have to attempt this unref on idle, but with gtk4-4.4.1 I 
get
-// intermittent "instance of invalid non-instantiatable type '(null)'"
+// intermittent "instance of invalid non-instantiable type '(null)'"
 // on some mysterious gst dbus callback
 if (g_main_context_default())
 g_idle_add_full(G_PRIORITY_DEFAULT_IDLE, gtk_media_stream_unref, 
m_pStream, nullptr);


[Libreoffice-commits] core.git: avmedia/source basctl/source xmloff/source xmlsecurity/source

2022-07-07 Thread Noel Grandin (via logerrit)
 avmedia/source/framework/mediaitem.cxx|8 +++---
 basctl/source/basicide/baside2b.cxx   |4 +--
 basctl/source/basicide/basobj3.cxx|4 ---
 basctl/source/basicide/bastypes.cxx   |8 +-
 xmloff/source/style/fonthdl.cxx   |2 -
 xmloff/source/text/txtfldi.cxx|9 
+++
 xmloff/source/transform/DocumentTContext.cxx  |   12 
--
 xmloff/source/transform/TransformerBase.cxx   |4 ---
 xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx |7 +++--
 xmlsecurity/source/xmlsec/nss/sanextension_nssimpl.cxx|4 +--
 xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx |5 ++--
 11 files changed, 29 insertions(+), 38 deletions(-)

New commits:
commit adf419792743a4c79b2054e42618dff75bb552ce
Author: Noel Grandin 
AuthorDate: Thu Jul 7 13:05:57 2022 +0200
Commit: Noel Grandin 
CommitDate: Thu Jul 7 15:21:33 2022 +0200

elide some string copies

Change-Id: I3e0d9f7e5a446689e007b9d01fb1c6bf9bc068e9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136880
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/avmedia/source/framework/mediaitem.cxx 
b/avmedia/source/framework/mediaitem.cxx
index 0a53cf5d4d39..7d249c604b6b 100644
--- a/avmedia/source/framework/mediaitem.cxx
+++ b/avmedia/source/framework/mediaitem.cxx
@@ -406,13 +406,13 @@ CreateStream(uno::Reference const& 
xStorage,
 
 if (xStorage->hasByName(filename))
 {
-OUString basename;
-OUString suffix;
+std::u16string_view basename;
+std::u16string_view suffix;
 sal_Int32 const nIndex(rFilename.lastIndexOf('.'));
 if (0 < nIndex)
 {
-basename = rFilename.copy(0, nIndex);
-suffix = rFilename.copy(nIndex);
+basename = rFilename.subView(0, nIndex);
+suffix = rFilename.subView(nIndex);
 }
 sal_Int32 count(0); // sigh... try to generate non-existent name
 do
diff --git a/basctl/source/basicide/baside2b.cxx 
b/basctl/source/basicide/baside2b.cxx
index df8196570653..fbda4447191e 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -719,9 +719,9 @@ TextSelection 
EditorWindow::GetLastHighlightPortionTextSelection() const
 if( aPortions.empty() )
 return TextSelection();
 
-OUString sStr = aLine.copy( r.nBegin, r.nEnd - r.nBegin );
+std::u16string_view sStr = aLine.subView( r.nBegin, r.nEnd - r.nBegin );
 TextPaM aStart( nLine, r.nBegin );
-TextPaM aEnd( nLine, r.nBegin + sStr.getLength() );
+TextPaM aEnd( nLine, r.nBegin + sStr.size() );
 return TextSelection( aStart, aEnd );
 }
 
diff --git a/basctl/source/basicide/basobj3.cxx 
b/basctl/source/basicide/basobj3.cxx
index 26de81e35cb9..a470461be6a7 100644
--- a/basctl/source/basicide/basobj3.cxx
+++ b/basctl/source/basicide/basobj3.cxx
@@ -105,9 +105,7 @@ SbMethod* CreateMacro( SbModule* pModule, const OUString& 
rMacroName )
 aOUSource = aOUSource.copy( 0, nSourceLen-1 );
 }
 
-OUString aSubStr = "Sub " + aMacroName + "\n\nEnd Sub";
-
-aOUSource += aSubStr;
+aOUSource += "Sub " + aMacroName + "\n\nEnd Sub";
 
 // update module in library
 StarBASIC* pBasic = dynamic_cast(pModule->GetParent());
diff --git a/basctl/source/basicide/bastypes.cxx 
b/basctl/source/basicide/bastypes.cxx
index 4ebe985804d9..8d26fc4cacc8 100644
--- a/basctl/source/basicide/bastypes.cxx
+++ b/basctl/source/basicide/bastypes.cxx
@@ -584,9 +584,7 @@ void CutLines( OUString& rStr, sal_Int32 nStartLine, 
sal_Int32 nLines )
 else
 nEndPos++;
 
-OUString aEndStr = rStr.copy( nEndPos );
-rStr = rStr.copy( 0, nStartPos );
-rStr += aEndStr;
+rStr = OUString::Concat(rStr.subView( 0, nStartPos )) + rStr.subView( 
nEndPos );
 
 // erase trailing empty lines
 {
@@ -600,9 +598,7 @@ void CutLines( OUString& rStr, sal_Int32 nStartLine, 
sal_Int32 nLines )
 
 if ( n > nStartPos )
 {
-aEndStr = rStr.copy( n );
-rStr = rStr.copy( 0, nStartPos );
-rStr += aEndStr;
+rStr = OUString::Concat(rStr.subView( 0, nStartPos )) + 
rStr.subView( n );
 }
 }
 }
diff --git a/xmloff/source/style/fonthdl.cxx b/xmloff/source/style/fonthdl.cxx
index 144de999cb78..3d736a1f1a75 100644
--- a/xmloff/source/style/fonthdl.cxx
+++ b/xmloff/source/style/fonthdl.cxx
@@ -160,7 +160,7 @@ bool XMLFontFamilyNamePropHdl::exportXML( OUString& 
rStrExpValue, const uno::Any
 sValue.append( ' ' );
 }
 sal_Int32 nLen = nLast-nFirst+1;
-OUString sFamily( aStrFamilyName.copy( nFirst, nLen ) );
+std::u16string_view sFamily( 

[Libreoffice-commits] core.git: avmedia/source include/avmedia

2022-06-02 Thread Noel Grandin (via logerrit)
 avmedia/source/viewer/mediawindow.cxx |5 +++--
 include/avmedia/mediaitem.hxx |5 +++--
 include/avmedia/mediawindow.hxx   |2 +-
 3 files changed, 7 insertions(+), 5 deletions(-)

New commits:
commit f5e3ad701e28e0b7d57e434d646a6191e2c1b0c0
Author: Noel Grandin 
AuthorDate: Thu Jun 2 15:57:49 2022 +0200
Commit: Noel Grandin 
CommitDate: Thu Jun 2 17:43:58 2022 +0200

clang-tidy modernize-pass-by-value in avmedia

Change-Id: Ia579341951d3fa0a227cdfa888c380b032e2ee2c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135312
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/avmedia/source/viewer/mediawindow.cxx 
b/avmedia/source/viewer/mediawindow.cxx
index c9b7f9bf20bb..df8110f54e0d 100644
--- a/avmedia/source/viewer/mediawindow.cxx
+++ b/avmedia/source/viewer/mediawindow.cxx
@@ -23,6 +23,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -459,9 +460,9 @@ void MediaWindow::dispatchInsertAVMedia(const 
css::uno::Referencedispatch(aDispatchURL, aArgs);
 }
 
-PlayerListener::PlayerListener(const std::function&)> )
+PlayerListener::PlayerListener(std::function&)> fn)
 : PlayerListener_BASE(m_aMutex)
-, m_aFn(rFn)
+, m_aFn(std::move(fn))
 {
 }
 
diff --git a/include/avmedia/mediaitem.hxx b/include/avmedia/mediaitem.hxx
index ab9418607cb7..5d033b7efba1 100644
--- a/include/avmedia/mediaitem.hxx
+++ b/include/avmedia/mediaitem.hxx
@@ -27,6 +27,7 @@
 #include 
 
 #include 
+#include 
 
 namespace com::sun::star::embed { class XStorage; }
 namespace com::sun::star::frame { class XModel; }
@@ -151,8 +152,8 @@ OUString GetFilename(OUString const& rSourceURL);
 struct AVMEDIA_DLLPUBLIC MediaTempFile
 {
 OUString const m_TempFileURL;
-MediaTempFile(OUString const& rURL)
-: m_TempFileURL(rURL)
+MediaTempFile(OUString aURL)
+: m_TempFileURL(std::move(aURL))
 {}
 ~MediaTempFile();
 };
diff --git a/include/avmedia/mediawindow.hxx b/include/avmedia/mediawindow.hxx
index 8f48ba58cb89..e8515d77ffb4 100644
--- a/include/avmedia/mediawindow.hxx
+++ b/include/avmedia/mediawindow.hxx
@@ -66,7 +66,7 @@ namespace avmedia
 
 using WeakComponentImplHelperBase::disposing;
 public:
-PlayerListener(const std::function&)> );
+PlayerListener(std::function&)> fn);
 virtual void SAL_CALL dispose() override;
 virtual ~PlayerListener() override;
 


[Libreoffice-commits] core.git: avmedia/source include/avmedia svx/source

2022-05-19 Thread Tünde Tóth (via logerrit)
 avmedia/source/viewer/mediawindow.cxx |8 +++-
 include/avmedia/mediawindow.hxx   |4 +++-
 svx/source/svdraw/svdomedia.cxx   |4 +++-
 3 files changed, 13 insertions(+), 3 deletions(-)

New commits:
commit d4ab6a4693c0f3147b086173d5a9787f1f0eee34
Author: Tünde Tóth 
AuthorDate: Mon May 16 11:37:57 2022 +0200
Commit: László Németh 
CommitDate: Thu May 19 10:26:01 2022 +0200

tdf#148923 PPTX import: fix incorrect image in media file

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 
Reviewed-by: László Németh 

diff --git a/avmedia/source/viewer/mediawindow.cxx 
b/avmedia/source/viewer/mediawindow.cxx
index d6649a2d743c..c9b7f9bf20bb 100644
--- a/avmedia/source/viewer/mediawindow.cxx
+++ b/avmedia/source/viewer/mediawindow.cxx
@@ -363,7 +363,9 @@ uno::Reference< media::XPlayer > MediaWindow::createPlayer( 
const OUString& rURL
 return priv::MediaWindowImpl::createPlayer( rURL, rReferer, pMimeType );
 }
 
-uno::Reference< graphic::XGraphic > MediaWindow::grabFrame(const 
css::uno::Reference& xPlayer)
+uno::Reference
+MediaWindow::grabFrame(const uno::Reference& xPlayer,
+   const uno::Reference& rGraphic)
 {
 uno::Reference< graphic::XGraphic > xRet;
 std::unique_ptr< Graphic > xGraphic;
@@ -401,7 +403,11 @@ uno::Reference< graphic::XGraphic > 
MediaWindow::grabFrame(const css::uno::Refer
 }
 
 if (xGraphic)
+{
+if (rGraphic)
+xGraphic.reset(new Graphic(rGraphic));
 xRet = xGraphic->GetXGraphic();
+}
 
 return xRet;
 }
diff --git a/include/avmedia/mediawindow.hxx b/include/avmedia/mediawindow.hxx
index f398f7e56427..8f48ba58cb89 100644
--- a/include/avmedia/mediawindow.hxx
+++ b/include/avmedia/mediawindow.hxx
@@ -134,7 +134,9 @@ namespace avmedia
 
 static css::uno::Reference< css::media::XPlayer > createPlayer( const 
OUString& rURL, const OUString& rReferer, const OUString* pMimeType = nullptr );
 
-static css::uno::Reference grabFrame(const 
css::uno::Reference& rPlayer);
+static css::uno::Reference
+grabFrame(const css::uno::Reference& rPlayer,
+  const css::uno::Reference& rGraphic 
= nullptr);
 
 static css::uno::Reference< css::graphic::XGraphic > grabFrame(const 
OUString& rURL, const OUString& rReferer,
 const OUString& sMimeType, rtl::Reference 
xPreferredPixelSizeListener);
diff --git a/svx/source/svdraw/svdomedia.cxx b/svx/source/svdraw/svdomedia.cxx
index 9e011a64ce80..8ab9d45a54c6 100644
--- a/svx/source/svdraw/svdomedia.cxx
+++ b/svx/source/svdraw/svdomedia.cxx
@@ -161,7 +161,9 @@ uno::Reference< graphic::XGraphic > const & 
SdrMediaObj::getSnapshot() const
 m_xImpl->m_xPlayerListener.set(new avmedia::PlayerListener(
 [this, xCachedSnapshot, aRealURL, sReferer, sMimeType](const 
css::uno::Reference& rPlayer){
 SolarMutexGuard g;
-m_xImpl->m_xCachedSnapshot = 
avmedia::MediaWindow::grabFrame(rPlayer);
+uno::Reference xGraphic
+= m_xImpl->m_MediaProperties.getGraphic().GetXGraphic();
+m_xImpl->m_xCachedSnapshot = 
avmedia::MediaWindow::grabFrame(rPlayer, xGraphic);
 ActionChanged();
 }));
 


[Libreoffice-commits] core.git: avmedia/source

2022-05-04 Thread Stephan Bergmann (via logerrit)
 avmedia/source/viewer/mediawindow.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 574018db41b9be7619bddda098c6068efdc2886a
Author: Stephan Bergmann 
AuthorDate: Wed May 4 22:34:29 2022 +0200
Commit: Stephan Bergmann 
CommitDate: Thu May 5 07:57:49 2022 +0200

Just use Any ctor instead of makeAny in avmedia

Change-Id: Ib43fa3be2e63de8ad6967682c2b00e702eb527ca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133850
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/avmedia/source/viewer/mediawindow.cxx 
b/avmedia/source/viewer/mediawindow.cxx
index 4db6a93cf553..d6649a2d743c 100644
--- a/avmedia/source/viewer/mediawindow.cxx
+++ b/avmedia/source/viewer/mediawindow.cxx
@@ -445,10 +445,10 @@ void MediaWindow::dispatchInsertAVMedia(const 
css::uno::Reference xDispatch = 
rDispatchProvider->queryDispatch(aDispatchURL, "", 0);
 css::uno::Sequence 
aArgs(comphelper::InitPropertySequence({
-{ "URL", css::uno::makeAny(rURL) },
-{ "Size.Width", uno::makeAny(rSize.Width)},
-{ "Size.Height", uno::makeAny(rSize.Height)},
-{ "IsLink", css::uno::makeAny(bLink) },
+{ "URL", css::uno::Any(rURL) },
+{ "Size.Width", uno::Any(rSize.Width)},
+{ "Size.Height", uno::Any(rSize.Height)},
+{ "IsLink", css::uno::Any(bLink) },
 }));
 xDispatch->dispatch(aDispatchURL, aArgs);
 }


[Libreoffice-commits] core.git: avmedia/source basctl/source basic/source connectivity/source cui/source dbaccess/source desktop/source drawinglayer/source editeng/source extensions/source filter/sour

2022-04-29 Thread Noel Grandin (via logerrit)
 avmedia/source/viewer/mediawindow.cxx   |2 
 basctl/source/basicide/baside2b.cxx |1 
 basctl/source/basicide/baside3.cxx  |2 
 basic/source/basmgr/basicmanagerrepository.cxx  |5 
 basic/source/basmgr/basmgr.cxx  |6 
 basic/source/inc/namecont.hxx   |4 
 basic/source/runtime/methods.cxx|2 
 basic/source/uno/namecont.cxx   |   31 ++--
 connectivity/source/drivers/dbase/DTable.cxx|2 
 connectivity/source/inc/dbase/DTable.hxx|2 
 cui/source/dialogs/AdditionsDialog.cxx  |2 
 cui/source/dialogs/cuigaldlg.cxx|2 
 cui/source/dialogs/hldocntp.cxx |2 
 cui/source/dialogs/hldoctp.cxx  |2 
 cui/source/dialogs/scriptdlg.cxx|4 
 cui/source/inc/cuigaldlg.hxx|2 
 cui/source/inc/hldocntp.hxx |2 
 cui/source/inc/hldoctp.hxx  |2 
 cui/source/inc/scriptdlg.hxx|2 
 cui/source/options/personalization.cxx  |2 
 dbaccess/source/core/dataaccess/databaseregistrations.cxx   |6 
 dbaccess/source/ui/dlg/ConnectionHelper.cxx |2 
 dbaccess/source/ui/dlg/ConnectionHelper.hxx |2 
 dbaccess/source/ui/dlg/dbwizsetup.cxx   |2 
 dbaccess/source/ui/inc/dbwizsetup.hxx   |2 
 desktop/source/migration/migration.cxx  |6 
 desktop/source/migration/migration_impl.hxx |2 
 drawinglayer/source/tools/emfpimage.cxx |4 
 editeng/source/items/frmitems.cxx   |2 
 editeng/source/items/legacyitem.cxx |4 
 extensions/source/propctrlr/defaultforminspection.cxx   |2 
 extensions/source/propctrlr/pcrcommon.cxx   |4 
 extensions/source/propctrlr/pcrcommon.hxx   |4 
 filter/source/graphic/GraphicExportFilter.cxx   |2 
 filter/source/msfilter/escherex.cxx |4 
 filter/source/msfilter/msdffimp.cxx |2 
 filter/source/svg/svgfilter.cxx |2 
 filter/source/xsltdialog/xmlfilterjar.cxx   |2 
 filter/source/xsltdialog/xmlfilterjar.hxx   |2 
 filter/source/xsltdialog/xmlfiltertestdialog.cxx|2 
 forms/source/xforms/submission/submission.hxx   |2 
 forms/source/xforms/submission/submission_get.cxx   |2 
 forms/source/xforms/submission/submission_get.hxx   |2 
 forms/source/xforms/submission/submission_post.cxx  |2 
 forms/source/xforms/submission/submission_post.hxx  |2 
 forms/source/xforms/submission/submission_put.cxx   |2 
 forms/source/xforms/submission/submission_put.hxx   |2 
 fpicker/source/office/fileview.cxx  |4 
 fpicker/source/office/foldertree.cxx|2 
 fpicker/source/office/foldertree.hxx|2 
 fpicker/source/office/iodlg.cxx |4 
 fpicker/source/office/iodlg.hxx |2 
 framework/source/fwe/classes/addonsoptions.cxx  |2 
 framework/source/fwe/helper/titlehelper.cxx |2 
 framework/source/services/pathsettings.cxx  |4 
 framework/source/uielement/generictoolbarcontroller.cxx |6 
 framework/source/uielement/imagebuttontoolbarcontroller.cxx |2 
 include/avmedia/mediawindow.hxx |2 
 include/basic/basmgr.hxx|4 
 include/framework/titlehelper.hxx   |2 
 include/sfx2/docfile.hxx|2 
 include/sfx2/doctempl.hxx   |4 
 include/sfx2/frmdescr.hxx   |2 
 include/sfx2/frmhtml.hxx|2 
 include/sfx2/objsh.hxx  |2 
 include/sfx2/sfxhtml.hxx|6 
 include/sfx2/templatelocalview.hxx  |6 
 include/svl/documentlockfile.hxx|2 
 include/svl/inethist.hxx|2 
 include/svl/lockfilecommon.hxx  |2 
 include/svl/msodocumentlockfile.hxx |6 
 include/svl/sharecontrolfile.hxx|2 
 

[Libreoffice-commits] core.git: avmedia/source

2022-04-13 Thread xuenhua (via logerrit)
 avmedia/source/framework/soundhandler.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0be48023938b74e1bde3b675bbc5481df7550470
Author: xuenhua 
AuthorDate: Tue Apr 12 22:20:09 2022 +0800
Commit: Ilmari Lauhakangas 
CommitDate: Wed Apr 13 15:07:01 2022 +0200

Fix typo

Change-Id: I77ee60e6e7c5482f49cb671d793687f831856628
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132918
Reviewed-by: Ilmari Lauhakangas 
Tested-by: Ilmari Lauhakangas 

diff --git a/avmedia/source/framework/soundhandler.cxx 
b/avmedia/source/framework/soundhandler.cxx
index 7d26c252201b..2392c3dd1ae1 100644
--- a/avmedia/source/framework/soundhandler.cxx
+++ b/avmedia/source/framework/soundhandler.cxx
@@ -144,7 +144,7 @@ SoundHandler::~SoundHandler()
 
 @short  try to load audio file
 @descr  This method try to load given audio file by URL and play it. 
We use vcl/Sound class to do that.
-Playing of sound is asynchron every time.
+Playing of sound is asynchronous every time.
 
 @attention  We must hold us alive by ourself ... because we use async. vcl 
sound player ... but playing is started
 in async interface call "dispatch()" too. And caller forget us 
immediately. But then our uno ref count


[Libreoffice-commits] core.git: avmedia/source basic/source canvas/source codemaker/source compilerplugins/clang connectivity/source cui/source dbaccess/source desktop/source extensions/source filter/

2022-04-10 Thread Noel Grandin (via logerrit)
 avmedia/source/viewer/mediawindow.cxx|7 -
 basic/source/basmgr/basmgr.cxx   |3 
 canvas/source/factory/cf_service.cxx |5 -
 codemaker/source/codemaker/global.cxx|3 
 codemaker/source/commoncpp/commoncpp.cxx |3 
 compilerplugins/clang/stringview.cxx |   25 +
 connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx |7 -
 cui/source/customize/SvxNotebookbarConfigPage.cxx|6 -
 cui/source/dialogs/cuigaldlg.cxx |3 
 cui/source/options/optpath.cxx   |3 
 cui/source/tabpages/macroass.cxx |3 
 dbaccess/source/core/dataaccess/documentcontainer.cxx|3 
 dbaccess/source/ui/dlg/ConnectionPage.cxx|3 
 dbaccess/source/ui/misc/TokenWriter.cxx  |3 
 dbaccess/source/ui/querydesign/QueryDesignView.cxx   |5 -
 dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx|9 +
 dbaccess/source/ui/querydesign/querycontroller.cxx   |3 
 dbaccess/source/ui/tabledesign/TableController.cxx   |3 
 desktop/source/deployment/registry/dp_registry.cxx   |7 -
 desktop/source/lib/init.cxx  |5 -
 extensions/source/abpilot/abpfinalpage.cxx   |3 
 filter/source/svg/svgwriter.cxx  |3 
 idlc/source/astscope.cxx |2 
 idlc/source/idlcproduce.cxx  |3 
 include/o3tl/string_view.hxx |   50 +--
 l10ntools/source/lngmerge.cxx|2 
 oox/source/dump/dumperbase.cxx   |3 
 oox/source/helper/attributelist.cxx  |2 
 oox/source/ole/axcontrol.cxx |2 
 sal/rtl/bootstrap.cxx|5 -
 sc/source/core/data/documen4.cxx |5 -
 sc/source/filter/html/htmlpars.cxx   |3 
 sc/source/filter/oox/pagesettings.cxx|8 -
 sc/source/ui/cctrl/checklistmenu.cxx |3 
 sc/source/ui/dbgui/asciiopt.cxx  |   13 +-
 sc/source/ui/dbgui/dbnamdlg.cxx  |3 
 sc/source/ui/dbgui/imoptdlg.cxx  |   13 +-
 sc/source/ui/dbgui/scuiimoptdlg.cxx  |5 -
 sc/source/ui/docshell/docfunc.cxx|3 
 sc/source/ui/docshell/docsh4.cxx |5 -
 sc/source/ui/docshell/docsh8.cxx |3 
 sc/source/ui/miscdlgs/crnrdlg.cxx|5 -
 sc/source/ui/miscdlgs/scuiautofmt.cxx|5 -
 sc/source/ui/optdlg/tpusrlst.cxx |7 -
 sc/source/ui/view/viewdata.cxx   |3 
 sd/source/core/CustomAnimationPreset.cxx |3 
 sd/source/filter/ppt/pptin.cxx   |3 
 sd/source/ui/dlg/tpaction.cxx|3 
 sdext/source/minimizer/optimizerdialog.cxx   |3 
 sfx2/source/appl/newhelp.cxx |9 +
 sfx2/source/bastyp/mieclip.cxx   |2 
 sfx2/source/doc/autoredactdialog.cxx |3 
 sfx2/source/doc/objmisc.cxx  |3 
 starmath/source/edit.cxx |3 
 starmath/source/mathml/mathmlimport.cxx  |3 
 starmath/source/ooxmlimport.cxx  |3 
 svx/source/gallery2/galini.cxx   |5 -
 sw/source/core/doc/docfld.cxx|3 
 sw/source/core/doc/docredln.cxx  |3 
 sw/source/core/fields/cellfml.cxx|2 
 sw/source/core/fields/dbfld.cxx  |5 -
 sw/source/core/unocore/unosect.cxx   |3 
 sw/source/filter/ww8/docxattributeoutput.cxx |2 
 sw/source/filter/ww8/ww8atr.cxx  |3 
 sw/source/ui/dbui/mmresultdialogs.cxx|2 
 sw/source/ui/dialog/uiregionsw.cxx   |5 -
 sw/source/ui/index/cnttab.cxx|2 
 sw/source/ui/misc/bookmark.cxx   |3 
 sw/source/ui/misc/glosbib.cxx|5 -
 sw/source/uibase/dochdl/gloshdl.cxx  |3 
 sw/source/uibase/dochdl/swdtflvr.cxx 

[Libreoffice-commits] core.git: avmedia/source

2022-03-29 Thread offtkp (via logerrit)
 avmedia/source/framework/MediaControlBase.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 64888968b30fb387d8c2536664117915e5423b0c
Author: offtkp 
AuthorDate: Sun Mar 27 21:54:20 2022 +0300
Commit: Hossein 
CommitDate: Tue Mar 29 13:27:41 2022 +0200

tdf#145614 Convert #define to constexpr

Change-Id: I2c57e2021a224fb7f69d1de5cf0f809a7d2422b3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132151
Tested-by: Jenkins
Reviewed-by: Hossein 

diff --git a/avmedia/source/framework/MediaControlBase.cxx 
b/avmedia/source/framework/MediaControlBase.cxx
index 16ab1df32aa2..534c27c2c33c 100644
--- a/avmedia/source/framework/MediaControlBase.cxx
+++ b/avmedia/source/framework/MediaControlBase.cxx
@@ -26,8 +26,8 @@
 #include 
 
 constexpr sal_Int32 AVMEDIA_DB_RANGE = -40;
-#define AVMEDIA_LINEINCREMENT   1.0
-#define AVMEDIA_PAGEINCREMENT   10.0
+constexpr double AVMEDIA_LINEINCREMENT = 1.0;
+constexpr double AVMEDIA_PAGEINCREMENT = 10.0;
 
 namespace avmedia {
 


[Libreoffice-commits] core.git: avmedia/source basic/source connectivity/source dbaccess/source extensions/source include/systools

2022-03-22 Thread Mike Kaganski (via logerrit)
 avmedia/source/win/framegrabber.cxx   |   10 
 basic/source/sbx/sbxdec.cxx   |9 
 connectivity/source/drivers/ado/AConnection.cxx   |3 
 connectivity/source/drivers/ado/ADatabaseMetaDataImpl.cxx |   11 
 connectivity/source/drivers/ado/AUsers.cxx|3 
 connectivity/source/drivers/ado/AView.cxx |8 
 connectivity/source/drivers/ado/AViews.cxx|4 
 connectivity/source/drivers/ado/Aolevariant.cxx   |   62 
 connectivity/source/drivers/ado/Awrapado.cxx  |  207 +++---
 connectivity/source/drivers/ado/adoimp.cxx|5 
 connectivity/source/inc/ado/Aolevariant.hxx   |   21 -
 connectivity/source/inc/ado/adoimp.hxx|5 
 dbaccess/source/ui/dlg/adodatalinks.cxx   |   14 
 extensions/source/activex/SOActiveX.cxx   |   16 -
 extensions/source/activex/SOActiveX.h |2 
 extensions/source/config/WinUserInfo/WinUserInfoBe.cxx|   23 -
 include/systools/win32/oleauto.hxx|   84 +
 17 files changed, 244 insertions(+), 243 deletions(-)

New commits:
commit a2c3ef6d8108355ce5daf6ff72310ac93ae745f0
Author: Mike Kaganski 
AuthorDate: Tue Mar 22 21:18:04 2022 +0300
Commit: Mike Kaganski 
CommitDate: Tue Mar 22 22:23:56 2022 +0100

Move BSTR wrapper to systools, and fix some wrong BSTR uses

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 

diff --git a/avmedia/source/win/framegrabber.cxx 
b/avmedia/source/win/framegrabber.cxx
index a2adc90b7072..547b3ffa6a59 100644
--- a/avmedia/source/win/framegrabber.cxx
+++ b/avmedia/source/win/framegrabber.cxx
@@ -38,6 +38,7 @@
 #include 
 #include 
 #include 
+#include 
 
 constexpr OUStringLiteral AVMEDIA_WIN_FRAMEGRABBER_IMPLEMENTATIONNAME = 
u"com.sun.star.comp.avmedia.FrameGrabber_DirectX";
 constexpr OUStringLiteral AVMEDIA_WIN_FRAMEGRABBER_SERVICENAME = 
u"com.sun.star.media.FrameGrabber_DirectX";
@@ -69,15 +70,8 @@ sal::systools::COMReference implCreateMediaDet( 
const OUString& rURL
 if( osl::FileBase::getSystemPathFromFileURL( rURL, aLocalStr )
 == osl::FileBase::E_None )
 {
-BSTR bstrFilename = SysAllocString(o3tl::toW(aLocalStr.getStr()));
-if( !SUCCEEDED( pDet->put_Filename( bstrFilename ) ) )
-{
-// Shouldn't we free this string unconditionally, not only in 
case of failure?
-// I cannot find information why do we pass a newly allocated 
BSTR to the put_Filename
-// and if it frees the string internally
-SysFreeString(bstrFilename);
+if( !SUCCEEDED( pDet->put_Filename(sal::systools::BStr(aLocalStr)) 
) )
 pDet.clear();
-}
 }
 }
 
diff --git a/basic/source/sbx/sbxdec.cxx b/basic/source/sbx/sbxdec.cxx
index 3c8f1eec4d78..cad5601f2f7b 100644
--- a/basic/source/sbx/sbxdec.cxx
+++ b/basic/source/sbx/sbxdec.cxx
@@ -17,7 +17,11 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include 
+#ifdef _WIN32
 #include 
+#include 
+#endif
 
 #include 
 #include "sbxconv.hxx"
@@ -338,7 +342,7 @@ void SbxDecimal::getString( OUString& rString )
 #ifdef _WIN32
 static LCID nLANGID = MAKELANGID( LANG_ENGLISH, SUBLANG_ENGLISH_US );
 
-BSTR pBStr = nullptr;
+sal::systools::BStr pBStr;
 // VarBstrFromDec allocates new BSTR that needs to be released with 
SysFreeString
 HRESULT hResult = VarBstrFromDec( , nLANGID, 0,  );
 if( hResult == S_OK )
@@ -362,8 +366,7 @@ void SbxDecimal::getString( OUString& rString )
 i++;
 }
 }
-rString = o3tl::toU( pBStr );
-SysFreeString( pBStr );
+rString = pBStr;
 }
 #else
 (void)rString;
diff --git 

[Libreoffice-commits] core.git: avmedia/source connectivity/source extensions/source fpicker/source include/systools vcl/win

2022-03-22 Thread Mike Kaganski (via logerrit)
 avmedia/source/win/framegrabber.cxx   |2 -
 avmedia/source/win/player.cxx |2 -
 connectivity/source/drivers/ado/AColumn.cxx   |2 -
 connectivity/source/drivers/ado/AConnection.cxx   |2 -
 connectivity/source/drivers/ado/ADatabaseMetaDataImpl.cxx |8 ++--
 connectivity/source/drivers/ado/AGroup.cxx|2 -
 connectivity/source/drivers/ado/Awrapado.cxx  |6 +--
 extensions/source/config/WinUserInfo/WinUserInfoBe.cxx|4 +-
 fpicker/source/win32/VistaFilePickerImpl.cxx  |2 -
 include/systools/win32/comtools.hxx   |   26 +-
 vcl/win/app/fileregistration.cxx  |7 +--
 11 files changed, 28 insertions(+), 35 deletions(-)

New commits:
commit 561cb62a5ac81053e89ec9bf1eed739801570c2d
Author: Mike Kaganski 
AuthorDate: Tue Mar 22 10:05:39 2022 +0300
Commit: Mike Kaganski 
CommitDate: Tue Mar 22 09:01:58 2022 +0100

Simplify CoCreateInstance / CoGetClassObject with COMReference

Change-Id: Ieb1035410c3c6c4b40ea779e829a940460d19b5a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131922
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/avmedia/source/win/framegrabber.cxx 
b/avmedia/source/win/framegrabber.cxx
index 42e30219caf3..a2adc90b7072 100644
--- a/avmedia/source/win/framegrabber.cxx
+++ b/avmedia/source/win/framegrabber.cxx
@@ -62,7 +62,7 @@ sal::systools::COMReference implCreateMediaDet( 
const OUString& rURL
 {
 sal::systools::COMReference pDet;
 
-if( SUCCEEDED(pDet.TryCoCreateInstance(CLSID_MediaDet, nullptr, 
CLSCTX_INPROC_SERVER)) )
+if( SUCCEEDED(pDet.CoCreateInstance(CLSID_MediaDet, nullptr, 
CLSCTX_INPROC_SERVER)) )
 {
 OUString aLocalStr;
 
diff --git a/avmedia/source/win/player.cxx b/avmedia/source/win/player.cxx
index 7f6660ab8462..5c05dcbc32dc 100644
--- a/avmedia/source/win/player.cxx
+++ b/avmedia/source/win/player.cxx
@@ -95,7 +95,7 @@ bool Player::create( const OUString& rURL )
 {
 boolbRet = false;
 
-if( SUCCEEDED(mpGB.TryCoCreateInstance(CLSID_FilterGraph, nullptr, 
CLSCTX_INPROC_SERVER)) )
+if( SUCCEEDED(mpGB.CoCreateInstance(CLSID_FilterGraph, nullptr, 
CLSCTX_INPROC_SERVER)) )
 {
 // Don't use the overlay mixer on Windows Vista
 // It disables the desktop composition as soon as RenderFile is called
diff --git a/connectivity/source/drivers/ado/AColumn.cxx 
b/connectivity/source/drivers/ado/AColumn.cxx
index e136e39f4e2b..a521586b9551 100644
--- a/connectivity/source/drivers/ado/AColumn.cxx
+++ b/connectivity/source/drivers/ado/AColumn.cxx
@@ -40,7 +40,7 @@ using namespace com::sun::star::sdbc;
 
 void WpADOColumn::Create()
 {
-pInterface.TryCoCreateInstance(ADOS::CLSID_ADOCOLUMN_25, nullptr, 
CLSCTX_INPROC_SERVER);
+pInterface.CoCreateInstance(ADOS::CLSID_ADOCOLUMN_25, nullptr, 
CLSCTX_INPROC_SERVER);
 }
 
 OAdoColumn::OAdoColumn(bool _bCase,OConnection* _pConnection,_ADOColumn* 
_pColumn)
diff --git a/connectivity/source/drivers/ado/AConnection.cxx 
b/connectivity/source/drivers/ado/AConnection.cxx
index 5b44d9e6f4fb..c393d6a4dc3e 100644
--- a/connectivity/source/drivers/ado/AConnection.cxx
+++ b/connectivity/source/drivers/ado/AConnection.cxx
@@ -59,7 +59,7 @@ OConnection::OConnection(ODriver*   _pDriver)
 osl_atomic_increment( _refCount );
 
 sal::systools::COMReference pIUnknown;
-if (!FAILED(pIUnknown.TryCoGetClassObject(ADOS::CLSID_ADOCONNECTION_21, 
CLSCTX_INPROC_SERVER)))
+if (!FAILED(pIUnknown.CoGetClassObject(ADOS::CLSID_ADOCONNECTION_21, 
CLSCTX_INPROC_SERVER)))
 {
 HRESULT hr = pIUnknown->CreateInstanceLic(nullptr,
 nullptr,
diff --git a/connectivity/source/drivers/ado/ADatabaseMetaDataImpl.cxx 
b/connectivity/source/drivers/ado/ADatabaseMetaDataImpl.cxx
index 42cf95a827ae..037fdb6fe41d 100644
--- a/connectivity/source/drivers/ado/ADatabaseMetaDataImpl.cxx
+++ b/connectivity/source/drivers/ado/ADatabaseMetaDataImpl.cxx
@@ -385,7 +385,7 @@ RightsEnum OAdoGroup::Map2Right(sal_Int32 _eNum)
 
 void WpADOIndex::Create()
 {
-pInterface.TryCoCreateInstance(ADOS::CLSID_ADOINDEX_25, nullptr, 
CLSCTX_INPROC_SERVER);
+pInterface.CoCreateInstance(ADOS::CLSID_ADOINDEX_25, nullptr, 
CLSCTX_INPROC_SERVER);
 }
 
 void OAdoIndex::fillPropertyValues()
@@ -401,7 +401,7 @@ void OAdoIndex::fillPropertyValues()
 
 void WpADOKey::Create()
 {
-pInterface.TryCoCreateInstance(ADOS::CLSID_ADOKEY_25, nullptr, 
CLSCTX_INPROC_SERVER);
+pInterface.CoCreateInstance(ADOS::CLSID_ADOKEY_25, nullptr, 
CLSCTX_INPROC_SERVER);
 }
 
 void OAdoKey::fillPropertyValues()
@@ -498,7 +498,7 @@ KeyTypeEnum OAdoKey::Map2KeyRule(sal_Int32 _eNum)
 
 void WpADOTable::Create()
 {
-pInterface.TryCoCreateInstance(ADOS::CLSID_ADOTABLE_25, nullptr, 
CLSCTX_INPROC_SERVER);
+pInterface.CoCreateInstance(ADOS::CLSID_ADOTABLE_25, 

[Libreoffice-commits] core.git: avmedia/source sd/qa

2022-03-04 Thread Andrea Gelmini (via logerrit)
 avmedia/source/viewer/mediawindow.cxx|2 +-
 sd/qa/unit/tiledrendering/tiledrendering.cxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 626e05a221909bcb068b5ef6af8be9356ce6d640
Author: Andrea Gelmini 
AuthorDate: Fri Mar 4 13:07:23 2022 +0100
Commit: Julien Nabet 
CommitDate: Fri Mar 4 16:30:05 2022 +0100

Fix typos

Change-Id: I4b26b105e4c16b1860389deb7a629ff139bd260c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130976
Tested-by: Julien Nabet 
Reviewed-by: Julien Nabet 

diff --git a/avmedia/source/viewer/mediawindow.cxx 
b/avmedia/source/viewer/mediawindow.cxx
index f3c034146f1d..521e624db386 100644
--- a/avmedia/source/viewer/mediawindow.cxx
+++ b/avmedia/source/viewer/mediawindow.cxx
@@ -323,7 +323,7 @@ bool MediaWindow::isMediaURL(const OUString& rURL, const 
OUString& rReferer, boo
 uno::Reference 
xPlayerNotifier(xPlayer, css::uno::UNO_QUERY);
 if (xPlayerNotifier)
 {
-// wait until its possible to query this to get a 
sensible answer
+// wait until it's possible to query this to get a 
sensible answer
 
xPreferredPixelSizeListener->startListening(xPlayerNotifier);
 }
 else
diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx 
b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index 5fabb1fe3038..d5972c459e92 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -2581,7 +2581,7 @@ void SdTiledRenderingTest::testRegenerateDiagram()
 SdPage* pActualPage = 
pXImpressDocument->GetDocShell()->GetViewShell()->GetActualPage();
 CPPUNIT_ASSERT_EQUAL(static_cast(4), 
pActualPage->GetObj(0)->GetSubList()->GetObjCount());
 
-// For new Diagram funcionality entering group using UI is not allowed as 
long
+// For new Diagram functionality entering group using UI is not allowed as 
long
 // as the group shape is a diagram. Do the same as before done by 
triggering UI
 // events directly in the model
 // Remove and free top-left entry (Box showing "A")


[Libreoffice-commits] core.git: avmedia/source include/avmedia sc/source sd/source sfx2/sdi svx/source sw/source

2022-03-01 Thread Caolán McNamara (via logerrit)
 avmedia/source/gtk/gtkplayer.cxx  |  130 --
 avmedia/source/gtk/gtkplayer.hxx  |   20 -
 avmedia/source/viewer/mediawindow.cxx |  127 +
 include/avmedia/mediawindow.hxx   |   47 ++--
 sc/source/ui/drawfunc/fuins1.cxx  |   57 ++
 sd/source/ui/func/fuinsert.cxx|   99 +
 sd/source/ui/inc/View.hxx |3 
 sd/source/ui/inc/fuinsert.hxx |5 +
 sd/source/ui/view/sdview.cxx  |7 +
 sd/source/ui/view/sdview4.cxx |   57 +-
 sfx2/sdi/sfx.sdi  |6 +
 svx/source/svdraw/svdomedia.cxx   |   15 +++
 sw/source/uibase/shells/grfshex.cxx   |  118 ++
 13 files changed, 512 insertions(+), 179 deletions(-)

New commits:
commit 05db887bc226b85befe2c2b9e84b796020a6ca05
Author: Caolán McNamara 
AuthorDate: Mon Feb 21 10:01:42 2022 +
Commit: Caolán McNamara 
CommitDate: Tue Mar 1 18:38:27 2022 +0100

gtk4: media dimensions are only reliably available async

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 

diff --git a/avmedia/source/gtk/gtkplayer.cxx b/avmedia/source/gtk/gtkplayer.cxx
index 7ce488f231ec..b988e7f19684 100644
--- a/avmedia/source/gtk/gtkplayer.cxx
+++ b/avmedia/source/gtk/gtkplayer.cxx
@@ -37,8 +37,12 @@ namespace avmedia::gtk
 {
 GtkPlayer::GtkPlayer()
 : GtkPlayer_BASE(m_aMutex)
+, m_lListener(m_aMutex)
 , m_pStream(nullptr)
 , m_pVideo(nullptr)
+, m_nNotifySignalId(0)
+, m_nInvalidateSizeSignalId(0)
+, m_nTimeoutId(0)
 , m_nUnmutedVolume(0)
 {
 }
@@ -61,6 +65,8 @@ void GtkPlayer::cleanup()
 
 if (m_pStream)
 {
+uninstallNotify();
+
 // shouldn't have to attempt this unref on idle, but with gtk4-4.4.1 I 
get
 // intermittent "instance of invalid non-instantiatable type '(null)'"
 // on some mysterious gst dbus callback
@@ -81,6 +87,51 @@ void SAL_CALL GtkPlayer::disposing()
 cleanup();
 }
 
+static void do_notify(GtkPlayer* pThis)
+{
+rtl::Reference xThis(pThis);
+xThis->notifyListeners();
+xThis->uninstallNotify();
+}
+
+static void invalidate_size_cb(GdkPaintable* /*pPaintable*/, GtkPlayer* pThis) 
{ do_notify(pThis); }
+
+static void notify_cb(GtkMediaStream* /*pStream*/, GParamSpec* pspec, 
GtkPlayer* pThis)
+{
+if (g_str_equal(pspec->name, "prepared") || g_str_equal(pspec->name, 
"error"))
+do_notify(pThis);
+}
+
+static bool timeout_cb(GtkPlayer* pThis)
+{
+do_notify(pThis);
+return false;
+}
+
+void GtkPlayer::installNotify()
+{
+if (m_nNotifySignalId)
+return;
+m_nNotifySignalId = g_signal_connect(m_pStream, "notify", 
G_CALLBACK(notify_cb), this);
+// notify should be enough, but there is an upstream bug so also try 
"invalidate-size" and add a timeout for
+// audio-only case where that won't happen, see: 
https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/4513
+m_nInvalidateSizeSignalId
+= g_signal_connect(m_pStream, "invalidate-size", 
G_CALLBACK(invalidate_size_cb), this);
+m_nTimeoutId = g_timeout_add_seconds(10, G_SOURCE_FUNC(timeout_cb), this);
+}
+
+void GtkPlayer::uninstallNotify()
+{
+if (!m_nNotifySignalId)
+return;
+g_signal_handler_disconnect(m_pStream, m_nNotifySignalId);
+m_nNotifySignalId = 0;
+g_signal_handler_disconnect(m_pStream, m_nInvalidateSizeSignalId);
+m_nInvalidateSizeSignalId = 0;
+g_source_remove(m_nTimeoutId);
+m_nTimeoutId = 0;
+}
+
 bool GtkPlayer::create(const OUString& rURL)
 {
 bool bRet = false;
@@ -104,6 +155,25 @@ bool GtkPlayer::create(const OUString& rURL)
 return bRet;
 }
 
+void GtkPlayer::notifyListeners()
+{
+comphelper::OInterfaceContainerHelper2* pContainer
+= 
m_lListener.getContainer(cppu::UnoType::get());
+if (!pContainer)
+return;
+
+css::lang::EventObject aEvent;
+aEvent.Source = static_cast(this);
+
+comphelper::OInterfaceIteratorHelper2 pIterator(*pContainer);
+while (pIterator.hasMoreElements())
+{
+css::uno::Reference xListener(
+static_cast(pIterator.next()));
+xListener->preferredPlayerWindowSizeAvailable(aEvent);
+}
+}
+
 void SAL_CALL GtkPlayer::start()
 {
 osl::MutexGuard aGuard(m_aMutex);
@@ -231,41 +301,6 @@ sal_Int16 SAL_CALL GtkPlayer::getVolumeDB()
 return m_nUnmutedVolume;
 }
 
-namespace
-{
-void invalidate_size(GdkPaintable* /*paintable*/, Timer* pTimer) { 
pTimer->Stop(); }
-
-Size GetPreferredPlayerWindowSize(GdkPaintable* pStream)
-{
-Size aSize(gdk_paintable_get_intrinsic_width(pStream),
-   

[Libreoffice-commits] core.git: avmedia/source include/avmedia svx/inc svx/source

2022-02-19 Thread Caolán McNamara (via logerrit)
 avmedia/source/viewer/mediawindow.cxx |8 -
 include/avmedia/mediawindow.hxx   |1 
 svx/inc/sdr/contact/viewobjectcontactofsdrmediaobj.hxx|4 
 svx/source/sdr/contact/viewobjectcontactofsdrmediaobj.cxx |   65 --
 4 files changed, 47 insertions(+), 31 deletions(-)

New commits:
commit 6f938dce6eaa927cfde39491ef7a0bc1d07df66b
Author: Caolán McNamara 
AuthorDate: Fri Feb 18 21:09:30 2022 +
Commit: Caolán McNamara 
CommitDate: Sat Feb 19 12:01:54 2022 +0100

update video pos and size after change if currently playing

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 

diff --git a/avmedia/source/viewer/mediawindow.cxx 
b/avmedia/source/viewer/mediawindow.cxx
index 6c61a7e9b361..c251f020225e 100644
--- a/avmedia/source/viewer/mediawindow.cxx
+++ b/avmedia/source/viewer/mediawindow.cxx
@@ -142,30 +142,30 @@ bool MediaWindow::start()
 return mpImpl->start();
 }
 
-
 void MediaWindow::updateMediaItem( MediaItem& rItem ) const
 {
 mpImpl->updateMediaItem( rItem );
 }
 
-
 void MediaWindow::executeMediaItem( const MediaItem& rItem )
 {
 mpImpl->executeMediaItem( rItem );
 }
 
-
 void MediaWindow::show()
 {
 mpImpl->Show();
 }
 
-
 void MediaWindow::hide()
 {
 mpImpl->Hide();
 }
 
+bool MediaWindow::isVisible() const
+{
+return mpImpl->IsVisible();
+}
 
 vcl::Window* MediaWindow::getWindow() const
 {
diff --git a/include/avmedia/mediawindow.hxx b/include/avmedia/mediawindow.hxx
index 78e0b1a299a3..d031f51adaf0 100644
--- a/include/avmedia/mediawindow.hxx
+++ b/include/avmedia/mediawindow.hxx
@@ -74,6 +74,7 @@ namespace avmedia
 
 voidshow();
 voidhide();
+boolisVisible() const;
 
 public:
 
diff --git a/svx/inc/sdr/contact/viewobjectcontactofsdrmediaobj.hxx 
b/svx/inc/sdr/contact/viewobjectcontactofsdrmediaobj.hxx
index 21fbed38142c..d362048df3db 100644
--- a/svx/inc/sdr/contact/viewobjectcontactofsdrmediaobj.hxx
+++ b/svx/inc/sdr/contact/viewobjectcontactofsdrmediaobj.hxx
@@ -51,7 +51,11 @@ namespace sdr::contact
 voidupdateMediaItem( ::avmedia::MediaItem& rItem ) const;
 voidexecuteMediaItem( const ::avmedia::MediaItem& rItem );
 
+virtual void ActionChanged() override;
+
 private:
+void updateMediaWindow() const;
+
 #if HAVE_FEATURE_AVMEDIA
 std::unique_ptr mpMediaWindow;
 #endif
diff --git a/svx/source/sdr/contact/viewobjectcontactofsdrmediaobj.cxx 
b/svx/source/sdr/contact/viewobjectcontactofsdrmediaobj.cxx
index 27768ff0777f..0241fabd5661 100644
--- a/svx/source/sdr/contact/viewobjectcontactofsdrmediaobj.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofsdrmediaobj.cxx
@@ -84,6 +84,43 @@ Size ViewObjectContactOfSdrMediaObj::getPreferredSize() const
 return aRet;
 }
 
+void ViewObjectContactOfSdrMediaObj::ActionChanged()
+{
+ViewObjectContactOfSdrObj::ActionChanged();
+if (mpMediaWindow && mpMediaWindow->isVisible())
+updateMediaWindow();
+}
+
+void ViewObjectContactOfSdrMediaObj::updateMediaWindow() const
+{
+basegfx::B2DRange aViewRange(getObjectRange());
+
aViewRange.transform(GetObjectContact().getViewInformation2D().getViewTransformation());
+
+const tools::Rectangle aViewRectangle(
+static_cast(floor(aViewRange.getMinX())), 
static_cast(floor(aViewRange.getMinY())),
+static_cast(ceil(aViewRange.getMaxX())), 
static_cast(ceil(aViewRange.getMaxY(;
+
+// mpMediaWindow contains a SalObject window and gtk won't accept
+// the size until after the SalObject widget is shown but if we
+// show it before setting a size then vcl will detect that the
+// vcl::Window has no size and make it invisible instead. If we
+// call setPosSize twice with the same size before and after show
+// then the second attempt is a no-op as vcl caches the size.
+
+// so call it initially with a size arbitrarily 1 pixel wider than
+// we want so we have an initial size to make vcl happy
+tools::Rectangle aInitialRect(aViewRectangle);
+aInitialRect.AdjustRight(1);
+mpMediaWindow->setPosSize(aInitialRect);
+
+// then make it visible
+mpMediaWindow->show();
+
+// set the final desired size which is different to let vcl send it
+// through to gtk which will now accept it as the underlying
+// m_pSocket of GtkSalObject::SetPosSize is now visible
+mpMediaWindow->setPosSize(aViewRectangle);
+}
 
 void ViewObjectContactOfSdrMediaObj::updateMediaItem( ::avmedia::MediaItem& 
rItem ) const
 {
@@ -100,33 +137,7 @@ void ViewObjectContactOfSdrMediaObj::updateMediaItem( 

[Libreoffice-commits] core.git: avmedia/source

2022-02-19 Thread Caolán McNamara (via logerrit)
 avmedia/source/gtk/gtkplayer.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit f10ac3e5bd720e363e5c76a2c841dded4859a7a0
Author: Caolán McNamara 
AuthorDate: Fri Feb 18 20:35:01 2022 +
Commit: Caolán McNamara 
CommitDate: Sat Feb 19 12:01:32 2022 +0100

gtk4: use gtk_widget_set_can_target so the video can be picked up and moved

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 

diff --git a/avmedia/source/gtk/gtkplayer.cxx b/avmedia/source/gtk/gtkplayer.cxx
index ea6276e02a59..098e8b3b6fe6 100644
--- a/avmedia/source/gtk/gtkplayer.cxx
+++ b/avmedia/source/gtk/gtkplayer.cxx
@@ -272,10 +272,12 @@ uno::Reference<::media::XPlayerWindow>
 
 m_pVideo = gtk_picture_new_for_paintable(GDK_PAINTABLE(m_pStream));
 gtk_picture_set_keep_aspect_ratio(GTK_PICTURE(m_pVideo), false);
+gtk_widget_set_can_target(m_pVideo, false);
 gtk_widget_set_vexpand(m_pVideo, true);
 gtk_widget_set_hexpand(m_pVideo, true);
 
 GtkWidget* pParent = static_cast(pEnvData->pWidget);
+gtk_widget_set_can_target(pParent, false);
 gtk_grid_attach(GTK_GRID(pParent), m_pVideo, 0, 0, 1, 1);
 gtk_widget_show(m_pVideo);
 gtk_widget_show(pParent);
@@ -355,7 +357,7 @@ uno::Reference SAL_CALL 
GtkPlayer::createFrameGrabber()
 rtl::Reference xFrameGrabber;
 SAL_WARN("avmedia.gtk", "TODO: createFrameGrabber");
 
-const awt::Size aPrefSize(getPreferredPlayerWindowSize());
+// const awt::Size aPrefSize(getPreferredPlayerWindowSize());
 
 xFrameGrabber.set(new GtkFrameGrabber(m_pStream));
 


[Libreoffice-commits] core.git: avmedia/source

2022-02-19 Thread Caolán McNamara (via logerrit)
 avmedia/source/gtk/gtkplayer.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 62d9d64c90eaf4b6d8ff20b615c5645e12a9cba9
Author: Caolán McNamara 
AuthorDate: Fri Feb 18 20:13:10 2022 +
Commit: Caolán McNamara 
CommitDate: Sat Feb 19 12:01:10 2022 +0100

gtk4: the assumption is that video is supposed to fit to the window

Change-Id: Iacc31ee978a1279c23ac895fb6f8fd610ab3113d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130176
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 

diff --git a/avmedia/source/gtk/gtkplayer.cxx b/avmedia/source/gtk/gtkplayer.cxx
index b01eaeeed630..ea6276e02a59 100644
--- a/avmedia/source/gtk/gtkplayer.cxx
+++ b/avmedia/source/gtk/gtkplayer.cxx
@@ -271,6 +271,7 @@ uno::Reference<::media::XPlayerWindow>
 return nullptr;
 
 m_pVideo = gtk_picture_new_for_paintable(GDK_PAINTABLE(m_pStream));
+gtk_picture_set_keep_aspect_ratio(GTK_PICTURE(m_pVideo), false);
 gtk_widget_set_vexpand(m_pVideo, true);
 gtk_widget_set_hexpand(m_pVideo, true);
 


[Libreoffice-commits] core.git: avmedia/source

2022-02-18 Thread Caolán McNamara (via logerrit)
 avmedia/source/inc/mediamisc.hxx   |1 -
 avmedia/source/viewer/mediawindow_impl.cxx |   14 +-
 2 files changed, 1 insertion(+), 14 deletions(-)

New commits:
commit 4da31ebb064d13f5bb180b5b3b689375246ddc00
Author: Caolán McNamara 
AuthorDate: Fri Feb 18 16:32:02 2022 +
Commit: Caolán McNamara 
CommitDate: Fri Feb 18 20:39:43 2022 +0100

there's only one media backend per platform currently

Change-Id: I8722395617929f7d710713934dd619134a318071
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130170
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/avmedia/source/inc/mediamisc.hxx b/avmedia/source/inc/mediamisc.hxx
index b0f9964d18f9..061a7177f05a 100644
--- a/avmedia/source/inc/mediamisc.hxx
+++ b/avmedia/source/inc/mediamisc.hxx
@@ -21,7 +21,6 @@
 
 #include 
 
-#define AVMEDIA_MANAGER_SERVICE_PREFERRED 
"com.sun.star.comp.avmedia.Manager_GStreamer"
 #ifdef _WIN32
 #define AVMEDIA_MANAGER_SERVICE_NAME 
"com.sun.star.comp.avmedia.Manager_DirectX"
 #else
diff --git a/avmedia/source/viewer/mediawindow_impl.cxx 
b/avmedia/source/viewer/mediawindow_impl.cxx
index 1ff4c46bd65a..7f3ec8a4f078 100644
--- a/avmedia/source/viewer/mediawindow_impl.cxx
+++ b/avmedia/source/viewer/mediawindow_impl.cxx
@@ -181,19 +181,7 @@ uno::Reference 
MediaWindowImpl::createPlayer(const OUString& rUR
 if (!pMimeType || *pMimeType == AVMEDIA_MIMETYPE_COMMON)
 {
 uno::Reference 
xContext(::comphelper::getProcessComponentContext());
-
-static std::u16string_view aServiceManagers[] =
-{
-u"" AVMEDIA_MANAGER_SERVICE_PREFERRED,
-u"" AVMEDIA_MANAGER_SERVICE_NAME,
-};
-
-for (const auto& rServiceName : aServiceManagers)
-{
-xPlayer = createPlayer(rURL, OUString(rServiceName), xContext);
-if (xPlayer)
-break;
-}
+xPlayer = createPlayer(rURL, AVMEDIA_MANAGER_SERVICE_NAME, xContext);
 }
 
 return xPlayer;


[Libreoffice-commits] core.git: avmedia/source include/avmedia

2022-02-14 Thread Caolán McNamara (via logerrit)
 avmedia/source/framework/MediaControlBase.cxx |   47 --
 include/avmedia/MediaControlBase.hxx  |1 
 2 files changed, 30 insertions(+), 18 deletions(-)

New commits:
commit 3d61c9026a8a562022fa3099472a82b60172f112
Author: Caolán McNamara 
AuthorDate: Mon Feb 14 10:59:34 2022 +
Commit: Caolán McNamara 
CommitDate: Mon Feb 14 16:23:19 2022 +0100

update play/pause/stop when one of the other changes

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 

diff --git a/avmedia/source/framework/MediaControlBase.cxx 
b/avmedia/source/framework/MediaControlBase.cxx
index eac8fc3923c5..16ab1df32aa2 100644
--- a/avmedia/source/framework/MediaControlBase.cxx
+++ b/avmedia/source/framework/MediaControlBase.cxx
@@ -128,6 +128,28 @@ void MediaControlBase::InitializeWidgets()
 mxTimeSlider->set_tooltip_text( AvmResId( AVMEDIA_STR_POSITION ));
 }
 
+void MediaControlBase::UpdatePlayState(const MediaItem& rMediaItem)
+{
+if (rMediaItem.getState() == MediaState::Play)
+{
+mxPlayToolBox->set_item_active("play", true);
+mxPlayToolBox->set_item_active("pause", false);
+mxPlayToolBox->set_item_active("stop", false);
+}
+else if( rMediaItem.getState() == MediaState::Pause )
+{
+mxPlayToolBox->set_item_active("play", false);
+mxPlayToolBox->set_item_active("pause", true);
+mxPlayToolBox->set_item_active("stop", false);
+}
+else
+{
+mxPlayToolBox->set_item_active("play", false);
+mxPlayToolBox->set_item_active("pause", false);
+mxPlayToolBox->set_item_active("stop", true);
+}
+}
+
 void MediaControlBase::UpdateToolBoxes(const MediaItem& rMediaItem)
 {
 const bool bValidURL = !rMediaItem.getURL().isEmpty();
@@ -145,24 +167,7 @@ void MediaControlBase::UpdateToolBoxes(const MediaItem& 
rMediaItem)
 {
 mxPlayToolBox->set_sensitive(true);
 mxMuteToolBox->set_sensitive(true);
-if( rMediaItem.getState() == MediaState::Play )
-{
-mxPlayToolBox->set_item_active("play", true);
-mxPlayToolBox->set_item_active("pause", false);
-mxPlayToolBox->set_item_active("stop", false);
-}
-else if( rMediaItem.getState() == MediaState::Pause )
-{
-mxPlayToolBox->set_item_active("play", false);
-mxPlayToolBox->set_item_active("pause", true);
-mxPlayToolBox->set_item_active("stop", false);
-}
-else
-{
-mxPlayToolBox->set_item_active("play", false);
-mxPlayToolBox->set_item_active("pause", false);
-mxPlayToolBox->set_item_active("stop", true);
-}
+UpdatePlayState(rMediaItem);
 mxPlayToolBox->set_item_active("loop", rMediaItem.isLoop());
 mxMuteToolBox->set_item_active("mute", rMediaItem.isMute());
 if (!mbCurrentlySettingZoom)
@@ -221,15 +226,21 @@ void MediaControlBase::SelectPlayToolBoxItem( MediaItem& 
aExecItem, MediaItem co
 aExecItem.setTime( 0.0 );
 else
 aExecItem.setTime( aItem.getTime() );
+
+UpdatePlayState(aExecItem);
 }
 else if (rId == "pause")
 {
 aExecItem.setState( MediaState::Pause );
+
+UpdatePlayState(aExecItem);
 }
 else if (rId == "stop")
 {
 aExecItem.setState( MediaState::Stop );
 aExecItem.setTime( 0.0 );
+
+UpdatePlayState(aExecItem);
 }
 else if (rId == "mute")
 {
diff --git a/include/avmedia/MediaControlBase.hxx 
b/include/avmedia/MediaControlBase.hxx
index 3d4464ce0424..1379a4364f33 100644
--- a/include/avmedia/MediaControlBase.hxx
+++ b/include/avmedia/MediaControlBase.hxx
@@ -63,6 +63,7 @@ protected:
 void UpdateVolumeSlider( MediaItem const & aMediaItem );
 void UpdateTimeSlider( MediaItem const & aMediaItem );
 void UpdateTimeField( MediaItem const & aMediaItem, double fTime );
+void UpdatePlayState(const MediaItem& rMediaItem);
 void SelectPlayToolBoxItem( MediaItem& aExecItem, MediaItem const & aItem, 
std::string_view rId);
 void disposeWidgets();
 };


[Libreoffice-commits] core.git: avmedia/source

2022-02-14 Thread Caolán McNamara (via logerrit)
 avmedia/source/gstreamer/gstplayer.cxx |   21 -
 avmedia/source/gstreamer/gstplayer.hxx |1 -
 2 files changed, 4 insertions(+), 18 deletions(-)

New commits:
commit 0414b84a8ad5a436df4354a5af1e8486334acb42
Author: Caolán McNamara 
AuthorDate: Sun Feb 13 21:26:46 2022 +
Commit: Caolán McNamara 
CommitDate: Mon Feb 14 16:22:55 2022 +0100

Related: tdf#34759 ditch PlayPending hack and use GST_STATE_TARGET

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 
Reviewed-by: Caolán McNamara 

diff --git a/avmedia/source/gstreamer/gstplayer.cxx 
b/avmedia/source/gstreamer/gstplayer.cxx
index b28be1678207..bf939c4a603b 100644
--- a/avmedia/source/gstreamer/gstplayer.cxx
+++ b/avmedia/source/gstreamer/gstplayer.cxx
@@ -285,7 +285,6 @@ Player::Player() :
 mbUseGtkSink( false ),
 mbFakeVideo (false ),
 mnUnmutedVolume( 0 ),
-mbPlayPending ( false ),
 mbMuted( false ),
 mbLooping( false ),
 mbInitialized( false ),
@@ -385,7 +384,6 @@ void Player::processMessage( GstMessage *message )
 switch( GST_MESSAGE_TYPE( message ) ) {
 case GST_MESSAGE_EOS:
 gst_element_set_state( mpPlaybin, GST_STATE_READY );
-mbPlayPending = false;
 if (mbLooping)
 start();
 break;
@@ -401,9 +399,6 @@ void Player::processMessage( GstMessage *message )
 {
 gst_video_overlay_expose(mpXOverlay);
 }
-
-if (mbPlayPending)
-mbPlayPending = ((newstate == GST_STATE_READY) || (newstate == 
GST_STATE_PAUSED));
 }
 break;
 default:
@@ -532,7 +527,6 @@ void Player::preparePlaybin( std::u16string_view rURL, 
GstElement *pSink )
 if (mpPlaybin != nullptr)
 {
 gst_element_set_state( mpPlaybin, GST_STATE_NULL );
-mbPlayPending = false;
 g_object_unref( mpPlaybin );
 }
 
@@ -597,7 +591,6 @@ bool Player::create( const OUString& rURL )
 preparePlaybin( rURL, gst_element_factory_make( "fakesink", nullptr ) 
);
 
 gst_element_set_state( mpPlaybin, GST_STATE_PAUSED );
-mbPlayPending = false;
 
 bRet = true;
 }
@@ -610,7 +603,6 @@ bool Player::create( const OUString& rURL )
 return bRet;
 }
 
-
 void SAL_CALL Player::start()
 {
 ::osl::MutexGuard aGuard(m_aMutex);
@@ -619,11 +611,9 @@ void SAL_CALL Player::start()
 if( mbInitialized && mpPlaybin != nullptr )
 {
 gst_element_set_state( mpPlaybin, GST_STATE_PLAYING );
-mbPlayPending = true;
 }
 }
 
-
 void SAL_CALL Player::stop()
 {
 ::osl::MutexGuard aGuard(m_aMutex);
@@ -632,21 +622,19 @@ void SAL_CALL Player::stop()
 if( mpPlaybin )
 gst_element_set_state( mpPlaybin, GST_STATE_PAUSED );
 
-mbPlayPending = false;
 SAL_INFO( "avmedia.gstreamer", AVVERSION "stop " << mpPlaybin );
 }
 
-
 sal_Bool SAL_CALL Player::isPlaying()
 {
 ::osl::MutexGuard aGuard(m_aMutex);
 
-boolbRet = mbPlayPending;
+bool bRet = false;
 
-// return whether the pipeline is in PLAYING STATE or not
-if( !mbPlayPending && mbInitialized && mpPlaybin )
+// return whether the pipeline target is PLAYING STATE or not
+if (mbInitialized && mpPlaybin)
 {
-bRet = GST_STATE( mpPlaybin ) == GST_STATE_PLAYING;
+bRet = GST_STATE_TARGET(mpPlaybin) == GST_STATE_PLAYING;
 }
 
 SAL_INFO( "avmedia.gstreamer", AVVERSION "isPlaying " << bRet );
@@ -654,7 +642,6 @@ sal_Bool SAL_CALL Player::isPlaying()
 return bRet;
 }
 
-
 double SAL_CALL Player::getDuration()
 {
 ::osl::MutexGuard aGuard(m_aMutex);
diff --git a/avmedia/source/gstreamer/gstplayer.hxx 
b/avmedia/source/gstreamer/gstplayer.hxx
index a82dac3f2b39..2694ac00ce7e 100644
--- a/avmedia/source/gstreamer/gstplayer.hxx
+++ b/avmedia/source/gstreamer/gstplayer.hxx
@@ -86,7 +86,6 @@ private:
 boolmbFakeVideo;
 
 gdouble mnUnmutedVolume;
-boolmbPlayPending;
 boolmbMuted;
 boolmbLooping;
 boolmbInitialized;


[Libreoffice-commits] core.git: avmedia/source

2022-02-14 Thread Caolán McNamara (via logerrit)
 avmedia/source/framework/mediacontrol.cxx |2 --
 1 file changed, 2 deletions(-)

New commits:
commit e37b9b21edccf2750816c18103b5b39d42779fac
Author: Caolán McNamara 
AuthorDate: Mon Feb 14 10:48:23 2022 +
Commit: Caolán McNamara 
CommitDate: Mon Feb 14 13:50:11 2022 +0100

can drop unneeded TODO

Change-Id: I58d65b1da1aa54716b84fc31af7550037817194a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129908
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/avmedia/source/framework/mediacontrol.cxx 
b/avmedia/source/framework/mediacontrol.cxx
index 49cee3e977d6..bb1bca959a90 100644
--- a/avmedia/source/framework/mediacontrol.cxx
+++ b/avmedia/source/framework/mediacontrol.cxx
@@ -50,8 +50,6 @@ MediaControl::MediaControl( vcl::Window* pParent, 
MediaControlStyle eControlStyl
 mxTimeEdit = m_xBuilder->weld_entry("timeedit");
 mxMediaPath = m_xBuilder->weld_label("url");
 
-// TODO SetParentClipMode( ParentClipMode::NoClip );
-
 InitializeWidgets();
 
 mxPlayToolBox->connect_clicked( LINK( this, MediaControl, implSelectHdl ) 
);


[Libreoffice-commits] core.git: avmedia/source

2022-01-17 Thread VaibhavMalik4187 (via logerrit)
 avmedia/source/viewer/mediawindow.cxx |   14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

New commits:
commit e7b01e4a5a856543e85f614c82950122e9598518
Author: VaibhavMalik4187 
AuthorDate: Fri Jan 14 18:28:26 2022 +0530
Commit: Hossein 
CommitDate: Mon Jan 17 20:49:57 2022 +0100

tdf#145538 - Use range based for loops

Change-Id: I5bf5a88d40f9633d9af9c40df2ee927130701f91
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128318
Tested-by: Jenkins
Reviewed-by: Hossein 

diff --git a/avmedia/source/viewer/mediawindow.cxx 
b/avmedia/source/viewer/mediawindow.cxx
index 039ef62d4693..6c61a7e9b361 100644
--- a/avmedia/source/viewer/mediawindow.cxx
+++ b/avmedia/source/viewer/mediawindow.cxx
@@ -219,21 +219,21 @@ bool MediaWindow::executeMediaURLDialog(weld::Window* 
pParent, OUString& rURL, b
 aDlg.SetTitle( AvmResId( o_pbLink != nullptr
 ? AVMEDIA_STR_INSERTMEDIA_DLG : AVMEDIA_STR_OPENMEDIA_DLG ) );
 
-for( FilterNameVector::size_type i = 0; i < aFilters.size(); ++i )
+for( const auto  : aFilters )
 {
 for( sal_Int32 nIndex = 0; nIndex >= 0; )
 {
 if( !aAllTypes.isEmpty() )
 aAllTypes.append(aSeparator);
 
-aAllTypes.append(aWildcard + aFilters[ i ].second.getToken( 0, 
';', nIndex ));
+aAllTypes.append(aWildcard + filter.second.getToken( 0, ';', 
nIndex ));
 }
 }
 
 // add filter for all media types
 aDlg.AddFilter( AvmResId( AVMEDIA_STR_ALL_MEDIAFILES ), 
aAllTypes.makeStringAndClear() );
 
-for( FilterNameVector::size_type i = 0; i < aFilters.size(); ++i )
+for( const auto  : aFilters )
 {
 OUStringBuffer aTypes;
 
@@ -242,11 +242,11 @@ bool MediaWindow::executeMediaURLDialog(weld::Window* 
pParent, OUString& rURL, b
 if( !aTypes.isEmpty() )
 aTypes.append(aSeparator);
 
-aTypes.append(aWildcard + aFilters[ i ].second.getToken( 0, ';', 
nIndex ));
+aTypes.append(aWildcard + filter.second.getToken( 0, ';', nIndex 
));
 }
 
 // add single filters
-aDlg.AddFilter( aFilters[ i ].first, aTypes.makeStringAndClear() );
+aDlg.AddFilter( filter.first, aTypes.makeStringAndClear() );
 }
 
 // add filter for all types
@@ -333,11 +333,11 @@ bool MediaWindow::isMediaURL( const OUString& rURL, const 
OUString& rReferer, bo
 FilterNameVectoraFilters = getMediaFilters();
 const OUString  aExt( aURL.getExtension() );
 
-for( FilterNameVector::size_type i = 0; i < aFilters.size(); ++i )
+for( const auto  : aFilters )
 {
 for( sal_Int32 nIndex = 0; nIndex >= 0; )
 {
-if( aExt.equalsIgnoreAsciiCase( aFilters[ i ].second.getToken( 
0, ';', nIndex ) ) )
+if( aExt.equalsIgnoreAsciiCase( filter.second.getToken( 0, 
';', nIndex ) ) )
 return true;
 }
 }


[Libreoffice-commits] core.git: avmedia/source

2022-01-02 Thread Arnaud Versini (via logerrit)
 avmedia/source/gstreamer/gstplayer.cxx|   13 +++--
 avmedia/source/viewer/mediaevent_impl.cxx |   12 ++--
 avmedia/source/viewer/mediaevent_impl.hxx |4 +++-
 3 files changed, 16 insertions(+), 13 deletions(-)

New commits:
commit 477fa6c3cb92f578032dee60482718efdb8f44f2
Author: Arnaud Versini 
AuthorDate: Sun Oct 24 16:49:50 2021 +0200
Commit: Noel Grandin 
CommitDate: Sun Jan 2 18:23:48 2022 +0100

avmedia : use std::mutex instead of osl::Mutex

Change-Id: I0e779db4ef32ac74b9df18d1e162b49236b44b88
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124122
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/avmedia/source/gstreamer/gstplayer.cxx 
b/avmedia/source/gstreamer/gstplayer.cxx
index f25ec5c6bb0c..b28be1678207 100644
--- a/avmedia/source/gstreamer/gstplayer.cxx
+++ b/avmedia/source/gstreamer/gstplayer.cxx
@@ -25,6 +25,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -94,7 +95,7 @@ private:
 
 DECL_STATIC_LINK(MissingPluginInstaller, launchUi, void*, void);
 
-osl::Mutex mutex_;
+std::mutex mutex_;
 std::set reported_;
 std::map>> queued_;
 rtl::Reference currentThread_;
@@ -106,7 +107,7 @@ private:
 
 
 MissingPluginInstaller::~MissingPluginInstaller() {
-osl::MutexGuard g(mutex_);
+std::unique_lock g(mutex_);
 SAL_WARN_IF(currentThread_.is(), "avmedia.gstreamer", "unjoined thread");
 inCleanUp_ = true;
 }
@@ -134,7 +135,7 @@ void MissingPluginInstaller::report(
 rtl::Reference join;
 rtl::Reference launch;
 {
-osl::MutexGuard g(mutex_);
+std::unique_lock g(mutex_);
 if (reported_.find(detStr) != reported_.end()) {
 return;
 }
@@ -179,7 +180,7 @@ void eraseSource(std::set> & set, 
Player const * source)
 void MissingPluginInstaller::detach(Player const * source) {
 rtl::Reference join;
 {
-osl::MutexGuard g(mutex_);
+std::unique_lock g(mutex_);
 if (inCleanUp_) {
 // Guard against ~MissingPluginInstaller with erroneously un-joined
 // currentThread_ (thus non-empty currentSources_) calling
@@ -251,7 +252,7 @@ void MissingPluginInstallerThread::execute() {
 for (;;) {
 std::vector details;
 {
-osl::MutexGuard g(inst.mutex_);
+std::unique_lock g(inst.mutex_);
 assert(!inst.currentDetails_.empty());
 details.swap(inst.currentDetails_);
 }
@@ -264,7 +265,7 @@ void MissingPluginInstallerThread::execute() {
 args.push_back(nullptr);
 gst_install_plugins_sync(args.data(), nullptr);
 {
-osl::MutexGuard g(inst.mutex_);
+std::unique_lock g(inst.mutex_);
 if (inst.queued_.empty() || inst.launchNewThread_) {
 inst.launchNewThread_ = true;
 break;
diff --git a/avmedia/source/viewer/mediaevent_impl.cxx 
b/avmedia/source/viewer/mediaevent_impl.cxx
index 62217f6d9473..d6a2c082c246 100644
--- a/avmedia/source/viewer/mediaevent_impl.cxx
+++ b/avmedia/source/viewer/mediaevent_impl.cxx
@@ -52,7 +52,7 @@ void SAL_CALL MediaEventListenersImpl::disposing( const 
css::lang::EventObject&
 
 void SAL_CALL MediaEventListenersImpl::keyPressed( const css::awt::KeyEvent& e 
)
 {
-const ::osl::MutexGuard aGuard( maMutex );
+const std::unique_lock aGuard( maMutex );
 
 if( mpNotifyWindow )
 {
@@ -69,7 +69,7 @@ void SAL_CALL MediaEventListenersImpl::keyPressed( const 
css::awt::KeyEvent& e )
 
 void SAL_CALL MediaEventListenersImpl::keyReleased( const css::awt::KeyEvent& 
e )
 {
-const ::osl::MutexGuard aGuard( maMutex );
+const std::unique_lock aGuard( maMutex );
 
 if( mpNotifyWindow )
 {
@@ -85,7 +85,7 @@ void SAL_CALL MediaEventListenersImpl::keyReleased( const 
css::awt::KeyEvent& e
 
 void SAL_CALL MediaEventListenersImpl::mousePressed( const 
css::awt::MouseEvent& e )
 {
-const ::osl::MutexGuard aGuard( maMutex );
+const std::unique_lock aGuard( maMutex );
 
 if( mpNotifyWindow )
 {
@@ -103,7 +103,7 @@ void SAL_CALL MediaEventListenersImpl::mousePressed( const 
css::awt::MouseEvent&
 
 void SAL_CALL MediaEventListenersImpl::mouseReleased( const 
css::awt::MouseEvent& e )
 {
-const ::osl::MutexGuard aGuard( maMutex );
+const std::unique_lock aGuard( maMutex );
 const SolarMutexGuard aAppGuard;
 
 if( mpNotifyWindow )
@@ -132,7 +132,7 @@ void SAL_CALL MediaEventListenersImpl::mouseExited( const 
css::awt::MouseEvent&
 
 void SAL_CALL MediaEventListenersImpl::mouseDragged( const 
css::awt::MouseEvent& e )
 {
-const ::osl::MutexGuard aGuard( maMutex );
+const std::unique_lock aGuard( maMutex );
 
 if( mpNotifyWindow )
 {
@@ -144,7 +144,7 @@ void SAL_CALL MediaEventListenersImpl::mouseDragged( const 
css::awt::MouseEvent&
 
 void SAL_CALL MediaEventListenersImpl::mouseMoved( const css::awt::MouseEvent& 
e )
 {
-const 

[Libreoffice-commits] core.git: avmedia/source extensions/source include/systools sal/osl vcl/inc vcl/win

2021-12-21 Thread Mike Kaganski (via logerrit)
 avmedia/source/win/framegrabber.cxx|9 ++-
 avmedia/source/win/framegrabber.hxx|5 +++-
 avmedia/source/win/player.cxx  |5 +---
 avmedia/source/win/player.hxx  |3 +-
 extensions/source/config/WinUserInfo/WinUserInfoBe.cxx |   21 -
 include/systools/win32/comtools.hxx|   19 ---
 sal/osl/w32/thread.cxx |7 +++--
 vcl/inc/win/saldata.hxx|3 +-
 vcl/win/app/fileregistration.cxx   |   14 ++-
 vcl/win/app/salinst.cxx|6 ++--
 vcl/win/dtrans/MtaOleClipb.cxx |5 +---
 11 files changed, 46 insertions(+), 51 deletions(-)

New commits:
commit c35f81148fb18ba070516edcbb4d61899235
Author: Mike Kaganski 
AuthorDate: Tue Dec 21 16:19:46 2021 +0300
Commit: Mike Kaganski 
CommitDate: Tue Dec 21 17:03:30 2021 +0100

Use sal::systools::CoInitializeGuard and sal::systools::ThrowIfFailed

Change-Id: Ifb40e7672671df03b5ffc89905ad1e7b68451b68
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127232
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/avmedia/source/win/framegrabber.cxx 
b/avmedia/source/win/framegrabber.cxx
index 17fb229ef057..42e30219caf3 100644
--- a/avmedia/source/win/framegrabber.cxx
+++ b/avmedia/source/win/framegrabber.cxx
@@ -38,7 +38,6 @@
 #include 
 #include 
 #include 
-#include 
 
 constexpr OUStringLiteral AVMEDIA_WIN_FRAMEGRABBER_IMPLEMENTATIONNAME = 
u"com.sun.star.comp.avmedia.FrameGrabber_DirectX";
 constexpr OUStringLiteral AVMEDIA_WIN_FRAMEGRABBER_SERVICENAME = 
u"com.sun.star.media.FrameGrabber_DirectX";
@@ -49,15 +48,13 @@ namespace avmedia::win {
 
 
 FrameGrabber::FrameGrabber()
+: sal::systools::CoInitializeGuard(COINIT_APARTMENTTHREADED, false,
+   
sal::systools::CoInitializeGuard::WhenFailed::NoThrow)
 {
-::CoInitializeEx( nullptr, COINIT_APARTMENTTHREADED );
 }
 
 
-FrameGrabber::~FrameGrabber()
-{
-::CoUninitialize();
-}
+FrameGrabber::~FrameGrabber() = default;
 
 namespace {
 
diff --git a/avmedia/source/win/framegrabber.hxx 
b/avmedia/source/win/framegrabber.hxx
index fb4fda35905d..d1ca48e84230 100644
--- a/avmedia/source/win/framegrabber.hxx
+++ b/avmedia/source/win/framegrabber.hxx
@@ -21,6 +21,8 @@
 
 #include "wincommon.hxx"
 #include 
+#include 
+
 #include 
 
 struct IMediaDet;
@@ -28,7 +30,8 @@ struct IMediaDet;
 namespace avmedia::win {
 
 class FrameGrabber : public ::cppu::WeakImplHelper< css::media::XFrameGrabber,
-css::lang::XServiceInfo >
+css::lang::XServiceInfo >,
+ public sal::systools::CoInitializeGuard
 {
 public:
 explicit FrameGrabber();
diff --git a/avmedia/source/win/player.cxx b/avmedia/source/win/player.cxx
index 23fdb241b3f5..7f6660ab8462 100644
--- a/avmedia/source/win/player.cxx
+++ b/avmedia/source/win/player.cxx
@@ -64,13 +64,14 @@ static LRESULT CALLBACK MediaPlayerWndProc_2( HWND 
hWnd,UINT nMsg, WPARAM nPar1,
 
 Player::Player() :
 Player_BASE(m_aMutex),
+sal::systools::CoInitializeGuard(COINIT_APARTMENTTHREADED, false,
+ 
sal::systools::CoInitializeGuard::WhenFailed::NoThrow),
 mnUnmutedVolume( 0 ),
 mnFrameWnd( nullptr ),
 mbMuted( false ),
 mbLooping( false ),
 mbAddWindow( true )
 {
-::CoInitializeEx( nullptr, COINIT_APARTMENTTHREADED );
 }
 
 
@@ -78,8 +79,6 @@ Player::~Player()
 {
 if( mnFrameWnd )
 ::DestroyWindow( mnFrameWnd );
-
-::CoUninitialize();
 }
 
 
diff --git a/avmedia/source/win/player.hxx b/avmedia/source/win/player.hxx
index 20806251c8bc..1563d549a85e 100644
--- a/avmedia/source/win/player.hxx
+++ b/avmedia/source/win/player.hxx
@@ -51,7 +51,8 @@ typedef ::cppu::WeakComponentImplHelper< css::media::XPlayer,
 
 
 class Player : public cppu::BaseMutex,
-   public Player_BASE
+   public Player_BASE,
+   public sal::systools::CoInitializeGuard
 {
 public:
 
diff --git a/extensions/source/config/WinUserInfo/WinUserInfoBe.cxx 
b/extensions/source/config/WinUserInfo/WinUserInfoBe.cxx
index a412769ee639..ce4d147220c2 100644
--- a/extensions/source/config/WinUserInfo/WinUserInfoBe.cxx
+++ b/extensions/source/config/WinUserInfo/WinUserInfoBe.cxx
@@ -90,33 +90,22 @@ public:
 {
 try
 {
-struct CoInitializeGuard
-{
-CoInitializeGuard()
-{
-if (HRESULT hr = CoInitializeEx(nullptr, 
COINIT_APARTMENTTHREADED); FAILED(hr))
-throw sal::systools::ComError("CoInitializeEx failed", 
hr);
-}
-~CoInitializeGuard() { CoUninitialize(); }
-} 

[Libreoffice-commits] core.git: avmedia/source

2021-12-21 Thread Noel Grandin (via logerrit)
 avmedia/source/viewer/mediaevent_impl.cxx |5 -
 1 file changed, 5 deletions(-)

New commits:
commit dc873abca8fa070cd50f82b640a425ffbb651f2b
Author: Noel Grandin 
AuthorDate: Tue Dec 21 10:16:39 2021 +0200
Commit: Noel Grandin 
CommitDate: Tue Dec 21 10:09:12 2021 +0100

no need to take solar mutex here

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 

diff --git a/avmedia/source/viewer/mediaevent_impl.cxx 
b/avmedia/source/viewer/mediaevent_impl.cxx
index 23a5bc3daa75..62217f6d9473 100644
--- a/avmedia/source/viewer/mediaevent_impl.cxx
+++ b/avmedia/source/viewer/mediaevent_impl.cxx
@@ -53,7 +53,6 @@ void SAL_CALL MediaEventListenersImpl::disposing( const 
css::lang::EventObject&
 void SAL_CALL MediaEventListenersImpl::keyPressed( const css::awt::KeyEvent& e 
)
 {
 const ::osl::MutexGuard aGuard( maMutex );
-const SolarMutexGuard aAppGuard;
 
 if( mpNotifyWindow )
 {
@@ -71,7 +70,6 @@ void SAL_CALL MediaEventListenersImpl::keyPressed( const 
css::awt::KeyEvent& e )
 void SAL_CALL MediaEventListenersImpl::keyReleased( const css::awt::KeyEvent& 
e )
 {
 const ::osl::MutexGuard aGuard( maMutex );
-const SolarMutexGuard aAppGuard;
 
 if( mpNotifyWindow )
 {
@@ -88,7 +86,6 @@ void SAL_CALL MediaEventListenersImpl::keyReleased( const 
css::awt::KeyEvent& e
 void SAL_CALL MediaEventListenersImpl::mousePressed( const 
css::awt::MouseEvent& e )
 {
 const ::osl::MutexGuard aGuard( maMutex );
-const SolarMutexGuard aAppGuard;
 
 if( mpNotifyWindow )
 {
@@ -136,7 +133,6 @@ void SAL_CALL MediaEventListenersImpl::mouseExited( const 
css::awt::MouseEvent&
 void SAL_CALL MediaEventListenersImpl::mouseDragged( const 
css::awt::MouseEvent& e )
 {
 const ::osl::MutexGuard aGuard( maMutex );
-const SolarMutexGuard aAppGuard;
 
 if( mpNotifyWindow )
 {
@@ -149,7 +145,6 @@ void SAL_CALL MediaEventListenersImpl::mouseDragged( const 
css::awt::MouseEvent&
 void SAL_CALL MediaEventListenersImpl::mouseMoved( const css::awt::MouseEvent& 
e )
 {
 const ::osl::MutexGuard aGuard( maMutex );
-const SolarMutexGuard aAppGuard;
 
 if( mpNotifyWindow )
 {


[Libreoffice-commits] core.git: avmedia/source include/systools

2021-12-20 Thread Mike Kaganski (via logerrit)
 avmedia/source/win/framegrabber.cxx |2 +-
 avmedia/source/win/player.cxx   |2 +-
 include/systools/win32/comtools.hxx |   15 ---
 3 files changed, 14 insertions(+), 5 deletions(-)

New commits:
commit 64e46c7cb0968a6249dd37ac0a7b12bccc19ee58
Author: Mike Kaganski 
AuthorDate: Mon Dec 20 19:25:58 2021 +0300
Commit: Mike Kaganski 
CommitDate: Tue Dec 21 07:31:55 2021 +0100

Introduce sal::systools::COMReference::TryCoCreateInstance

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 
Reviewed-by: Mike Kaganski 

diff --git a/avmedia/source/win/framegrabber.cxx 
b/avmedia/source/win/framegrabber.cxx
index b7109b251497..17fb229ef057 100644
--- a/avmedia/source/win/framegrabber.cxx
+++ b/avmedia/source/win/framegrabber.cxx
@@ -65,7 +65,7 @@ sal::systools::COMReference implCreateMediaDet( 
const OUString& rURL
 {
 sal::systools::COMReference pDet;
 
-if( pDet.CoCreateInstance(CLSID_MediaDet, nullptr, CLSCTX_INPROC_SERVER) )
+if( SUCCEEDED(pDet.TryCoCreateInstance(CLSID_MediaDet, nullptr, 
CLSCTX_INPROC_SERVER)) )
 {
 OUString aLocalStr;
 
diff --git a/avmedia/source/win/player.cxx b/avmedia/source/win/player.cxx
index ab2c9c8eb20d..23fdb241b3f5 100644
--- a/avmedia/source/win/player.cxx
+++ b/avmedia/source/win/player.cxx
@@ -96,7 +96,7 @@ bool Player::create( const OUString& rURL )
 {
 boolbRet = false;
 
-if( mpGB.CoCreateInstance(CLSID_FilterGraph, nullptr, 
CLSCTX_INPROC_SERVER) )
+if( SUCCEEDED(mpGB.TryCoCreateInstance(CLSID_FilterGraph, nullptr, 
CLSCTX_INPROC_SERVER)) )
 {
 // Don't use the overlay mixer on Windows Vista
 // It disables the desktop composition as soon as RenderFile is called
diff --git a/include/systools/win32/comtools.hxx 
b/include/systools/win32/comtools.hxx
index bc9ecdf5c12c..d26f680569e5 100644
--- a/include/systools/win32/comtools.hxx
+++ b/include/systools/win32/comtools.hxx
@@ -110,12 +110,21 @@ namespace sal::systools
 return operator=(p.template QueryInterface(t));
 }
 
+HRESULT TryCoCreateInstance(REFCLSID clsid, IUnknown* pOuter = nullptr,
+DWORD nCtx = CLSCTX_ALL)
+{
+T* ip;
+HRESULT hr = ::CoCreateInstance(clsid, pOuter, nCtx, __uuidof(T),
+  reinterpret_cast());
+if (SUCCEEDED(hr))
+release(std::exchange(com_ptr_, ip));
+return hr;
+}
+
 COMReference& CoCreateInstance(REFCLSID clsid, IUnknown* pOuter = 
nullptr,
   DWORD nCtx = CLSCTX_ALL)
 {
-clear();
-HRESULT hr = ::CoCreateInstance(clsid, pOuter, nCtx, __uuidof(T),
-
reinterpret_cast(_ptr_));
+HRESULT hr = TryCoCreateInstance(clsid, pOuter, nCtx);
 if (FAILED(hr))
 throw ComError("CoCreateInstance failed!", hr);
 


[Libreoffice-commits] core.git: avmedia/source

2021-12-20 Thread Mike Kaganski (via logerrit)
 avmedia/source/win/framegrabber.cxx |   24 --
 avmedia/source/win/player.cxx   |   58 
 avmedia/source/win/player.hxx   |   20 
 3 files changed, 23 insertions(+), 79 deletions(-)

New commits:
commit 00eb9b8954a129fb365191ce8cdcbc4cf66a7333
Author: Mike Kaganski 
AuthorDate: Mon Dec 20 10:12:13 2021 +0300
Commit: Mike Kaganski 
CommitDate: Mon Dec 20 09:22:09 2021 +0100

Use more sal::systools::COMReference

Change-Id: I29bf304d90db968682c2b0791372d0ea41375096
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127132
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/avmedia/source/win/framegrabber.cxx 
b/avmedia/source/win/framegrabber.cxx
index 6ed07a87935a..b7109b251497 100644
--- a/avmedia/source/win/framegrabber.cxx
+++ b/avmedia/source/win/framegrabber.cxx
@@ -38,6 +38,7 @@
 #include 
 #include 
 #include 
+#include 
 
 constexpr OUStringLiteral AVMEDIA_WIN_FRAMEGRABBER_IMPLEMENTATIONNAME = 
u"com.sun.star.comp.avmedia.FrameGrabber_DirectX";
 constexpr OUStringLiteral AVMEDIA_WIN_FRAMEGRABBER_SERVICENAME = 
u"com.sun.star.media.FrameGrabber_DirectX";
@@ -60,11 +61,11 @@ FrameGrabber::~FrameGrabber()
 
 namespace {
 
-IMediaDet* implCreateMediaDet( const OUString& rURL )
+sal::systools::COMReference implCreateMediaDet( const OUString& 
rURL )
 {
-IMediaDet* pDet = nullptr;
+sal::systools::COMReference pDet;
 
-if( SUCCEEDED( CoCreateInstance( CLSID_MediaDet, nullptr, 
CLSCTX_INPROC_SERVER, IID_IMediaDet, reinterpret_cast() ) ) )
+if( pDet.CoCreateInstance(CLSID_MediaDet, nullptr, CLSCTX_INPROC_SERVER) )
 {
 OUString aLocalStr;
 
@@ -78,8 +79,7 @@ IMediaDet* implCreateMediaDet( const OUString& rURL )
 // I cannot find information why do we pass a newly allocated 
BSTR to the put_Filename
 // and if it frees the string internally
 SysFreeString(bstrFilename);
-pDet->Release();
-pDet = nullptr;
+pDet.clear();
 }
 }
 }
@@ -92,14 +92,8 @@ IMediaDet* implCreateMediaDet( const OUString& rURL )
 bool FrameGrabber::create( const OUString& rURL )
 {
 // just check if a MediaDet interface can be created with the given URL
-IMediaDet*  pDet = implCreateMediaDet( rURL );
-
-if( pDet )
-{
+if (implCreateMediaDet(rURL))
 maURL = rURL;
-pDet->Release();
-pDet = nullptr;
-}
 else
 maURL.clear();
 
@@ -110,9 +104,7 @@ bool FrameGrabber::create( const OUString& rURL )
 uno::Reference< graphic::XGraphic > SAL_CALL FrameGrabber::grabFrame( double 
fMediaTime )
 {
 uno::Reference< graphic::XGraphic > xRet;
-IMediaDet*  pDet = implCreateMediaDet( maURL );
-
-if( pDet )
+if (sal::systools::COMReference pDet = 
implCreateMediaDet(maURL))
 {
 double  fLength;
 longnStreamCount;
@@ -195,8 +187,6 @@ uno::Reference< graphic::XGraphic > SAL_CALL 
FrameGrabber::grabFrame( double fMe
 }
 }
 }
-
-pDet->Release();
 }
 
 return xRet;
diff --git a/avmedia/source/win/player.cxx b/avmedia/source/win/player.cxx
index 4d764d4a4fa6..ab2c9c8eb20d 100644
--- a/avmedia/source/win/player.cxx
+++ b/avmedia/source/win/player.cxx
@@ -64,16 +64,6 @@ static LRESULT CALLBACK MediaPlayerWndProc_2( HWND hWnd,UINT 
nMsg, WPARAM nPar1,
 
 Player::Player() :
 Player_BASE(m_aMutex),
-mpGB( nullptr ),
-mpOMF( nullptr ),
-mpMC( nullptr ),
-mpME( nullptr ),
-mpMS( nullptr ),
-mpMP( nullptr ),
-mpBA( nullptr ),
-mpBV( nullptr ),
-mpVW( nullptr ),
-mpEV( nullptr ),
 mnUnmutedVolume( 0 ),
 mnFrameWnd( nullptr ),
 mbMuted( false ),
@@ -97,47 +87,16 @@ void SAL_CALL Player::disposing()
 {
 ::osl::MutexGuard aGuard(m_aMutex);
 stop();
-if( mpBA )
-mpBA->Release();
-
-if( mpBV )
-mpBV->Release();
-
-if( mpVW )
-mpVW->Release();
-
-if( mpMP )
-mpMP->Release();
-
-if( mpMS )
-mpMS->Release();
-
 if( mpME )
-{
 mpME->SetNotifyWindow( 0, WM_GRAPHNOTIFY, 0);
-mpME->Release();
-}
-
-if( mpMC )
-mpMC->Release();
-
-if( mpEV )
-mpEV->Release();
-
-if( mpOMF )
-mpOMF->Release();
-
-if( mpGB )
-mpGB->Release();
 }
 
 
 bool Player::create( const OUString& rURL )
 {
-HRESULT hR;
 boolbRet = false;
 
-if( SUCCEEDED( hR = CoCreateInstance( CLSID_FilterGraph, nullptr, 
CLSCTX_INPROC_SERVER, IID_IGraphBuilder, reinterpret_cast() ) ) )
+if( mpGB.CoCreateInstance(CLSID_FilterGraph, nullptr, 
CLSCTX_INPROC_SERVER) )
 {
 // Don't use the overlay mixer on Windows Vista
 // It disables the desktop composition as soon as RenderFile is called
@@ -149,18 +108,17 @@ bool Player::create( const OUString& rURL )
 if 

[Libreoffice-commits] core.git: avmedia/source include/editeng sw/inc

2021-11-16 Thread Mike Kaganski (via logerrit)
 avmedia/source/framework/MediaControlBase.cxx |2 --
 include/editeng/overflowingtxt.hxx|5 -
 sw/inc/IDocumentFieldsAccess.hxx  |5 +++--
 sw/inc/IDocumentLinksAdministration.hxx   |5 +++--
 4 files changed, 6 insertions(+), 11 deletions(-)

New commits:
commit ae8802cef10c40a40df8f783e724d70618539126
Author: Mike Kaganski 
AuthorDate: Tue Nov 16 12:20:19 2021 +0200
Commit: Mike Kaganski 
CommitDate: Tue Nov 16 19:48:15 2021 +0100

Drop redundant 'using rtl::OUString'

obsoleted by 6080259862ee9886d1dabcb7c06132268a398cc6

Change-Id: I246dc6050fe7adf60ab3c836db3cfa781578d483
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125142
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/avmedia/source/framework/MediaControlBase.cxx 
b/avmedia/source/framework/MediaControlBase.cxx
index 4e8800186ae4..c572bed7d0e6 100644
--- a/avmedia/source/framework/MediaControlBase.cxx
+++ b/avmedia/source/framework/MediaControlBase.cxx
@@ -25,8 +25,6 @@
 #include 
 #include 
 
-using ::rtl::OUString;
-
 constexpr sal_Int32 AVMEDIA_DB_RANGE = -40;
 #define AVMEDIA_LINEINCREMENT   1.0
 #define AVMEDIA_PAGEINCREMENT   10.0
diff --git a/include/editeng/overflowingtxt.hxx 
b/include/editeng/overflowingtxt.hxx
index 043b8ebd21f4..1c11c7797d00 100644
--- a/include/editeng/overflowingtxt.hxx
+++ b/include/editeng/overflowingtxt.hxx
@@ -31,11 +31,6 @@
 namespace com::sun::star {
   namespace datatransfer { class XTransferable; }
 }
-namespace rtl {
-class OUString;
-};
-using ::rtl::OUString;
-
 
 class OutlinerParaObject;
 class Outliner;
diff --git a/sw/inc/IDocumentFieldsAccess.hxx b/sw/inc/IDocumentFieldsAccess.hxx
index fb8af7657132..5f866a361228 100644
--- a/sw/inc/IDocumentFieldsAccess.hxx
+++ b/sw/inc/IDocumentFieldsAccess.hxx
@@ -20,6 +20,9 @@
 #ifndef INCLUDED_SW_INC_IDOCUMENTFIELDSACCESS_HXX
 #define INCLUDED_SW_INC_IDOCUMENTFIELDSACCESS_HXX
 
+#include 
+
+#include 
 #include 
 #include 
 #include "nodeoffset.hxx"
@@ -42,8 +45,6 @@ struct HashStr;
 class SwRootFrame;
 class IDocumentRedlineAccess;
 
-namespace rtl { class OUString; }
-using rtl::OUString;
 namespace com::sun::star::uno { class Any; }
 
  /** Document fields related interfaces
diff --git a/sw/inc/IDocumentLinksAdministration.hxx 
b/sw/inc/IDocumentLinksAdministration.hxx
index 43bc0298c878..26133d9c57da 100644
--- a/sw/inc/IDocumentLinksAdministration.hxx
+++ b/sw/inc/IDocumentLinksAdministration.hxx
@@ -20,12 +20,13 @@
 #ifndef INCLUDED_SW_INC_IDOCUMENTLINKSADMINISTRATION_HXX
 #define INCLUDED_SW_INC_IDOCUMENTLINKSADMINISTRATION_HXX
 
+#include 
+
+#include 
 #include 
 
 namespace com::sun::star::uno { class Any; }
 namespace sfx2 { class SvLinkSource;  class LinkManager; }
-namespace rtl { class OUString; }
-using rtl::OUString;
 
 
  /** Document links administration interface


[Libreoffice-commits] core.git: avmedia/source compilerplugins/clang desktop/source i18npool/source l10ntools/source solenv/CompilerTest_compilerplugins_clang.mk svx/source testtools/source ucb/source

2021-11-10 Thread Noel Grandin (via logerrit)
 avmedia/source/gstreamer/gstplayer.cxx |6 
 compilerplugins/clang/stringliteraldefine.cxx  |  172 +
 compilerplugins/clang/test/stringliteraldefine.cxx |   56 ++
 desktop/source/migration/services/jvmfwk.cxx   |2 
 i18npool/source/indexentry/indexentrysupplier.cxx  |2 
 l10ntools/source/xmlparse.cxx  |2 
 solenv/CompilerTest_compilerplugins_clang.mk   |1 
 svx/source/form/datanavi.cxx   |   48 ++---
 testtools/source/bridgetest/bridgetest.cxx |8 
 testtools/source/bridgetest/cppobj.cxx |6 
 ucb/source/ucp/ftp/ftpcontent.cxx  |4 
 unotools/source/config/cmdoptions.cxx  |2 
 unotools/source/config/compatibility.cxx   |2 
 unotools/source/config/fontcfg.cxx |   16 -
 unotools/source/config/moduleoptions.cxx   |2 
 15 files changed, 279 insertions(+), 50 deletions(-)

New commits:
commit 9444c925b254cca32c08c473cc294a5f0e90881a
Author: Noel Grandin 
AuthorDate: Wed Nov 10 12:28:26 2021 +0200
Commit: Noel Grandin 
CommitDate: Wed Nov 10 19:10:31 2021 +0100

new loplugin:stringliteraldefine

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 

diff --git a/avmedia/source/gstreamer/gstplayer.cxx 
b/avmedia/source/gstreamer/gstplayer.cxx
index 2e723ce6efbc..4f12f80f5ded 100644
--- a/avmedia/source/gstreamer/gstplayer.cxx
+++ b/avmedia/source/gstreamer/gstplayer.cxx
@@ -42,12 +42,12 @@
 #include "gstwindow.hxx"
 
 #include 
-#define AVMEDIA_GST_PLAYER_IMPLEMENTATIONNAME 
"com.sun.star.comp.avmedia.Player_GStreamer"
-#define AVMEDIA_GST_PLAYER_SERVICENAME
"com.sun.star.media.Player_GStreamer"
-
 #include 
 #include 
 
+constexpr OUStringLiteral AVMEDIA_GST_PLAYER_IMPLEMENTATIONNAME = 
u"com.sun.star.comp.avmedia.Player_GStreamer";
+constexpr OUStringLiteral AVMEDIA_GST_PLAYER_SERVICENAME= 
u"com.sun.star.media.Player_GStreamer";
+
 #define AVVERSION "gst 1.0: "
 
 using namespace ::com::sun::star;
diff --git a/compilerplugins/clang/stringliteraldefine.cxx 
b/compilerplugins/clang/stringliteraldefine.cxx
new file mode 100644
index ..0eda65e7bea2
--- /dev/null
+++ b/compilerplugins/clang/stringliteraldefine.cxx
@@ -0,0 +1,172 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+// Find constant character array variables that are either
+//   (a) passed into O[U]String constructors
+//   (b) assigned to O[U]String
+// and are declared using macro names
+// and should thus be turned into O[U]StringLiteral variables.
+//
+
+#include 
+
+#include "check.hxx"
+#include "plugin.hxx"
+
+namespace
+{
+class StringLiteralDefine final : public 
loplugin::FilteringPlugin
+{
+public:
+explicit StringLiteralDefine(loplugin::InstantiationData const& data)
+: FilteringPlugin(data)
+{
+}
+
+bool TraverseInitListExpr(InitListExpr* expr, DataRecursionQueue* queue = 
nullptr)
+{
+return WalkUpFromInitListExpr(expr)
+   && TraverseSynOrSemInitListExpr(
+  expr->isSemanticForm() ? expr : expr->getSemanticForm(), 
queue);
+}
+
+bool VisitCXXConstructExpr(CXXConstructExpr const* expr)
+{
+if (ignoreLocation(expr))
+return true;
+loplugin::TypeCheck const tc(expr->getType());
+if (!(tc.Class("OString").Namespace("rtl").GlobalNamespace()
+  || tc.Class("OUString").Namespace("rtl").GlobalNamespace()))
+{
+return true;
+}
+auto const ctor = expr->getConstructor();
+if (ctor->getNumParams() != 2)
+return true;
+
+const Expr* arg0 = expr->getArg(0)->IgnoreParenImpCasts();
+auto const e1 = dyn_cast(arg0);
+if (!e1)
+return true;
+auto argLoc = compat::getBeginLoc(arg0);
+// check if the arg is a macro
+auto macroLoc = compiler.getSourceManager().getSpellingLoc(argLoc);
+if (argLoc == macroLoc)
+return true;
+// check if it is the right kind of macro (not particularly reliable 
checks)
+if (!macroLoc.isValid() || 
!compiler.getSourceManager().isInMainFile(macroLoc)
+|| compiler.getSourceManager().isInSystemHeader(macroLoc)
+// not sure when these became available

[Libreoffice-commits] core.git: avmedia/source chart2/source desktop/source filter/source framework/source hwpfilter/source include/unotools oox/source reportdesign/source scripting/source sc/source s

2021-11-08 Thread Noel Grandin (via logerrit)
 avmedia/source/framework/soundhandler.cxx|   10 
 chart2/source/controller/main/ChartFrameloader.cxx   |6 
 desktop/source/app/dispatchwatcher.cxx   |4 
 desktop/source/lib/init.cxx  |4 
 filter/source/config/cache/typedetection.cxx |   52 +-
 filter/source/storagefilterdetect/filterdetect.cxx   |   12 
 filter/source/svg/svgfilter.cxx  |4 
 filter/source/textfilterdetect/filterdetect.cxx  |   38 -
 filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx  |4 
 framework/source/dispatch/oxt_handler.cxx|4 
 framework/source/fwe/helper/titlehelper.cxx  |4 
 framework/source/helper/statusindicatorfactory.cxx   |2 
 framework/source/layoutmanager/helpers.cxx   |2 
 framework/source/loadenv/loadenv.cxx |  104 ++--
 framework/source/services/autorecovery.cxx   |   60 +-
 framework/source/uielement/toolbarmanager.cxx|2 
 hwpfilter/source/hwpreader.cxx   |4 
 include/unotools/mediadescriptor.hxx |   88 ++--
 oox/source/core/filterbase.cxx   |   12 
 oox/source/core/filterdetect.cxx |   12 
 oox/source/core/xmlfilterbase.cxx|4 
 reportdesign/source/core/api/ReportDefinition.cxx|4 
 reportdesign/source/filter/xml/xmlfilter.cxx |2 
 sc/source/filter/orcus/filterdetect.cxx  |4 
 sc/source/ui/unoobj/exceldetect.cxx  |   12 
 sc/source/ui/unoobj/scdetect.cxx |6 
 scripting/source/provider/BrowseNodeFactoryImpl.cxx  |4 
 sd/source/ui/framework/factories/BasicToolBarFactory.cxx |2 
 sd/source/ui/unoidl/sddetect.cxx |6 
 sfx2/source/appl/fileobj.cxx |2 
 sfx2/source/bastyp/fltfnc.cxx|   14 
 sfx2/source/doc/DocumentMetadataAccess.cxx   |   18 
 sfx2/source/doc/SfxDocumentMetaData.cxx  |   12 
 sfx2/source/doc/docfile.cxx  |   14 
 starmath/source/smdetect.cxx |2 
 starmath/source/unofilter.cxx|2 
 sw/qa/unit/swmodeltestbase.cxx   |2 
 sw/source/core/docnode/retrieveinputstream.cxx   |4 
 sw/source/core/layout/dumpfilter.cxx |2 
 sw/source/core/unocore/unocrsrhelper.cxx |   18 
 sw/source/filter/indexing/IndexingExportFilter.cxx   |2 
 sw/source/filter/ww8/docxexportfilter.cxx|2 
 sw/source/filter/ww8/rtfexportfilter.cxx |2 
 sw/source/ui/uno/swdetect.cxx|4 
 unotools/source/misc/mediadescriptor.cxx |  328 +--
 vbahelper/source/vbahelper/vbadocumentsbase.cxx  |2 
 writerfilter/source/dmapper/DomainMapper_Impl.cxx|4 
 writerfilter/source/dmapper/domainmapperfactory.cxx  |2 
 writerfilter/source/filter/RtfFilter.cxx |6 
 writerfilter/source/filter/WriterFilter.cxx  |4 
 writerfilter/source/rtftok/rtfdocumentimpl.cxx   |2 
 writerperfect/inc/ImportFilter.hxx   |2 
 writerperfect/qa/unit/ImportTest.cxx |6 
 writerperfect/source/calc/MSWorksCalcImportFilter.cxx|4 
 writerperfect/source/writer/EBookImportFilter.cxx|2 
 writerperfect/source/writer/EPUBPackage.cxx  |4 
 writerperfect/source/writer/MSWorksImportFilter.cxx  |2 
 57 files changed, 338 insertions(+), 602 deletions(-)

New commits:
commit 2ab40e9ecc9092e2227a30e43a7fc319f8632a17
Author: Noel Grandin 
AuthorDate: Mon Nov 8 11:36:27 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon Nov 8 11:31:36 2021 +0100

use more OUStringLiteral in MediaDescriptor

Change-Id: I0567d103db8db401c737fed98483912a39352929
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124835
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/avmedia/source/framework/soundhandler.cxx 
b/avmedia/source/framework/soundhandler.cxx
index 0724a2729150..07bee2113358 100644
--- a/avmedia/source/framework/soundhandler.cxx
+++ b/avmedia/source/framework/soundhandler.cxx
@@ -172,7 +172,7 @@ void SAL_CALL SoundHandler::dispatchWithNotification(const 
css::util::URL&
 //close streams otherwise on windows we can't reopen the file in the
 //media player when we pass the url to directx as it'll already be open
 css::uno::Reference< css::io::XInputStream > xInputStream =
-
aDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_INPUTSTREAM(),
+
aDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_INPUTSTREAM,

[Libreoffice-commits] core.git: avmedia/source

2021-10-28 Thread Mike Kaganski (via logerrit)
 avmedia/source/framework/mediaitem.cxx |   22 ++
 avmedia/source/viewer/mediawindow_impl.cxx |9 +
 2 files changed, 15 insertions(+), 16 deletions(-)

New commits:
commit eee0b76a8c3dab62d1751db2f29f7f075c65b0c5
Author: Mike Kaganski 
AuthorDate: Thu Oct 28 16:02:46 2021 +0300
Commit: Mike Kaganski 
CommitDate: Thu Oct 28 20:09:59 2021 +0200

Prepare for removal of non-const operator[] from Sequence in avmedia

Change-Id: Iefa86987f6ce43610177b7c4122744d37386ad6c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124335
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/avmedia/source/framework/mediaitem.cxx 
b/avmedia/source/framework/mediaitem.cxx
index b2b2b8d72b82..127ad8af243f 100644
--- a/avmedia/source/framework/mediaitem.cxx
+++ b/avmedia/source/framework/mediaitem.cxx
@@ -133,18 +133,16 @@ bool MediaItem::GetPresentation( SfxItemPresentation,
 
 bool MediaItem::QueryValue( css::uno::Any& rVal, sal_uInt8 ) const
 {
-uno::Sequence< uno::Any > aSeq( 10 );
-
-aSeq[ 0 ] <<= m_pImpl->m_URL;
-aSeq[ 1 ] <<= static_cast(m_pImpl->m_nMaskSet);
-aSeq[ 2 ] <<= static_cast< sal_Int32 >( m_pImpl->m_eState );
-aSeq[ 3 ] <<= m_pImpl->m_fTime;
-aSeq[ 4 ] <<= m_pImpl->m_fDuration;
-aSeq[ 5 ] <<= m_pImpl->m_nVolumeDB;
-aSeq[ 6 ] <<= m_pImpl->m_bLoop;
-aSeq[ 7 ] <<= m_pImpl->m_bMute;
-aSeq[ 8 ] <<= m_pImpl->m_eZoom;
-aSeq[ 9 ] <<= m_pImpl->m_sMimeType;
+uno::Sequence< uno::Any > aSeq{ uno::Any(m_pImpl->m_URL),
+
uno::Any(static_cast(m_pImpl->m_nMaskSet)),
+uno::Any(static_cast< sal_Int32 >( 
m_pImpl->m_eState )),
+uno::Any(m_pImpl->m_fTime),
+uno::Any(m_pImpl->m_fDuration),
+uno::Any(m_pImpl->m_nVolumeDB),
+uno::Any(m_pImpl->m_bLoop),
+uno::Any(m_pImpl->m_bMute),
+uno::Any(m_pImpl->m_eZoom),
+uno::Any(m_pImpl->m_sMimeType) };
 
 rVal <<= aSeq;
 
diff --git a/avmedia/source/viewer/mediawindow_impl.cxx 
b/avmedia/source/viewer/mediawindow_impl.cxx
index 2637eedf8147..fcc06488e913 100644
--- a/avmedia/source/viewer/mediawindow_impl.cxx
+++ b/avmedia/source/viewer/mediawindow_impl.cxx
@@ -415,7 +415,6 @@ void MediaWindowImpl::onURLChanged()
 if (mxPlayer.is())
 {
 Resize();
-uno::Sequence aArgs( 3 );
 uno::Reference xPlayerWindow;
 const Point aPoint;
 const Size aSize(mpChildWindow->GetSizePixel());
@@ -425,9 +424,11 @@ void MediaWindowImpl::onURLChanged()
 // tdf#139609 gtk doesn't need the handle, and fetching it is 
undesirable
 if (!pEnvData || pEnvData->toolkit != SystemEnvData::Toolkit::Gtk)
 nParentWindowHandle = mpChildWindow->GetParentWindowHandle();
-aArgs[0] <<= nParentWindowHandle;
-aArgs[1] <<= awt::Rectangle(aPoint.X(), aPoint.Y(), aSize.Width(), 
aSize.Height());
-aArgs[2] <<= reinterpret_cast(mpChildWindow.get());
+uno::Sequence aArgs{
+uno::Any(nParentWindowHandle),
+uno::Any(awt::Rectangle(aPoint.X(), aPoint.Y(), aSize.Width(), 
aSize.Height())),
+uno::Any(reinterpret_cast(mpChildWindow.get()))
+};
 
 try
 {


[Libreoffice-commits] core.git: avmedia/source basegfx/source basic/source include/basegfx

2021-08-27 Thread Noel Grandin (via logerrit)
 avmedia/source/framework/mediacontrol.cxx|1 -
 avmedia/source/gstreamer/gstframegrabber.cxx |3 +--
 basegfx/source/color/bcolormodifier.cxx  |6 ++
 basegfx/source/curve/b2dbeziertools.cxx  |3 +--
 basegfx/source/matrix/b2dhommatrix.cxx   |1 -
 basegfx/source/polygon/b2dpolygon.cxx|   13 +
 basegfx/source/polygon/b2dpolypolygon.cxx|8 ++--
 basegfx/source/polygon/b2dtrapezoid.cxx  |3 ---
 basegfx/source/polygon/b3dpolygon.cxx|   10 +++---
 basegfx/source/polygon/b3dpolypolygon.cxx|2 +-
 basegfx/source/range/b2dpolyrange.cxx|5 +
 basegfx/source/range/b2drange.cxx|4 +---
 basegfx/source/range/b2drangeclipper.cxx |1 -
 basegfx/source/raster/rasterconvert3d.cxx|2 --
 basegfx/source/tools/b2dclipstate.cxx|5 -
 basegfx/source/tools/systemdependentdata.cxx |1 -
 basic/source/classes/sbunoobj.cxx|3 +--
 basic/source/sbx/sbxarray.cxx|2 +-
 basic/source/sbx/sbxvalue.cxx|4 ++--
 basic/source/sbx/sbxvar.cxx  |4 ++--
 include/basegfx/color/bcolor.hxx |1 -
 include/basegfx/color/bcolormodifier.hxx |   12 +++-
 include/basegfx/matrix/b2dhommatrixtools.hxx |6 +-
 include/basegfx/point/b2dpoint.hxx   |1 -
 include/basegfx/point/b2ipoint.hxx   |1 -
 include/basegfx/point/b3dpoint.hxx   |1 -
 include/basegfx/range/b2dconnectedranges.hxx |3 +--
 include/basegfx/raster/rasterconvert3d.hxx   |5 -
 include/basegfx/utils/gradienttools.hxx  |5 +
 include/basegfx/vector/b2dvector.hxx |1 -
 include/basegfx/vector/b2ivector.hxx |1 -
 include/basegfx/vector/b3dvector.hxx |1 -
 32 files changed, 25 insertions(+), 94 deletions(-)

New commits:
commit 8024118d5c9ac964e35e8c4163ca14a5cd78cc3d
Author: Noel Grandin 
AuthorDate: Fri Aug 27 15:26:05 2021 +0200
Commit: Noel Grandin 
CommitDate: Fri Aug 27 21:24:20 2021 +0200

clang-tidy:readability-redundant-member-init

Change-Id: Ibeff6e5cbc20ab86b1e9cb96292acb340849ede3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121149
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/avmedia/source/framework/mediacontrol.cxx 
b/avmedia/source/framework/mediacontrol.cxx
index 035430ab9089..55286145bb39 100644
--- a/avmedia/source/framework/mediacontrol.cxx
+++ b/avmedia/source/framework/mediacontrol.cxx
@@ -35,7 +35,6 @@ MediaControl::MediaControl( vcl::Window* pParent, 
MediaControlStyle eControlStyl
OUString("svx/ui/mediawindow.ui") :
OUString("svx/ui/medialine.ui"),
"MediaWindow"),
-MediaControlBase(),
 maIdle( "avmedia MediaControl Idle" ),
 maChangeTimeIdle( "avmedia MediaControl Change Time Idle" ),
 maItem( 0, AVMediaSetMask::ALL ),
diff --git a/avmedia/source/gstreamer/gstframegrabber.cxx 
b/avmedia/source/gstreamer/gstframegrabber.cxx
index 15dbc6279357..ece799d87530 100644
--- a/avmedia/source/gstreamer/gstframegrabber.cxx
+++ b/avmedia/source/gstreamer/gstframegrabber.cxx
@@ -48,8 +48,7 @@ void FrameGrabber::disposePipeline()
 }
 }
 
-FrameGrabber::FrameGrabber( std::u16string_view rURL ) :
-FrameGrabber_BASE()
+FrameGrabber::FrameGrabber( std::u16string_view rURL )
 {
 gchar *pPipelineStr;
 pPipelineStr = g_strdup_printf(
diff --git a/basegfx/source/color/bcolormodifier.cxx 
b/basegfx/source/color/bcolormodifier.cxx
index 1002e607f6d2..8620a94fe2c7 100644
--- a/basegfx/source/color/bcolormodifier.cxx
+++ b/basegfx/source/color/bcolormodifier.cxx
@@ -148,8 +148,7 @@ namespace basegfx
 }
 
 BColorModifier_gamma::BColorModifier_gamma(double fValue)
-:   BColorModifier(),
-mfValue(fValue),
+:   mfValue(fValue),
 mfInvValue(fValue),
 mbUseIt(!basegfx::fTools::equal(fValue, 1.0) && 
basegfx::fTools::more(fValue, 0.0) && basegfx::fTools::lessOrEqual(fValue, 
10.0))
 {
@@ -195,8 +194,7 @@ namespace basegfx
 }
 
 
BColorModifier_RGBLuminanceContrast::BColorModifier_RGBLuminanceContrast(double 
fRed, double fGreen, double fBlue, double fLuminance, double fContrast)
-:   BColorModifier(),
-mfRed(std::clamp(fRed, -1.0, 1.0)),
+:   mfRed(std::clamp(fRed, -1.0, 1.0)),
 mfGreen(std::clamp(fGreen, -1.0, 1.0)),
 mfBlue(std::clamp(fBlue, -1.0, 1.0)),
 mfLuminance(std::clamp(fLuminance, -1.0, 1.0)),
diff --git a/basegfx/source/curve/b2dbeziertools.cxx 
b/basegfx/source/curve/b2dbeziertools.cxx
index c24ba4215a2e..8fd4c4b84c74 100644
--- a/basegfx/source/curve/b2dbeziertools.cxx
+++ b/basegfx/source/curve/b2dbeziertools.cxx
@@ -24,8 +24,7 @@
 namespace basegfx
 {
 B2DCubicBezierHelper::B2DCubicBezierHelper(const B2DCubicBezier& rBase, 
sal_uInt32 nDivisions)
-:   

[Libreoffice-commits] core.git: avmedia/source chart2/source compilerplugins/clang dbaccess/source desktop/source embeddedobj/source filter/source forms/source framework/source package/source sdext/so

2021-08-23 Thread Noel Grandin (via logerrit)
 avmedia/source/viewer/mediawindow_impl.cxx|   16 +---
 chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx |2 
 chart2/source/tools/ExplicitCategoriesProvider.cxx|2 
 chart2/source/view/main/ChartView.cxx |2 
 compilerplugins/clang/plugin.cxx  |   16 +++-
 compilerplugins/clang/test/referencecasting.cxx   |   22 +
 dbaccess/source/ui/browser/sbagrid.cxx|4 -
 dbaccess/source/ui/misc/TokenWriter.cxx   |6 -
 desktop/source/deployment/registry/help/dp_help.cxx   |4 -
 embeddedobj/source/msole/ownview.cxx  |   27 
+--
 filter/source/config/cache/cacheupdatelistener.cxx|2 
 forms/source/component/FormComponent.cxx  |3 
 forms/source/component/FormattedField.cxx |4 -
 framework/source/dispatch/interceptionhelper.cxx  |4 -
 framework/source/dispatch/mailtodispatcher.cxx|4 -
 framework/source/dispatch/popupmenudispatcher.cxx |5 -
 framework/source/dispatch/servicehandler.cxx  |4 -
 framework/source/fwe/helper/actiontriggerhelper.cxx   |2 
 framework/source/fwe/xml/menuconfiguration.cxx|2 
 framework/source/helper/uiconfigelementwrapperbase.cxx|8 +-
 framework/source/jobs/job.cxx |   14 +--
 framework/source/jobs/jobdispatch.cxx |2 
 framework/source/layoutmanager/layoutmanager.cxx  |   26 +++---
 framework/source/layoutmanager/toolbarlayoutmanager.cxx   |   16 +---
 framework/source/services/autorecovery.cxx|4 -
 framework/source/services/desktop.cxx |2 
 framework/source/services/frame.cxx   |   26 ++
 framework/source/uiconfiguration/globalsettings.cxx   |4 -
 framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx |   38 
+-
 framework/source/uiconfiguration/uiconfigurationmanager.cxx   |   34 

 framework/source/uielement/addonstoolbarwrapper.cxx   |2 
 framework/source/uielement/controlmenucontroller.cxx  |4 -
 framework/source/uielement/fontmenucontroller.cxx |4 -
 framework/source/uielement/fontsizemenucontroller.cxx |4 -
 framework/source/uielement/headermenucontroller.cxx   |4 -
 framework/source/uielement/langselectionmenucontroller.cxx|4 -
 framework/source/uielement/macrosmenucontroller.cxx   |4 -
 framework/source/uielement/menubarmanager.cxx |   21 ++---
 framework/source/uielement/menubarwrapper.cxx |2 
 framework/source/uielement/newmenucontroller.cxx  |4 -
 framework/source/uielement/objectmenucontroller.cxx   |4 -
 framework/source/uielement/progressbarwrapper.cxx |9 --
 framework/source/uielement/recentfilesmenucontroller.cxx  |6 -
 framework/source/uielement/statusbarmanager.cxx   |   14 +--
 framework/source/uielement/statusbarwrapper.cxx   |2 
 framework/source/uielement/subtoolbarcontroller.cxx   |3 
 framework/source/uielement/toolbarmanager.cxx |   28 
++-
 framework/source/uielement/toolbarmodemenucontroller.cxx  |6 -
 framework/source/uielement/toolbarsmenucontroller.cxx |6 -
 framework/source/uielement/toolbarwrapper.cxx |2 
 framework/source/uifactory/menubarfactory.cxx |3 
 framework/source/uifactory/statusbarfactory.cxx   |3 
 framework/source/uifactory/toolbarfactory.cxx |3 
 package/source/xstor/ocompinstream.cxx|2 
 package/source/xstor/xstorage.cxx |3 
 package/source/zippackage/ZipPackageFolder.cxx|4 -
 sd/source/ui/slidesorter/controller/SlideSorterController.cxx |3 
 sd/source/ui/slidesorter/controller/SlsListener.cxx   |8 --
 sd/source/ui/tools/EventMultiplexer.cxx   |7 -
 sd/source/ui/view/drviewsa.cxx|3 
 sdext/source/presenter/PresenterAccessibility.cxx |2 
 sdext/source/presenter/PresenterController.cxx|6 -
 sdext/source/presenter/PresenterHelpView.cxx  |3 
 sdext/source/presenter/PresenterNotesView.cxx |4 -
 sdext/source/presenter/PresenterPaneFactory.cxx   |6 -
 

[Libreoffice-commits] core.git: avmedia/source chart2/inc chart2/source comphelper/source embeddedobj/source extensions/source filter/source fpicker/source framework/inc framework/source include/comph

2021-08-07 Thread Noel Grandin (via logerrit)
 UnoControls/inc/basecontainercontrol.hxx  |3 
 UnoControls/inc/multiplexer.hxx   |4 
 UnoControls/source/base/basecontainercontrol.cxx  |8 
 UnoControls/source/base/multiplexer.cxx   |8 
 UnoControls/source/controls/OConnectionPointContainerHelper.cxx   |5 
 UnoControls/source/controls/OConnectionPointHelper.cxx|7 
 UnoControls/source/inc/OConnectionPointContainerHelper.hxx|6 
 avmedia/source/macavf/window.hxx  |4 
 avmedia/source/win/window.cxx |   16 -
 avmedia/source/win/window.hxx |4 
 chart2/inc/ChartView.hxx  |4 
 chart2/source/controller/main/ChartController_Window.cxx  |4 
 chart2/source/inc/LifeTime.hxx|4 
 chart2/source/model/main/ChartModel.cxx   |4 
 chart2/source/model/main/ChartModel_Persistence.cxx   |8 
 chart2/source/tools/LifeTime.cxx  |8 
 chart2/source/view/main/ChartView.cxx |4 
 comphelper/source/container/interfacecontainer2.cxx   |  116 

 embeddedobj/source/commonembedding/embedobj.cxx   |6 
 embeddedobj/source/commonembedding/miscobj.cxx|   17 -
 embeddedobj/source/general/dummyobject.cxx|   17 -
 embeddedobj/source/inc/commonembobj.hxx   |6 
 embeddedobj/source/inc/dummyobject.hxx|8 
 embeddedobj/source/inc/oleembobj.hxx  |6 
 embeddedobj/source/msole/olecomponent.cxx |   18 -
 embeddedobj/source/msole/olecomponent.hxx |6 
 embeddedobj/source/msole/oleembed.cxx |   14 -
 embeddedobj/source/msole/olemisc.cxx  |   24 -
 extensions/source/bibliography/framectr.cxx   |4 
 filter/source/config/cache/basecontainer.cxx  |4 
 filter/source/config/cache/basecontainer.hxx  |4 
 filter/source/config/cache/configflush.cxx|4 
 filter/source/config/cache/configflush.hxx|4 
 fpicker/source/win32/VistaFilePickerEventHandler.cxx  |4 
 fpicker/source/win32/VistaFilePickerEventHandler.hxx  |4 
 framework/inc/helper/uiconfigelementwrapperbase.hxx   |3 
 framework/inc/helper/uielementwrapperbase.hxx |3 
 framework/inc/services/layoutmanager.hxx  |4 
 framework/inc/uielement/statusbarmanager.hxx  |4 
 framework/inc/uielement/toolbarmanager.hxx|4 
 framework/source/fwe/helper/titlehelper.cxx   |4 
 framework/source/layoutmanager/layoutmanager.cxx  |6 
 framework/source/services/desktop.cxx |   12 
 framework/source/services/frame.cxx   |   14 -
 framework/source/uiconfiguration/imagemanagerimpl.cxx |4 
 framework/source/uiconfiguration/imagemanagerimpl.hxx |4 
 framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx |7 
 framework/source/uiconfiguration/uiconfigurationmanager.cxx   |7 
 include/comphelper/multicontainer2.hxx|  139 
++
 include/framework/desktop.hxx |3 
 include/framework/titlehelper.hxx |4 
 include/svtools/statusbarcontroller.hxx   |4 
 include/svtools/toolboxcontroller.hxx |4 
 package/source/xstor/owriteablestream.cxx |7 
 package/source/xstor/xstorage.cxx |   11 
 sfx2/source/doc/printhelper.cxx   |8 
 sfx2/source/doc/sfxbasemodel.cxx  |   22 -
 sfx2/source/view/sfxbasecontroller.cxx|7 
 sw/source/core/unocore/unoidx.cxx |5 
 sw/source/core/unocore/unotbl.cxx |6 
 60 files changed, 464 insertions(+), 199 deletions(-)

New commits:
commit 86abf3a682b424dc0fcbccf030f5a0b9bfb81d8c
Author: Noel Grandin 
AuthorDate: Sat Aug 7 09:24:46 2021 +0200
Commit: Noel Grandin 
CommitDate: Sat Aug 7 21:34:33 2021 +0200

create comphelper::OMultiTypeInterfaceContainerHelper2 and use it

based on OInterfaceContainerHelper2 which is considerably
faster than the original OInterfaceContainerHelper

Change-Id: 

[Libreoffice-commits] core.git: avmedia/source chart2/source dbaccess/source fpicker/source framework/source linguistic/source sw/source ucbhelper/source ucb/source vcl/win

2021-08-07 Thread Noel Grandin (via logerrit)
 avmedia/source/win/window.cxx|8 +++---
 chart2/source/controller/main/ChartController_Window.cxx |4 ---
 chart2/source/model/main/ChartModel.cxx  |4 ---
 chart2/source/model/main/ChartModel_Persistence.cxx  |9 ++
 chart2/source/tools/LifeTime.cxx |9 ++
 chart2/source/tools/RangeHighlighter.cxx |4 ---
 chart2/source/view/main/ChartView.cxx|4 ---
 dbaccess/source/core/dataaccess/ContentHelper.cxx|4 ---
 fpicker/source/win32/VistaFilePickerEventHandler.cxx |3 +-
 framework/source/services/autorecovery.cxx   |3 --
 framework/source/services/desktop.cxx|   15 +++
 linguistic/source/lngopt.cxx |4 ---
 sw/source/uibase/uno/unomailmerge.cxx|8 +-
 ucb/source/cacher/contentresultsetwrapper.cxx|   20 +++
 ucb/source/core/ucbstore.cxx |   10 +--
 ucb/source/sorter/sortresult.cxx |   10 +--
 ucbhelper/source/provider/contenthelper.cxx  |6 +---
 ucbhelper/source/provider/resultset.cxx  |6 +---
 vcl/win/dtrans/generic_clipboard.cxx |4 ---
 19 files changed, 39 insertions(+), 96 deletions(-)

New commits:
commit 773a7b57fa99bdda9cde59937cd1987384ae533a
Author: Noel Grandin 
AuthorDate: Sat Aug 7 10:47:18 2021 +0200
Commit: Noel Grandin 
CommitDate: Sat Aug 7 17:17:25 2021 +0200

no need to use UNO_QUERY here

Change-Id: I1bfe8238d7c08f27d2b21f9fe79712aba045c812
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120152
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/avmedia/source/win/window.cxx b/avmedia/source/win/window.cxx
index a3fb5abca52c..b7aa28ba26d5 100644
--- a/avmedia/source/win/window.cxx
+++ b/avmedia/source/win/window.cxx
@@ -430,7 +430,7 @@ void Window::fireMousePressedEvent( const 
css::awt::MouseEvent& rEvt )
 ::cppu::OInterfaceIteratorHelper aIter( *pContainer );
 
 while( aIter.hasMoreElements() )
-uno::Reference< awt::XMouseListener >( aIter.next(), 
uno::UNO_QUERY_THROW )->mousePressed( rEvt );
+static_cast< awt::XMouseListener* >( aIter.next() )->mousePressed( 
rEvt );
 }
 }
 
@@ -443,7 +443,7 @@ void Window::fireMouseReleasedEvent( const 
css::awt::MouseEvent& rEvt )
 ::cppu::OInterfaceIteratorHelper aIter( *pContainer );
 
 while( aIter.hasMoreElements() )
-uno::Reference< awt::XMouseListener >( aIter.next(), 
uno::UNO_QUERY_THROW )->mouseReleased( rEvt );
+static_cast< awt::XMouseListener* >( aIter.next() 
)->mouseReleased( rEvt );
 }
 }
 
@@ -456,7 +456,7 @@ void Window::fireMouseMovedEvent( const 
css::awt::MouseEvent& rEvt )
 ::cppu::OInterfaceIteratorHelper aIter( *pContainer );
 
 while( aIter.hasMoreElements() )
-uno::Reference< awt::XMouseMotionListener >( aIter.next(), 
uno::UNO_QUERY_THROW )->mouseMoved( rEvt );
+static_cast< awt::XMouseMotionListener* >( aIter.next() 
)->mouseMoved( rEvt );
 }
 }
 
@@ -469,7 +469,7 @@ void Window::fireSetFocusEvent( const css::awt::FocusEvent& 
rEvt )
 ::cppu::OInterfaceIteratorHelper aIter( *pContainer );
 
 while( aIter.hasMoreElements() )
-uno::Reference< awt::XFocusListener >( aIter.next(), 
uno::UNO_QUERY_THROW )->focusGained( rEvt );
+static_cast< awt::XFocusListener* >( aIter.next() )->focusGained( 
rEvt );
 }
 }
 
diff --git a/chart2/source/controller/main/ChartController_Window.cxx 
b/chart2/source/controller/main/ChartController_Window.cxx
index a63da0791c30..024cbe5bf589 100644
--- a/chart2/source/controller/main/ChartController_Window.cxx
+++ b/chart2/source/controller/main/ChartController_Window.cxx
@@ -1760,9 +1760,7 @@ void 
ChartController::impl_notifySelectionChangeListeners()
 ::cppu::OInterfaceIteratorHelper aIt( *pIC );
 while( aIt.hasMoreElements() )
 {
-uno::Reference< view::XSelectionChangeListener > xListener( 
aIt.next(), uno::UNO_QUERY );
-if( xListener.is() )
-xListener->selectionChanged( aEvent );
+static_cast< view::XSelectionChangeListener* >( aIt.next() 
)->selectionChanged( aEvent );
 }
 }
 }
diff --git a/chart2/source/model/main/ChartModel.cxx 
b/chart2/source/model/main/ChartModel.cxx
index 01bf592f7f34..b36d2becb6f3 100644
--- a/chart2/source/model/main/ChartModel.cxx
+++ b/chart2/source/model/main/ChartModel.cxx
@@ -251,9 +251,7 @@ void ChartModel::impl_notifyCloseListeners()
 ::cppu::OInterfaceIteratorHelper aIt( *pIC );
 while( aIt.hasMoreElements() )
 {
-uno::Reference< util::XCloseListener > xListener( aIt.next(), 
uno::UNO_QUERY );
-if( xListener.is() )
-   

[Libreoffice-commits] core.git: avmedia/source

2021-08-06 Thread Caolán McNamara (via logerrit)
 avmedia/source/avmediadummy.cxx |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit bd0c058811538a646196b479a8ce8d94a64763aa
Author: Caolán McNamara 
AuthorDate: Fri Aug 6 14:33:02 2021 +0100
Commit: Caolán McNamara 
CommitDate: Fri Aug 6 21:15:48 2021 +0200

fix --disable-avmedia clang-plugins warnings

abandoned getting this to work because not sure what this should
look like, seems caught between two stools as to what it wants to do

Change-Id: Ica0d1e25f2a19dfee0fe40d3e106d05e1f861c2b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120119
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/avmedia/source/avmediadummy.cxx b/avmedia/source/avmediadummy.cxx
index 6c6ada0163e9..823cc6ec9f80 100644
--- a/avmedia/source/avmediadummy.cxx
+++ b/avmedia/source/avmediadummy.cxx
@@ -61,6 +61,7 @@ bool MediaItem::PutValue( const css::uno::Any&, sal_uInt8 )
 
 AVMediaSetMask MediaItem::getMaskSet() const
 {
+(void) this;// Silence loplugin:staticmethods
 return AVMediaSetMask::NONE;
 }
 
@@ -83,10 +84,10 @@ bool MediaItem::operator==( const SfxPoolItem& rItem ) const
 
 } // namespace avmedia
 
-extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* SAL_CALL
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
 
com_sun_star_comp_framework_SoundHandler_get_implementation(css::uno::XComponentContext*,
 
css::uno::Sequence const &)
 {
-return NULL;
+return nullptr;
 }
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


[Libreoffice-commits] core.git: avmedia/source basic/source canvas/source connectivity/source cppuhelper/source cui/source dbaccess/source extensions/source filter/source fpicker/source hwpfilter/sour

2021-08-02 Thread Noel Grandin (via logerrit)
 UnoControls/source/controls/progressmonitor.cxx|   16 +-
 UnoControls/source/controls/statusindicator.cxx|8 -
 avmedia/source/framework/soundhandler.cxx  |2 
 avmedia/source/gstreamer/gstframegrabber.cxx   |4 
 avmedia/source/gstreamer/gstwindow.cxx |4 
 avmedia/source/win/framegrabber.cxx|4 
 avmedia/source/win/player.cxx  |4 
 avmedia/source/win/window.cxx  |4 
 basic/source/classes/sb.cxx|2 
 basic/source/sbx/sbxform.cxx   |   28 +--
 basic/source/sbx/sbxscan.cxx   |   16 +-
 basic/source/uno/namecont.cxx  |4 
 canvas/source/cairo/cairo_canvashelper.cxx |2 
 connectivity/source/manager/mdrivermanager.cxx |2 
 cppuhelper/source/component_context.cxx|6 
 cppuhelper/source/macro_expander.cxx   |6 
 cui/source/dialogs/hlmarkwn.cxx|6 
 cui/source/dialogs/showcols.cxx|4 
 cui/source/options/optpath.cxx |   10 -
 dbaccess/source/core/api/SingleSelectQueryComposer.cxx |   26 +--
 dbaccess/source/ui/uno/composerdialogs.cxx |4 
 extensions/source/update/check/updatecheck.cxx |   10 -
 extensions/source/update/check/updatecheckconfig.cxx   |   34 ++--
 extensions/source/update/check/updatehdl.cxx   |   22 +--
 extensions/source/update/ui/updatecheckui.cxx  |   12 -
 filter/source/msfilter/msdffimp.cxx|2 
 filter/source/svg/svgexport.cxx|   12 -
 filter/source/t602/t602filter.cxx  |   14 -
 filter/source/textfilterdetect/filterdetect.cxx|   14 -
 fpicker/source/office/fileview.cxx |2 
 hwpfilter/source/hwpreader.cxx |2 
 jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx   |4 
 libreofficekit/source/gtk/lokdocview.cxx   |2 
 lingucomponent/source/lingutil/lingutil.cxx|2 
 lingucomponent/source/spellcheck/spell/sspellimp.cxx   |2 
 lingucomponent/source/thesaurus/libnth/nthesimp.cxx|2 
 linguistic/source/convdicxml.cxx   |6 
 linguistic/source/dicimp.cxx   |4 
 linguistic/source/hhconvdic.cxx|2 
 reportdesign/source/core/api/ReportDefinition.cxx  |  122 -
 scaddins/source/analysis/analysis.cxx  |6 
 scaddins/source/datefunc/datefunc.cxx  |6 
 scaddins/source/pricing/pricing.cxx|6 
 sccomp/source/solver/SolverComponent.cxx   |   10 -
 scripting/source/basprov/basmethnode.cxx   |4 
 scripting/source/basprov/basscript.cxx |2 
 scripting/source/vbaevents/eventhelper.cxx |2 
 sd/source/filter/html/pubdlg.cxx   |2 
 starmath/source/cfgitem.cxx|8 -
 stoc/source/security/file_policy.cxx   |   20 +-
 svl/source/items/srchitem.cxx  |   28 +--
 svl/source/numbers/numfmuno.cxx|   70 -
 svtools/source/config/miscopt.cxx  |6 
 svtools/source/config/slidesorterbaropt.cxx|2 
 svtools/source/control/ctrlbox.cxx |2 
 svtools/source/uno/addrtempuno.cxx |2 
 svx/source/dialog/imapdlg.cxx  |   16 +-
 svx/source/dialog/swframeexample.cxx   |2 
 svx/source/form/datanavi.cxx   |   18 +-
 svx/source/items/viewlayoutitem.cxx|4 
 svx/source/items/zoomslideritem.cxx|8 -
 svx/source/sidebar/PanelFactory.cxx|4 
 svx/source/svdraw/svdview.cxx  |2 
 svx/source/tbxctrls/fillctrl.cxx   |4 
 svx/source/tbxctrls/grafctrl.cxx   |2 
 svx/source/xml/xmleohlp.cxx|   18 +-
 svx/source/xml/xmlgrhlp.cxx|4 
 svx/source/xoutdev/_xoutbmp.cxx|8 -
 toolkit/source/controls/controlmodelcontainerbase.cxx  |2 
 toolkit/source/controls/dialogcontrol.cxx  |6 
 toolkit/source/controls/geometrycontrolmodel.cxx   |   18 +-
 toolkit/source/controls/tabpagecontainer.cxx   |2 
 ucb/source/core/FileAccess.cxx |2 
 ucb/source/core/ucbstore.cxx   |4 
 ucb/source/ucp/hierarchy/hierarchydata.cxx |6 
 ucb/source/ucp/hierarchy/hierarchydatasource.cxx   |   11 -
 ucb/source/ucp/hierarchy/hierarchyuri.cxx  |   33 

[Libreoffice-commits] core.git: avmedia/source cui/source desktop/source editeng/source include/editeng include/unotools sc/source sd/source sfx2/source sw/source unotools/source uui/source xmloff/sou

2021-07-26 Thread Noel Grandin (via logerrit)
 avmedia/source/viewer/mediawindow_impl.cxx |2 
 cui/source/options/optinet2.cxx|   27 
 cui/source/options/optinet2.hxx|2 
 cui/source/options/securityoptions.cxx |   26 
 cui/source/options/securityoptions.hxx |4 
 desktop/source/lib/init.cxx|2 
 editeng/source/editeng/impedit2.cxx|3 
 editeng/source/items/frmitems.cxx  |3 
 include/editeng/brushitem.hxx  |2 
 include/unotools/configitem.hxx|5 
 include/unotools/itemholderbase.hxx|1 
 include/unotools/securityoptions.hxx   |  217 +-
 sc/source/core/data/global.cxx |3 
 sc/source/ui/docshell/docsh4.cxx   |4 
 sd/source/ui/func/fusel.cxx|5 
 sfx2/source/appl/appcfg.cxx|   13 
 sfx2/source/appl/appopen.cxx   |2 
 sfx2/source/appl/linkmgr2.cxx  |2 
 sfx2/source/appl/sfxhelp.cxx   |3 
 sfx2/source/dialog/filedlghelper.cxx   |3 
 sfx2/source/doc/docmacromode.cxx   |   10 
 sfx2/source/doc/objcont.cxx|2 
 sfx2/source/doc/objstor.cxx|4 
 sw/source/core/doc/DocumentLinksAdministrationManager.cxx  |2 
 sw/source/filter/html/htmlgrin.cxx |3 
 sw/source/filter/ww8/docxattributeoutput.cxx   |   15 
 sw/source/uibase/docvw/SidebarTxtControl.cxx   |3 
 sw/source/uibase/docvw/edtwin.cxx  |9 
 unotools/source/config/configitem.cxx  |  145 +
 unotools/source/config/itemholder1.cxx |4 
 unotools/source/config/securityoptions.cxx |  956 ++---
 unotools/source/misc/mediadescriptor.cxx   |2 
 uui/source/secmacrowarnings.cxx|5 
 xmloff/source/draw/sdxmlexp.cxx|3 
 xmloff/source/text/XMLRedlineExport.cxx|6 
 xmloff/source/text/txtflde.cxx |3 
 xmlsecurity/inc/macrosecurity.hxx  |1 
 xmlsecurity/source/component/documentdigitalsignatures.cxx |   20 
 xmlsecurity/source/dialogs/macrosecurity.cxx   |   24 
 39 files changed, 437 insertions(+), 1109 deletions(-)

New commits:
commit 6ed8c5a0f19901ab413c6610649326b2475c3a8c
Author: Noel Grandin 
AuthorDate: Sun Jul 25 21:35:05 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon Jul 26 14:25:35 2021 +0200

use officecfg for security options

Change-Id: I9d91fd5b260b82e05aac6567143386742953ecf6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119486
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/avmedia/source/viewer/mediawindow_impl.cxx 
b/avmedia/source/viewer/mediawindow_impl.cxx
index ea15b6413e2a..affc0ff63611 100644
--- a/avmedia/source/viewer/mediawindow_impl.cxx
+++ b/avmedia/source/viewer/mediawindow_impl.cxx
@@ -175,7 +175,7 @@ uno::Reference 
MediaWindowImpl::createPlayer(const OUString& rUR
 if( rURL.isEmpty() )
 return xPlayer;
 
-if (SvtSecurityOptions().isUntrustedReferer(rReferer))
+if (SvtSecurityOptions::isUntrustedReferer(rReferer))
 {
 return xPlayer;
 }
diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx
index acb04b97d696..e01433516ff7 100644
--- a/cui/source/options/optinet2.cxx
+++ b/cui/source/options/optinet2.cxx
@@ -475,7 +475,6 @@ IMPL_STATIC_LINK(SvxProxyTabPage, LoseFocusHdl_Impl, 
weld::Widget&, rControl, vo
 //
 SvxSecurityTabPage::SvxSecurityTabPage(weld::Container* pPage, 
weld::DialogController* pController, const SfxItemSet& rSet)
 : SfxTabPage(pPage, pController, "cui/ui/optsecuritypage.ui", 
"OptSecurityPage", )
-, mpSecOptions(new SvtSecurityOptions)
 , m_xSecurityOptionsPB(m_xBuilder->weld_button("options"))
 , m_xSavePasswordsCB(m_xBuilder->weld_check_button("savepassword"))
 , m_xShowConnectionsPB(m_xBuilder->weld_button("connections"))
@@ -523,7 +522,7 @@ SvxSecurityTabPage::~SvxSecurityTabPage()
 IMPL_LINK_NOARG(SvxSecurityTabPage, SecurityOptionsHdl, weld::Button&, void)
 {
 if (!m_xSecOptDlg)
-m_xSecOptDlg.reset(new svx::SecurityOptionsDialog(GetFrameWeld(), 
mpSecOptions.get()));
+m_xSecOptDlg.reset(new svx::SecurityOptionsDialog(GetFrameWeld()));
 m_xSecOptDlg->run();
 }
 
@@ -766,15 +765,15 @@ DeactivateRC SvxSecurityTabPage::DeactivatePage( 
SfxItemSet* _pSet )
 
 namespace
 {
-  

[Libreoffice-commits] core.git: avmedia/source basctl/source cui/source dbaccess/source desktop/source extensions/source filter/source forms/source include/sfx2 officecfg/registry reportdesign/source

2021-07-12 Thread Samuel Mehrbrodt (via logerrit)
 avmedia/source/viewer/mediawindow.cxx   |1 
 basctl/source/basicide/moduldl2.cxx |   23 -
 cui/source/customize/acccfg.cxx |1 
 cui/source/customize/cfg.cxx|1 
 cui/source/dialogs/SignSignatureLineDialog.cxx  |1 
 cui/source/dialogs/insdlg.cxx   |1 
 cui/source/dialogs/screenshotannotationdlg.cxx  |1 
 cui/source/options/optjava.cxx  |6 
 cui/source/tabpages/numpages.cxx|1 
 dbaccess/source/ui/app/AppController.cxx|6 
 dbaccess/source/ui/dlg/dbwizsetup.cxx   |5 
 dbaccess/source/ui/dlg/generalpage.cxx  |1 
 desktop/source/deployment/gui/dp_gui_dialog2.cxx|5 
 desktop/source/deployment/gui/dp_gui_dialog2.hxx|1 
 extensions/source/propctrlr/formcomponenthandler.cxx|2 
 filter/source/xsltdialog/xmlfiltersettingsdialog.cxx|2 
 forms/source/component/ImageControl.cxx |1 
 include/sfx2/filedlghelper.hxx  |   64 ++-
 officecfg/registry/data/org/openoffice/Office/Impress.xcu   |5 
 officecfg/registry/schema/org/openoffice/Office/Common.xcs  |   15 
 officecfg/registry/schema/org/openoffice/Office/Impress.xcs |   14 
 reportdesign/source/ui/report/ReportController.cxx  |1 
 sc/source/ui/miscdlgs/dataproviderdlg.cxx   |1 
 sc/source/ui/miscdlgs/datastreamdlg.cxx |1 
 sc/source/ui/xmlsource/xmlsourcedlg.cxx |   19 
 sd/source/ui/dlg/PhotoAlbumDialog.cxx   |   30 -
 sd/source/ui/dlg/filedlg.cxx|   11 
 sd/source/ui/dlg/tpaction.cxx   |6 
 sd/source/ui/func/fuinsfil.cxx  |1 
 sfx2/source/appl/fileobj.cxx|2 
 sfx2/source/appl/opengrf.cxx|1 
 sfx2/source/dialog/filedlghelper.cxx|  246 ++--
 sfx2/source/dialog/filedlgimpl.hxx  |2 
 sfx2/source/doc/autoredactdialog.cxx|1 
 sfx2/source/doc/docinsert.cxx   |1 
 sfx2/source/doc/guisaveas.cxx   |   33 +
 sfx2/source/doc/templatedlg.cxx |1 
 svx/source/core/graphichelper.cxx   |2 
 svx/source/dialog/imapdlg.cxx   |4 
 svx/source/form/datanavi.cxx|3 
 sw/source/ui/chrdlg/chardlg.cxx |1 
 sw/source/ui/dbui/createaddresslistdialog.cxx   |4 
 sw/source/ui/dbui/mmdocselectpage.cxx   |3 
 sw/source/ui/fldui/javaedit.cxx |2 
 sw/source/ui/misc/glossary.cxx  |4 
 sw/source/uibase/app/docsh2.cxx |6 
 sw/source/uibase/dbui/dbmgr.cxx |4 
 sw/source/uibase/dbui/mailmergehelper.cxx   |1 
 sw/source/uibase/uiview/srcview.cxx |2 
 sw/source/uibase/uiview/view2.cxx   |2 
 50 files changed, 376 insertions(+), 176 deletions(-)

New commits:
commit d157c1bd70d630a58db33910d550bb8dee9fe62e
Author: Samuel Mehrbrodt 
AuthorDate: Thu Jul 8 05:50:25 2021 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Mon Jul 12 14:31:20 2021 +0200

tdf#126665 Remember last used file picker directory

This introduces internal tracking of last used directories.
Each caller of the file picker can pass a "context". The selected
directory will then be saved & restored when opening the file picker
with the same context again.

After ffa636ba74b04b3258ec9a696bc4eac33581fa24 , the Windows file picker
no longer tracks the last used directory itself.
This is a replacement and an improvement at the same time, since there is 
not
one global last used directory, but one per context.

Change-Id: I10650cfb9359922690954fa65c89b4e47477e2c5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118597
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 
Reviewed-by: Samuel Mehrbrodt 

diff --git a/avmedia/source/viewer/mediawindow.cxx 
b/avmedia/source/viewer/mediawindow.cxx
index 0807de0f5a45..4ff32f636eb6 100644
--- a/avmedia/source/viewer/mediawindow.cxx
+++ b/avmedia/source/viewer/mediawindow.cxx
@@ -215,6 +215,7 @@ bool MediaWindow::executeMediaURLDialog(weld::Window* 
pParent, OUString& rURL, b
 static const char   aSeparator[] = ";";
 OUStringBuffer  aAllTypes;
 
+

[Libreoffice-commits] core.git: avmedia/source basctl/source cui/source include/avmedia include/sfx2 include/svx reportdesign/source sc/inc sc/source sd/source sfx2/inc sfx2/source starmath/inc starma

2021-06-18 Thread Armin Le Grand (Allotropia) (via logerrit)
 avmedia/source/framework/mediatoolbox.cxx   |2 +-
 basctl/source/basicide/IDEComboBox.cxx  |6 --
 basctl/source/inc/IDEComboBox.hxx   |8 
 cui/source/dialogs/cuihyperdlg.cxx  |2 +-
 cui/source/inc/cuihyperdlg.hxx  |2 +-
 include/avmedia/mediatoolbox.hxx|2 +-
 include/sfx2/ctrlitem.hxx   |4 ++--
 include/sfx2/sfxstatuslistener.hxx  |2 +-
 include/sfx2/sidebar/ControllerItem.hxx |2 +-
 include/sfx2/stbitem.hxx|2 +-
 include/sfx2/tbxctrl.hxx|2 +-
 include/svx/ParaSpacingControl.hxx  |8 
 include/svx/bmpmask.hxx |2 +-
 include/svx/clipboardctl.hxx|2 +-
 include/svx/fillctrl.hxx|2 +-
 include/svx/float3d.hxx |4 ++--
 include/svx/fontwork.hxx|2 +-
 include/svx/formatpaintbrushctrl.hxx|2 +-
 include/svx/grafctrl.hxx|4 ++--
 include/svx/imapdlg.hxx |2 +-
 include/svx/insctrl.hxx |4 ++--
 include/svx/linectrl.hxx|2 +-
 include/svx/modctrl.hxx |4 ++--
 include/svx/pszctrl.hxx |2 +-
 include/svx/selctrl.hxx |4 ++--
 include/svx/tbxctl.hxx  |2 +-
 include/svx/xmlsecctrl.hxx  |2 +-
 include/svx/zoomctrl.hxx|4 ++--
 include/svx/zoomsliderctrl.hxx  |2 +-
 reportdesign/source/ui/misc/statusbarcontroller.cxx |4 ++--
 sc/inc/NumberFormatControl.hxx  |2 +-
 sc/source/ui/cctrl/tbzoomsliderctrl.cxx |2 +-
 sc/source/ui/inc/navcitem.hxx   |2 +-
 sc/source/ui/inc/tbzoomsliderctrl.hxx   |2 +-
 sc/source/ui/navipi/navcitem.cxx|2 +-
 sc/source/ui/sidebar/NumberFormatControl.cxx|2 +-
 sd/source/ui/app/scalectrl.cxx  |4 ++--
 sd/source/ui/app/tmplctrl.cxx   |2 +-
 sd/source/ui/dlg/animobjs.cxx   |2 +-
 sd/source/ui/dlg/diactrl.cxx|2 +-
 sd/source/ui/dlg/gluectrl.cxx   |4 ++--
 sd/source/ui/dlg/navigatr.cxx   |4 ++--
 sd/source/ui/inc/animobjs.hxx   |2 +-
 sd/source/ui/inc/diactrl.hxx|4 ++--
 sd/source/ui/inc/gluectrl.hxx   |4 ++--
 sd/source/ui/inc/navigatr.hxx   |4 ++--
 sd/source/ui/inc/scalectrl.hxx  |4 ++--
 sd/source/ui/inc/tmplctrl.hxx   |2 +-
 sd/source/ui/view/sdruler.cxx   |4 ++--
 sfx2/inc/inettbc.hxx|2 +-
 sfx2/inc/unoctitm.hxx   |2 +-
 sfx2/source/control/ctrlitem.cxx|6 +++---
 sfx2/source/control/sfxstatuslistener.cxx   |4 ++--
 sfx2/source/control/statcach.cxx|   10 +-
 sfx2/source/control/unoctitm.cxx|4 ++--
 sfx2/source/dialog/tplcitem.cxx |2 +-
 sfx2/source/inc/tplcitem.hxx|2 +-
 sfx2/source/inet/inettbc.cxx|2 +-
 sfx2/source/sidebar/ControllerItem.cxx  |2 +-
 sfx2/source/statbar/stbitem.cxx |4 ++--
 sfx2/source/toolbox/tbxitem.cxx |4 ++--
 sfx2/source/view/viewfrm2.cxx   |2 +-
 starmath/inc/view.hxx   |4 ++--
 starmath/source/view.cxx|8 
 svx/source/dialog/_bmpmask.cxx  |2 +-
 svx/source/dialog/_contdlg.cxx  |2 +-
 svx/source/dialog/contimp.hxx   |2 +-
 svx/source/dialog/fontwork.cxx  |2 +-
 svx/source/dialog/imapdlg.cxx   |2 +-
 svx/source/dialog/rlrcitem.cxx  |2 +-
 svx/source/dialog/rlrcitem.hxx  |2 +-
 svx/source/dialog/srchctrl.cxx  |2 +-
 svx/source/dialog/srchctrl.hxx  |3 ++-
 svx/source/engine3d/float3d.cxx |4 ++--
 svx/source/form/datanavi.cxx|2 +-
 svx/source/form/filtnav.cxx |2 +-
 svx/source/form/fmPropBrw.cxx   |2 +-
 svx/source/form/fmexpl.cxx  |2 +-
 

[Libreoffice-commits] core.git: avmedia/source

2021-05-15 Thread Noel Grandin (via logerrit)
 avmedia/source/viewer/mediaevent_impl.cxx |   14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

New commits:
commit d7bc3b5d3a55f621ee7eea2bc89ce1234b0b9db4
Author: Noel Grandin 
AuthorDate: Fri May 14 20:14:30 2021 +0200
Commit: Noel Grandin 
CommitDate: Sat May 15 08:56:56 2021 +0200

unnecessary cast

Change-Id: Ib08132199c343a057a398a50dc09ccab92ab944d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115632
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/avmedia/source/viewer/mediaevent_impl.cxx 
b/avmedia/source/viewer/mediaevent_impl.cxx
index c724b172ad3e..23a5bc3daa75 100644
--- a/avmedia/source/viewer/mediaevent_impl.cxx
+++ b/avmedia/source/viewer/mediaevent_impl.cxx
@@ -40,7 +40,7 @@ MediaEventListenersImpl::~MediaEventListenersImpl()
 
 void MediaEventListenersImpl::cleanUp()
 {
-Application::RemoveMouseAndKeyEvents( reinterpret_cast< vcl::Window* >( 
mpNotifyWindow.get() ) );
+Application::RemoveMouseAndKeyEvents( mpNotifyWindow.get() );
 mpNotifyWindow = nullptr;
 }
 
@@ -63,7 +63,7 @@ void SAL_CALL MediaEventListenersImpl::keyPressed( const 
css::awt::KeyEvent& e )
   ( ( e.Modifiers & 4 ) ? KEY_MOD2 : 0 ) );
 KeyEvent aVCLKeyEvt( e.KeyChar, aVCLKeyCode );
 
-Application::PostKeyEvent( VclEventId::WindowKeyInput, 
reinterpret_cast< vcl::Window* >( mpNotifyWindow.get() ),  );
+Application::PostKeyEvent( VclEventId::WindowKeyInput, 
mpNotifyWindow.get(),  );
 }
 }
 
@@ -80,7 +80,7 @@ void SAL_CALL MediaEventListenersImpl::keyReleased( const 
css::awt::KeyEvent& e
   ( ( e.Modifiers & 2 ) ? KEY_MOD1 : 0 ) |
   ( ( e.Modifiers & 4 ) ? KEY_MOD2 : 0 ) );
 KeyEvent aVCLKeyEvt( e.KeyChar, aVCLKeyCode );
-Application::PostKeyEvent( VclEventId::WindowKeyUp, reinterpret_cast< 
vcl::Window* >( mpNotifyWindow.get() ),  );
+Application::PostKeyEvent( VclEventId::WindowKeyUp, 
mpNotifyWindow.get(),  );
 }
 }
 
@@ -99,7 +99,7 @@ void SAL_CALL MediaEventListenersImpl::mousePressed( const 
css::awt::MouseEvent&
 ( ( e.Buttons & 2 ) ? MOUSE_RIGHT : 0 ) |
 ( ( e.Buttons & 4 ) ? MOUSE_MIDDLE : 0 ),
 e.Modifiers );
-Application::PostMouseEvent( VclEventId::WindowMouseButtonDown, 
reinterpret_cast< vcl::Window* >( mpNotifyWindow.get() ),  );
+Application::PostMouseEvent( VclEventId::WindowMouseButtonDown, 
mpNotifyWindow.get(),  );
 }
 }
 
@@ -118,7 +118,7 @@ void SAL_CALL MediaEventListenersImpl::mouseReleased( const 
css::awt::MouseEvent
 ( ( e.Buttons & 2 ) ? MOUSE_RIGHT : 0 ) |
 ( ( e.Buttons & 4 ) ? MOUSE_MIDDLE : 0 ),
 e.Modifiers );
-Application::PostMouseEvent( VclEventId::WindowMouseButtonUp, 
reinterpret_cast< vcl::Window* >( mpNotifyWindow.get() ),  );
+Application::PostMouseEvent( VclEventId::WindowMouseButtonUp, 
mpNotifyWindow.get(),  );
 }
 }
 
@@ -141,7 +141,7 @@ void SAL_CALL MediaEventListenersImpl::mouseDragged( const 
css::awt::MouseEvent&
 if( mpNotifyWindow )
 {
 MouseEvent aVCLMouseEvt( Point( e.X, e.Y ), 0, 
MouseEventModifiers::NONE, e.Buttons, e.Modifiers );
-Application::PostMouseEvent( VclEventId::WindowMouseMove, 
reinterpret_cast< vcl::Window* >( mpNotifyWindow.get() ),  );
+Application::PostMouseEvent( VclEventId::WindowMouseMove, 
mpNotifyWindow.get(),  );
 }
 }
 
@@ -154,7 +154,7 @@ void SAL_CALL MediaEventListenersImpl::mouseMoved( const 
css::awt::MouseEvent& e
 if( mpNotifyWindow )
 {
 MouseEvent aVCLMouseEvt( Point( e.X, e.Y ), 0, 
MouseEventModifiers::NONE, e.Buttons, e.Modifiers );
-Application::PostMouseEvent( VclEventId::WindowMouseMove, 
reinterpret_cast< vcl::Window* >( mpNotifyWindow.get() ),  );
+Application::PostMouseEvent( VclEventId::WindowMouseMove, 
mpNotifyWindow.get(),  );
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: avmedia/source basctl/source basic/source chart2/source comphelper/source compilerplugins/clang connectivity/source cui/source dbaccess/source desktop/source extensions

2021-04-27 Thread Noel Grandin (via logerrit)
 UnoControls/source/controls/progressmonitor.cxx   |8 -
 avmedia/source/viewer/mediawindow.cxx |4 
 basctl/source/basicide/baside2b.cxx   |2 
 basic/source/runtime/methods.cxx  |2 
 chart2/source/tools/ExponentialRegressionCurveCalculator.cxx  |   10 -
 chart2/source/tools/LogarithmicRegressionCurveCalculator.cxx  |8 -
 chart2/source/tools/PolynomialRegressionCurveCalculator.cxx   |2 
 chart2/source/tools/PotentialRegressionCurveCalculator.cxx|6 
 chart2/source/view/charttypes/VSeriesPlotter.cxx  |2 
 comphelper/source/misc/xmlsechelper.cxx   |2 
 compilerplugins/clang/stringadd.cxx   |   58 
 compilerplugins/clang/stringview.cxx  |2 
 compilerplugins/clang/test/stringadd.cxx  |4 
 connectivity/source/commontools/dbtools2.cxx  |4 
 connectivity/source/commontools/sqlerror.cxx  |6 
 connectivity/source/drivers/firebird/Util.cxx |2 
 connectivity/source/drivers/postgresql/pq_xkeys.cxx   |5 
 connectivity/source/drivers/postgresql/pq_xviews.cxx  |2 
 cui/source/customize/cfg.cxx  |2 
 dbaccess/source/core/api/CacheSet.cxx |6 
 dbaccess/source/core/api/KeySet.cxx   |   12 -
 dbaccess/source/core/api/OptimisticSet.cxx|4 
 dbaccess/source/core/api/SingleSelectQueryComposer.cxx|   20 +--
 dbaccess/source/core/dataaccess/ContentHelper.cxx |2 
 dbaccess/source/filter/xml/xmlServerDatabase.cxx  |   22 +--
 dbaccess/source/ui/dlg/directsql.cxx  |2 
 dbaccess/source/ui/dlg/tablespage.cxx |4 
 dbaccess/source/ui/misc/WCopyTable.cxx|2 
 dbaccess/source/ui/uno/copytablewizard.cxx|2 
 desktop/source/deployment/registry/component/dp_component.cxx |2 
 extensions/source/propctrlr/selectlabeldialog.cxx |7 -
 filter/source/config/cache/filtercache.cxx|   24 +--
 forms/source/xforms/model_ui.cxx  |2 
 framework/source/accelerators/storageholder.cxx   |2 
 i18nlangtag/source/languagetag/languagetag.cxx|6 
 i18npool/source/collator/collator_unicode.cxx |4 
 lotuswordpro/source/filter/lwptblformula.cxx  |2 
 oox/source/core/xmlfilterbase.cxx |2 
 oox/source/dump/dumperbase.cxx|2 
 oox/source/export/drawingml.cxx   |3 
 oox/source/export/vmlexport.cxx   |   12 -
 oox/source/ole/vbamodule.cxx  |3 
 reportdesign/source/filter/xml/xmlControlProperty.cxx |   24 +--
 sc/source/core/data/postit.cxx|2 
 sc/source/core/tool/address.cxx   |2 
 sc/source/core/tool/chgtrack.cxx  |   49 +--
 sc/source/core/tool/compiler.cxx  |4 
 sc/source/filter/dif/difimp.cxx   |4 
 sc/source/filter/excel/xehelper.cxx   |6 
 sc/source/filter/html/htmlexp.cxx |   28 +---
 sc/source/filter/oox/formulabase.cxx  |6 
 sc/source/filter/oox/numberformatsbuffer.cxx  |6 
 sc/source/filter/oox/querytablebuffer.cxx |2 
 sc/source/ui/app/inputhdl.cxx |2 
 sc/source/ui/cctrl/checklistmenu.cxx  |2 
 sc/source/ui/condformat/condformathelper.cxx  |4 
 sc/source/ui/dataprovider/datatransformation.cxx  |2 
 sc/source/ui/dbgui/asciiopt.cxx   |   12 -
 sc/source/ui/optdlg/tpusrlst.cxx  |4 
 sc/source/ui/unoobj/PivotTableDataProvider.cxx|2 
 sc/source/ui/vba/vbahyperlink.cxx |2 
 sc/source/ui/vba/vbanames.cxx |2 
 sc/source/ui/view/tabview.cxx |   10 -
 sd/source/filter/eppt/pptx-epptooxml.cxx  |   24 ---
 sd/source/filter/html/htmlex.cxx  |   10 -
 sd/source/ui/remotecontrol/Communicator.cxx   |   11 -
 sd/source/ui/remotecontrol/DiscoveryService.cxx   |7 -
 sfx2/source/appl/newhelp.cxx  |9 -
 sfx2/source/bastyp/frmhtmlw.cxx   |   14 --
 sfx2/source/control/unoctitm.cxx   

[Libreoffice-commits] core.git: avmedia/source chart2/source include/svx include/vcl sd/source sfx2/source svtools/inc svx/source sw/source

2021-04-06 Thread Caolán McNamara (via logerrit)
 avmedia/source/viewer/mediaevent_impl.cxx  |1 
 chart2/source/controller/inc/ChartController.hxx   |   11 -
 include/svx/sdr/table/tablecontroller.hxx  |1 
 include/vcl/event.hxx  |5 +++-
 include/vcl/vclenum.hxx|   14 
 include/vcl/window.hxx |   15 -
 sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx |2 -
 sd/source/ui/accessibility/AccessibleViewForwarder.cxx |2 -
 sd/source/ui/inc/OutlineView.hxx   |1 
 sfx2/source/view/lokcharthelper.cxx|1 
 sfx2/source/view/lokhelper.cxx |1 
 sfx2/source/view/userinputinterception.cxx |1 
 svtools/inc/table/tablecontrolinterface.hxx|8 --
 svx/source/accessibility/AccessibleControlShape.cxx|1 
 svx/source/accessibility/AccessibleShape.cxx   |1 
 svx/source/accessibility/GraphCtlAccessibleContext.cxx |1 
 svx/source/form/fmpage.cxx |1 
 svx/source/form/fmshimp.cxx|3 +-
 svx/source/form/fmview.cxx |1 
 svx/source/form/fmvwimp.cxx|1 
 svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx   |1 
 svx/source/svdraw/sdrpagewindow.cxx|1 
 svx/source/svdraw/sdrpaintwindow.cxx   |1 
 svx/source/svdraw/svdedxv.cxx  |1 
 svx/source/svdraw/svdmrkv.cxx  |1 
 svx/source/svdraw/svdpntv.cxx  |1 
 svx/source/svdraw/svdview.cxx  |2 -
 svx/source/table/tablecontroller.cxx   |1 
 sw/source/ui/dbui/mmaddressblockpage.cxx   |1 
 29 files changed, 48 insertions(+), 34 deletions(-)

New commits:
commit b1253218e428640c0079916ddd5688c8fbb7171e
Author: Caolán McNamara 
AuthorDate: Tue Apr 6 09:15:23 2021 +0100
Commit: Caolán McNamara 
CommitDate: Tue Apr 6 17:32:51 2021 +0200

forward declare vcl::window in vcl/event.hxx

Change-Id: Ib3fc1b72d3d45377e2d4ccd0ff3e6835d2c29930
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113631
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/avmedia/source/viewer/mediaevent_impl.cxx 
b/avmedia/source/viewer/mediaevent_impl.cxx
index 9fbaceea1145..c724b172ad3e 100644
--- a/avmedia/source/viewer/mediaevent_impl.cxx
+++ b/avmedia/source/viewer/mediaevent_impl.cxx
@@ -21,6 +21,7 @@
 #include 
 #include 
 #include 
+#include 
 
 using namespace ::com::sun::star;
 
diff --git a/chart2/source/controller/inc/ChartController.hxx 
b/chart2/source/controller/inc/ChartController.hxx
index 582573dc7612..09fda2b6fb00 100644
--- a/chart2/source/controller/inc/ChartController.hxx
+++ b/chart2/source/controller/inc/ChartController.hxx
@@ -55,6 +55,7 @@ namespace com::sun::star::awt { struct Point; }
 namespace com::sun::star::document { class XUndoManager; }
 namespace com::sun::star::frame { class XDispatch; }
 namespace com::sun::star::frame { class XLayoutManagerEventBroadcaster; }
+namespace com::sun::star::graphic { class XGraphic; }
 namespace com::sun::star::lang { class XInitialization; }
 namespace com::sun::star::uno { class XComponentContext; }
 namespace com::sun::star::util { class XCloseable; }
@@ -72,14 +73,12 @@ namespace svx::sidebar {
 class SelectionChangeHandler;
 }
 
-class DropTargetHelper;
-
-namespace com::sun::star {
-namespace graphic {
-class XGraphic;
-}
+namespace weld {
+class Window;
 }
 
+class DropTargetHelper;
+
 namespace chart
 {
 
diff --git a/include/svx/sdr/table/tablecontroller.hxx 
b/include/svx/sdr/table/tablecontroller.hxx
index 3d94dcfb08b7..6b505ae4dfd3 100644
--- a/include/svx/sdr/table/tablecontroller.hxx
+++ b/include/svx/sdr/table/tablecontroller.hxx
@@ -29,6 +29,7 @@
 #include 
 #include 
 
+struct ImplSVEvent;
 class SdrView;
 class SdrObject;
 class SfxItemSet;
diff --git a/include/vcl/event.hxx b/include/vcl/event.hxx
index 229c1f5988d0..236062d69670 100644
--- a/include/vcl/event.hxx
+++ b/include/vcl/event.hxx
@@ -26,7 +26,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 
 class CommandEvent;
@@ -38,6 +37,10 @@ enum class TextDirectionality {
 BottomToTop_LeftToRight
 };
 
+namespace vcl {
+class Window;
+}
+
 class VCL_DLLPUBLIC KeyEvent
 {
 private:
diff --git a/include/vcl/vclenum.hxx b/include/vcl/vclenum.hxx
index d0c56ea43090..d18bfc70e5f0 100644
--- a/include/vcl/vclenum.hxx
+++ b/include/vcl/vclenum.hxx
@@ -400,6 +400,20 @@ namespace o3tl
 template<> struct typed_flags : is_typed_flags {};
 }
 
+enum class TrackingEventFlags
+{
+NONE   = 0x,
+Cancel   

[Libreoffice-commits] core.git: avmedia/source canvas/source cppcanvas/source drawinglayer/source forms/source include/vcl lotuswordpro/source oox/source sd/source sfx2/source svx/qa svx/source sw/sou

2021-03-13 Thread Tomaž Vajngerl (via logerrit)
 avmedia/source/gstreamer/gstframegrabber.cxx  |2 
 canvas/source/vcl/canvasbitmap.cxx|5 
 cppcanvas/source/mtfrenderer/implrenderer.cxx |2 
 drawinglayer/source/tools/wmfemfhelper.cxx|2 
 forms/source/component/imgprod.cxx|2 
 include/vcl/BitmapTools.hxx   |4 
 include/vcl/bitmap.hxx|8 -
 include/vcl/bitmap/BitmapTypes.hxx|   55 ++
 include/vcl/bitmapex.hxx  |   13 ++
 lotuswordpro/source/filter/lwpbackgroundstuff.cxx |2 
 oox/source/export/drawingml.cxx   |2 
 sd/source/core/drawdoc4.cxx   |2 
 sfx2/source/control/recentdocsviewitem.cxx|2 
 svx/qa/unit/XTableImportExportTest.cxx|2 
 svx/source/gallery2/galobj.cxx|2 
 svx/source/sdr/primitive2d/sdrprimitivetools.cxx  |2 
 svx/source/svdraw/svdhdl.cxx  |2 
 svx/source/svdraw/svdpdf.cxx  |2 
 sw/source/core/layout/paintfrm.cxx|   16 +-
 vcl/backendtest/outputdevice/bitmap.cxx   |   10 -
 vcl/qa/api/XGraphicTest.cxx   |2 
 vcl/qa/cppunit/BackendTest.cxx|8 -
 vcl/qa/cppunit/BitmapExTest.cxx   |6 -
 vcl/qa/cppunit/BitmapFilterTest.cxx   |4 
 vcl/qa/cppunit/BitmapProcessorTest.cxx|4 
 vcl/qa/cppunit/BitmapScaleTest.cxx|6 -
 vcl/qa/cppunit/BitmapTest.cxx |   41 ---
 vcl/qa/cppunit/GraphicDescriptorTest.cxx  |2 
 vcl/qa/cppunit/GraphicTest.cxx|2 
 vcl/qa/cppunit/TypeSerializerTest.cxx |2 
 vcl/qa/cppunit/canvasbitmaptest.cxx   |   16 ++
 vcl/qa/cppunit/graphicfilter/filters-test.cxx |4 
 vcl/qa/cppunit/graphicfilter/filters-tiff-test.cxx|2 
 vcl/qa/cppunit/outdev.cxx |4 
 vcl/qa/cppunit/skia/skia.cxx  |   12 +-
 vcl/qa/cppunit/svm/svmtest.cxx|   28 ++---
 vcl/source/bitmap/BitmapColorQuantizationFilter.cxx   |8 -
 vcl/source/bitmap/BitmapConvolutionMatrixFilter.cxx   |2 
 vcl/source/bitmap/BitmapDisabledImageFilter.cxx   |   11 +-
 vcl/source/bitmap/BitmapDuoToneFilter.cxx |2 
 vcl/source/bitmap/BitmapEmbossGreyFilter.cxx  |3 
 vcl/source/bitmap/BitmapEx.cxx|   20 +--
 vcl/source/bitmap/BitmapFastScaleFilter.cxx   |2 
 vcl/source/bitmap/BitmapGaussianSeparableBlurFilter.cxx   |4 
 vcl/source/bitmap/BitmapInterpolateScaleFilter.cxx|4 
 vcl/source/bitmap/BitmapLightenFilter.cxx |2 
 vcl/source/bitmap/BitmapMedianFilter.cxx  |2 
 vcl/source/bitmap/BitmapMonochromeFilter.cxx  |2 
 vcl/source/bitmap/BitmapMosaicFilter.cxx  |2 
 vcl/source/bitmap/BitmapScaleConvolutionFilter.cxx|4 
 vcl/source/bitmap/BitmapScaleSuperFilter.cxx  |   12 +-
 vcl/source/bitmap/BitmapSeparableUnsharpenFilter.cxx  |2 
 vcl/source/bitmap/BitmapSepiaFilter.cxx   |2 
 vcl/source/bitmap/BitmapSimpleColorQuantizationFilter.cxx |   10 -
 vcl/source/bitmap/BitmapSobelGreyFilter.cxx   |3 
 vcl/source/bitmap/BitmapTools.cxx |   29 +++--
 vcl/source/bitmap/alpha.cxx   |4 
 vcl/source/bitmap/bitmap.cxx  |   76 --
 vcl/source/bitmap/bitmappaint.cxx |9 -
 vcl/source/bitmap/dibtools.cxx|   48 
 vcl/source/filter/igif/gifread.cxx|4 
 vcl/source/filter/ipdf/pdfread.cxx|2 
 vcl/source/filter/itiff/itiff.cxx |2 
 vcl/source/filter/ixbm/xbmread.cxx|4 
 vcl/source/filter/ixpm/xpmread.cxx|   14 +-
 vcl/source/filter/jpeg/JpegReader.cxx |6 -
 vcl/source/filter/png/PngImageReader.cxx  |9 -
 vcl/source/gdi/gdimtf.cxx |2 
 vcl/source/gdi/print.cxx  |2 
 vcl/source/graphic/GraphicObject2.cxx |2 
 vcl/source/helper/canvastools.cxx |   21 ++-
 vcl/source/opengl/OpenGLHelper.cxx|4 
 vcl/source/outdev/bitmap.cxx  |6 -
 

[Libreoffice-commits] core.git: avmedia/source

2021-02-25 Thread Noel (via logerrit)
 avmedia/source/framework/mediatoolbox.cxx|2 +-
 avmedia/source/gstreamer/gstframegrabber.cxx |2 +-
 avmedia/source/gstreamer/gstframegrabber.hxx |3 ++-
 avmedia/source/gstreamer/gstplayer.cxx   |4 ++--
 4 files changed, 6 insertions(+), 5 deletions(-)

New commits:
commit 19ddd197a4246b8ab62932d63670b3d281e7b626
Author: Noel 
AuthorDate: Thu Feb 25 14:49:13 2021 +0200
Commit: Noel Grandin 
CommitDate: Fri Feb 26 07:36:12 2021 +0100

loplugin:refcounting in avmedia

Change-Id: I0cd6d6a4a45d77b25f04c3b49327f1cf9279c6a5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111540
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/avmedia/source/framework/mediatoolbox.cxx 
b/avmedia/source/framework/mediatoolbox.cxx
index a109113a78fe..5cdde7399afe 100644
--- a/avmedia/source/framework/mediatoolbox.cxx
+++ b/avmedia/source/framework/mediatoolbox.cxx
@@ -65,7 +65,7 @@ void MediaToolBoxControl_Impl::execute( const MediaItem& 
rItem )
 }
 
 
-SFX_IMPL_TOOLBOX_CONTROL( ::avmedia::MediaToolBoxControl, ::avmedia::MediaItem 
);
+SFX_IMPL_TOOLBOX_CONTROL( MediaToolBoxControl, ::avmedia::MediaItem );
 
 
 MediaToolBoxControl::MediaToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, 
ToolBox& rTbx ) :
diff --git a/avmedia/source/gstreamer/gstframegrabber.cxx 
b/avmedia/source/gstreamer/gstframegrabber.cxx
index c1341d8d6ad4..7f86852c5609 100644
--- a/avmedia/source/gstreamer/gstframegrabber.cxx
+++ b/avmedia/source/gstreamer/gstframegrabber.cxx
@@ -87,7 +87,7 @@ FrameGrabber::~FrameGrabber()
 disposePipeline();
 }
 
-FrameGrabber* FrameGrabber::create( std::u16string_view rURL )
+rtl::Reference FrameGrabber::create( std::u16string_view rURL )
 {
 return new FrameGrabber( rURL );
 }
diff --git a/avmedia/source/gstreamer/gstframegrabber.hxx 
b/avmedia/source/gstreamer/gstframegrabber.hxx
index b99401526506..c706192efd7d 100644
--- a/avmedia/source/gstreamer/gstframegrabber.hxx
+++ b/avmedia/source/gstreamer/gstframegrabber.hxx
@@ -26,6 +26,7 @@
 #include "gstplayer.hxx"
 #include 
 #include 
+#include 
 
 namespace avmedia::gstreamer {
 
@@ -43,7 +44,7 @@ public:
 const FrameGrabber& operator=(const FrameGrabber&) =delete;
 
 // static create method instead of public Ctor
-static FrameGrabber* create( std::u16string_view rURL );
+static rtl::Reference create( std::u16string_view rURL );
 
 virtual ~FrameGrabber() override;
 
diff --git a/avmedia/source/gstreamer/gstplayer.cxx 
b/avmedia/source/gstreamer/gstplayer.cxx
index cab9f4649b6a..2e723ce6efbc 100644
--- a/avmedia/source/gstreamer/gstplayer.cxx
+++ b/avmedia/source/gstreamer/gstplayer.cxx
@@ -897,12 +897,12 @@ uno::Reference< ::media::XPlayerWindow > SAL_CALL 
Player::createPlayerWindow( co
 uno::Reference< media::XFrameGrabber > SAL_CALL Player::createFrameGrabber()
 {
 ::osl::MutexGuard aGuard(m_aMutex);
-FrameGrabber* pFrameGrabber = nullptr;
+rtl::Reference pFrameGrabber;
 const awt::Size aPrefSize( getPreferredPlayerWindowSize() );
 
 if( ( aPrefSize.Width > 0 ) && ( aPrefSize.Height > 0 ) )
 pFrameGrabber = FrameGrabber::create( maURL );
-SAL_INFO( "avmedia.gstreamer", AVVERSION "created FrameGrabber " << 
pFrameGrabber );
+SAL_INFO( "avmedia.gstreamer", AVVERSION "created FrameGrabber " << 
pFrameGrabber.get() );
 
 return pFrameGrabber;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: avmedia/source

2021-02-22 Thread Noel (via logerrit)
 avmedia/source/gstreamer/gstmanager.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 239d3a850dd3bef82c050fd727f4dbd5cf8ae0af
Author: Noel 
AuthorDate: Mon Feb 22 19:43:35 2021 +0200
Commit: Noel Grandin 
CommitDate: Tue Feb 23 07:30:42 2021 +0100

loplugin:refcounting in avmedia

Change-Id: I150a0f9ffe6ca10d9e92af347e5cc4b87a828125
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111351
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/avmedia/source/gstreamer/gstmanager.cxx 
b/avmedia/source/gstreamer/gstmanager.cxx
index bc7c917dc99d..1803b5880bc1 100644
--- a/avmedia/source/gstreamer/gstmanager.cxx
+++ b/avmedia/source/gstreamer/gstmanager.cxx
@@ -23,6 +23,7 @@
 #include "gstplayer.hxx"
 
 #include 
+#include 
 
 using namespace ::com::sun::star;
 
@@ -38,14 +39,13 @@ Manager::~Manager()
 
 uno::Reference< media::XPlayer > SAL_CALL Manager::createPlayer( const 
OUString& rURL )
 {
-Player* pPlayer( new Player );
-uno::Reference< media::XPlayer >xRet( pPlayer );
+rtl::Reference pPlayer( new Player );
 const INetURLObject aURL( rURL );
 
 if( !pPlayer->create( aURL.GetMainURL( 
INetURLObject::DecodeMechanism::Unambiguous ) )  )
-xRet.clear();
+pPlayer.clear();
 
-return xRet;
+return pPlayer;
 }
 
 OUString SAL_CALL Manager::getImplementationName(  )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: avmedia/source connectivity/source vcl/osx

2021-02-18 Thread Stephan Bergmann (via logerrit)
 avmedia/source/macavf/manager.mm |2 +-
 avmedia/source/macavf/player.mm  |2 +-
 connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx  |2 +-
 connectivity/source/drivers/macab/MacabPreparedStatement.cxx |2 +-
 connectivity/source/drivers/macab/MacabResultSet.cxx |4 ++--
 vcl/osx/a11yfactory.mm   |2 +-
 6 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit 9ece0ae7e1b07d61274c975cbc1cd55966a89013
Author: Stephan Bergmann 
AuthorDate: Thu Feb 18 15:40:53 2021 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Feb 18 19:01:33 2021 +0100

loplugin:referencecasting (macOS)

Change-Id: I99470067a34fab9fbc2ea53d2f8a634240f0d223
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/27
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/avmedia/source/macavf/manager.mm b/avmedia/source/macavf/manager.mm
index 44768b54c4e3..d240bb27a8d1 100644
--- a/avmedia/source/macavf/manager.mm
+++ b/avmedia/source/macavf/manager.mm
@@ -44,7 +44,7 @@ uno::Reference< media::XPlayer > SAL_CALL 
Manager::createPlayer( const OUString&
 if( !xPlayer->create( aURL.GetMainURL( 
INetURLObject::DecodeMechanism::Unambiguous ) )  )
 return {};
 
-return uno::Reference(xPlayer.get());
+return uno::Reference(xPlayer);
 }
 
 
diff --git a/avmedia/source/macavf/player.mm b/avmedia/source/macavf/player.mm
index 7fdc58247f50..401cba74c2d2 100644
--- a/avmedia/source/macavf/player.mm
+++ b/avmedia/source/macavf/player.mm
@@ -333,7 +333,7 @@ uno::Reference< media::XFrameGrabber > SAL_CALL 
Player::createFrameGrabber()
 if( !pGrabber->create( pMovie ) )
 return {};
 
-return pGrabber.get();
+return pGrabber;
 }
 
 
diff --git a/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx 
b/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx
index 540e333aa639..9b3aed095039 100644
--- a/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx
@@ -729,7 +729,7 @@ sal_Bool SAL_CALL 
MacabDatabaseMetaData::supportsBatchUpdates(  )
 
 Reference< XConnection > SAL_CALL MacabDatabaseMetaData::getConnection(  )
 {
-return m_xConnection.get();
+return m_xConnection;
 }
 
 Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getTableTypes(  )
diff --git a/connectivity/source/drivers/macab/MacabPreparedStatement.cxx 
b/connectivity/source/drivers/macab/MacabPreparedStatement.cxx
index cbb3dc75608c..22fd7b499a82 100644
--- a/connectivity/source/drivers/macab/MacabPreparedStatement.cxx
+++ b/connectivity/source/drivers/macab/MacabPreparedStatement.cxx
@@ -131,7 +131,7 @@ Reference< XResultSetMetaData > SAL_CALL 
MacabPreparedStatement::getMetaData()
 m_xMetaData = new 
MacabResultSetMetaData(getOwnConnection(),sTableName);
 setMacabFields();
 }
-Reference< XResultSetMetaData > xMetaData = m_xMetaData.get();
+Reference< XResultSetMetaData > xMetaData = m_xMetaData;
 return xMetaData;
 }
 
diff --git a/connectivity/source/drivers/macab/MacabResultSet.cxx 
b/connectivity/source/drivers/macab/MacabResultSet.cxx
index da2d2dafd3ed..b35f6e2d57ca 100644
--- a/connectivity/source/drivers/macab/MacabResultSet.cxx
+++ b/connectivity/source/drivers/macab/MacabResultSet.cxx
@@ -513,7 +513,7 @@ Reference< XResultSetMetaData > SAL_CALL 
MacabResultSet::getMetaData()
 if (!m_xMetaData.is())
 m_xMetaData = new 
MacabResultSetMetaData(m_xStatement->getOwnConnection(), m_sTableName);
 
-Reference< XResultSetMetaData > xMetaData = m_xMetaData.get();
+Reference< XResultSetMetaData > xMetaData = m_xMetaData;
 return xMetaData;
 }
 
@@ -668,7 +668,7 @@ Reference< XInterface > SAL_CALL 
MacabResultSet::getStatement()
 ::osl::MutexGuard aGuard( m_aMutex );
 checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed);
 
-Reference< XStatement > xStatement = m_xStatement.get();
+Reference< XStatement > xStatement = m_xStatement;
 return xStatement;
 }
 
diff --git a/vcl/osx/a11yfactory.mm b/vcl/osx/a11yfactory.mm
index 0a17f15dad8d..797a7492d391 100644
--- a/vcl/osx/a11yfactory.mm
+++ b/vcl/osx/a11yfactory.mm
@@ -59,7 +59,7 @@ static bool enabled = false;
 mdAllWrapper = [ [ [ NSMutableDictionary alloc ] init ] retain ];
 // initialize keyboard focus tracker
 rtl::Reference< AquaA11yFocusListener > listener( 
AquaA11yFocusListener::get() );
-TheAquaA11yFocusTracker::get().setFocusListener(listener.get());
+TheAquaA11yFocusTracker::get().setFocusListener(listener);
 enabled = true;  
 }
 return mdAllWrapper;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: avmedia/source

2021-02-01 Thread Caolán McNamara (via logerrit)
 avmedia/source/framework/MediaControlBase.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit cc973bbba9b8a2af9f0fdc899444dc8b4179804a
Author: Caolán McNamara 
AuthorDate: Sun Jan 31 19:43:51 2021 +
Commit: Caolán McNamara 
CommitDate: Mon Feb 1 10:18:38 2021 +0100

cppcheck: missing getting current increment values

Change-Id: I4f6aab6e1ad8d6db1575721312fd04b50dc29773
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110232
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/avmedia/source/framework/MediaControlBase.cxx 
b/avmedia/source/framework/MediaControlBase.cxx
index 890bb04d805b..4e8800186ae4 100644
--- a/avmedia/source/framework/MediaControlBase.cxx
+++ b/avmedia/source/framework/MediaControlBase.cxx
@@ -84,6 +84,7 @@ void MediaControlBase::UpdateTimeSlider( MediaItem const & 
aMediaItem )
 
 bool bChanged(false);
 int nStep(0), nPage(0);
+mxTimeSlider->get_increments(nStep, nPage);
 if (!nStep)
 {
 nStep = AVMEDIA_TIME_RANGE * AVMEDIA_LINEINCREMENT / fDuration;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: avmedia/source include/vcl slideshow/source vcl/unx

2021-01-27 Thread Caolán McNamara (via logerrit)
 avmedia/source/gstreamer/gstplayer.cxx|4 ++--
 avmedia/source/viewer/mediawindow_impl.cxx|2 +-
 include/vcl/sysdata.hxx   |2 +-
 slideshow/source/engine/shapes/viewmediashape.cxx |2 +-
 vcl/unx/gtk3/gtk3gtkframe.cxx |2 +-
 vcl/unx/gtk3/gtk3gtkobject.cxx|2 +-
 6 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit 3aa8656dcee396384dc540fb7785a4f5455ac3e6
Author: Caolán McNamara 
AuthorDate: Tue Jan 26 11:24:13 2021 +
Commit: Caolán McNamara 
CommitDate: Wed Jan 27 10:22:18 2021 +0100

rename Toolkit::Gtk3 to Toolkit::Gtk because Gtk2 support is gone

so the need to distinguish no longer exists

Change-Id: I4c11ddffbfa77f04497c454358c1c707ecf1d162
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109942
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/avmedia/source/gstreamer/gstplayer.cxx 
b/avmedia/source/gstreamer/gstplayer.cxx
index c15bd1adf6ea..cab9f4649b6a 100644
--- a/avmedia/source/gstreamer/gstplayer.cxx
+++ b/avmedia/source/gstreamer/gstplayer.cxx
@@ -850,7 +850,7 @@ uno::Reference< ::media::XPlayerWindow > SAL_CALL 
Player::createPlayerWindow( co
 // tdf#124027: the position of embedded window is identical w/ the 
position
 // of media object in all other vclplugs (kf5, gen), in gtk3 w/o 
gtksink it
 // needs to be translated
-if (pEnvData->toolkit == SystemEnvData::Toolkit::Gtk3)
+if (pEnvData->toolkit == SystemEnvData::Toolkit::Gtk)
 {
 Point aPoint = pParentWindow->GetPosPixel();
 maArea.X = aPoint.getX();
@@ -862,7 +862,7 @@ uno::Reference< ::media::XPlayerWindow > SAL_CALL 
Player::createPlayerWindow( co
 GstElement *pVideosink = 
static_cast(pParentWindow->CreateGStreamerSink());
 if (pVideosink)
 {
-if (pEnvData->toolkit == SystemEnvData::Toolkit::Gtk3)
+if (pEnvData->toolkit == SystemEnvData::Toolkit::Gtk)
 mbUseGtkSink = true;
 }
 else
diff --git a/avmedia/source/viewer/mediawindow_impl.cxx 
b/avmedia/source/viewer/mediawindow_impl.cxx
index 316263c9a7b2..ea15b6413e2a 100644
--- a/avmedia/source/viewer/mediawindow_impl.cxx
+++ b/avmedia/source/viewer/mediawindow_impl.cxx
@@ -424,7 +424,7 @@ void MediaWindowImpl::onURLChanged()
 sal_IntPtr nParentWindowHandle(0);
 const SystemEnvData* pEnvData = mpChildWindow->GetSystemData();
 // tdf#139609 gtk doesn't need the handle, and fetching it is 
undesirable
-if (!pEnvData || pEnvData->toolkit != SystemEnvData::Toolkit::Gtk3)
+if (!pEnvData || pEnvData->toolkit != SystemEnvData::Toolkit::Gtk)
 nParentWindowHandle = mpChildWindow->GetParentWindowHandle();
 aArgs[0] <<= nParentWindowHandle;
 aArgs[1] <<= awt::Rectangle(aPoint.X(), aPoint.Y(), aSize.Width(), 
aSize.Height());
diff --git a/include/vcl/sysdata.hxx b/include/vcl/sysdata.hxx
index 63b7c810de3d..85babeaa2f1c 100644
--- a/include/vcl/sysdata.hxx
+++ b/include/vcl/sysdata.hxx
@@ -50,7 +50,7 @@ typedef struct CGContext *CGContextRef;
 
 struct VCL_DLLPUBLIC SystemEnvData
 {
-enum class Toolkit { Gen, Gtk3, Qt5 };
+enum class Toolkit { Gen, Gtk, Qt5 };
 Toolkit toolkit;// the toolkit in use
 #if defined(_WIN32)
 HWNDhWnd;   // the window hwnd
diff --git a/slideshow/source/engine/shapes/viewmediashape.cxx 
b/slideshow/source/engine/shapes/viewmediashape.cxx
index fdcfde36aa8f..29c6405b8725 100644
--- a/slideshow/source/engine/shapes/viewmediashape.cxx
+++ b/slideshow/source/engine/shapes/viewmediashape.cxx
@@ -436,7 +436,7 @@ namespace slideshow::internal
 sal_IntPtr nParentWindowHandle(0);
 const SystemEnvData* pEnvData = 
mpMediaWindow->GetSystemData();
 // tdf#139609 gtk doesn't need the handle, and 
fetching it is undesirable
-if (!pEnvData || pEnvData->toolkit != 
SystemEnvData::Toolkit::Gtk3)
+if (!pEnvData || pEnvData->toolkit != 
SystemEnvData::Toolkit::Gtk)
 nParentWindowHandle = 
mpMediaWindow->GetParentWindowHandle();
 
 aArgs[ 0 ] <<= nParentWindowHandle;
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index 7d40fd5a241b..4243763a3158 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -955,7 +955,7 @@ void GtkSalFrame::InitCommon()
 m_aSystemData.pSalFrame = this;
 m_aSystemData.pWidget   = m_pWindow;
 m_aSystemData.nScreen   = m_nXScreen.getXScreen();
-m_aSystemData.toolkit   = SystemEnvData::Toolkit::Gtk3;
+m_aSystemData.toolkit   = SystemEnvData::Toolkit::Gtk;
 
 #if defined(GDK_WINDOWING_X11)
 GdkDisplay *pDisplay = 

[Libreoffice-commits] core.git: avmedia/source include/vcl slideshow/source toolkit/source vcl/inc vcl/qt5 vcl/source vcl/unx

2021-01-27 Thread Caolán McNamara (via logerrit)
 avmedia/source/gstreamer/gstplayer.cxx|   11 +
 avmedia/source/viewer/mediawindow_impl.cxx|8 +-
 include/vcl/sysdata.hxx   |   26 +++---
 slideshow/source/engine/shapes/viewmediashape.cxx |9 +--
 toolkit/source/awt/vclxsystemdependentwindow.cxx  |2 -
 toolkit/source/awt/vclxtopwindow.cxx  |2 -
 vcl/inc/salframe.hxx  |4 +++
 vcl/inc/unx/gtk/gtkframe.hxx  |4 ++-
 vcl/qt5/Qt5FilePicker.cxx |2 -
 vcl/source/opengl/x11/context.cxx |4 +--
 vcl/source/window/syschild.cxx|   15 +++-
 vcl/unx/generic/app/i18n_ic.cxx   |4 +--
 vcl/unx/generic/app/saldisp.cxx   |2 -
 vcl/unx/generic/gdi/cairo_xlib_cairo.cxx  |4 +--
 vcl/unx/generic/gdi/cairo_xlib_cairo.hxx  |3 +-
 vcl/unx/generic/gdi/salgdi.cxx|2 -
 vcl/unx/generic/gdi/salgdi2.cxx   |2 -
 vcl/unx/generic/window/salobj.cxx |6 ++---
 vcl/unx/gtk3/gtk3gtkdata.cxx  |2 -
 vcl/unx/gtk3/gtk3gtkframe.cxx |   10 +++-
 vcl/unx/gtk3/gtk3gtkobject.cxx|3 +-
 vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.cxx|2 -
 22 files changed, 86 insertions(+), 41 deletions(-)

New commits:
commit df788fcc308bbf8950ad8a22a1f8290681b64f0d
Author: Caolán McNamara 
AuthorDate: Tue Jan 26 10:03:37 2021 +
Commit: Caolán McNamara 
CommitDate: Wed Jan 27 10:18:50 2021 +0100

tdf#139609 avoid fetching unnecessary xid under gtk3

because of the side effects

using a bare GtkGrid as m_pSocket in vcl/unx/gtk3/gtk3gtkobject.cxx
is perhaps a poor choice, getting its xid causes poor side effects
wrt events belonging to its child widgets getting delivered to
the SalFrame widget, so duplicate scrolling after showing a opengl
slide and/or showing a video and lots of flickering

we're (generally at least) not using the xid under gtk3 so don't set it
unless it's explicitly asked for. Happily the gtk Player::createPlayerWindow
doesn't use its arg[0] xid in any case, so don't bother setting it for
that backend.

Change-Id: I1c59a607a332635091782c3b49de10647558f301
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109941
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/avmedia/source/gstreamer/gstplayer.cxx 
b/avmedia/source/gstreamer/gstplayer.cxx
index 5d8d625ddf08..c15bd1adf6ea 100644
--- a/avmedia/source/gstreamer/gstplayer.cxx
+++ b/avmedia/source/gstreamer/gstplayer.cxx
@@ -880,11 +880,14 @@ uno::Reference< ::media::XPlayerWindow > SAL_CALL 
Player::createPlayerWindow( co
 g_object_set(G_OBJECT(mpPlaybin), "video-sink", pVideosink, nullptr);
 g_object_set(G_OBJECT(mpPlaybin), "force-aspect-ratio", FALSE, 
nullptr);
 
-mnWindowID = pEnvData->GetWindowHandle();
-mpDisplay = pEnvData->pDisplay;
-SAL_INFO( "avmedia.gstreamer", AVVERSION "set window id to " << 
static_cast(mnWindowID) << " XOverlay " << mpXOverlay);
+if (!mbUseGtkSink)
+{
+mnWindowID = 
pEnvData->GetWindowHandle(pParentWindow->ImplGetFrame());
+mpDisplay = pEnvData->pDisplay;
+SAL_INFO( "avmedia.gstreamer", AVVERSION "set window id to " << 
static_cast(mnWindowID) << " XOverlay " << mpXOverlay);
+}
 gst_element_set_state( mpPlaybin, GST_STATE_PAUSED );
-if ( mpXOverlay != nullptr )
+if (!mbUseGtkSink && mpXOverlay)
 gst_video_overlay_set_window_handle( mpXOverlay, mnWindowID );
 }
 
diff --git a/avmedia/source/viewer/mediawindow_impl.cxx 
b/avmedia/source/viewer/mediawindow_impl.cxx
index 50110cfd1748..316263c9a7b2 100644
--- a/avmedia/source/viewer/mediawindow_impl.cxx
+++ b/avmedia/source/viewer/mediawindow_impl.cxx
@@ -34,6 +34,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -420,7 +421,12 @@ void MediaWindowImpl::onURLChanged()
 const Point aPoint;
 const Size aSize(mpChildWindow->GetSizePixel());
 
-aArgs[0] <<= mpChildWindow->GetParentWindowHandle();
+sal_IntPtr nParentWindowHandle(0);
+const SystemEnvData* pEnvData = mpChildWindow->GetSystemData();
+// tdf#139609 gtk doesn't need the handle, and fetching it is 
undesirable
+if (!pEnvData || pEnvData->toolkit != SystemEnvData::Toolkit::Gtk3)
+nParentWindowHandle = mpChildWindow->GetParentWindowHandle();
+aArgs[0] <<= nParentWindowHandle;
 aArgs[1] <<= awt::Rectangle(aPoint.X(), aPoint.Y(), aSize.Width(), 
aSize.Height());
 aArgs[2] <<= reinterpret_cast(mpChildWindow.get());
 
diff --git a/include/vcl/sysdata.hxx b/include/vcl/sysdata.hxx
index ed93b524d699..63b7c810de3d 100644
--- 

[Libreoffice-commits] core.git: avmedia/source include/vcl toolkit/source vcl/qt5 vcl/source vcl/unx

2021-01-26 Thread Caolán McNamara (via logerrit)
 avmedia/source/gstreamer/gstplayer.cxx   |2 +-
 include/vcl/sysdata.hxx  |   17 +++--
 toolkit/source/awt/vclxsystemdependentwindow.cxx |2 +-
 toolkit/source/awt/vclxtopwindow.cxx |2 +-
 vcl/qt5/Qt5FilePicker.cxx|2 +-
 vcl/qt5/Qt5Frame.cxx |2 +-
 vcl/qt5/Qt5Object.cxx|2 +-
 vcl/source/opengl/x11/context.cxx|4 ++--
 vcl/source/window/syschild.cxx   |2 +-
 vcl/unx/generic/app/i18n_ic.cxx  |4 ++--
 vcl/unx/generic/app/saldisp.cxx  |2 +-
 vcl/unx/generic/gdi/cairo_xlib_cairo.cxx |2 +-
 vcl/unx/generic/gdi/salgdi2.cxx  |2 +-
 vcl/unx/generic/window/salframe.cxx  |2 +-
 vcl/unx/generic/window/salobj.cxx|   10 +-
 vcl/unx/gtk3/gtk3gtkdata.cxx |2 +-
 vcl/unx/gtk3/gtk3gtkframe.cxx|2 +-
 vcl/unx/gtk3/gtk3gtkobject.cxx   |2 +-
 18 files changed, 38 insertions(+), 25 deletions(-)

New commits:
commit 0069bce585ae60eafaaf0f52928941c16eab4fae
Author: Caolán McNamara 
AuthorDate: Mon Jan 25 20:59:58 2021 +
Commit: Caolán McNamara 
CommitDate: Tue Jan 26 13:27:17 2021 +0100

use an accessor for SystemEnvData::aWindow

with an eye to making it on-demand

Change-Id: If6cefd68a336dc6afe23591c857bd71034215b54
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109929
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/avmedia/source/gstreamer/gstplayer.cxx 
b/avmedia/source/gstreamer/gstplayer.cxx
index 4efbc6497b09..5d8d625ddf08 100644
--- a/avmedia/source/gstreamer/gstplayer.cxx
+++ b/avmedia/source/gstreamer/gstplayer.cxx
@@ -880,7 +880,7 @@ uno::Reference< ::media::XPlayerWindow > SAL_CALL 
Player::createPlayerWindow( co
 g_object_set(G_OBJECT(mpPlaybin), "video-sink", pVideosink, nullptr);
 g_object_set(G_OBJECT(mpPlaybin), "force-aspect-ratio", FALSE, 
nullptr);
 
-mnWindowID = pEnvData->aWindow;
+mnWindowID = pEnvData->GetWindowHandle();
 mpDisplay = pEnvData->pDisplay;
 SAL_INFO( "avmedia.gstreamer", AVVERSION "set window id to " << 
static_cast(mnWindowID) << " XOverlay " << mpXOverlay);
 gst_element_set_state( mpPlaybin, GST_STATE_PAUSED );
diff --git a/include/vcl/sysdata.hxx b/include/vcl/sysdata.hxx
index 3abf92b55640..ed93b524d699 100644
--- a/include/vcl/sysdata.hxx
+++ b/include/vcl/sysdata.hxx
@@ -61,7 +61,6 @@ struct SystemEnvData
 enum class Platform { Wayland, Xcb };
 
 void*   pDisplay;   // the relevant display connection
-sal_uIntPtr aWindow;// the window of the object
 void*   pSalFrame;  // contains a salframe, if object has 
one
 void*   pWidget;// the corresponding widget
 void*   pVisual;// the visual in use
@@ -71,6 +70,20 @@ struct SystemEnvData
 sal_IntPtr  aShellWindow;   // the window of the frame's shell
 Toolkit toolkit;// the toolkit in use
 Platformplatform;   // the windowing system in use
+private:
+sal_uIntPtr aWindow;// the window of the object
+public:
+
+void SetWindowHandle(sal_uIntPtr nWindow)
+{
+aWindow = nWindow;
+}
+
+sal_uIntPtr GetWindowHandle() const
+{
+return aWindow;
+}
+
 #endif
 
 SystemEnvData()
@@ -83,7 +96,6 @@ struct SystemEnvData
 #elif defined( IOS )
 #elif defined( UNX )
 : pDisplay(nullptr)
-, aWindow(0)
 , pSalFrame(nullptr)
 , pWidget(nullptr)
 , pVisual(nullptr)
@@ -91,6 +103,7 @@ struct SystemEnvData
 , aShellWindow(0)
 , toolkit(Toolkit())
 , platform(Platform())
+, aWindow(0)
 #endif
 {
 }
diff --git a/toolkit/source/awt/vclxsystemdependentwindow.cxx 
b/toolkit/source/awt/vclxsystemdependentwindow.cxx
index 2c53edf19b27..371945627573 100644
--- a/toolkit/source/awt/vclxsystemdependentwindow.cxx
+++ b/toolkit/source/awt/vclxsystemdependentwindow.cxx
@@ -102,7 +102,7 @@ css::uno::Any VCLXSystemDependentWindow::getWindowHandle( 
const css::uno::Sequen
 {
 css::awt::SystemDependentXWindow aSD;
 aSD.DisplayPointer = sal::static_int_cast< sal_Int64 
>(reinterpret_cast< sal_IntPtr >(pSysData->pDisplay));
-aSD.WindowHandle = pSysData->aWindow;
+aSD.WindowHandle = pSysData->GetWindowHandle();
 aRet <<= aSD;
 }
 #endif
diff --git a/toolkit/source/awt/vclxtopwindow.cxx 
b/toolkit/source/awt/vclxtopwindow.cxx
index 40aab75a480a..b0d070fb85a8 100644
--- a/toolkit/source/awt/vclxtopwindow.cxx
+++ b/toolkit/source/awt/vclxtopwindow.cxx
@@ -79,7 +79,7 @@ css::uno::Any 

[Libreoffice-commits] core.git: avmedia/source basic/source chart2/source connectivity/source cui/source dbaccess/source editeng/source framework/source i18nlangtag/source i18npool/inc i18npool/source

2021-01-25 Thread Noel (via logerrit)
 avmedia/source/framework/mediaitem.cxx|2 +-
 basic/source/inc/buffer.hxx   |4 ++--
 chart2/source/controller/inc/CommandDispatchContainer.hxx |2 +-
 chart2/source/view/axes/Tickmarks.cxx |2 +-
 chart2/source/view/axes/Tickmarks.hxx |2 +-
 connectivity/source/drivers/firebird/DatabaseMetaData.cxx |2 +-
 connectivity/source/drivers/firebird/DatabaseMetaData.hxx |2 +-
 cui/source/dialogs/AdditionsDialog.cxx|2 +-
 cui/source/inc/AdditionsDialog.hxx|2 +-
 cui/source/inc/cuihyperdlg.hxx|2 +-
 dbaccess/source/ui/control/opendoccontrols.cxx|2 +-
 dbaccess/source/ui/inc/opendoccontrols.hxx|2 +-
 editeng/source/editeng/editview.cxx   |2 +-
 editeng/source/editeng/impedit.cxx|2 +-
 editeng/source/editeng/impedit.hxx|2 +-
 framework/source/services/desktop.cxx |2 +-
 framework/source/uiconfiguration/ImageList.cxx|2 +-
 framework/source/uiconfiguration/ImageList.hxx|2 +-
 i18nlangtag/source/languagetag/languagetag.cxx|4 ++--
 i18npool/inc/breakiteratorImpl.hxx|2 +-
 i18npool/source/breakiterator/breakiteratorImpl.cxx   |2 +-
 include/avmedia/mediaitem.hxx |2 +-
 include/editeng/editview.hxx  |2 +-
 include/framework/desktop.hxx |2 +-
 include/oox/dump/dumperbase.hxx   |2 +-
 include/sfx2/docfile.hxx  |2 +-
 include/sfx2/lokhelper.hxx|2 +-
 include/svx/svdobj.hxx|2 +-
 include/vcl/SwapFile.hxx  |2 +-
 include/vcl/event.hxx |2 +-
 include/vcl/filter/PDFiumLibrary.hxx  |2 +-
 include/vcl/graph.hxx |2 +-
 include/vcl/notebookbar/notebookbar.hxx   |2 +-
 include/vcl/uitest/logger.hxx |2 +-
 linguistic/source/hyphdsp.hxx |8 
 linguistic/source/spelldsp.hxx|8 
 linguistic/source/thesdsp.hxx |4 ++--
 oox/source/drawingml/diagram/diagram.hxx  |2 +-
 oox/source/dump/dumperbase.cxx|2 +-
 sdext/source/presenter/PresenterToolBar.cxx   |2 +-
 sfx2/source/doc/docfile.cxx   |2 +-
 sfx2/source/view/lokhelper.cxx|2 +-
 starmath/inc/ElementsDockingWindow.hxx|2 +-
 svx/source/svdraw/presetooxhandleadjustmentrelations.cxx  |2 +-
 svx/source/svdraw/svdobj.cxx  |2 +-
 sw/inc/fldbas.hxx |2 +-
 sw/source/core/fields/fldbas.cxx  |2 +-
 sw/source/uibase/fldui/fldmgr.cxx |2 +-
 sw/source/uibase/inc/fldmgr.hxx   |2 +-
 sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx |4 ++--
 uui/source/iahndl.hxx |2 +-
 vcl/inc/image.h   |2 +-
 vcl/inc/impgraph.hxx  |2 +-
 vcl/inc/sft.hxx   |2 +-
 vcl/inc/unx/freetype_glyphcache.hxx   |2 +-
 vcl/inc/unx/glyphcache.hxx|2 +-
 vcl/inc/verticaltabctrl.hxx   |4 ++--
 vcl/source/control/ivctrl.cxx |2 +-
 vcl/source/gdi/graph.cxx  |2 +-
 vcl/source/gdi/impgraph.cxx   |2 +-
 vcl/source/gdi/pdfbuildin_fonts.cxx   |2 +-
 vcl/source/gdi/pdfbuildin_fonts.hxx   |2 +-
 vcl/source/uitest/logger.cxx  |6 --
 vcl/source/window/NotebookBarAddonsMerger.cxx |2 +-
 vcl/unx/generic/glyphs/freetype_glyphcache.cxx|4 ++--
 writerfilter/source/dmapper/DomainMapperTableManager.cxx  |2 +-
 writerfilter/source/dmapper/DomainMapperTableManager.hxx  |2 +-
 writerfilter/source/dmapper/NumberingManager.cxx  |2 +-
 writerfilter/source/dmapper/NumberingManager.hxx  |4 ++--
 writerfilter/source/dmapper/SettingsTable.cxx |4 ++--
 writerfilter/source/dmapper/SettingsTable.hxx |4 ++--
 xmlsecurity/source/xmlsec/nss/nssinitializer.cxx  |2 

[Libreoffice-commits] core.git: avmedia/source include/avmedia sd/qa svx/source

2021-01-21 Thread Miklos Vajna (via logerrit)
 avmedia/source/framework/mediaitem.cxx |   13 +
 include/avmedia/mediaitem.hxx  |8 ++--
 sd/qa/unit/export-tests-ooxml1.cxx |   23 +++
 svx/source/svdraw/svdomedia.cxx|5 +
 svx/source/unodraw/unoprov.cxx |1 +
 svx/source/unodraw/unoshap4.cxx|   31 +--
 6 files changed, 77 insertions(+), 4 deletions(-)

New commits:
commit e2d46da076f43a7c0d56fc486b9f15339243f7c9
Author: Miklos Vajna 
AuthorDate: Thu Jan 21 15:08:13 2021 +0100
Commit: Miklos Vajna 
CommitDate: Thu Jan 21 21:40:20 2021 +0100

avmedia: add doc model for bitmap fill of slide narrations

This allows specifying a custom bitmap for a media shape. It's mostly
useful for audio-only streams where the additional bitmap may be e.g. a
speaker icon to indicate this a narration.

Change-Id: I21c1b492ac09b631cf6e3ec8120be8b82c01c26d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109763
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/avmedia/source/framework/mediaitem.cxx 
b/avmedia/source/framework/mediaitem.cxx
index f42065e8e81e..54db2e3bc6bf 100644
--- a/avmedia/source/framework/mediaitem.cxx
+++ b/avmedia/source/framework/mediaitem.cxx
@@ -40,6 +40,7 @@
 #include 
 #include 
 #include 
+#include 
 
 using namespace ::com::sun::star;
 
@@ -62,6 +63,7 @@ struct MediaItem::Impl
 boolm_bLoop;
 boolm_bMute;
 css::media::ZoomLevel m_eZoom;
+Graphic m_aGraphic;
 
 explicit Impl(AVMediaSetMask nMaskSet)
 : m_nMaskSet( nMaskSet )
@@ -104,6 +106,7 @@ bool MediaItem::operator==( const SfxPoolItem& rItem ) const
 && m_pImpl->m_URL == rOther.m_pImpl->m_URL
 && m_pImpl->m_Referer == rOther.m_pImpl->m_Referer
 && m_pImpl->m_sMimeType == rOther.m_pImpl->m_sMimeType
+&& m_pImpl->m_aGraphic == rOther.m_pImpl->m_aGraphic
 && m_pImpl->m_eState == rOther.m_pImpl->m_eState
 && m_pImpl->m_fDuration == rOther.m_pImpl->m_fDuration
 && m_pImpl->m_fTime == rOther.m_pImpl->m_fTime
@@ -188,6 +191,9 @@ void MediaItem::merge( const MediaItem& rMediaItem )
 if( AVMediaSetMask::MIME_TYPE & nMaskSet )
 setMimeType( rMediaItem.getMimeType() );
 
+if (nMaskSet & AVMediaSetMask::GRAPHIC)
+setGraphic(rMediaItem.getGraphic());
+
 if( AVMediaSetMask::STATE & nMaskSet )
 setState( rMediaItem.getState() );
 
@@ -256,6 +262,13 @@ OUString MediaItem::getMimeType() const
 return !m_pImpl->m_sMimeType.isEmpty() ? m_pImpl->m_sMimeType : 
AVMEDIA_MIMETYPE_COMMON;
 }
 
+void MediaItem::setGraphic(const Graphic& rGraphic)
+{
+m_pImpl->m_nMaskSet |= AVMediaSetMask::GRAPHIC;
+m_pImpl->m_aGraphic = rGraphic;
+}
+
+Graphic MediaItem::getGraphic() const { return m_pImpl->m_aGraphic; }
 
 void MediaItem::setState( MediaState eState )
 {
diff --git a/include/avmedia/mediaitem.hxx b/include/avmedia/mediaitem.hxx
index 7246c9e7e2a1..9e3fb4cd4530 100644
--- a/include/avmedia/mediaitem.hxx
+++ b/include/avmedia/mediaitem.hxx
@@ -32,6 +32,7 @@ namespace com::sun::star::embed { class XStorage; }
 namespace com::sun::star::frame { class XModel; }
 namespace com::sun::star::io { class XInputStream; }
 namespace com::sun::star::io { class XStream; }
+class Graphic;
 
 enum class AVMediaSetMask
 {
@@ -45,11 +46,12 @@ enum class AVMediaSetMask
 ZOOM= 0x040,
 URL = 0x080,
 MIME_TYPE   = 0x100,
-ALL = 0x1ff,
+GRAPHIC = 0x200,
+ALL = 0x3ff,
 };
 namespace o3tl
 {
-template<> struct typed_flags : 
is_typed_flags {};
+template<> struct typed_flags : 
is_typed_flags {};
 }
 
 
@@ -115,6 +117,8 @@ public:
 
 voidsetMimeType( const OUString& rMimeType );
 OUStringgetMimeType() const;
+void setGraphic(const Graphic& rGraphic);
+Graphic getGraphic() const;
 const OUString& getTempURL() const;
 
 const OUString& getReferer() const;
diff --git a/sd/qa/unit/export-tests-ooxml1.cxx 
b/sd/qa/unit/export-tests-ooxml1.cxx
index 5784d00d112d..91ce68e20a50 100644
--- a/sd/qa/unit/export-tests-ooxml1.cxx
+++ b/sd/qa/unit/export-tests-ooxml1.cxx
@@ -53,6 +53,8 @@
 
 #include 
 #include 
+#include 
+#include 
 
 using namespace css;
 
@@ -1313,6 +1315,27 @@ void SdOOXMLExportTest1::testNarrationMimeType()
 assertXPath(pXmlDoc,
 
"/ContentType:Types/ContentType:Override[@PartName='/ppt/media/media1.m4a']",
 "ContentType", "audio/mp4");
+
+// Check if the bitmap of the media shape is exported correctly.
+xmlDocUniquePtr pSlideDoc = parseExport(aTempFile, 
"ppt/slides/slide1.xml");
+OUString aImageId = getXPath(pSlideDoc, 
"/p:sld/p:cSld/p:spTree/p:pic/p:blipFill/a:blip", "embed");
+xmlDocUniquePtr pRelsDoc = parseExport(aTempFile, 
"ppt/slides/_rels/slide1.xml.rels");
+OUString aImagePath = 

[Libreoffice-commits] core.git: avmedia/source

2020-12-25 Thread Chris Sherlock (via logerrit)
 avmedia/source/vlc/vlcframegrabber.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit adf4a7a8b39d17841de70fa0b43b525a991a45ab
Author: Chris Sherlock 
AuthorDate: Fri Dec 25 11:13:36 2020 +1100
Commit: Julien Nabet 
CommitDate: Fri Dec 25 11:53:01 2020 +0100

avmedia: followup fix to 17aea7c41

Change-Id: Ia462091459bd36c11511c88d384e352863f1cb81
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108274
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/avmedia/source/vlc/vlcframegrabber.cxx 
b/avmedia/source/vlc/vlcframegrabber.cxx
index 6b8a689029a2..4211d1190d80 100644
--- a/avmedia/source/vlc/vlcframegrabber.cxx
+++ b/avmedia/source/vlc/vlcframegrabber.cxx
@@ -22,7 +22,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: avmedia/source basctl/source basic/source chart2/source cui/source dbaccess/source embeddedobj/source embedserv/source extensions/source filter/source framework/source

2020-12-19 Thread Noel Grandin (via logerrit)
 avmedia/source/viewer/mediawindow_impl.cxx|2 
 basctl/source/basicide/baside2b.cxx   |2 
 basctl/source/basicide/bastype3.cxx   |2 
 basctl/source/basicide/moduldl2.cxx   |2 
 basic/source/runtime/dllmgr-x86.cxx   |4 -
 chart2/source/controller/dialogs/res_DataLabel.cxx|2 
 cui/source/tabpages/border.cxx|4 -
 dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx |2 
 embeddedobj/source/msole/oleembed.cxx |2 
 embedserv/source/embed/ed_ipersiststr.cxx |6 -
 extensions/source/bibliography/toolbar.cxx|6 -
 filter/source/graphicfilter/ieps/ieps.cxx |2 
 framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx |2 
 framework/source/uiconfiguration/uiconfigurationmanager.cxx   |4 -
 framework/source/uielement/controlmenucontroller.cxx  |2 
 include/rtl/string.hxx|2 
 include/rtl/ustring.hxx   |2 
 reportdesign/source/ui/report/ReportController.cxx|4 -
 sax/qa/cppunit/xmlimport.cxx  |2 
 sax/source/tools/converter.cxx|   32 
+-
 sc/source/filter/excel/xestream.cxx   |4 -
 sc/source/ui/navipi/content.cxx   |2 
 sc/source/ui/unoobj/targuno.cxx   |2 
 sc/source/ui/vba/vbadialog.cxx|2 
 sc/source/ui/view/olinewin.cxx|2 
 sd/source/core/stlsheet.cxx   |2 
 sd/source/ui/view/viewoverlaymanager.cxx  |4 -
 sfx2/source/dialog/filedlghelper.cxx  |   22 +++---
 sfx2/source/doc/objmisc.cxx   |2 
 svl/source/items/itemprop.cxx |2 
 svx/source/dialog/frmsel.cxx  |2 
 svx/source/fmcomp/fmgridif.cxx|   10 +--
 svx/source/form/fmshimp.cxx   |2 
 svx/source/form/fmundo.cxx|2 
 svx/source/tbxctrls/extrusioncontrols.cxx |8 +-
 sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx |2 
 sw/source/ui/fldui/changedb.cxx   |2 
 sw/source/uibase/ribbar/workctrl.cxx  |2 
 vcl/source/filter/graphicfilter.cxx   |2 
 writerfilter/source/dmapper/DomainMapperTableHandler.cxx  |4 -
 writerperfect/source/common/WPFTEncodingDialog.cxx|2 
 writerperfect/source/writer/exp/xmlimp.cxx|2 
 xmloff/source/core/xmluconv.cxx   |   24 
+++
 xmloff/source/draw/animimp.cxx|   10 +--
 xmloff/source/draw/shapeimport.cxx|   18 +++--
 xmloff/source/draw/ximpcustomshape.cxx|5 -
 xmloff/source/forms/elementexport.cxx |2 
 xmlsecurity/source/dialogs/certificateviewer.cxx  |2 
 xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx|2 
 49 files changed, 121 insertions(+), 112 deletions(-)

New commits:
commit 46c5de832868d2812448b2caace3eeaa9237b9f6
Author: Noel Grandin 
AuthorDate: Thu Dec 17 22:02:06 2020 +0200
Commit: Noel Grandin 
CommitDate: Sat Dec 19 17:53:06 2020 +0100

make *String(string_view) constructors explicit

to make it more obvious when we are constructing heap OUStrings
code and potentially inadvertently throwing away performance.

And fix a handful of places so revealed.

Change-Id: I0cf390f78026f8a670aaab53424cd31510633051
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107923
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/avmedia/source/viewer/mediawindow_impl.cxx 
b/avmedia/source/viewer/mediawindow_impl.cxx
index 01c25c291ec5..50110cfd1748 100644
--- a/avmedia/source/viewer/mediawindow_impl.cxx
+++ b/avmedia/source/viewer/mediawindow_impl.cxx
@@ -191,7 +191,7 @@ uno::Reference 
MediaWindowImpl::createPlayer(const OUString& rUR
 
 for (const auto& rServiceName : aServiceManagers)
 {
-xPlayer = createPlayer(rURL, rServiceName, xContext);
+xPlayer = createPlayer(rURL, OUString(rServiceName), xContext);
 if (xPlayer)
 break;
  

[Libreoffice-commits] core.git: avmedia/source

2020-12-14 Thread Julien Nabet (via logerrit)
 avmedia/source/framework/MediaControlBase.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f4e496af66bc6a779f600158cc42b986d654f143
Author: Julien Nabet 
AuthorDate: Mon Dec 14 19:45:22 2020 +0100
Commit: Noel Grandin 
CommitDate: Tue Dec 15 08:29:32 2020 +0100

Related tdf#13: fix assertion on avmedia/MediaControlBase

Assertion when trying to insert a video in Impress, see bt:
https://bugs.documentfoundation.org/attachment.cgi?id=168161

According to https://en.cppreference.com/w/cpp/algorithm/clamp
"behavior is undefined if the value of lo is greater than hi"

Regression from:
commit 36b3b357fe2a882db6a5f5a006239e16200fb847
Author: Noel 
Date:   Thu Nov 12 16:10:56 2020 +0200

replace std::min(std::max()) with std::clamp

Change-Id: Idf33eb6c662b60174678f990f98aefc72edec2a6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107722
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/avmedia/source/framework/MediaControlBase.cxx 
b/avmedia/source/framework/MediaControlBase.cxx
index ef92cce8a736..890bb04d805b 100644
--- a/avmedia/source/framework/MediaControlBase.cxx
+++ b/avmedia/source/framework/MediaControlBase.cxx
@@ -64,7 +64,7 @@ void MediaControlBase::UpdateVolumeSlider( MediaItem const & 
aMediaItem )
 {
 mxVolumeSlider->set_sensitive(true);
 const sal_Int32 nVolumeDB = aMediaItem.getVolumeDB();
-mxVolumeSlider->set_value( std::clamp( nVolumeDB, sal_Int32(0), 
AVMEDIA_DB_RANGE ) );
+mxVolumeSlider->set_value( std::clamp( nVolumeDB, AVMEDIA_DB_RANGE, 
sal_Int32(0)) );
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: avmedia/source basctl/source basic/source chart2/qa chart2/source codemaker/source comphelper/qa comphelper/source compilerplugins/clang connectivity/source cppu/source

2020-12-11 Thread Stephan Bergmann (via logerrit)
 avmedia/source/gstreamer/gstframegrabber.cxx   |4 
 avmedia/source/gstreamer/gstframegrabber.hxx   |8 
 avmedia/source/gstreamer/gstplayer.cxx |2 
 avmedia/source/gstreamer/gstplayer.hxx |6 
 basctl/source/basicide/baside2.hxx |3 
 basctl/source/basicide/baside2b.cxx|2 
 basic/source/classes/image.cxx |3 
 basic/source/inc/iosys.hxx |6 
 basic/source/runtime/iosys.cxx |4 
 basic/source/runtime/methods.cxx   |3 
 basic/source/sbx/sbxvalue.cxx  |3 
 chart2/qa/extras/chart2dump/chart2dump.cxx |4 
 chart2/qa/extras/chart2geometry.cxx|3 
 chart2/qa/extras/xshape/chart2xshape.cxx   |3 
 chart2/source/controller/inc/ChartController.hxx   |3 
 chart2/source/controller/main/ChartController_Properties.cxx   |2 
 codemaker/source/codemaker/global.cxx  |2 
 codemaker/source/commoncpp/commoncpp.cxx   |4 
 codemaker/source/cppumaker/cpputype.cxx|   35 ++--
 codemaker/source/cppumaker/dumputils.cxx   |2 
 codemaker/source/cppumaker/includes.cxx|2 
 codemaker/source/cppumaker/includes.hxx|3 
 comphelper/qa/string/test_string.cxx   |8 
 comphelper/source/misc/docpasswordhelper.cxx   |   15 -
 comphelper/source/misc/storagehelper.cxx   |4 
 compilerplugins/clang/stringadd.cxx|   36 +++-
 connectivity/source/commontools/CommonTools.cxx|2 
 connectivity/source/commontools/DriversConfig.cxx  |   15 +
 connectivity/source/drivers/dbase/dindexnode.cxx   |2 
 connectivity/source/drivers/evoab2/NStatement.cxx  |   17 +-
 connectivity/source/drivers/file/FStringFunctions.cxx  |2 
 connectivity/source/drivers/firebird/StatementCommonBase.cxx   |2 
 connectivity/source/drivers/firebird/StatementCommonBase.hxx   |6 
 connectivity/source/drivers/jdbc/Class.cxx |2 
 connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx|   25 +-
 connectivity/source/drivers/odbc/OStatement.cxx|2 
 connectivity/source/drivers/postgresql/pq_connection.cxx   |2 
 connectivity/source/drivers/postgresql/pq_statement.cxx|3 
 connectivity/source/drivers/postgresql/pq_tools.cxx|   29 +--
 connectivity/source/drivers/postgresql/pq_tools.hxx|   18 +-
 connectivity/source/drivers/postgresql/pq_xcolumns.cxx |4 
 connectivity/source/drivers/postgresql/pq_xcolumns.hxx |8 
 connectivity/source/inc/java/lang/Class.hxx|6 
 connectivity/source/inc/odbc/ODatabaseMetaDataResultSet.hxx|   23 +-
 connectivity/source/inc/odbc/OStatement.hxx|3 
 connectivity/source/parse/internalnode.cxx |2 
 connectivity/source/parse/sqlnode.cxx  |4 
 cppu/source/LogBridge/LogBridge.cxx|3 
 cppu/source/typelib/typelib.cxx|2 
 cppu/source/uno/lbenv.cxx  |6 
 cpputools/source/unoexe/unoexe.cxx |3 
 cui/source/dialogs/AdditionsDialog.cxx |   84 
+-
 dbaccess/qa/unit/dbtest_base.cxx   |4 
 dbaccess/source/core/misc/dsntypes.cxx |   24 +-
 dbaccess/source/filter/hsqldb/rowinputbinary.cxx   |7 
 dbaccess/source/filter/hsqldb/utils.cxx|2 
 dbaccess/source/filter/hsqldb/utils.hxx|6 
 dbaccess/source/inc/dsntypes.hxx   |   25 +-
 dbaccess/source/ui/dlg/dbwizsetup.cxx  |2 
 dbaccess/source/ui/dlg/generalpage.cxx |4 
 desktop/inc/dp_misc.h  |8 
 desktop/qa/desktop_lib/test_desktop_lib.cxx|2 
 desktop/source/app/dispatchwatcher.cxx |3 
 desktop/source/deployment/manager/dp_activepackages.cxx|5 
 desktop/source/deployment/misc/dp_misc.cxx |8 
 

[Libreoffice-commits] core.git: avmedia/source canvas/inc canvas/source include/svx Repository.mk vcl/inc vcl/qa vcl/source vcl/unx vcl/win vcl/workben

2020-12-08 Thread Luboš Luňák (via logerrit)
 Repository.mk  |1 
 avmedia/source/inc/mediamisc.hxx   |2 -
 canvas/inc/pch/precompiled_cairocanvas.hxx |1 
 canvas/source/cairo/cairo_canvas.cxx   |1 
 canvas/source/directx/dx_canvas.cxx|1 
 canvas/source/factory/cf_service.cxx   |3 --
 include/svx/unoshape.hxx   |1 
 vcl/inc/salgdi.hxx |1 
 vcl/inc/salgdiimpl.hxx |1 
 vcl/inc/unx/saldisp.hxx|1 
 vcl/qa/cppunit/BackendTest.cxx |1 
 vcl/qa/cppunit/BitmapTest.cxx  |3 --
 vcl/qa/cppunit/svm/svmtest.cxx |3 --
 vcl/source/app/svapp.cxx   |3 --
 vcl/source/app/svdata.cxx  |3 --
 vcl/source/gdi/bitmap3.cxx |3 --
 vcl/source/outdev/bitmap.cxx   |3 --
 vcl/source/outdev/text.cxx |3 --
 vcl/source/window/event.cxx|1 
 vcl/source/window/status.cxx   |3 --
 vcl/unx/generic/app/saldisp.cxx|   33 -
 vcl/unx/generic/gdi/salvd.cxx  |2 -
 vcl/win/gdi/salfont.cxx|1 
 vcl/win/gdi/winlayout.cxx  |1 
 vcl/workben/icontest.cxx   |2 -
 25 files changed, 78 deletions(-)

New commits:
commit 3b9e403751862a7938d656c4453189bc1d5ca646
Author: Luboš Luňák 
AuthorDate: Mon Dec 7 20:31:45 2020 +0100
Commit: Luboš Luňák 
CommitDate: Tue Dec 8 10:09:29 2020 +0100

remove more no longer needed OpenGL-related code

Change-Id: If7f47cf6dad860e4f8eab68931b72a38a7eda136
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107362
Tested-by: Jenkins
Reviewed-by: Luboš Luňák 

diff --git a/Repository.mk b/Repository.mk
index fce601fc0e79..9dea44f7db9c 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -941,7 +941,6 @@ $(eval $(call gb_Helper_register_packages_for_install,ooo,\
wizards_wizardshare \
tipoftheday_images \
toolbarmode_images \
-   vcl_opengl_shader \
vcl_theme_definitions \
$(if $(filter WNT,$(OS)), \
vcl_opengl_denylist \
diff --git a/avmedia/source/inc/mediamisc.hxx b/avmedia/source/inc/mediamisc.hxx
index 71bce74e3d28..97b2121cfaa1 100644
--- a/avmedia/source/inc/mediamisc.hxx
+++ b/avmedia/source/inc/mediamisc.hxx
@@ -32,8 +32,6 @@
 #endif
 #endif
 
-#define AVMEDIA_OPENGL_MANAGER_SERVICE_NAME "com.sun.star.media.Manager_OpenGL"
-
 // Mime types
 #define AVMEDIA_MIMETYPE_COMMON "application/vnd.sun.star.media"
 
diff --git a/canvas/inc/pch/precompiled_cairocanvas.hxx 
b/canvas/inc/pch/precompiled_cairocanvas.hxx
index ee38cccdc32f..c6350a84ebad 100644
--- a/canvas/inc/pch/precompiled_cairocanvas.hxx
+++ b/canvas/inc/pch/precompiled_cairocanvas.hxx
@@ -40,7 +40,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/canvas/source/cairo/cairo_canvas.cxx 
b/canvas/source/cairo/cairo_canvas.cxx
index 394ffe773871..f8266cffe446 100644
--- a/canvas/source/cairo/cairo_canvas.cxx
+++ b/canvas/source/cairo/cairo_canvas.cxx
@@ -25,7 +25,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 
diff --git a/canvas/source/directx/dx_canvas.cxx 
b/canvas/source/directx/dx_canvas.cxx
index a571d4085d6d..3d5bda00288b 100644
--- a/canvas/source/directx/dx_canvas.cxx
+++ b/canvas/source/directx/dx_canvas.cxx
@@ -38,7 +38,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 
 #include 
diff --git a/canvas/source/factory/cf_service.cxx 
b/canvas/source/factory/cf_service.cxx
index 608aaaf1d0a2..4e31197de2be 100644
--- a/canvas/source/factory/cf_service.cxx
+++ b/canvas/source/factory/cf_service.cxx
@@ -37,9 +37,6 @@
 #include 
 #include 
 #include 
-#if HAVE_FEATURE_OPENGL
-#include 
-#endif
 #include 
 #include 
 
diff --git a/include/svx/unoshape.hxx b/include/svx/unoshape.hxx
index 1f948f50574b..dc0d94a80f9c 100644
--- a/include/svx/unoshape.hxx
+++ b/include/svx/unoshape.hxx
@@ -64,7 +64,6 @@ class SdrModel;
 class SvxDrawPage;
 class SvGlobalName;
 class Pair;
-class IOpenGLRenderer;
 
 // Dimension arrows change size/position on save/reload (#i59051#)
 namespace basegfx
diff --git a/vcl/inc/salgdi.hxx b/vcl/inc/salgdi.hxx
index 845183953e2c..d43e3b632d45 100644
--- a/vcl/inc/salgdi.hxx
+++ b/vcl/inc/salgdi.hxx
@@ -43,7 +43,6 @@ class SalLayout;
 class ImplLayoutArgs;
 namespace tools { class Rectangle; }
 class FontSubsetInfo;
-class OpenGLContext;
 class OutputDevice;
 class FreetypeFont;
 struct SystemGraphicsData;
diff --git a/vcl/inc/salgdiimpl.hxx b/vcl/inc/salgdiimpl.hxx
index 1b60c59e0188..e349edadddc4 100644
--- a/vcl/inc/salgdiimpl.hxx
+++ b/vcl/inc/salgdiimpl.hxx
@@ -35,7 +35,6 @@ class SalGraphics;
 class SalBitmap;
 class SalFrame;
 class Gradient;
-class OpenGLContext;
 class SalVirtualDevice;
 struct SalGradient;
 
diff --git a/vcl/inc/unx/saldisp.hxx 

[Libreoffice-commits] core.git: avmedia/source basic/source canvas/inc canvas/source chart2/source comphelper/qa comphelper/source compilerplugins/clang configmgr/source connectivity/source cui/source

2020-11-30 Thread Noel (via logerrit)
 avmedia/source/framework/MediaControlBase.cxx |2 
 basic/source/inc/runtime.hxx  |2 
 basic/source/runtime/dllmgr-none.cxx  |   10 
 basic/source/runtime/dllmgr-x64.cxx   |2 
 basic/source/runtime/dllmgr-x86.cxx   |2 
 basic/source/runtime/dllmgr.hxx   |2 
 basic/source/runtime/runtime.cxx  |4 
 canvas/inc/parametricpolypolygon.hxx  |2 
 canvas/source/tools/parametricpolypolygon.cxx |   16 -
 chart2/source/controller/main/ChartController.cxx |   98 

 chart2/source/controller/main/ChartController_Properties.cxx  |8 
 chart2/source/controller/sidebar/ChartColorWrapper.cxx|6 
 chart2/source/controller/sidebar/ChartColorWrapper.hxx|2 
 chart2/source/inc/InternalDataProvider.hxx|2 
 chart2/source/inc/RegressionCurveHelper.hxx   |4 
 chart2/source/tools/InternalDataProvider.cxx  |   14 -
 chart2/source/tools/RegressionCurveHelper.cxx |   30 +-
 chart2/source/view/inc/VDataSeries.hxx|2 
 chart2/source/view/main/VDataSeries.cxx   |   20 -
 comphelper/qa/unit/test_hash.cxx  |2 
 comphelper/source/misc/docpasswordhelper.cxx  |   14 -
 compilerplugins/clang/stringviewparam.cxx |   15 +
 compilerplugins/clang/test/stringviewparam.cxx|   10 
 configmgr/source/components.cxx   |4 
 configmgr/source/components.hxx   |2 
 connectivity/source/drivers/firebird/Util.cxx |6 
 connectivity/source/drivers/mork/MConnection.hxx  |2 
 cui/source/customize/SvxConfigPageHelper.cxx  |   28 +-
 cui/source/customize/SvxNotebookbarConfigPage.cxx |   28 +-
 cui/source/customize/cfg.cxx  |4 
 cui/source/inc/SvxConfigPageHelper.hxx|2 
 cui/source/inc/cfg.hxx|4 
 cui/source/options/optlingu.cxx   |8 
 cui/source/options/treeopt.cxx|   16 -
 dbaccess/source/filter/hsqldb/createparser.cxx|   44 
+--
 desktop/source/deployment/manager/dp_extensionmanager.cxx |   12 
 desktop/source/deployment/manager/dp_extensionmanager.hxx |2 
 desktop/source/deployment/misc/dp_misc.cxx|8 
 desktop/source/deployment/misc/dp_platform.cxx|   82 
+++---
 desktop/source/lib/init.cxx   |4 
 desktop/source/migration/migration.cxx|   28 +-
 desktop/source/migration/migration_impl.hxx   |4 
 filter/source/storagefilterdetect/filterdetect.cxx|   54 
++--
 forms/source/component/ImageControl.cxx   |4 
 fpicker/source/office/fileview.cxx|4 
 framework/inc/targets.h   |   12 
 framework/inc/uielement/statusbarmerger.hxx   |2 
 framework/inc/xml/acceleratorconfigurationreader.hxx  |4 
 framework/source/inc/loadenv/targethelper.hxx |2 
 framework/source/loadenv/targethelper.cxx |2 
 framework/source/uielement/statusbarmerger.cxx|8 
 framework/source/uielement/styletoolbarcontroller.cxx |   18 -
 framework/source/xml/acceleratorconfigurationreader.cxx   |   20 -
 i18nlangtag/qa/cppunit/test_languagetag.cxx   |  122 
+-
 i18npool/inc/numberformatcode.hxx |4 
 i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx |4 
 i18npool/source/localedata/LocaleNode.hxx |2 
 i18npool/source/localedata/filewriter.cxx |4 
 i18npool/source/numberformatcode/numberformatcode.cxx |   26 +-
 include/avmedia/MediaControlBase.hxx  |2 
 include/comphelper/docpasswordhelper.hxx  |6 
 include/editeng/unoprnms.hxx  |   16 -
 include/linguistic/misc.hxx  

[Libreoffice-commits] core.git: avmedia/source

2020-11-25 Thread Stephan Bergmann (via logerrit)
 avmedia/source/win/player.cxx |4 +---
 avmedia/source/win/player.hxx |2 +-
 2 files changed, 2 insertions(+), 4 deletions(-)

New commits:
commit 8f4d36009d789f645ab700bfcd20f8e268ce8cee
Author: Stephan Bergmann 
AuthorDate: Wed Nov 25 17:45:08 2020 +0100
Commit: Stephan Bergmann 
CommitDate: Wed Nov 25 22:58:16 2020 +0100

Player::processEvent return value is unused

Change-Id: Ia3f35f761cdfbfe6a57fce6bc632969759367c56
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106603
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/avmedia/source/win/player.cxx b/avmedia/source/win/player.cxx
index b3e621cbc56d..7990e7aecdfe 100644
--- a/avmedia/source/win/player.cxx
+++ b/avmedia/source/win/player.cxx
@@ -191,7 +191,7 @@ void Player::setNotifyWnd( HWND nNotifyWnd )
 }
 
 
-long Player::processEvent()
+void Player::processEvent()
 {
 long nCode;
 LONG_PTR nParam1, nParam2;
@@ -214,8 +214,6 @@ long Player::processEvent()
 
 mpME->FreeEventParams( nCode, nParam1, nParam2 );
 }
-
-return 0;
 }
 
 
diff --git a/avmedia/source/win/player.hxx b/avmedia/source/win/player.hxx
index ed34981e96ae..84e2689c0397 100644
--- a/avmedia/source/win/player.hxx
+++ b/avmedia/source/win/player.hxx
@@ -60,7 +60,7 @@ public:
 boolcreate( const OUString& rURL );
 
 voidsetNotifyWnd( HWND nNotifyWnd );
-longprocessEvent();
+voidprocessEvent();
 
 const IVideoWindow* getVideoWindow() const;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: avmedia/source

2020-11-25 Thread Stephan Bergmann (via logerrit)
 avmedia/source/win/framegrabber.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit ff75b172cc86374969a986ee94cac0931d95a5cd
Author: Stephan Bergmann 
AuthorDate: Wed Nov 25 17:50:21 2020 +0100
Commit: Stephan Bergmann 
CommitDate: Wed Nov 25 21:40:56 2020 +0100

BITMAPINFOHEADER::biWidth,biHeight are of type LONG

Change-Id: Iba16ea38867499d2963e389dffec4e72daf1bcad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106605
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/avmedia/source/win/framegrabber.cxx 
b/avmedia/source/win/framegrabber.cxx
index 4fd0d8b519b2..249648f04f96 100644
--- a/avmedia/source/win/framegrabber.cxx
+++ b/avmedia/source/win/framegrabber.cxx
@@ -138,7 +138,8 @@ uno::Reference< graphic::XGraphic > SAL_CALL 
FrameGrabber::grabFrame( double fMe
 ( fLength > 0.0 ) && ( fMediaTime >= 0.0 ) && ( fMediaTime <= 
fLength ) )
 {
 AM_MEDIA_TYPE   aMediaType;
-longnWidth = 0, nHeight = 0, nSize = 0;
+LONGnWidth = 0, nHeight = 0;
+longnSize = 0;
 
 if( SUCCEEDED( pDet->get_StreamMediaType(  ) ) )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: avmedia/source basegfx/source comphelper/source include/oox oox/source sc/source sdext/source starmath/source svx/source sw/source vcl/source

2020-11-16 Thread Noel (via logerrit)
 avmedia/source/framework/MediaControlBase.cxx|5 ++---
 basegfx/source/polygon/b3dpolypolygontools.cxx   |8 
 comphelper/source/misc/backupfilehelper.cxx  |2 +-
 include/oox/helper/helper.hxx|2 +-
 oox/source/export/chartexport.cxx|2 +-
 sc/source/filter/excel/xltools.cxx   |2 +-
 sc/source/ui/Accessibility/AccessibleCsvControl.cxx  |2 +-
 sdext/source/presenter/PresenterScrollBar.cxx|2 +-
 starmath/source/view.cxx |2 +-
 svx/source/sdr/primitive2d/sdrframeborderprimitive2d.cxx |2 +-
 svx/source/table/tablehandles.cxx|2 +-
 sw/source/core/txtnode/ndtxt.cxx |2 +-
 vcl/source/filter/graphicfilter.cxx  |2 +-
 vcl/source/outdev/bitmap.cxx |2 +-
 14 files changed, 18 insertions(+), 19 deletions(-)

New commits:
commit 36b3b357fe2a882db6a5f5a006239e16200fb847
Author: Noel 
AuthorDate: Thu Nov 12 16:10:56 2020 +0200
Commit: Noel Grandin 
CommitDate: Mon Nov 16 13:46:01 2020 +0100

replace std::min(std::max()) with std::clamp

Change-Id: I76e34e8020d98292e8ffde387542b7029f85a42d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105754
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/avmedia/source/framework/MediaControlBase.cxx 
b/avmedia/source/framework/MediaControlBase.cxx
index 7c3450d802e1..60faa27cfc3f 100644
--- a/avmedia/source/framework/MediaControlBase.cxx
+++ b/avmedia/source/framework/MediaControlBase.cxx
@@ -27,7 +27,7 @@
 
 using ::rtl::OUString;
 
-#define AVMEDIA_DB_RANGE-40
+constexpr sal_Int32 AVMEDIA_DB_RANGE = -40;
 #define AVMEDIA_LINEINCREMENT   1.0
 #define AVMEDIA_PAGEINCREMENT   10.0
 
@@ -64,8 +64,7 @@ void MediaControlBase::UpdateVolumeSlider( MediaItem const & 
aMediaItem )
 {
 mxVolumeSlider->set_sensitive(true);
 const sal_Int32 nVolumeDB = aMediaItem.getVolumeDB();
-mxVolumeSlider->set_value( std::min( std::max( nVolumeDB, static_cast< 
sal_Int32 >( AVMEDIA_DB_RANGE ) ),
-static_cast< sal_Int32 >( 0 ) 
) );
+mxVolumeSlider->set_value( std::clamp( nVolumeDB, sal_Int32(0), 
AVMEDIA_DB_RANGE ) );
 }
 }
 
diff --git a/basegfx/source/polygon/b3dpolypolygontools.cxx 
b/basegfx/source/polygon/b3dpolypolygontools.cxx
index 3badd683d248..ad2dd5bb7979 100644
--- a/basegfx/source/polygon/b3dpolypolygontools.cxx
+++ b/basegfx/source/polygon/b3dpolypolygontools.cxx
@@ -221,7 +221,7 @@ namespace basegfx::utils
 }
 
 // min/max limitations
-nHorSeg = std::min(nMaxSegments, std::max(nMinSegments, nHorSeg));
+nHorSeg = std::clamp(nHorSeg, nMinSegments, nMaxSegments);
 
 if(!nVerSeg)
 {
@@ -229,7 +229,7 @@ namespace basegfx::utils
 }
 
 // min/max limitations
-nVerSeg = std::min(nMaxSegments, std::max(nMinSegments, nVerSeg));
+nVerSeg = std::clamp(nVerSeg, nMinSegments, nMaxSegments);
 
 // create constants
 const double fVerDiffPerStep((fVerStop - fVerStart) / 
static_cast(nVerSeg));
@@ -320,7 +320,7 @@ namespace basegfx::utils
 }
 
 // min/max limitations
-nHorSeg = std::min(nMaxSegments, std::max(nMinSegments, nHorSeg));
+nHorSeg = std::clamp(nHorSeg, nMinSegments, nMaxSegments);
 
 if(!nVerSeg)
 {
@@ -328,7 +328,7 @@ namespace basegfx::utils
 }
 
 // min/max limitations
-nVerSeg = std::min(nMaxSegments, std::max(nMinSegments, nVerSeg));
+nVerSeg = std::clamp(nVerSeg, nMinSegments, nMaxSegments);
 
 // vertical loop
 for(sal_uInt32 a(0); a < nVerSeg; a++)
diff --git a/comphelper/source/misc/backupfilehelper.cxx 
b/comphelper/source/misc/backupfilehelper.cxx
index dc9e0ab9143d..d07442b8f39c 100644
--- a/comphelper/source/misc/backupfilehelper.cxx
+++ b/comphelper/source/misc/backupfilehelper.cxx
@@ -1558,7 +1558,7 @@ namespace comphelper
 const sal_uInt16 
nConfigNumCopies(static_cast(sTokenOut.toUInt32()));
 
 // limit to range [1..mnMaxAllowedBackups]
-mnNumBackups = std::min(std::max(nConfigNumCopies, mnNumBackups), 
mnMaxAllowedBackups);
+mnNumBackups = std::clamp(mnNumBackups, nConfigNumCopies, 
mnMaxAllowedBackups);
 }
 
 if (mbActive && rtl::Bootstrap::get("SecureUserConfigMode", sTokenOut))
diff --git a/include/oox/helper/helper.hxx b/include/oox/helper/helper.hxx
index 9d6befb90c54..da28c88b9e4b 100644
--- a/include/oox/helper/helper.hxx
+++ b/include/oox/helper/helper.hxx
@@ -108,7 +108,7 @@ const sal_Int8 API_ESCAPEHEIGHT_DEFAULT = 58;   
///< Relative character
 template< 

[Libreoffice-commits] core.git: avmedia/source

2020-11-15 Thread Stephan Bergmann (via logerrit)
 avmedia/source/macavf/framegrabber.mm |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3f08333c2aab8da835bfbe00199e7334c4bc7153
Author: Stephan Bergmann 
AuthorDate: Thu Nov 12 13:55:28 2020 +0100
Commit: Stephan Bergmann 
CommitDate: Sun Nov 15 17:18:28 2020 +0100

CFDataGetLength returns CFIndex, not long

Change-Id: I341ef5abfc001e47d86a03960022b018aac8e35f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105741
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/avmedia/source/macavf/framegrabber.mm 
b/avmedia/source/macavf/framegrabber.mm
index 31566bef3876..7803fa4f1063 100644
--- a/avmedia/source/macavf/framegrabber.mm
+++ b/avmedia/source/macavf/framegrabber.mm
@@ -71,7 +71,7 @@ uno::Reference< graphic::XGraphic > SAL_CALL 
FrameGrabber::grabFrame( double fMe
 CGImageDestinationAddImage( pCGImgDest, pCGImage, nullptr );
 CGImageDestinationFinalize( pCGImgDest );
 CFRelease( pCGImgDest );
-const long nBitmapLen = CFDataGetLength( pCFData );
+const CFIndex nBitmapLen = CFDataGetLength( pCFData );
 UInt8 * pBitmapBytes = const_cast(CFDataGetBytePtr( pCFData ));
 
 // convert the image into the return-value type which is a 
graphic::XGraphic
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: avmedia/source solenv/clang-format

2020-11-12 Thread Philipp Hofer (via logerrit)
 avmedia/source/inc/mediamisc.hxx |8 
 solenv/clang-format/excludelist  |1 -
 2 files changed, 4 insertions(+), 5 deletions(-)

New commits:
commit e05af8af958c9caa4bb7a4f6d8600ddf0a22c54b
Author: Philipp Hofer 
AuthorDate: Thu Nov 12 12:47:49 2020 +0100
Commit: Mike Kaganski 
CommitDate: Fri Nov 13 08:10:09 2020 +0100

tdf#123936 Formatting files in module avmedia with clang-format

Change-Id: I66738a8bb23bb547249aa74f1f710b76bd7df516
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105643
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/avmedia/source/inc/mediamisc.hxx b/avmedia/source/inc/mediamisc.hxx
index 504a136aa5ce..71bce74e3d28 100644
--- a/avmedia/source/inc/mediamisc.hxx
+++ b/avmedia/source/inc/mediamisc.hxx
@@ -23,19 +23,19 @@
 
 #define AVMEDIA_MANAGER_SERVICE_PREFERRED 
"com.sun.star.comp.avmedia.Manager_VLC"
 #ifdef _WIN32
-#define AVMEDIA_MANAGER_SERVICE_NAME  
"com.sun.star.comp.avmedia.Manager_DirectX"
+#define AVMEDIA_MANAGER_SERVICE_NAME 
"com.sun.star.comp.avmedia.Manager_DirectX"
 #else
 #ifdef MACOSX
-#define AVMEDIA_MANAGER_SERVICE_NAME  
"com.sun.star.comp.avmedia.Manager_MacAVF"
+#define AVMEDIA_MANAGER_SERVICE_NAME "com.sun.star.comp.avmedia.Manager_MacAVF"
 #else
-#define AVMEDIA_MANAGER_SERVICE_NAME  
"com.sun.star.comp.avmedia.Manager_GStreamer"
+#define AVMEDIA_MANAGER_SERVICE_NAME 
"com.sun.star.comp.avmedia.Manager_GStreamer"
 #endif
 #endif
 
 #define AVMEDIA_OPENGL_MANAGER_SERVICE_NAME "com.sun.star.media.Manager_OpenGL"
 
 // Mime types
-#define AVMEDIA_MIMETYPE_COMMON   "application/vnd.sun.star.media"
+#define AVMEDIA_MIMETYPE_COMMON "application/vnd.sun.star.media"
 
 inline OUString AvmResId(const char* pId)
 {
diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist
index e0379086f6ea..40bf78f00e65 100644
--- a/solenv/clang-format/excludelist
+++ b/solenv/clang-format/excludelist
@@ -156,7 +156,6 @@ avmedia/source/gstreamer/gstplayer.cxx
 avmedia/source/gstreamer/gstplayer.hxx
 avmedia/source/gstreamer/gstwindow.cxx
 avmedia/source/gstreamer/gstwindow.hxx
-avmedia/source/inc/mediamisc.hxx
 avmedia/source/macavf/framegrabber.hxx
 avmedia/source/macavf/macavfcommon.hxx
 avmedia/source/macavf/manager.hxx
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: avmedia/source canvas/source compilerplugins/clang cppcanvas/source cui/source desktop/source editeng/source emfio/source filter/source include/svtools include/tools in

2020-11-10 Thread Noel Grandin (via logerrit)
 avmedia/source/viewer/mediawindow_impl.cxx  |2 -
 canvas/source/directx/dx_textlayout_drawhelper.cxx  |2 -
 canvas/source/opengl/ogl_canvashelper.cxx   |2 -
 compilerplugins/clang/toolslong.cxx |   15 +++
 cppcanvas/source/mtfrenderer/implrenderer.cxx   |   10 ++---
 cui/source/dialogs/cuigrfflt.cxx|4 +-
 desktop/source/lib/init.cxx |8 ++--
 editeng/source/editeng/impedit3.cxx |   10 ++---
 editeng/source/outliner/outliner.cxx|2 -
 emfio/source/reader/emfreader.cxx   |6 +--
 emfio/source/reader/mtftools.cxx|2 -
 emfio/source/reader/wmfreader.cxx   |   10 ++---
 filter/source/graphicfilter/idxf/dxf2mtf.cxx|2 -
 filter/source/graphicfilter/ieps/ieps.cxx   |4 +-
 filter/source/graphicfilter/itiff/itiff.cxx |6 +--
 filter/source/svg/svgwriter.cxx |4 +-
 include/svtools/unitconv.hxx|2 -
 include/tools/bigint.hxx|4 +-
 include/tools/fract.hxx |2 -
 include/tools/gen.hxx   |3 +
 include/tools/long.hxx  |   12 +++---
 include/vcl/bitmap.hxx  |2 -
 include/vcl/devicecoordinate.hxx|3 +
 include/vcl/metaact.hxx |2 -
 include/vcl/salgtype.hxx|6 +--
 reportdesign/source/core/sdr/RptObject.cxx  |2 -
 sc/source/core/data/fillinfo.cxx|8 ++--
 sc/source/filter/excel/xltools.cxx  |2 -
 sd/source/core/drawdoc2.cxx |4 +-
 sd/source/ui/dlg/vectdlg.cxx|2 -
 sd/source/ui/view/drviews3.cxx  |   10 ++---
 sfx2/source/sidebar/SidebarToolBox.cxx  |2 -
 starmath/source/accessibility.cxx   |4 +-
 svl/source/svdde/ddecli.cxx |   12 +++---
 svl/source/svdde/ddedata.cxx|4 +-
 svx/source/customshapes/EnhancedCustomShapeFontWork.cxx |4 +-
 svx/source/dialog/_bmpmask.cxx  |   24 ++--
 svx/source/dialog/pagectrl.cxx  |4 +-
 svx/source/dialog/swframeexample.cxx|6 +--
 svx/source/gallery2/gallerybinaryengine.cxx |2 -
 svx/source/gallery2/galobj.cxx  |4 +-
 sw/inc/swrect.hxx   |4 +-
 sw/source/core/doc/doccomp.cxx  |4 +-
 sw/source/core/doc/notxtfrm.cxx |2 -
 sw/source/core/docnode/ndtbl1.cxx   |2 -
 sw/source/core/frmedt/tblsel.cxx|2 -
 sw/source/core/inc/frame.hxx|4 +-
 sw/source/core/inc/frmtool.hxx  |2 -
 sw/source/core/layout/anchoredobject.cxx|4 +-
 sw/source/core/layout/flowfrm.cxx   |8 ++--
 sw/source/core/layout/fly.cxx   |8 ++--
 sw/source/core/layout/frmtool.cxx   |2 -
 sw/source/core/layout/ftnfrm.cxx|6 +--
 sw/source/core/layout/hffrm.cxx |2 -
 sw/source/core/layout/pagechg.cxx   |4 +-
 sw/source/core/layout/paintfrm.cxx  |   22 +--
 sw/source/core/layout/tabfrm.cxx|   30 +++
 sw/source/core/layout/wsfrm.cxx |4 +-
 sw/source/core/text/frmcrsr.cxx |8 ++--
 sw/source/core/text/itrform2.cxx|8 ++--
 sw/source/core/text/itrpaint.cxx|2 -
 sw/source/core/text/txtfly.cxx  |2 -
 sw/source/core/text/txtfrm.cxx  |2 -
 sw/source/core/txtnode/fntcache.cxx |   24 ++--
 sw/source/core/view/pagepreviewlayout.cxx   |6 +--
 sw/source/core/view/viewsh.cxx  |8 ++--
 sw/source/filter/html/swhtml.cxx|2 -
 sw/source/filter/ww8/docxsdrexport.cxx  |6 ++-
 sw/source/filter/ww8/wrtw8esh.cxx   |2 -
 sw/source/filter/ww8/ww8par6.cxx|2 -
 sw/source/ui/envelp/labfmt.cxx  |   12 +++---
 sw/source/ui/frmdlg/column.cxx  |8 ++--
 sw/source/uibase/app/appenv.cxx |8 ++--
 sw/source/uibase/docvw/edtwin.cxx   

[Libreoffice-commits] core.git: avmedia/source

2020-10-16 Thread Stephan Bergmann (via logerrit)
 avmedia/source/viewer/mediawindow_impl.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d0f072e8c223247f79268f4d1278dcd6aa5c624e
Author: Stephan Bergmann 
AuthorDate: Thu Oct 15 22:22:57 2020 +0200
Commit: Noel Grandin 
CommitDate: Fri Oct 16 08:21:42 2020 +0200

Fix a confusion between UNOIDL long (i.e., sal_Int32) and C++ long

Change-Id: Id4c2645652a9588d1a9a2658217662e93c59fdbe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104387
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/avmedia/source/viewer/mediawindow_impl.cxx 
b/avmedia/source/viewer/mediawindow_impl.cxx
index c2a654969c07..13d84e5ec926 100644
--- a/avmedia/source/viewer/mediawindow_impl.cxx
+++ b/avmedia/source/viewer/mediawindow_impl.cxx
@@ -476,7 +476,7 @@ void MediaWindowImpl::setPointer(PointerStyle aPointer)
 if (!mxPlayerWindow.is())
 return;
 
-long nPointer;
+sal_Int32 nPointer;
 
 switch (aPointer)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: avmedia/source

2020-10-02 Thread Stephan Bergmann (via logerrit)
 avmedia/source/vlc/avmediavlc.component |2 +-
 avmedia/source/vlc/vlcmanager.cxx   |5 ++---
 2 files changed, 3 insertions(+), 4 deletions(-)

New commits:
commit c1152bceb7593e47fcf6dc51d9538adfb5bd3c6e
Author: Stephan Bergmann 
AuthorDate: Fri Oct 2 14:29:23 2020 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Oct 2 20:50:31 2020 +0200

Use the new single-instance="true" attribute in avmedia

Change-Id: If3f882b4f28224d951492c26800d3009b8cb04b3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103858
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/avmedia/source/vlc/avmediavlc.component 
b/avmedia/source/vlc/avmediavlc.component
index 595c3e8ef325..27009957141b 100644
--- a/avmedia/source/vlc/avmediavlc.component
+++ b/avmedia/source/vlc/avmediavlc.component
@@ -10,7 +10,7 @@
 http://openoffice.org/2010/uno-components;>
   
+constructor="com_sun_star_comp_media_Manager_VLC_get_implementation" 
single-instance="true">
 
   
 
diff --git a/avmedia/source/vlc/vlcmanager.cxx 
b/avmedia/source/vlc/vlcmanager.cxx
index bb916013ef4f..a78dd4381f20 100644
--- a/avmedia/source/vlc/vlcmanager.cxx
+++ b/avmedia/source/vlc/vlcmanager.cxx
@@ -11,6 +11,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include "vlcmanager.hxx"
 #include "vlcplayer.hxx"
@@ -127,9 +128,7 @@ com_sun_star_comp_media_Manager_VLC_get_implementation(
 // Experimental for now - code is neither elegant nor well tested.
 if (!officecfg::Office::Common::Misc::ExperimentalMode::get(context))
 return nullptr;
-static uno::Reference< uno::XInterface > manager( *new 
::avmedia::vlc::Manager );
-manager->acquire();
-return manager.get();
+return cppu::acquire(static_cast(new 
::avmedia::vlc::Manager));
 }
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: avmedia/source basctl/source chart2/source comphelper/source compilerplugins/clang connectivity/source cui/source dbaccess/source desktop/qa desktop/source extensions/s

2020-09-22 Thread Caolán McNamara (via logerrit)
 avmedia/source/vlc/vlcframegrabber.cxx|4 
 avmedia/source/vlc/vlcplayer.cxx  |4 
 avmedia/source/vlc/vlcwindow.cxx  |4 
 basctl/source/basicide/basidectrlr.cxx|2 
 basctl/source/basicide/localizationmgr.cxx|6 
 chart2/source/controller/dialogs/DialogModel.cxx  |2 
 chart2/source/controller/dialogs/tp_DataSource.cxx|2 
 chart2/source/controller/sidebar/ChartColorWrapper.cxx|2 
 chart2/source/model/main/ChartModel.cxx   |4 
 chart2/source/view/main/ChartView.cxx |4 
 comphelper/source/container/embeddedobjectcontainer.cxx   |2 
 comphelper/source/misc/backupfilehelper.cxx   |2 
 comphelper/source/officeinstdir/officeinstallationdirectories.cxx |4 
 comphelper/source/xml/ofopxmlhelper.cxx   |   36 +-
 compilerplugins/clang/stringstatic.cxx|4 
 connectivity/source/drivers/firebird/Connection.cxx   |4 
 cui/source/dialogs/colorpicker.cxx|4 
 cui/source/options/treeopt.cxx|2 
 dbaccess/source/ui/dlg/dbfindex.cxx   |2 
 desktop/qa/desktop_lib/test_desktop_lib.cxx   |4 
 desktop/source/lib/init.cxx   |   22 -
 extensions/source/bibliography/datman.cxx |2 
 extensions/source/logging/csvformatter.cxx|2 
 filter/source/msfilter/msocximex.cxx  |2 
 filter/source/msfilter/msvbahelper.cxx|4 
 filter/source/xsltdialog/xmlfilterjar.cxx |2 
 idlc/source/astdeclaration.cxx|2 
 oox/source/core/xmlfilterbase.cxx |6 
 oox/source/crypto/Standard2007Engine.cxx  |2 
 oox/source/helper/modelobjecthelper.cxx   |   10 
 oox/source/ole/vbacontrol.cxx |2 
 oox/source/vml/vmlinputstream.cxx |4 
 oox/source/vml/vmlshapecontext.cxx|2 
 package/source/manifest/ManifestImport.cxx|  142 
+-
 package/source/zippackage/ZipPackage.cxx  |   10 
 reportdesign/source/filter/xml/xmlStyleImport.cxx |8 
 sal/osl/w32/path_helper.cxx   |4 
 sal/qa/osl/pipe/osl_Pipe.cxx  |8 
 sal/qa/rtl/digest/rtl_digest.cxx  |4 
 sal/qa/rtl/textenc/rtl_textcvt.cxx|2 
 sc/source/core/tool/compiler.cxx  |6 
 sc/source/filter/excel/xiescher.cxx   |6 
 sc/source/filter/oox/defnamesbuffer.cxx   |2 
 sc/source/filter/oox/pagesettings.cxx |   10 
 sc/source/filter/oox/worksheethelper.cxx  |2 
 sc/source/filter/xml/XMLStylesExportHelper.cxx|   20 -
 sc/source/filter/xml/xmlexprt.cxx |2 
 sc/source/filter/xml/xmlstyli.cxx |8 
 sc/source/ui/StatisticsDialogs/FourierAnalysisDialog.cxx  |2 
 sc/source/ui/dbgui/scuiasciiopt.cxx   |6 
 sc/source/ui/unoobj/PivotTableDataProvider.cxx|6 
 sc/source/ui/vba/vbaaxis.cxx  |8 
 sc/source/ui/vba/vbachart.cxx |   32 +-
 sc/source/ui/vba/vbachartobject.cxx   |2 
 sc/source/ui/view/formatsh.cxx|2 
 sd/source/filter/xml/sdtransform.cxx  |6 
 sd/source/ui/dlg/sdabstdlg.cxx|2 
 sd/source/ui/dlg/tpaction.cxx |2 
 sd/source/ui/docshell/docshel4.cxx|6 
 sd/source/ui/presenter/PresenterTextView.cxx  |   18 -
 sd/source/ui/remotecontrol/ImagePreparer.cxx  |4 
 sd/source/ui/unoidl/unoobj.cxx|   30 +-
 sdext/source/presenter/PresenterHelper.cxx|2 
 sdext/source/presenter/PresenterNotesView.cxx |4 
 sfx2/source/appl/sfxhelp.cxx  |2 
 sfx2/source/doc/doctemplateslocal.cxx |8 
 sfx2/source/doc/objstor.cxx 

[Libreoffice-commits] core.git: avmedia/source basctl/source basic/source chart2/source comphelper/source compilerplugins/clang connectivity/source cppuhelper/source cui/source dbaccess/source desktop

2020-09-16 Thread Stephan Bergmann (via logerrit)
 avmedia/source/viewer/mediawindow_impl.cxx 
|3 
 basctl/source/basicide/baside2b.cxx
|3 
 basctl/source/basicide/bastype2.cxx
|3 
 basctl/source/basicide/bastype3.cxx
|3 
 basctl/source/basicide/moduldl2.cxx
|3 
 basic/source/classes/sbunoobj.cxx  
|2 
 basic/source/sbx/sbxscan.cxx   
|   28 
 
chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx
 |8 
 chart2/source/controller/dialogs/ChartTypeDialogController.cxx 
|   20 
 chart2/source/controller/dialogs/res_DataLabel.cxx 
|6 
 chart2/source/controller/main/ChartController_Window.cxx   
|6 
 chart2/source/controller/sidebar/ChartColorWrapper.cxx 
|6 
 chart2/source/tools/ExponentialRegressionCurveCalculator.cxx   
|6 
 comphelper/source/misc/profilezone.cxx 
|3 
 compilerplugins/clang/bufferadd.cxx
|4 
 compilerplugins/clang/conditionalstring.cxx
|   33 
 compilerplugins/clang/elidestringvar.cxx   
|2 
 compilerplugins/clang/implicitboolconversion.cxx   
|2 
 compilerplugins/clang/stringadd.cxx
|4 
 compilerplugins/clang/stringconcatliterals.cxx 
|7 
 compilerplugins/clang/test/conditionalstring.cxx   
|   11 
 compilerplugins/clang/test/elidestringvar.cxx  
|3 
 compilerplugins/clang/test/staticvar.cxx   
|6 
 compilerplugins/clang/test/stringadd.cxx   
|2 
 compilerplugins/clang/test/stringconcatliterals.cxx
|5 
 connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx   
|4 
 connectivity/source/drivers/jdbc/DatabaseMetaData.cxx  
|6 
 connectivity/source/drivers/mork/MDatabaseMetaData.cxx 
|4 
 cppuhelper/source/typemanager.cxx  
|   33 
 cui/source/dialogs/scriptdlg.cxx   
|2 
 cui/source/inc/cfg.hxx 
|2 
 cui/source/options/treeopt.cxx 
|4 
 cui/source/tabpages/border.cxx 
|8 
 dbaccess/source/core/api/SingleSelectQueryComposer.cxx 
|3 
 dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx  
|2 
 desktop/source/deployment/registry/component/dp_component.cxx  
|3 
 desktop/source/pkgchk/unopkg/unopkg_misc.cxx   
|6 
 editeng/source/uno/unotext.cxx 
|3 
 editeng/source/uno/unotext2.cxx
|5 
 embeddedobj/source/msole/oleembed.cxx  
|6 
 extensions/IwyuFilter_extensions.yaml  
|3 
 extensions/source/abpilot/fieldmappingimpl.cxx 
|2 
 extensions/source/bibliography/bibconfig.cxx   
|2 
 extensions/source/bibliography/bibmod.cxx  
|7 
 extensions/source/bibliography/bibprop.hxx 
|   30 
 extensions/source/bibliography/datman.cxx  
|6 
 extensions/source/bibliography/toolbar.cxx 
|   10 
 extensions/source/logging/loggerconfig.cxx 
|   15 
 extensions/source/propctrlr/formcomponenthandler.cxx   
|7 
 extensions/source/propctrlr/selectlabeldialog.cxx  
|6 
 filter/source/graphicfilter/ieps/ieps.cxx  
|3 
 filter/source/svg/svgexport.cxx
|2 
 framework/Library_fwk.mk   
|1 
 framework/inc/jobs/jobconst.hxx 

[Libreoffice-commits] core.git: avmedia/source svx/source

2020-09-08 Thread Martin van Zijl (via logerrit)
 avmedia/source/gstreamer/gstplayer.cxx  |2 --
 svx/source/sidebar/media/MediaPlaybackPanel.cxx |1 -
 2 files changed, 3 deletions(-)

New commits:
commit 5989ffe70942af036974b70c9e0ecd67978c6cc6
Author: Martin van Zijl 
AuthorDate: Wed Jul 1 07:42:29 2020 +1200
Commit: Noel Grandin 
CommitDate: Tue Sep 8 08:27:13 2020 +0200

tdf#34759 fix media player pausing when pressing time slider

Change-Id: I196549f168d67895510a239640c492cfc421fb07
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97644
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/avmedia/source/gstreamer/gstplayer.cxx 
b/avmedia/source/gstreamer/gstplayer.cxx
index 9511be54b5ae..932e1dd1c6e1 100644
--- a/avmedia/source/gstreamer/gstplayer.cxx
+++ b/avmedia/source/gstreamer/gstplayer.cxx
@@ -684,8 +684,6 @@ void SAL_CALL Player::setMediaTime( double fTime )
   GST_SEEK_FLAG_FLUSH,
   GST_SEEK_TYPE_SET, gst_position,
   GST_SEEK_TYPE_NONE, 0 );
-if( !isPlaying() )
-gst_element_set_state( mpPlaybin, GST_STATE_PAUSED );
 
 SAL_INFO( "avmedia.gstreamer", AVVERSION "seek to: " << gst_position << " 
ns original: " << fTime << " s" );
 }
diff --git a/svx/source/sidebar/media/MediaPlaybackPanel.cxx 
b/svx/source/sidebar/media/MediaPlaybackPanel.cxx
index b62eb3292b91..2b2cd5d10ab8 100644
--- a/svx/source/sidebar/media/MediaPlaybackPanel.cxx
+++ b/svx/source/sidebar/media/MediaPlaybackPanel.cxx
@@ -133,7 +133,6 @@ IMPL_LINK_NOARG( MediaPlaybackPanel, VolumeSlideHdl, 
weld::Scale&, void)
 IMPL_LINK_NOARG( MediaPlaybackPanel, SeekHdl, weld::Scale&, void)
 {
 MediaItem aItem(SID_AVMEDIA_TOOLBOX);
-aItem.setState( MediaState::Pause );
 double nTime = 0;
 if (mpMediaItem)
 nTime = mxTimeSlider->get_value() * mpMediaItem->getDuration() / 
AVMEDIA_TIME_RANGE;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: avmedia/source

2020-09-07 Thread Stephan Bergmann (via logerrit)
 avmedia/source/vlc/wrapper/SymbolLoader.hxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit aebfaf13f20e6a106a024b38a671474debd5346a
Author: Stephan Bergmann 
AuthorDate: Sun Sep 6 21:55:18 2020 +0200
Commit: Stephan Bergmann 
CommitDate: Mon Sep 7 10:22:49 2020 +0200

Use plain char osl_getAsciiFunctionSymbol

Change-Id: I932675efaeb1072602775115fc368bbba7bfd2b1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102134
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/avmedia/source/vlc/wrapper/SymbolLoader.hxx 
b/avmedia/source/vlc/wrapper/SymbolLoader.hxx
index 5bbdf18580a8..3c67b82f15c3 100644
--- a/avmedia/source/vlc/wrapper/SymbolLoader.hxx
+++ b/avmedia/source/vlc/wrapper/SymbolLoader.hxx
@@ -19,7 +19,7 @@
 #include 
 #include 
 
-#define SYM_MAP(a) { u ## #a, reinterpret_cast() }
+#define SYM_MAP(a) { #a, reinterpret_cast() }
 
 namespace avmedia::vlc::wrapper
 {
@@ -27,7 +27,7 @@ typedef void (*SymbolFunc) (void);
 
 struct ApiMap
 {
-OUStringLiteral symName;
+char const * symName;
 SymbolFunc *refValue;
 };
 
@@ -70,8 +70,8 @@ struct ApiMap
 {
 for (size_t i = 0; i < N; ++i)
 {
-SymbolFunc aMethod = 
reinterpret_cast(osl_getFunctionSymbol
-( aModule, OUString( pMap[ i ].symName ).pData ));
+SymbolFunc aMethod = 
reinterpret_cast(osl_getAsciiFunctionSymbol
+( aModule, pMap[ i ].symName ));
 if ( !aMethod )
 {
 SAL_WARN("avmedia", "Cannot load method " << pMap[ i 
].symName);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: avmedia/source include/avmedia

2020-09-02 Thread Noel Grandin (via logerrit)
 avmedia/source/framework/MediaControlBase.cxx |4 
 include/avmedia/MediaControlBase.hxx  |3 ---
 2 files changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 65e3a8eb976a669f516bb75ef45071b8d628c811
Author: Noel Grandin 
AuthorDate: Wed Sep 2 09:06:54 2020 +0200
Commit: Noel Grandin 
CommitDate: Wed Sep 2 14:28:12 2020 +0200

these constants can be local to the cxx file

Change-Id: Icc264a185a025466c44351983919e0eb1010072b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101907
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/avmedia/source/framework/MediaControlBase.cxx 
b/avmedia/source/framework/MediaControlBase.cxx
index eb8697104581..1e0b44b757b1 100644
--- a/avmedia/source/framework/MediaControlBase.cxx
+++ b/avmedia/source/framework/MediaControlBase.cxx
@@ -29,6 +29,10 @@
 
 using ::rtl::OUString;
 
+#define AVMEDIA_DB_RANGE-40
+#define AVMEDIA_LINEINCREMENT   1.0
+#define AVMEDIA_PAGEINCREMENT   10.0
+
 namespace avmedia {
 
 MediaControlBase::MediaControlBase()
diff --git a/include/avmedia/MediaControlBase.hxx 
b/include/avmedia/MediaControlBase.hxx
index 3060dd284f95..fdab003e3800 100644
--- a/include/avmedia/MediaControlBase.hxx
+++ b/include/avmedia/MediaControlBase.hxx
@@ -27,9 +27,6 @@
 namespace avmedia { class MediaItem; }
 
 #define AVMEDIA_TIME_RANGE  2048
-#define AVMEDIA_DB_RANGE-40
-#define AVMEDIA_LINEINCREMENT   1.0
-#define AVMEDIA_PAGEINCREMENT   10.0
 
 #define AVMEDIA_TOOLBOXITEM_PLAY0x0001
 #define AVMEDIA_TOOLBOXITEM_PAUSE   0x0004
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: avmedia/source include/avmedia

2020-09-02 Thread Noel Grandin (via logerrit)
 avmedia/source/framework/mediacontrol.cxx  |   12 ++--
 avmedia/source/framework/mediatoolbox.cxx  |2 +-
 avmedia/source/viewer/mediawindow_impl.cxx |2 +-
 include/avmedia/MediaControlBase.hxx   |6 +++---
 4 files changed, 11 insertions(+), 11 deletions(-)

New commits:
commit 7d9ae709c5c252a5360f3ef85f8fba39cdec5bda
Author: Noel Grandin 
AuthorDate: Wed Sep 2 09:15:40 2020 +0200
Commit: Noel Grandin 
CommitDate: Wed Sep 2 14:13:23 2020 +0200

convert MediaControlStyle to scoped enum

Change-Id: If99d07d218499f7daa8b7294c216ddf2c0849b11
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101908
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/avmedia/source/framework/mediacontrol.cxx 
b/avmedia/source/framework/mediacontrol.cxx
index 1db23fdbb23b..a0ab139279f7 100644
--- a/avmedia/source/framework/mediacontrol.cxx
+++ b/avmedia/source/framework/mediacontrol.cxx
@@ -35,9 +35,9 @@ namespace avmedia
 {
 
 MediaControl::MediaControl( vcl::Window* pParent, MediaControlStyle 
eControlStyle ) :
-// MEDIACONTROLSTYLE_MULTILINE is the normal docking windows of 
tools->media player
-// MEDIACONTROLSTYLE_SINGLELINE is the toolbar of view->toolbar->media 
playback
-InterimItemWindow(pParent, eControlStyle == MEDIACONTROLSTYLE_MULTILINE ?
+// MediaControlStyle::MultiLine is the normal docking windows of 
tools->media player
+// MediaControlStyle::SingleLine is the toolbar of view->toolbar->media 
playback
+InterimItemWindow(pParent, eControlStyle == MediaControlStyle::MultiLine ?
OUString("svx/ui/mediawindow.ui") :
OUString("svx/ui/medialine.ui"),
"MediaWindow"),
@@ -82,7 +82,7 @@ MediaControl::MediaControl( vcl::Window* pParent, 
MediaControlStyle eControlStyl
 
 const OUString aMediaPath( AvmResId( AVMEDIA_MEDIA_PATH_DEFAULT ) );
 mxMediaPath->set_label(aMediaPath);
-if (meControlStyle == MEDIACONTROLSTYLE_SINGLELINE)
+if (meControlStyle == MediaControlStyle::SingleLine)
 
mxMediaPath->set_size_request(mxMediaPath->get_preferred_size().Width() + 400, 
-1); // maybe extend the no. 400 to span the screen width
 
 // we want time field + progress slider to update as the media plays
@@ -93,7 +93,7 @@ MediaControl::MediaControl( vcl::Window* pParent, 
MediaControlStyle eControlStyl
 
 void MediaControl::InitializeWidgets()
 {
-if( meControlStyle != MEDIACONTROLSTYLE_SINGLELINE )
+if( meControlStyle != MediaControlStyle::SingleLine )
 {
 mxPlayToolBox->set_item_help_id("open", HID_AVMEDIA_TOOLBOXITEM_OPEN);
 mxPlayToolBox->set_item_label("open", AvmResId(AVMEDIA_STR_OPEN));
@@ -128,7 +128,7 @@ void MediaControl::setState( const MediaItem& rItem )
 {
 mfTime = fTime;
 maItem.merge( rItem );
-if( rItem.getURL().isEmpty() && meControlStyle == 
MEDIACONTROLSTYLE_SINGLELINE )
+if( rItem.getURL().isEmpty() && meControlStyle == 
MediaControlStyle::SingleLine )
 mxPlayToolBox->set_sensitive(false);
 UpdateToolBoxes( maItem );
 UpdateTimeSlider( maItem );
diff --git a/avmedia/source/framework/mediatoolbox.cxx 
b/avmedia/source/framework/mediatoolbox.cxx
index 0eac2eff0378..a109113a78fe 100644
--- a/avmedia/source/framework/mediatoolbox.cxx
+++ b/avmedia/source/framework/mediatoolbox.cxx
@@ -47,7 +47,7 @@ private:
 };
 
 MediaToolBoxControl_Impl::MediaToolBoxControl_Impl( vcl::Window& rParent, 
MediaToolBoxControl& rControl ) :
-MediaControl( , MEDIACONTROLSTYLE_SINGLELINE ),
+MediaControl( , MediaControlStyle::SingleLine ),
 mpToolBoxControl(  )
 {
 SetSizePixel(m_xContainer->get_preferred_size());
diff --git a/avmedia/source/viewer/mediawindow_impl.cxx 
b/avmedia/source/viewer/mediawindow_impl.cxx
index d030271b1c7f..78203960456c 100644
--- a/avmedia/source/viewer/mediawindow_impl.cxx
+++ b/avmedia/source/viewer/mediawindow_impl.cxx
@@ -46,7 +46,7 @@ using namespace ::com::sun::star;
 namespace avmedia::priv {
 
 MediaWindowControl::MediaWindowControl(vcl::Window* pParent)
-: MediaControl(pParent, MEDIACONTROLSTYLE_MULTILINE)
+: MediaControl(pParent, MediaControlStyle::MultiLine)
 {
 }
 
diff --git a/include/avmedia/MediaControlBase.hxx 
b/include/avmedia/MediaControlBase.hxx
index 7c5530019218..3060dd284f95 100644
--- a/include/avmedia/MediaControlBase.hxx
+++ b/include/avmedia/MediaControlBase.hxx
@@ -49,10 +49,10 @@ namespace avmedia { class MediaItem; }
 
 namespace avmedia {
 
-enum MediaControlStyle
+enum class MediaControlStyle
 {
-MEDIACONTROLSTYLE_SINGLELINE = 0,
-MEDIACONTROLSTYLE_MULTILINE = 1
+SingleLine = 0,
+MultiLine = 1
 };
 
 class UNLESS_MERGELIBS(AVMEDIA_DLLPUBLIC) MediaControlBase
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org

[Libreoffice-commits] core.git: avmedia/source basctl/source basic/source chart2/source comphelper/source compilerplugins/clang connectivity/source cppuhelper/source cui/source dbaccess/source desktop

2020-08-28 Thread Stephan Bergmann (via logerrit)
 avmedia/source/viewer/mediawindow_impl.cxx 
|4 
 avmedia/source/vlc/vlcframegrabber.cxx 
|4 
 avmedia/source/vlc/vlcplayer.cxx   
|4 
 avmedia/source/vlc/vlcwindow.cxx   
|4 
 avmedia/source/vlc/wrapper/SymbolLoader.hxx
|2 
 basctl/source/basicide/baside2b.cxx
|2 
 basctl/source/basicide/basidectrlr.cxx 
|2 
 basctl/source/basicide/bastype2.cxx
|4 
 basctl/source/basicide/bastype3.cxx
|2 
 basctl/source/basicide/localizationmgr.cxx 
|6 
 basctl/source/basicide/moduldl2.cxx
|2 
 basic/source/classes/sbunoobj.cxx  
|2 
 basic/source/sbx/sbxscan.cxx   
|   22 
 
chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx
 |4 
 chart2/source/controller/dialogs/ChartTypeDialogController.cxx 
|   20 
 chart2/source/controller/dialogs/DialogModel.cxx   
|2 
 chart2/source/controller/dialogs/res_DataLabel.cxx 
|2 
 chart2/source/controller/dialogs/tp_DataSource.cxx 
|2 
 chart2/source/controller/main/ChartController_Window.cxx   
|2 
 chart2/source/controller/sidebar/ChartColorWrapper.cxx 
|4 
 chart2/source/model/main/ChartModel.cxx
|4 
 chart2/source/tools/ErrorBar.cxx   
|   32 
 chart2/source/tools/ExponentialRegressionCurveCalculator.cxx   
|2 
 chart2/source/view/main/ChartView.cxx  
|4 
 comphelper/source/container/embeddedobjectcontainer.cxx
|2 
 comphelper/source/misc/backupfilehelper.cxx
|2 
 comphelper/source/misc/profilezone.cxx 
|2 
 comphelper/source/misc/storagehelper.cxx   
|4 
 comphelper/source/officeinstdir/officeinstallationdirectories.cxx  
|4 
 comphelper/source/xml/ofopxmlhelper.cxx
|   36 
 compilerplugins/clang/stringstatic.cxx 
|4 
 compilerplugins/clang/test/conditionalstring.cxx   
|2 
 compilerplugins/clang/test/elidestringvar.cxx  
|2 
 compilerplugins/clang/test/staticvar.cxx   
|2 
 compilerplugins/clang/test/stringadd.cxx   
|3 
 compilerplugins/clang/test/stringconcatliterals.cxx
|   14 
 connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx   
|2 
 connectivity/source/drivers/firebird/Connection.cxx
|4 
 connectivity/source/drivers/hsqldb/HDriver.cxx 
|2 
 connectivity/source/drivers/jdbc/DatabaseMetaData.cxx  
|   14 
 connectivity/source/drivers/mork/MDatabaseMetaData.cxx 
|4 
 connectivity/source/drivers/mysql_jdbc/YTable.cxx  
|2 
 cppuhelper/source/typemanager.cxx  
|   30 
 cui/source/dialogs/colorpicker.cxx 
|4 
 cui/source/dialogs/scriptdlg.cxx   
|2 
 cui/source/inc/cfg.hxx 
|2 
 cui/source/options/dbregister.cxx  
|2 
 cui/source/options/treeopt.cxx 
|   26 
 cui/source/tabpages/border.cxx 
|   74 
 dbaccess/source/core/api/SingleSelectQueryComposer.cxx 
|2 
 dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx  
|6 
 desktop/qa/desktop_lib/test_desktop_lib.cxx
|2 
 desktop/source/deployment/registry/component/dp_component.cxx  
|2 
 desktop/source/lib/init.cxx 

[Libreoffice-commits] core.git: avmedia/source basic/source emfio/source filter/source include/vcl sc/source sd/source sfx2/source svtools/qa svx/source vcl/inc vcl/qa vcl/source

2020-08-15 Thread Tomaž Vajngerl (via logerrit)
 avmedia/source/win/framegrabber.cxx   |3 ++-
 basic/source/runtime/methods.cxx  |3 ++-
 emfio/source/reader/mtftools.cxx  |2 +-
 filter/source/msfilter/msdffimp.cxx   |2 +-
 include/vcl/graph.hxx |6 +-
 sc/source/filter/excel/xiescher.cxx   |4 ++--
 sd/source/core/drawdoc4.cxx   |2 +-
 sd/source/ui/dlg/vectdlg.cxx  |2 +-
 sd/source/ui/view/sdview3.cxx |6 +++---
 sfx2/source/appl/linkmgr2.cxx |2 +-
 svtools/qa/unit/GraphicObjectTest.cxx |2 +-
 svx/source/dialog/_bmpmask.cxx|6 +++---
 svx/source/svdraw/svdfmtf.cxx |   10 +-
 svx/source/xoutdev/_xoutbmp.cxx   |2 +-
 vcl/inc/graphic/Manager.hxx   |1 -
 vcl/inc/impgraph.hxx  |6 +-
 vcl/qa/cppunit/BackendTest.cxx|2 +-
 vcl/qa/cppunit/BitmapFilterTest.cxx   |4 ++--
 vcl/qa/cppunit/BitmapScaleTest.cxx|   16 
 vcl/qa/cppunit/graphicfilter/filters-test.cxx |2 +-
 vcl/source/bitmap/bitmap.cxx  |2 +-
 vcl/source/filter/igif/gifread.cxx|2 +-
 vcl/source/filter/ixpm/xpmread.cxx|2 +-
 vcl/source/filter/jpeg/JpegReader.cxx |6 +++---
 vcl/source/gdi/graph.cxx  |5 -
 vcl/source/gdi/impgraph.cxx   |   11 ---
 vcl/source/gdi/pdfwriter_impl2.cxx|2 +-
 vcl/source/graphic/GraphicObject2.cxx |4 ++--
 vcl/source/graphic/Manager.cxx|7 ---
 29 files changed, 47 insertions(+), 77 deletions(-)

New commits:
commit 51599676667b2b6e81e51fc321a19033a3094773
Author: Tomaž Vajngerl 
AuthorDate: Thu Aug 13 08:49:30 2020 +0200
Commit: Tomaž Vajngerl 
CommitDate: Sat Aug 15 17:13:55 2020 +0200

remove constructor with plain Bitmap from Graphic, use BitmapEx

Change-Id: Ie429a10a8f54c6779d437ee4bc75a5ea0c427848
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100727
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/avmedia/source/win/framegrabber.cxx 
b/avmedia/source/win/framegrabber.cxx
index 3b03c68e4e67..4fd0d8b519b2 100644
--- a/avmedia/source/win/framegrabber.cxx
+++ b/avmedia/source/win/framegrabber.cxx
@@ -183,7 +183,8 @@ uno::Reference< graphic::XGraphic > SAL_CALL 
FrameGrabber::grabFrame( double fMe
 
 if( ReadDIB(aBmp, aMemStm, false ) && !aBmp.IsEmpty() )
 {
-const Graphic aGraphic( aBmp );
+BitmapEx aBitmapEx(aBmp);
+Graphic aGraphic(aBitmapEx);
 xRet = aGraphic.GetXGraphic();
 }
 }
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 89ba081348c2..cc60076b58a6 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -4309,7 +4309,8 @@ void SbRtl_LoadPicture(StarBASIC *, SbxArray & rPar, bool)
 {
 Bitmap aBmp;
 ReadDIB(aBmp, *pStream, true);
-Graphic aGraphic(aBmp);
+BitmapEx aBitmapEx(aBmp);
+Graphic aGraphic(aBitmapEx);
 
 SbxObjectRef xRef = new SbStdPicture;
 static_cast(xRef.get())->SetGraphic( aGraphic );
diff --git a/emfio/source/reader/mtftools.cxx b/emfio/source/reader/mtftools.cxx
index 535c49184dae..a903bf99aa99 100644
--- a/emfio/source/reader/mtftools.cxx
+++ b/emfio/source/reader/mtftools.cxx
@@ -1310,7 +1310,7 @@ namespace emfio
   Color(),
   Color(),
   0,
-  Graphic (maLatestFillStyle.aBmp) 
);
+  Graphic 
(BitmapEx(maLatestFillStyle.aBmp)));
 
 SvMemoryStream  aMemStm;
 
diff --git a/filter/source/msfilter/msdffimp.cxx 
b/filter/source/msfilter/msdffimp.cxx
index 57f034e38870..ea37cbe45b47 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -6555,7 +6555,7 @@ bool SvxMSDffManager::GetBLIPDirect( SvStream& 
rBLIPStream, Graphic& rData, tool
 Bitmap aNew;
 if( ReadDIB(aNew, *pGrStream, false) )
 {
-rData = Graphic( aNew );
+rData = Graphic(BitmapEx(aNew));
 nRes = ERRCODE_NONE;
 }
 }
diff --git a/include/vcl/graph.hxx b/include/vcl/graph.hxx
index f6a47e43b8ec..1880041b4ba5 100644
--- a/include/vcl/graph.hxx
+++ b/include/vcl/graph.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_VCL_GRAPH_HXX
-#define 

[Libreoffice-commits] core.git: avmedia/source basctl/source basegfx/source basic/source canvas/source chart2/source comphelper/source compilerplugins/clang connectivity/source cppuhelper/source cui/s

2020-08-14 Thread Noel Grandin (via logerrit)
 avmedia/source/viewer/mediawindow_impl.cxx|2 -
 basctl/source/basicide/baside2.cxx|4 +-
 basctl/source/basicide/basidesh.cxx   |2 -
 basegfx/source/color/bcolormodifier.cxx   |   10 ++---
 basegfx/source/matrix/b3dhommatrix.cxx|2 -
 basic/source/classes/sbxmod.cxx   |4 +-
 basic/source/runtime/runtime.cxx  |2 -
 basic/source/sbx/sbxvar.cxx   |2 -
 basic/source/uno/namecont.cxx |2 -
 canvas/source/cairo/cairo_spritehelper.cxx|2 -
 canvas/source/vcl/spritehelper.cxx|3 -
 chart2/source/controller/main/ChartController_Window.cxx  |2 -
 chart2/source/model/main/ChartModel_Persistence.cxx   |2 -
 chart2/source/tools/InternalDataProvider.cxx  |2 -
 chart2/source/view/axes/Tickmarks_Equidistant.cxx |2 -
 chart2/source/view/charttypes/BarChart.cxx|2 -
 chart2/source/view/main/ChartView.cxx |2 -
 comphelper/source/misc/backupfilehelper.cxx   |4 +-
 compilerplugins/clang/simplifybool.cxx|   12 --
 connectivity/source/commontools/TColumnsHelper.cxx|2 -
 connectivity/source/commontools/TIndexes.cxx  |2 -
 connectivity/source/commontools/TKeys.cxx |2 -
 connectivity/source/drivers/jdbc/CallableStatement.cxx|2 -
 connectivity/source/drivers/jdbc/JStatement.cxx   |2 -
 connectivity/source/drivers/jdbc/PreparedStatement.cxx|2 -
 cppuhelper/source/component_context.cxx   |2 -
 cui/source/dialogs/SpellDialog.cxx|2 -
 cui/source/dialogs/hldocntp.cxx   |2 -
 cui/source/tabpages/autocdlg.cxx  |2 -
 cui/source/tabpages/tpline.cxx|2 -
 dbaccess/source/core/dataaccess/databasedocument.cxx  |2 -
 dbaccess/source/filter/xml/xmlHierarchyCollection.cxx |2 -
 dbaccess/source/ui/browser/brwctrlr.cxx   |2 -
 dbaccess/source/ui/browser/sbagrid.cxx|2 -
 dbaccess/source/ui/relationdesign/RTableConnectionData.cxx|2 -
 desktop/source/migration/services/jvmfwk.cxx  |2 -
 drawinglayer/source/primitive2d/controlprimitive2d.cxx|2 -
 drawinglayer/source/primitive2d/markerarrayprimitive2d.cxx|2 -
 drawinglayer/source/primitive2d/svggradientprimitive2d.cxx|2 -
 drawinglayer/source/processor2d/vclprocessor2d.cxx|2 -
 editeng/source/editeng/impedit.cxx|4 +-
 editeng/source/editeng/impedit2.cxx   |2 -
 editeng/source/editeng/impedit4.cxx   |3 -
 editeng/source/misc/hangulhanja.cxx   |2 -
 editeng/source/outliner/outliner.cxx  |4 +-
 editeng/source/outliner/outlvw.cxx|2 -
 extensions/source/bibliography/toolbar.cxx|2 -
 extensions/source/propctrlr/eformspropertyhandler.cxx |2 -
 filter/source/graphicfilter/icgm/actimpr.cxx  |2 -
 filter/source/msfilter/escherex.cxx   |2 -
 filter/source/msfilter/svdfppt.cxx|2 -
 filter/source/xsltdialog/xmlfilterjar.cxx |   10 ++---
 forms/source/component/imgprod.cxx|2 -
 formula/source/ui/dlg/formula.cxx |2 -
 framework/source/jobs/job.cxx |2 -
 framework/source/services/frame.cxx   |4 +-
 framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx |6 +--
 framework/source/uiconfiguration/uiconfigurationmanager.cxx   |6 +--
 framework/source/uielement/uicommanddescription.cxx   |2 -
 idlc/source/astinterface.cxx  |2 -
 linguistic/source/lngsvcmgr.cxx   |2 -
 oox/source/dump/oledumper.cxx |2 -
 oox/source/helper/storagebase.cxx |2 -
 oox/source/ole/vbacontrol.cxx |2 -
 oox/source/ole/vbaproject.cxx |2 -
 

[Libreoffice-commits] core.git: avmedia/source basctl/source basic/source chart2/source comphelper/source compilerplugins/clang cui/source dbaccess/source desktop/qa desktop/source extensions/source f

2020-08-13 Thread Noel Grandin (via logerrit)
 avmedia/source/vlc/vlcframegrabber.cxx|4 
 avmedia/source/vlc/vlcplayer.cxx  |4 
 avmedia/source/vlc/vlcwindow.cxx  |4 
 basctl/source/basicide/basidectrlr.cxx|2 
 basctl/source/basicide/localizationmgr.cxx|6 
 basic/source/sbx/sbxvar.cxx   |2 
 chart2/source/controller/dialogs/DialogModel.cxx  |4 
 chart2/source/controller/dialogs/tp_DataSource.cxx|4 
 chart2/source/model/main/ChartModel.cxx   |4 
 chart2/source/view/main/ChartView.cxx |4 
 comphelper/source/officeinstdir/officeinstallationdirectories.cxx |4 
 comphelper/source/xml/ofopxmlhelper.cxx   |   36 ++--
 compilerplugins/clang/stringstatic.cxx|   60 
+---
 compilerplugins/clang/test/stringstatic.cxx   |   24 +++
 cui/source/options/treeopt.cxx|2 
 dbaccess/source/ui/dlg/dbfindex.cxx   |2 
 desktop/qa/desktop_lib/test_desktop_lib.cxx   |6 
 desktop/source/lib/init.cxx   |   22 +-
 extensions/source/bibliography/bibmod.cxx |   21 +-
 extensions/source/bibliography/bibprop.hxx|   20 +-
 extensions/source/bibliography/datman.cxx |6 
 extensions/source/logging/csvformatter.cxx|2 
 filter/source/msfilter/msocximex.cxx  |2 
 filter/source/msfilter/msvbahelper.cxx|4 
 framework/inc/jobs/jobconst.hxx   |6 
 framework/source/fwi/jobs/jobconst.cxx|6 
 idlc/source/astdeclaration.cxx|2 
 include/rtl/string.hxx|   75 
+++---
 include/xmloff/xmlimp.hxx |4 
 oox/source/core/xmlfilterbase.cxx |4 
 oox/source/crypto/Standard2007Engine.cxx  |2 
 oox/source/vml/vmlinputstream.cxx |4 
 oox/source/vml/vmlshapecontext.cxx|2 
 package/source/zippackage/ZipPackage.cxx  |   10 -
 sal/qa/osl/pipe/osl_Pipe.cxx  |9 -
 sal/qa/rtl/digest/rtl_digest.cxx  |   20 +-
 sax/qa/cppunit/xmlimport.cxx  |   29 ++-
 sax/source/fastparser/legacyfastparser.cxx|8 -
 sc/source/core/tool/compiler.cxx  |6 
 sc/source/filter/excel/xiescher.cxx   |4 
 sc/source/ui/StatisticsDialogs/FourierAnalysisDialog.cxx  |2 
 sc/source/ui/dbgui/scuiasciiopt.cxx   |6 
 sc/source/ui/unoobj/PivotTableDataProvider.cxx|6 
 sc/source/ui/vba/excelvbahelper.cxx   |2 
 sc/source/ui/vba/vbaaxis.cxx  |8 -
 sc/source/ui/vba/vbachart.cxx |   32 ++--
 sc/source/ui/vba/vbachartobject.cxx   |2 
 sc/source/ui/view/formatsh.cxx|2 
 sd/inc/strmname.h |8 -
 sd/source/ui/dlg/sdabstdlg.cxx|2 
 sd/source/ui/framework/tools/FrameworkHelper.cxx  |   26 +--
 sd/source/ui/inc/ToolBarManager.hxx   |   30 ++--
 sd/source/ui/inc/framework/FrameworkHelper.hxx|   26 +--
 sd/source/ui/remotecontrol/ImagePreparer.cxx  |4 
 sd/source/ui/view/ToolBarManager.cxx  |   30 ++--
 sdext/source/presenter/PresenterConfigurationAccess.cxx   |2 
 sdext/source/presenter/PresenterConfigurationAccess.hxx   |2 
 sdext/source/presenter/PresenterHelper.cxx|   12 -
 sdext/source/presenter/PresenterHelper.hxx|   12 -
 sdext/source/presenter/PresenterNotesView.cxx |4 
 sdext/source/presenter/PresenterPaneFactory.cxx   |   14 -
 sdext/source/presenter/PresenterPaneFactory.hxx   |   14 -
 sdext/source/presenter/PresenterViewFactory.cxx   |   12 -
 sdext/source/presenter/PresenterViewFactory.hxx   |   12 -
 sfx2/source/appl/sfxhelp.cxx  |2 
 sfx2/source/dialog/filedlghelper.cxx

[Libreoffice-commits] core.git: avmedia/source

2020-07-16 Thread Noel Grandin (via logerrit)
 avmedia/source/viewer/mediaevent_impl.hxx  |6 ++
 avmedia/source/vlc/inc/wrapper/Common.hxx  |   10 +++---
 avmedia/source/vlc/inc/wrapper/EventHandler.hxx|   10 +++---
 avmedia/source/vlc/inc/wrapper/EventManager.hxx|   10 +++---
 avmedia/source/vlc/inc/wrapper/Instance.hxx|   10 +++---
 avmedia/source/vlc/inc/wrapper/Media.hxx   |   10 +++---
 avmedia/source/vlc/inc/wrapper/Player.hxx  |   10 +++---
 avmedia/source/vlc/inc/wrapper/ThreadsafeQueue.hxx |   10 +++---
 avmedia/source/vlc/vlcframegrabber.hxx |5 ++---
 avmedia/source/vlc/vlcmanager.hxx  |5 ++---
 avmedia/source/vlc/vlcplayer.hxx   |5 ++---
 avmedia/source/vlc/vlcwindow.hxx   |5 ++---
 avmedia/source/vlc/wrapper/SymbolLoader.hxx|   10 +++---
 13 files changed, 34 insertions(+), 72 deletions(-)

New commits:
commit 2f6839b8b1c778cd01833a66c1cc92f1b5cf2667
Author: Noel Grandin 
AuthorDate: Thu Jul 16 12:44:34 2020 +0200
Commit: Noel Grandin 
CommitDate: Thu Jul 16 18:05:48 2020 +0200

compact namespace: avmedia

Change-Id: I3f8d9c689724c6f522933604cc8e9cb041585546
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98896
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/avmedia/source/viewer/mediaevent_impl.hxx 
b/avmedia/source/viewer/mediaevent_impl.hxx
index 9c864ecff29d..1dc1c20ec2ff 100644
--- a/avmedia/source/viewer/mediaevent_impl.hxx
+++ b/avmedia/source/viewer/mediaevent_impl.hxx
@@ -27,9 +27,7 @@
 #include 
 #include 
 
-namespace avmedia
-{
-namespace priv
+namespace avmedia::priv
 {
 
 // - MediaEventListenersImpl -
@@ -72,7 +70,7 @@ namespace avmedia
 VclPtr mpNotifyWindow;
 mutable ::osl::MutexmaMutex;
 };
-}
+
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/avmedia/source/vlc/inc/wrapper/Common.hxx 
b/avmedia/source/vlc/inc/wrapper/Common.hxx
index c9b7f9682dd2..a7c48e586c67 100644
--- a/avmedia/source/vlc/inc/wrapper/Common.hxx
+++ b/avmedia/source/vlc/inc/wrapper/Common.hxx
@@ -9,11 +9,7 @@
 
 #pragma once
 
-namespace avmedia
-{
-namespace vlc
-{
-namespace wrapper
+namespace avmedia::vlc::wrapper
 {
 class Common
 {
@@ -23,7 +19,7 @@ namespace wrapper
 static const char* LastErrorMessage();
 };
 }
-}
-}
+
+
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/avmedia/source/vlc/inc/wrapper/EventHandler.hxx 
b/avmedia/source/vlc/inc/wrapper/EventHandler.hxx
index 955c8347839d..d0ecd1832caa 100644
--- a/avmedia/source/vlc/inc/wrapper/EventHandler.hxx
+++ b/avmedia/source/vlc/inc/wrapper/EventHandler.hxx
@@ -13,11 +13,7 @@
 #include 
 #include 
 
-namespace avmedia
-{
-namespace vlc
-{
-namespace wrapper
+namespace avmedia::vlc::wrapper
 {
 class EventHandler : public ::osl::Thread
 {
@@ -36,7 +32,7 @@ namespace wrapper
 ThreadsafeQueue< TCallback > mCallbackQueue;
 };
 }
-}
-}
+
+
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/avmedia/source/vlc/inc/wrapper/EventManager.hxx 
b/avmedia/source/vlc/inc/wrapper/EventManager.hxx
index 9a85154831b1..30beac672384 100644
--- a/avmedia/source/vlc/inc/wrapper/EventManager.hxx
+++ b/avmedia/source/vlc/inc/wrapper/EventManager.hxx
@@ -15,11 +15,7 @@
 struct libvlc_event_manager_t;
 struct libvlc_event_t;
 
-namespace avmedia
-{
-namespace vlc
-{
-namespace wrapper
+namespace avmedia::vlc::wrapper
 {
 class EventHandler;
 class EventManager
@@ -49,7 +45,7 @@ namespace wrapper
 static void Handler( const libvlc_event_t *event, void *pData );
 };
 }
-}
-}
+
+
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/avmedia/source/vlc/inc/wrapper/Instance.hxx 
b/avmedia/source/vlc/inc/wrapper/Instance.hxx
index 7e4ba7741019..46e4b76bb38e 100644
--- a/avmedia/source/vlc/inc/wrapper/Instance.hxx
+++ b/avmedia/source/vlc/inc/wrapper/Instance.hxx
@@ -11,11 +11,7 @@
 
 struct libvlc_instance_t;
 
-namespace avmedia
-{
-namespace vlc
-{
-namespace wrapper
+namespace avmedia::vlc::wrapper
 {
 class Instance
 {
@@ -35,7 +31,7 @@ namespace wrapper
 libvlc_instance_t *mInstance;
 };
 }
-}
-}
+
+
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/avmedia/source/vlc/inc/wrapper/Media.hxx 
b/avmedia/source/vlc/inc/wrapper/Media.hxx
index 288bb0d43198..3268e898e254 100644
--- a/avmedia/source/vlc/inc/wrapper/Media.hxx
+++ b/avmedia/source/vlc/inc/wrapper/Media.hxx
@@ -13,11 +13,7 @@ struct libvlc_media_t;
 
 namespace rtl { class OUString; }
 
-namespace avmedia
-{
-namespace vlc
-{
-namespace wrapper
+namespace avmedia::vlc::wrapper
 {
 class Instance;
 class Media
@@ -41,7 +37,7 @@ namespace wrapper
 libvlc_media_t *mMedia;
 };
 }
-}
-}
+
+
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/avmedia/source/vlc/inc/wrapper/Player.hxx 

[Libreoffice-commits] core.git: avmedia/source

2020-07-15 Thread Noel Grandin (via logerrit)
 avmedia/source/win/avmediawin.component |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7a2b5236cc73993d71ccf46f62d69c6a9fa5a3d1
Author: Noel Grandin 
AuthorDate: Tue Jul 14 13:53:05 2020 +0200
Commit: Noel Grandin 
CommitDate: Wed Jul 15 10:42:56 2020 +0200

don't need to use prefix here anymore

all the services here are using constructors

Change-Id: I2f42170b5d2345954df7bc0c41aa2709f97b47ed
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98728
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/avmedia/source/win/avmediawin.component 
b/avmedia/source/win/avmediawin.component
index 00a25c0c6dca..4b68b1cfceba 100644
--- a/avmedia/source/win/avmediawin.component
+++ b/avmedia/source/win/avmediawin.component
@@ -18,7 +18,7 @@
  -->
 
 http://openoffice.org/2010/uno-components;>
+xmlns="http://openoffice.org/2010/uno-components;>
   
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: avmedia/source

2020-06-03 Thread Stephan Bergmann (via logerrit)
 avmedia/source/framework/MediaControlBase.cxx |3 +--
 avmedia/source/framework/mediacontrol.cxx |3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

New commits:
commit 9362928a1c3bf13acffa5b735996ba5d352ba50a
Author: Stephan Bergmann 
AuthorDate: Tue Jun 2 18:43:56 2020 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Jun 3 09:17:45 2020 +0200

Upcoming loplugin:elidestringvar: avmedia

Change-Id: I792998688f0ac0853cd6fee7a92d7c00580cb51b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95372
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/avmedia/source/framework/MediaControlBase.cxx 
b/avmedia/source/framework/MediaControlBase.cxx
index e84586d76809..eb8697104581 100644
--- a/avmedia/source/framework/MediaControlBase.cxx
+++ b/avmedia/source/framework/MediaControlBase.cxx
@@ -121,8 +121,7 @@ void MediaControlBase::InitializeWidgets()
 mxZoomListBox->set_help_id( HID_AVMEDIA_ZOOMLISTBOX );
 mxZoomListBox->set_tooltip_text(AvmResId( AVMEDIA_STR_ZOOM_TOOLTIP ));
 
-const OUString aTimeText( " 00:00:00/00:00:00 " );
-mxTimeEdit->set_text( aTimeText );
+mxTimeEdit->set_text( " 00:00:00/00:00:00 " );
 mxTimeEdit->set_help_id( HID_AVMEDIA_TIMEEDIT );
 mxTimeEdit->set_sensitive(false);
 
diff --git a/avmedia/source/framework/mediacontrol.cxx 
b/avmedia/source/framework/mediacontrol.cxx
index 66818fc07388..1db23fdbb23b 100644
--- a/avmedia/source/framework/mediacontrol.cxx
+++ b/avmedia/source/framework/mediacontrol.cxx
@@ -69,8 +69,7 @@ MediaControl::MediaControl( vcl::Window* pParent, 
MediaControlStyle eControlStyl
 maChangeTimeIdle.SetPriority( TaskPriority::LOWEST );
 maChangeTimeIdle.SetInvokeHandler( LINK( this, MediaControl, 
implTimeEndHdl ) );
 
-const OUString aTimeText( " 00:00:00/00:00:00 " );
-mxTimeEdit->set_text(aTimeText);
+mxTimeEdit->set_text(" 00:00:00/00:00:00 ");
 Size aTextSize = mxTimeEdit->get_preferred_size();
 mxTimeEdit->set_size_request(aTextSize.Width(), aTextSize.Height());
 mxTimeEdit->set_text(OUString());
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: avmedia/source connectivity/source cui/source dbaccess/source dtrans/source dtrans/test extensions/source extensions/test fpicker/source shell/source vcl/win

2020-05-22 Thread Julien Nabet (via logerrit)
 avmedia/source/win/framegrabber.cxx|2 +-
 avmedia/source/win/player.cxx  |2 +-
 connectivity/source/drivers/ado/ADriver.cxx|2 +-
 cui/source/options/optgdlg.cxx |2 +-
 dbaccess/source/ui/dlg/adodatalinks.cxx|4 ++--
 dtrans/source/win32/clipb/MtaOleClipb.cxx  |6 +++---
 dtrans/source/win32/workbench/test_wincb.cxx   |2 +-
 dtrans/test/win32/dnd/dndTest.cxx  |4 ++--
 extensions/source/config/WinUserInfo/WinUserInfoBe.cxx |2 +-
 extensions/source/update/check/updatecheck.cxx |2 +-
 extensions/test/ole/OleClient/clientTest.cxx   |4 ++--
 extensions/test/ole/OleConverterVar1/convTest.cxx  |4 ++--
 extensions/test/ole/cppToUno/testcppuno.cxx|4 ++--
 extensions/test/ole/cpptest/cpptest.cxx|2 +-
 extensions/test/ole/unoTocomCalls/Test/Test.cpp|4 ++--
 fpicker/source/win32/VistaFilePickerImpl.cxx   |2 +-
 shell/source/win32/SysShExec.cxx   |2 +-
 vcl/win/app/salinst.cxx|2 +-
 18 files changed, 26 insertions(+), 26 deletions(-)

New commits:
commit b587de60d4e6aa96238766272d94f1499b22f696
Author: Julien Nabet 
AuthorDate: Fri May 22 14:33:24 2020 +0200
Commit: Julien Nabet 
CommitDate: Fri May 22 22:22:15 2020 +0200

Prefer CoInitializeEx instead of CoInitialize

As 
https://docs.microsoft.com/fr-fr/windows/win32/api/objbase/nf-objbase-coinitialize?redirectedfrom=MSDN
advised.

Moreover, it'll make concurrency model explicit
Change-Id: I247a49248bf45beb64a7985a7c0d078ee48efe2d

Change-Id: I6e755fd516d9fb2dd2a9df0c66d9afd6070447ea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94669
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
Reviewed-by: Julien Nabet 

diff --git a/avmedia/source/win/framegrabber.cxx 
b/avmedia/source/win/framegrabber.cxx
index 09f5a6409616..21b5dede6866 100644
--- a/avmedia/source/win/framegrabber.cxx
+++ b/avmedia/source/win/framegrabber.cxx
@@ -50,7 +50,7 @@ namespace avmedia::win {
 FrameGrabber::FrameGrabber( const uno::Reference< lang::XMultiServiceFactory 
>& rxMgr ) :
 mxMgr( rxMgr )
 {
-::CoInitialize( nullptr );
+::CoInitializeEx( nullptr, COINIT_APARTMENTTHREADED );
 }
 
 
diff --git a/avmedia/source/win/player.cxx b/avmedia/source/win/player.cxx
index 50323bb80725..8e08d9e53b90 100644
--- a/avmedia/source/win/player.cxx
+++ b/avmedia/source/win/player.cxx
@@ -80,7 +80,7 @@ Player::Player( const uno::Reference< 
lang::XMultiServiceFactory >& rxMgr ) :
 mbLooping( false ),
 mbAddWindow( true )
 {
-::CoInitialize( nullptr );
+::CoInitializeEx( nullptr, COINIT_APARTMENTTHREADED );
 }
 
 
diff --git a/connectivity/source/drivers/ado/ADriver.cxx 
b/connectivity/source/drivers/ado/ADriver.cxx
index f8afdde132c0..926a818eebb2 100644
--- a/connectivity/source/drivers/ado/ADriver.cxx
+++ b/connectivity/source/drivers/ado/ADriver.cxx
@@ -58,7 +58,7 @@ ODriver::ODriver(const css::uno::Reference< 
css::lang::XMultiServiceFactory >& _
 ODriver::~ODriver()
 {
 CoUninitialize();
-CoInitialize(nullptr);
+CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED);
 }
 
 void ODriver::disposing()
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 8c9210474ce7..34bd6857142d 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -473,7 +473,7 @@ IMPL_LINK_NOARG( OfaMiscTabPage, TwoFigureHdl, 
weld::SpinButton&, void )
 #if defined(_WIN32)
 IMPL_STATIC_LINK_NOARG(OfaMiscTabPage, FileAssocClick, weld::Button&, void)
 {
-const bool bUninit = SUCCEEDED(CoInitialize(nullptr));
+const bool bUninit = SUCCEEDED(CoInitializeEx(nullptr, 
COINIT_APARTMENTTHREADED));
 IApplicationAssociationRegistrationUI* pIf = nullptr;
 HRESULT res = CoCreateInstance(CLSID_ApplicationAssociationRegistrationUI, 
nullptr,
CLSCTX_INPROC_SERVER, 
IID_IApplicationAssociationRegistrationUI,
diff --git a/dbaccess/source/ui/dlg/adodatalinks.cxx 
b/dbaccess/source/ui/dlg/adodatalinks.cxx
index fa237caa33ac..fc129b2dea33 100644
--- a/dbaccess/source/ui/dlg/adodatalinks.cxx
+++ b/dbaccess/source/ui/dlg/adodatalinks.cxx
@@ -42,7 +42,7 @@ OUString PromptNew(long hWnd)
 BSTR _result=nullptr;
 
 // Initialize COM
-::CoInitialize( nullptr );
+::CoInitializeEx( nullptr, COINIT_APARTMENTTHREADED );
 
 // Instantiate DataLinks object.
 hr = CoCreateInstance(
@@ -96,7 +96,7 @@ OUString PromptEdit(long hWnd, OUString const & connstr)
 BSTR _result=nullptr;
 
 // Initialize COM
-::CoInitialize( nullptr );
+::CoInitializeEx( nullptr, COINIT_APARTMENTTHREADED );
 
 hr = CoCreateInstance(CLSID_CADOConnection,
 nullptr,
diff --git 

[Libreoffice-commits] core.git: avmedia/source basctl/source bridges/inc bridges/source

2020-05-08 Thread Noel Grandin (via logerrit)
 avmedia/source/gstreamer/gstframegrabber.hxx|5 ++---
 avmedia/source/gstreamer/gstmanager.hxx |5 ++---
 avmedia/source/gstreamer/gstplayer.hxx  |5 ++---
 avmedia/source/gstreamer/gstwindow.hxx  |5 ++---
 avmedia/source/macavf/framegrabber.hxx  |5 ++---
 avmedia/source/macavf/framegrabber.mm   |5 ++---
 avmedia/source/macavf/macavfcommon.hxx  |8 +++-
 avmedia/source/macavf/manager.hxx   |5 ++---
 avmedia/source/macavf/manager.mm|5 ++---
 avmedia/source/macavf/player.hxx|5 ++---
 avmedia/source/macavf/player.mm |5 ++---
 avmedia/source/macavf/window.hxx|5 ++---
 avmedia/source/macavf/window.mm |5 ++---
 avmedia/source/viewer/mediawindow_impl.hxx  |8 
 avmedia/source/win/framegrabber.cxx |6 +++---
 avmedia/source/win/framegrabber.hxx |6 +++---
 avmedia/source/win/manager.cxx  |6 +++---
 avmedia/source/win/manager.hxx  |5 ++---
 avmedia/source/win/player.cxx   |6 +++---
 avmedia/source/win/player.hxx   |6 +++---
 avmedia/source/win/window.cxx   |6 +++---
 avmedia/source/win/window.hxx   |5 ++---
 basctl/source/basicide/baside2.hxx  |4 +---
 basctl/source/basicide/documentenumeration.hxx  |8 +++-
 bridges/inc/bridge.hxx  |4 ++--
 bridges/inc/cppinterfaceproxy.hxx   |8 +++-
 bridges/inc/types.hxx   |4 ++--
 bridges/inc/unointerfaceproxy.hxx   |8 +++-
 bridges/inc/vtablefactory.hxx   |4 ++--
 bridges/inc/vtables.hxx |4 ++--
 bridges/source/cpp_uno/gcc3_aix_powerpc/uno2cpp.cxx |4 ++--
 bridges/source/cpp_uno/gcc3_ios/uno2cpp.cxx |4 ++--
 bridges/source/cpp_uno/gcc3_linux_aarch64/uno2cpp.cxx   |4 ++--
 bridges/source/cpp_uno/gcc3_linux_alpha/uno2cpp.cxx |4 ++--
 bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx   |4 ++--
 bridges/source/cpp_uno/gcc3_linux_hppa/uno2cpp.cxx  |4 ++--
 bridges/source/cpp_uno/gcc3_linux_ia64/uno2cpp.cxx  |4 ++--
 bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx |4 ++--
 bridges/source/cpp_uno/gcc3_linux_m68k/uno2cpp.cxx  |4 ++--
 bridges/source/cpp_uno/gcc3_linux_mips/uno2cpp.cxx  |5 +++--
 bridges/source/cpp_uno/gcc3_linux_mips64/uno2cpp.cxx|5 +++--
 bridges/source/cpp_uno/gcc3_linux_powerpc/uno2cpp.cxx   |4 ++--
 bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx |4 ++--
 bridges/source/cpp_uno/gcc3_linux_s390/uno2cpp.cxx  |4 ++--
 bridges/source/cpp_uno/gcc3_linux_s390x/uno2cpp.cxx |4 ++--
 bridges/source/cpp_uno/gcc3_linux_sparc/uno2cpp.cxx |4 ++--
 bridges/source/cpp_uno/gcc3_linux_sparc64/uno2cpp.cxx   |4 ++--
 bridges/source/cpp_uno/gcc3_macosx_x86-64/uno2cpp.cxx   |4 ++--
 bridges/source/cpp_uno/gcc3_solaris_intel/uno2cpp.cxx   |4 ++--
 bridges/source/cpp_uno/gcc3_solaris_sparc/uno2cpp.cxx   |4 ++--
 bridges/source/cpp_uno/msvc_win32_intel/uno2cpp.cxx |4 ++--
 bridges/source/cpp_uno/msvc_win32_x86-64/uno2cpp.cxx|4 ++--
 52 files changed, 117 insertions(+), 139 deletions(-)

New commits:
commit 3eed23154170fcb8d313ff079d61c9701b77eefa
Author: Noel Grandin 
AuthorDate: Fri May 8 10:55:43 2020 +0200
Commit: Noel Grandin 
CommitDate: Fri May 8 12:16:54 2020 +0200

compact namespace in avmedia..bridges

Change-Id: Iba1282caadab91a0c6e1c044dbab5e6e15f3707b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93705
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/avmedia/source/gstreamer/gstframegrabber.hxx 
b/avmedia/source/gstreamer/gstframegrabber.hxx
index fce3edd70fe9..03c4af65f1a9 100644
--- a/avmedia/source/gstreamer/gstframegrabber.hxx
+++ b/avmedia/source/gstreamer/gstframegrabber.hxx
@@ -23,7 +23,7 @@
 #include 
 #include 
 
-namespace avmedia { namespace gstreamer {
+namespace avmedia::gstreamer {
 
 typedef ::cppu::WeakImplHelper< css::media::XFrameGrabber,
 css::lang::XServiceInfo > FrameGrabber_BASE;
@@ -55,7 +55,6 @@ private:
 explicit FrameGrabber( const OUString  );
 };
 
-} // namespace gst
-} // namespace avmedia
+} // avmedia::gst
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/avmedia/source/gstreamer/gstmanager.hxx 
b/avmedia/source/gstreamer/gstmanager.hxx
index cd7622f62d22..21a5245dd933 100644
--- a/avmedia/source/gstreamer/gstmanager.hxx

[Libreoffice-commits] core.git: avmedia/source chart2/qa chart2/source compilerplugins/clang lotuswordpro/source sd/qa sd/source sfx2/qa sfx2/source svx/source writerfilter/source writerperfect/qa wri

2020-05-01 Thread Noel Grandin (via logerrit)
 avmedia/source/vlc/vlcframegrabber.cxx |2 
 chart2/qa/extras/chart2export.cxx  |2 
 chart2/source/view/axes/VPolarAxis.cxx |6 
 chart2/source/view/axes/VPolarAxis.hxx |2 
 compilerplugins/clang/makeshared.cxx   |  124 +++--
 compilerplugins/clang/test/makeshared.cxx  |   30 +++-
 lotuswordpro/source/filter/lwpbulletstylemgr.cxx   |4 
 lotuswordpro/source/filter/lwpbulletstylemgr.hxx   |2 
 sd/qa/unit/export-tests-ooxml1.cxx |2 
 sd/qa/unit/export-tests-ooxml2.cxx |4 
 sd/qa/unit/sdmodeltestbase.hxx |   18 +-
 sd/source/ui/dlg/sddlgfact.cxx |   14 -
 sd/source/ui/dlg/sddlgfact.hxx |8 -
 sd/source/ui/slidesorter/cache/SlsBitmapCompressor.cxx |8 -
 sfx2/qa/cppunit/test_misc.cxx  |2 
 sfx2/source/doc/objstor.cxx|   41 ++---
 sfx2/source/doc/oleprops.cxx   |   13 -
 svx/source/dialog/imapwnd.cxx  |   20 +-
 svx/source/form/formcontroller.cxx |4 
 svx/source/sidebar/nbdtmg.cxx  |4 
 writerfilter/source/rtftok/rtfdocumentimpl.hxx |2 
 writerperfect/qa/unit/EPUBExportTest.cxx   |6 
 writerperfect/qa/unit/WPXSvStreamTest.cxx  |5 
 writerperfect/source/impress/KeynoteImportFilter.cxx   |   11 -
 xmloff/source/draw/xexptran.cxx|   32 ++--
 xmlsecurity/qa/unit/signing/signing.cxx|4 
 26 files changed, 244 insertions(+), 126 deletions(-)

New commits:
commit ed8152b1ed9baf859966fd21d6641dfba9c4467c
Author: Noel Grandin 
AuthorDate: Tue Apr 21 07:51:25 2020 +0200
Commit: Noel Grandin 
CommitDate: Fri May 1 08:26:24 2020 +0200

improve loplugin:makeshared

to find places where we are converting stuff to unique_ptr
instead of using std::make_shared.

As a bonus, this tends to find places where we are using shared_ptr
where we can instead be using unique_ptr avoiding the locking overhead.

Change-Id: I1b57bbc4a6c766b48bba8e25a55161800e149f62
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93207
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/avmedia/source/vlc/vlcframegrabber.cxx 
b/avmedia/source/vlc/vlcframegrabber.cxx
index a2c17c0a70e7..034de45118d7 100644
--- a/avmedia/source/vlc/vlcframegrabber.cxx
+++ b/avmedia/source/vlc/vlcframegrabber.cxx
@@ -101,7 +101,7 @@ VLCFrameGrabber::VLCFrameGrabber( wrapper::EventHandler& 
eh, const OUString& url
 
 OUString url;
 osl::FileBase::getFileURLFromSystemPath( fileName, url );
-std::shared_ptr stream( utl::UcbStreamHelper::CreateStream( url,
+std::unique_ptr stream( utl::UcbStreamHelper::CreateStream( url,
 
StreamMode::STD_READ ) );
 
 vcl::PNGReader reader( *stream );
diff --git a/chart2/qa/extras/chart2export.cxx 
b/chart2/qa/extras/chart2export.cxx
index b44d712dbd50..200704e90a8d 100644
--- a/chart2/qa/extras/chart2export.cxx
+++ b/chart2/qa/extras/chart2export.cxx
@@ -351,7 +351,7 @@ xmlDocPtr Chart2ExportTest::parseExport(const OUString& 
rDir, const OUString& rF
 uno::Reference xNameAccess = 
packages::zip::ZipFileAccess::createWithURL(comphelper::getComponentContext(m_xSFactory),
 pTempFile->GetURL());
 uno::Reference 
xInputStream(xNameAccess->getByName(findChartFile(rDir, xNameAccess)), 
uno::UNO_QUERY);
 CPPUNIT_ASSERT(xInputStream.is());
-std::shared_ptr 
pStream(utl::UcbStreamHelper::CreateStream(xInputStream, true));
+std::unique_ptr 
pStream(utl::UcbStreamHelper::CreateStream(xInputStream, true));
 
 return parseXmlStream(pStream.get());
 }
diff --git a/chart2/source/view/axes/VPolarAxis.cxx 
b/chart2/source/view/axes/VPolarAxis.cxx
index 2b251ef9a081..9e41857c29d4 100644
--- a/chart2/source/view/axes/VPolarAxis.cxx
+++ b/chart2/source/view/axes/VPolarAxis.cxx
@@ -27,13 +27,13 @@ namespace chart
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::chart2;
 
-VPolarAxis* VPolarAxis::createAxis( const AxisProperties& rAxisProperties
+std::shared_ptr VPolarAxis::createAxis( const AxisProperties& 
rAxisProperties
, const uno::Reference< util::XNumberFormatsSupplier >& 
xNumberFormatsSupplier
, sal_Int32 nDimensionIndex, sal_Int32 nDimensionCount )
 {
 if( nDimensionIndex==0 )
-return new VPolarAngleAxis( rAxisProperties, xNumberFormatsSupplier, 
nDimensionCount );
-return new VPolarRadiusAxis( rAxisProperties, xNumberFormatsSupplier, 
nDimensionCount );
+return std::make_shared( rAxisProperties, 
xNumberFormatsSupplier, nDimensionCount );
+return std::make_shared( rAxisProperties, 

[Libreoffice-commits] core.git: avmedia/source basctl/source include/avmedia include/sfx2 include/svx sc/inc sc/source sd/source sfx2/inc sfx2/source svx/source sw/source

2020-04-26 Thread Caolán McNamara (via logerrit)
 avmedia/source/framework/mediatoolbox.cxx   |5 +
 basctl/source/basicide/IDEComboBox.cxx  |4 ++--
 basctl/source/inc/IDEComboBox.hxx   |4 ++--
 include/avmedia/mediatoolbox.hxx|2 +-
 include/sfx2/tbxctrl.hxx|3 ++-
 include/svx/ParaSpacingControl.hxx  |   14 +++---
 include/svx/fillctrl.hxx|2 +-
 include/svx/grafctrl.hxx|4 ++--
 include/svx/linectrl.hxx|2 +-
 sc/inc/NumberFormatControl.hxx  |2 +-
 sc/source/ui/cctrl/tbzoomsliderctrl.cxx |3 ++-
 sc/source/ui/inc/tbzoomsliderctrl.hxx   |2 +-
 sc/source/ui/sidebar/NumberFormatControl.cxx|2 +-
 sd/source/ui/dlg/diactrl.cxx|2 +-
 sd/source/ui/dlg/gluectrl.cxx   |4 ++--
 sd/source/ui/inc/diactrl.hxx|2 +-
 sd/source/ui/inc/gluectrl.hxx   |2 +-
 sfx2/inc/inettbc.hxx|2 +-
 sfx2/source/inet/inettbc.cxx|2 +-
 sfx2/source/toolbox/tbxitem.cxx |5 +++--
 svx/source/form/tbxform.cxx |8 
 svx/source/inc/tbxform.hxx  |8 
 svx/source/sidebar/paragraph/ParaSpacingControl.cxx |   10 +-
 svx/source/tbxctrls/fillctrl.cxx|4 ++--
 svx/source/tbxctrls/grafctrl.cxx|4 ++--
 svx/source/tbxctrls/linewidthctrl.cxx   |2 +-
 sw/source/uibase/inc/workctrl.hxx   |4 ++--
 sw/source/uibase/ribbar/workctrl.cxx|4 ++--
 28 files changed, 56 insertions(+), 56 deletions(-)

New commits:
commit 61391c43f5808aadfa5fafb25a1bd7c2ae541b70
Author: Caolán McNamara 
AuthorDate: Wed Feb 12 16:16:59 2020 +
Commit: Caolán McNamara 
CommitDate: Sun Apr 26 15:33:47 2020 +0200

all ItemWindows are now welded

where native widgetery is hostable in a vcl toolbar or a native one

Change-Id: I942ada335bb4bd6ced0f3352f632e25787f68597
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88598
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/avmedia/source/framework/mediatoolbox.cxx 
b/avmedia/source/framework/mediatoolbox.cxx
index a291218da6c5..0eac2eff0378 100644
--- a/avmedia/source/framework/mediatoolbox.cxx
+++ b/avmedia/source/framework/mediatoolbox.cxx
@@ -105,19 +105,16 @@ void MediaToolBoxControl::StateChanged( sal_uInt16, 
SfxItemState eState, const S
 }
 }
 
-
-VclPtr MediaToolBoxControl::CreateItemWindow( vcl::Window 
*pParent )
+VclPtr MediaToolBoxControl::CreateItemWindow( vcl::Window 
*pParent )
 {
 return ( pParent ? VclPtr::Create( *pParent, 
*this ) : nullptr );
 }
 
-
 void MediaToolBoxControl::implUpdateMediaControl()
 {
 updateStatus( ".uno:AVMediaToolBox" );
 }
 
-
 void MediaToolBoxControl::implExecuteMediaControl( const MediaItem& rItem )
 {
 MediaItem   aExecItem( SID_AVMEDIA_TOOLBOX );
diff --git a/basctl/source/basicide/IDEComboBox.cxx 
b/basctl/source/basicide/IDEComboBox.cxx
index 621a60d97b0b..fc135cf1a3e4 100644
--- a/basctl/source/basicide/IDEComboBox.cxx
+++ b/basctl/source/basicide/IDEComboBox.cxx
@@ -81,7 +81,7 @@ void LibBoxControl::StateChanged(sal_uInt16, SfxItemState 
eState, const SfxPoolI
 }
 }
 
-VclPtr LibBoxControl::CreateItemWindow(vcl::Window* pParent)
+VclPtr LibBoxControl::CreateItemWindow(vcl::Window* pParent)
 {
 return VclPtr::Create(pParent);
 }
@@ -376,7 +376,7 @@ void LanguageBoxControl::StateChanged(sal_uInt16, 
SfxItemState eState, const Sfx
 }
 }
 
-VclPtr LanguageBoxControl::CreateItemWindow(vcl::Window* pParent)
+VclPtr LanguageBoxControl::CreateItemWindow(vcl::Window* 
pParent)
 {
 return VclPtr::Create(pParent);
 }
diff --git a/basctl/source/inc/IDEComboBox.hxx 
b/basctl/source/inc/IDEComboBox.hxx
index ff1023463edc..32b8bc43c576 100644
--- a/basctl/source/inc/IDEComboBox.hxx
+++ b/basctl/source/inc/IDEComboBox.hxx
@@ -70,7 +70,7 @@ public:
  * @param pParent -- parent window
  * @return ComboBox of macro and dialog Library
  */
-virtual VclPtr CreateItemWindow(vcl::Window* pParent) 
override;
+virtual VclPtr CreateItemWindow(vcl::Window* pParent) 
override;
 };
 
 /*!
@@ -223,7 +223,7 @@ public:
  * @param pParent
  * @return LanguageBox ComboBox
  */
-virtual VclPtr CreateItemWindow(vcl::Window* pParent) 
override;
+virtual VclPtr CreateItemWindow(vcl::Window* pParent) 
override;
 };
 
 /*!
diff --git a/include/avmedia/mediatoolbox.hxx b/include/avmedia/mediatoolbox.hxx
index 08f63b1cf035..23a766d7829c 100644
--- a/include/avmedia/mediatoolbox.hxx
+++ b/include/avmedia/mediatoolbox.hxx
@@ -40,7 +40,7 @@ public:
  

[Libreoffice-commits] core.git: avmedia/source

2020-04-21 Thread Caolán McNamara (via logerrit)
 avmedia/source/framework/mediacontrol.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 491235b48abd64392f717eb771ac4e12c797dfc8
Author: Caolán McNamara 
AuthorDate: Tue Apr 21 11:47:30 2020 +0100
Commit: Caolán McNamara 
CommitDate: Tue Apr 21 17:21:46 2020 +0200

drop unneeded include

Change-Id: I38a3ab4db7f74277074ed87410d14e2e9b3a5ea7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92621
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/avmedia/source/framework/mediacontrol.cxx 
b/avmedia/source/framework/mediacontrol.cxx
index 596234771ef1..66818fc07388 100644
--- a/avmedia/source/framework/mediacontrol.cxx
+++ b/avmedia/source/framework/mediacontrol.cxx
@@ -24,7 +24,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: avmedia/source

2020-04-18 Thread Noel Grandin (via logerrit)
 avmedia/source/framework/MediaControlBase.cxx |   22 +-
 avmedia/source/gstreamer/gstplayer.cxx|   23 +-
 avmedia/source/viewer/mediawindow_impl.cxx|  226 +-
 3 files changed, 136 insertions(+), 135 deletions(-)

New commits:
commit 0034fba36bdfe876c57014382ce77ea3aed55c91
Author: Noel Grandin 
AuthorDate: Sat Apr 18 15:06:23 2020 +0200
Commit: Noel Grandin 
CommitDate: Sat Apr 18 22:00:13 2020 +0200

loplugin:flatten in avmedia

Change-Id: Ie066ee15833a58db4a9a18006629c015d50a56b6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92486
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/avmedia/source/framework/MediaControlBase.cxx 
b/avmedia/source/framework/MediaControlBase.cxx
index 2d6b8d05b7a1..e84586d76809 100644
--- a/avmedia/source/framework/MediaControlBase.cxx
+++ b/avmedia/source/framework/MediaControlBase.cxx
@@ -38,20 +38,20 @@ MediaControlBase::MediaControlBase()
 
 void MediaControlBase::UpdateTimeField( MediaItem const & aMediaItem, double 
fTime )
 {
-if( !aMediaItem.getURL().isEmpty())
-{
-OUString aTimeString;
+if( aMediaItem.getURL().isEmpty())
+return;
 
-SvtSysLocale aSysLocale;
-const LocaleDataWrapper& rLocaleData = aSysLocale.GetLocaleData();
+OUString aTimeString;
 
-aTimeString += rLocaleData.getDuration( tools::Time( 0, 0, 
static_cast< sal_uInt32 >( floor( fTime ) ) ) ) +
-" / " +
-rLocaleData.getDuration( tools::Time( 0, 0, static_cast< 
sal_uInt32 >( floor( aMediaItem.getDuration() ) )) );
+SvtSysLocale aSysLocale;
+const LocaleDataWrapper& rLocaleData = aSysLocale.GetLocaleData();
 
-if( mxTimeEdit->get_text() != aTimeString )
-mxTimeEdit->set_text( aTimeString );
-}
+aTimeString += rLocaleData.getDuration( tools::Time( 0, 0, static_cast< 
sal_uInt32 >( floor( fTime ) ) ) ) +
+" / " +
+rLocaleData.getDuration( tools::Time( 0, 0, static_cast< sal_uInt32 >( 
floor( aMediaItem.getDuration() ) )) );
+
+if( mxTimeEdit->get_text() != aTimeString )
+mxTimeEdit->set_text( aTimeString );
 }
 
 void MediaControlBase::UpdateVolumeSlider( MediaItem const & aMediaItem )
diff --git a/avmedia/source/gstreamer/gstplayer.cxx 
b/avmedia/source/gstreamer/gstplayer.cxx
index 2c8dbc085ee9..9511be54b5ae 100644
--- a/avmedia/source/gstreamer/gstplayer.cxx
+++ b/avmedia/source/gstreamer/gstplayer.cxx
@@ -674,19 +674,20 @@ void SAL_CALL Player::setMediaTime( double fTime )
 {
 ::osl::MutexGuard aGuard(m_aMutex);
 
-if( mpPlaybin ) {
-gint64 gst_position = llround (fTime * GST_SECOND);
+if( !mpPlaybin )
+return;
 
-gst_element_seek( mpPlaybin, 1.0,
-  GST_FORMAT_TIME,
-  GST_SEEK_FLAG_FLUSH,
-  GST_SEEK_TYPE_SET, gst_position,
-  GST_SEEK_TYPE_NONE, 0 );
-if( !isPlaying() )
-gst_element_set_state( mpPlaybin, GST_STATE_PAUSED );
+gint64 gst_position = llround (fTime * GST_SECOND);
 
-SAL_INFO( "avmedia.gstreamer", AVVERSION "seek to: " << gst_position 
<< " ns original: " << fTime << " s" );
-}
+gst_element_seek( mpPlaybin, 1.0,
+  GST_FORMAT_TIME,
+  GST_SEEK_FLAG_FLUSH,
+  GST_SEEK_TYPE_SET, gst_position,
+  GST_SEEK_TYPE_NONE, 0 );
+if( !isPlaying() )
+gst_element_set_state( mpPlaybin, GST_STATE_PAUSED );
+
+SAL_INFO( "avmedia.gstreamer", AVVERSION "seek to: " << gst_position << " 
ns original: " << fTime << " s" );
 }
 
 
diff --git a/avmedia/source/viewer/mediawindow_impl.cxx 
b/avmedia/source/viewer/mediawindow_impl.cxx
index afb4a674cbb9..98f867e4e4e1 100644
--- a/avmedia/source/viewer/mediawindow_impl.cxx
+++ b/avmedia/source/viewer/mediawindow_impl.cxx
@@ -224,38 +224,38 @@ void MediaWindowImpl::setURL( const OUString& rURL,
 OUString const& rTempURL, OUString const& rReferer)
 {
 maReferer = rReferer;
-if( rURL != getURL() )
-{
-if( mxPlayer.is() )
-mxPlayer->stop();
+if( rURL == getURL() )
+return;
 
-if( mxPlayerWindow.is() )
-{
-mxPlayerWindow->setVisible( false );
-mxPlayerWindow.clear();
-}
+if( mxPlayer.is() )
+mxPlayer->stop();
 
-mxPlayer.clear();
-mTempFileURL.clear();
+if( mxPlayerWindow.is() )
+{
+mxPlayerWindow->setVisible( false );
+mxPlayerWindow.clear();
+}
 
-if (!rTempURL.isEmpty())
-{
-maFileURL = rURL;
-mTempFileURL = rTempURL;
-}
-else
-{
-INetURLObject aURL( rURL );
+mxPlayer.clear();
+mTempFileURL.clear();
 
-if (aURL.GetProtocol() != INetProtocol::NotValid)
-maFileURL = 

[Libreoffice-commits] core.git: avmedia/source cui/source filter/source framework/source include/tools reportdesign/source sc/source sd/source sfx2/source starmath/source svtools/source svx/source sw/

2020-04-15 Thread Noel Grandin (via logerrit)
 avmedia/source/viewer/mediawindow_impl.cxx  |2 +-
 cui/source/tabpages/tpbitmap.cxx|4 ++--
 filter/source/graphicfilter/ipict/ipict.cxx |2 +-
 filter/source/msfilter/msdffimp.cxx |3 +--
 framework/source/fwe/classes/addonsoptions.cxx  |2 +-
 framework/source/layoutmanager/layoutmanager.cxx|2 +-
 framework/source/layoutmanager/toolbarlayoutmanager.cxx |2 +-
 framework/source/uielement/imagebuttontoolbarcontroller.cxx |2 +-
 include/tools/gen.hxx   |2 ++
 reportdesign/source/ui/report/ScrollHelper.cxx  |2 +-
 sc/source/core/data/table5.cxx  |2 +-
 sc/source/filter/excel/xechart.cxx  |2 +-
 sc/source/ui/Accessibility/AccessibleCsvControl.cxx |2 +-
 sc/source/ui/app/inputwin.cxx   |2 +-
 sc/source/ui/cctrl/cbuttonw.cxx |2 +-
 sc/source/ui/drawfunc/fuins2.cxx|6 +++---
 sc/source/ui/view/tabvwsh4.cxx  |4 ++--
 sc/source/ui/view/viewfun7.cxx  |2 +-
 sd/source/filter/eppt/epptso.cxx|2 +-
 sd/source/ui/func/fuinsert.cxx  |4 ++--
 sd/source/ui/sidebar/MasterPageContainer.cxx|2 +-
 sd/source/ui/sidebar/PreviewValueSet.cxx|2 +-
 sd/source/ui/slideshow/slideshowviewimpl.cxx|2 +-
 sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx  |2 +-
 sd/source/ui/slidesorter/view/SlideSorterView.cxx   |2 +-
 sd/source/ui/slidesorter/view/SlsLayouter.cxx   |4 ++--
 sd/source/ui/tools/PreviewRenderer.cxx  |2 +-
 sd/source/ui/view/ViewShellBase.cxx |2 +-
 sd/source/ui/view/drviewse.cxx  |2 +-
 sd/source/ui/view/viewshel.cxx  |2 +-
 sfx2/source/control/thumbnailview.cxx   |4 ++--
 sfx2/source/doc/new.cxx |2 +-
 sfx2/source/doc/objcont.cxx |2 +-
 starmath/source/unomodel.cxx|4 ++--
 starmath/source/view.cxx|6 +++---
 starmath/source/visitors.cxx|3 +--
 svtools/source/brwbox/brwbox1.cxx   |3 +--
 svtools/source/filter/DocumentToGraphicRenderer.cxx |3 +--
 svx/source/dialog/hyperdlg.cxx  |3 +--
 svx/source/gallery2/galobj.cxx  |2 +-
 svx/source/sidebar/nbdtmg.cxx   |   10 --
 svx/source/svdraw/svdedxv.cxx   |2 +-
 svx/source/svdraw/svdoashp.cxx  |2 +-
 svx/source/svdraw/svdograf.cxx  |2 +-
 svx/source/svdraw/svdomedia.cxx |2 +-
 svx/source/svdraw/svdovirt.cxx  |2 +-
 svx/source/svdraw/svdpntv.cxx   |2 +-
 svx/source/tbxctrls/itemwin.cxx |2 +-
 svx/source/unodraw/UnoGraphicExporter.cxx   |2 +-
 sw/source/core/draw/dflyobj.cxx |2 +-
 sw/source/core/frmedt/fefly1.cxx|2 +-
 sw/source/core/frmedt/fews.cxx  |3 +--
 sw/source/core/layout/atrfrm.cxx|2 +-
 sw/source/core/layout/layact.cxx|8 
 sw/source/core/layout/virtoutp.cxx  |2 +-
 sw/source/core/text/txtfly.cxx  |2 +-
 sw/source/core/view/pagepreviewlayout.cxx   |2 +-
 sw/source/filter/html/htmlflywriter.cxx |6 ++
 sw/source/filter/ww8/wrtww8gr.cxx   |4 ++--
 sw/source/uibase/table/chartins.cxx |2 +-
 sw/source/uibase/uiview/pview.cxx   |2 +-
 sw/source/uibase/uiview/viewport.cxx|7 +++
 vcl/skia/x11/cairotextrender.cxx|2 +-
 vcl/source/bitmap/BitmapTools.cxx   |2 +-
 vcl/source/filter/png/pngread.cxx   |2 +-
 vcl/source/gdi/graph.cxx|6 ++
 vcl/source/graphic/GraphicObject.cxx|4 ++--
 vcl/source/outdev/bitmap.cxx|2 +-
 vcl/source/treelist/svimpbox.cxx|2 +-
 vcl/source/window/paint.cxx   

[Libreoffice-commits] core.git: avmedia/source basctl/source svx/source

2020-03-23 Thread Harshit Jain (via logerrit)
 avmedia/source/win/framegrabber.hxx|5 +
 avmedia/source/win/interface.hxx   |5 +
 avmedia/source/win/player.hxx  |5 +
 avmedia/source/win/window.hxx  |5 +
 basctl/source/basicide/brkdlg.hxx  |5 +
 basctl/source/basicide/documentenumeration.hxx |6 +-
 basctl/source/basicide/iderdll2.hxx|5 +
 basctl/source/basicide/linenumberwindow.hxx|6 +-
 svx/source/gallery2/codec.hxx  |5 +
 svx/source/gallery2/galbrws1.hxx   |5 +
 svx/source/gallery2/gallerydrawmodel.hxx   |5 +
 11 files changed, 11 insertions(+), 46 deletions(-)

New commits:
commit fd1cd5522283f279a01d6d673f676a1346e9358b
Author: Harshit Jain 
AuthorDate: Mon Mar 23 13:33:40 2020 +0530
Commit: Muhammet Kara 
CommitDate: Mon Mar 23 12:35:57 2020 +0100

tdf#124176: Use pragma once instead of include guards

Change-Id: Ia4a6b35a9a734e9fa1dc9dea702fc1ec370021f2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90901
Tested-by: Jenkins
Reviewed-by: Muhammet Kara 

diff --git a/avmedia/source/win/framegrabber.hxx 
b/avmedia/source/win/framegrabber.hxx
index ba496fa5b99f..cfd708b08353 100644
--- a/avmedia/source/win/framegrabber.hxx
+++ b/avmedia/source/win/framegrabber.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_AVMEDIA_SOURCE_WIN_FRAMEGRABBER_HXX
-#define INCLUDED_AVMEDIA_SOURCE_WIN_FRAMEGRABBER_HXX
+#pragma once
 
 #include "wincommon.hxx"
 #include 
@@ -55,6 +54,4 @@ private:
 } // namespace win
 } // namespace avmedia
 
-#endif // INCLUDED_AVMEDIA_SOURCE_WIN_FRAMEGRABBER_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/avmedia/source/win/interface.hxx b/avmedia/source/win/interface.hxx
index 08584777c7e6..a52c6ab1f36c 100644
--- a/avmedia/source/win/interface.hxx
+++ b/avmedia/source/win/interface.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_AVMEDIA_SOURCE_WIN_INTERFACE_HXX
-#define INCLUDED_AVMEDIA_SOURCE_WIN_INTERFACE_HXX
+#pragma once
 
 extern "C" const CLSID CLSID_MediaDet;
 extern "C" const IID IID_IMediaDet;
@@ -118,6 +117,4 @@ protected:
 ~ISampleGrabber() {}
 };
 
-#endif
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/avmedia/source/win/player.hxx b/avmedia/source/win/player.hxx
index a95445bf33a0..9bdc0cb69c79 100644
--- a/avmedia/source/win/player.hxx
+++ b/avmedia/source/win/player.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_AVMEDIA_SOURCE_WIN_PLAYER_HXX
-#define INCLUDED_AVMEDIA_SOURCE_WIN_PLAYER_HXX
+#pragma once
 
 #include 
 
@@ -117,6 +116,4 @@ private:
 } // namespace win
 } // namespace avmedia
 
-#endif // INCLUDED_AVMEDIA_SOURCE_WIN_PLAYER_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/avmedia/source/win/window.hxx b/avmedia/source/win/window.hxx
index 32ae3504f6d5..84b5423d9815 100644
--- a/avmedia/source/win/window.hxx
+++ b/avmedia/source/win/window.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_AVMEDIA_SOURCE_WIN_WINDOW_HXX
-#define INCLUDED_AVMEDIA_SOURCE_WIN_WINDOW_HXX
+#pragma once
 
 #include 
 
@@ -113,6 +112,4 @@ private:
 } // namespace win
 } // namespace avmedia
 
-#endif // INCLUDED_AVMEDIA_SOURCE_WIN_WINDOW_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basctl/source/basicide/brkdlg.hxx 
b/basctl/source/basicide/brkdlg.hxx
index c11f15c1ea98..c0db6576ca9a 100644
--- a/basctl/source/basicide/brkdlg.hxx
+++ b/basctl/source/basicide/brkdlg.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_BASCTL_SOURCE_BASICIDE_BRKDLG_HXX
-#define INCLUDED_BASCTL_SOURCE_BASICIDE_BRKDLG_HXX
+#pragma once
 
 #include 
 #include "breakpoint.hxx"
@@ -57,6 +56,4 @@ public:
 
 } // namespace basctl
 
-#endif // INCLUDED_BASCTL_SOURCE_BASICIDE_BRKDLG_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basctl/source/basicide/documentenumeration.hxx 
b/basctl/source/basicide/documentenumeration.hxx
index 2dbe7b6621f3..381f2aaf867d 100644
--- a/basctl/source/basicide/documentenumeration.hxx
+++ b/basctl/source/basicide/documentenumeration.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_BASCTL_SOURCE_BASICIDE_DOCUMENTENUMERATION_HXX
-#define INCLUDED_BASCTL_SOURCE_BASICIDE_DOCUMENTENUMERATION_HXX
+#pragma once
 
 #include 
 #include 
@@ -90,7 +89,4 @@ namespace basctl { namespace docs {
 
 } } // namespace basctl::docs
 
-
-#endif // INCLUDED_BASCTL_SOURCE_BASICIDE_DOCUMENTENUMERATION_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basctl/source/basicide/iderdll2.hxx 

  1   2   3   4   >