[Libreoffice-commits] core.git: 2 commits - avmedia/source connectivity/source cui/source lingucomponent/source sal/osl sc/source shell/source vcl/opengl vcl/osx vcl/source

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Sat Aug 10 14:50:42 UTC 2019


 avmedia/source/macavf/framegrabber.mm                        |    2 +-
 avmedia/source/macavf/manager.mm                             |    2 +-
 avmedia/source/macavf/player.mm                              |    2 +-
 avmedia/source/macavf/window.mm                              |    2 +-
 connectivity/source/drivers/macab/MacabDriver.cxx            |    2 +-
 cui/source/options/optgdlg.cxx                               |    2 +-
 lingucomponent/source/spellcheck/macosxspell/macspellimp.hxx |    2 +-
 lingucomponent/source/spellcheck/macosxspell/macspellimp.mm  |    2 +-
 sal/osl/unx/uunxapi.cxx                                      |    2 +-
 sc/source/ui/vba/vbaapplication.cxx                          |    2 +-
 shell/source/backends/macbe/macbackend.mm                    |    2 +-
 vcl/opengl/gdiimpl.cxx                                       |    5 +++--
 vcl/osx/DragSource.cxx                                       |    2 +-
 vcl/osx/DropTarget.cxx                                       |    2 +-
 vcl/osx/clipboard.cxx                                        |    2 +-
 vcl/source/components/dtranscomp.cxx                         |    2 +-
 16 files changed, 18 insertions(+), 17 deletions(-)

New commits:
commit 25694a5ccb552b3cbe8a9191e3d1490a3ec7eda1
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Sat Aug 10 13:03:32 2019 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Sat Aug 10 16:50:03 2019 +0200

    Silence -Werror,-Wimplicit-int-float-conversion
    
    > vcl/opengl/gdiimpl.cxx:2237:45: error: implicit conversion from 'int' to 'float' changes value from 2147483647 to 2147483648 [-Werror,-Wimplicit-int-float-conversion]
    >     glClearColor(static_cast<float>(rand())/RAND_MAX, static_cast<float>(rand())/RAND_MAX,
    >                                            ~^~~~~~~~
    
    etc. with Clang 10, by doing the division with double precision.
    
    Change-Id: Ide74d29eb07ea24ea7fb318bba7a2892251a40f7
    Reviewed-on: https://gerrit.libreoffice.org/77240
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx
index d7187c9921cc..efbc4cea3682 100644
--- a/vcl/opengl/gdiimpl.cxx
+++ b/vcl/opengl/gdiimpl.cxx
@@ -2234,8 +2234,9 @@ void OpenGLSalGraphicsImpl::doFlush()
     mpWindowContext->state().stencil().disable();
 
 #if OSL_DEBUG_LEVEL > 0 // random background glClear
-    glClearColor(static_cast<float>(rand())/RAND_MAX, static_cast<float>(rand())/RAND_MAX,
-                 static_cast<float>(rand())/RAND_MAX, 1.0);
+    glClearColor(static_cast<float>(double(rand())/RAND_MAX),
+                 static_cast<float>(double(rand())/RAND_MAX),
+                 static_cast<float>(double(rand())/RAND_MAX), 1.0);
     glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT );
     CHECK_GL_ERROR();
 #endif
commit f05565193971376182db41c238b617c1463bd9d7
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Sat Aug 10 13:03:01 2019 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Sat Aug 10 16:49:53 2019 +0200

    loplugin:stringconstant (macOS)
    
    Change-Id: Icb9d9e1cd21e2506e36fe40a3b93b6a2521a868c
    Reviewed-on: https://gerrit.libreoffice.org/77239
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/avmedia/source/macavf/framegrabber.mm b/avmedia/source/macavf/framegrabber.mm
index f6872e30c317..5bd9441f9dea 100644
--- a/avmedia/source/macavf/framegrabber.mm
+++ b/avmedia/source/macavf/framegrabber.mm
@@ -88,7 +88,7 @@ uno::Reference< graphic::XGraphic > SAL_CALL FrameGrabber::grabFrame( double fMe
 
 OUString SAL_CALL FrameGrabber::getImplementationName(  )
 {
-    return OUString( AVMEDIA_MACAVF_FRAMEGRABBER_IMPLEMENTATIONNAME );
+    return AVMEDIA_MACAVF_FRAMEGRABBER_IMPLEMENTATIONNAME;
 }
 
 sal_Bool SAL_CALL FrameGrabber::supportsService( const OUString& ServiceName )
diff --git a/avmedia/source/macavf/manager.mm b/avmedia/source/macavf/manager.mm
index a932549ea618..8dd50f475630 100644
--- a/avmedia/source/macavf/manager.mm
+++ b/avmedia/source/macavf/manager.mm
@@ -51,7 +51,7 @@ uno::Reference< media::XPlayer > SAL_CALL Manager::createPlayer( const OUString&
 
 OUString SAL_CALL Manager::getImplementationName(  )
 {
-    return OUString( AVMEDIA_MACAVF_MANAGER_IMPLEMENTATIONNAME );
+    return AVMEDIA_MACAVF_MANAGER_IMPLEMENTATIONNAME;
 }
 
 
diff --git a/avmedia/source/macavf/player.mm b/avmedia/source/macavf/player.mm
index ea7e48711861..0ad415742ec8 100644
--- a/avmedia/source/macavf/player.mm
+++ b/avmedia/source/macavf/player.mm
@@ -344,7 +344,7 @@ uno::Reference< media::XFrameGrabber > SAL_CALL Player::createFrameGrabber()
 
 OUString SAL_CALL Player::getImplementationName(  )
 {
-    return OUString( AVMEDIA_MACAVF_PLAYER_IMPLEMENTATIONNAME );
+    return AVMEDIA_MACAVF_PLAYER_IMPLEMENTATIONNAME;
 }
 
 
diff --git a/avmedia/source/macavf/window.mm b/avmedia/source/macavf/window.mm
index ebd6065df450..6d062af593e3 100644
--- a/avmedia/source/macavf/window.mm
+++ b/avmedia/source/macavf/window.mm
@@ -241,7 +241,7 @@ void SAL_CALL Window::removeEventListener( const uno::Reference< lang::XEventLis
 
 OUString SAL_CALL Window::getImplementationName(  )
 {
-    return OUString( AVMEDIA_MACAVF_WINDOW_IMPLEMENTATIONNAME );
+    return AVMEDIA_MACAVF_WINDOW_IMPLEMENTATIONNAME;
 }
 
 
diff --git a/connectivity/source/drivers/macab/MacabDriver.cxx b/connectivity/source/drivers/macab/MacabDriver.cxx
index 73629973434e..8b07ebab093c 100644
--- a/connectivity/source/drivers/macab/MacabDriver.cxx
+++ b/connectivity/source/drivers/macab/MacabDriver.cxx
@@ -218,7 +218,7 @@ void MacabDriver::disposing()
 
 OUString MacabDriver::getImplementationName_Static(  )
 {
-    return OUString("com.sun.star.comp.sdbc.macab.Driver");
+    return "com.sun.star.comp.sdbc.macab.Driver";
 }
 
 Sequence< OUString > MacabDriver::getSupportedServiceNames_Static(  )
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index f2e031d7568c..1ac969189bf7 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -210,7 +210,7 @@ OUString impl_SystemFileOpenServiceName()
     #if defined(_WIN32)
     return OUString("com.sun.star.ui.dialogs.SystemFilePicker");
     #elif defined MACOSX
-    return OUString("com.sun.star.ui.dialogs.AquaFilePicker");
+    return "com.sun.star.ui.dialogs.AquaFilePicker";
     #else
     return OUString();
     #endif
diff --git a/lingucomponent/source/spellcheck/macosxspell/macspellimp.hxx b/lingucomponent/source/spellcheck/macosxspell/macspellimp.hxx
index fea3ba77c742..e26d353455fe 100644
--- a/lingucomponent/source/spellcheck/macosxspell/macspellimp.hxx
+++ b/lingucomponent/source/spellcheck/macosxspell/macspellimp.hxx
@@ -124,7 +124,7 @@ public:
 
 inline OUString MacSpellChecker::getImplementationName_Static() throw()
 {
-    return OUString( "org.openoffice.lingu.MacOSXSpellChecker" );
+    return "org.openoffice.lingu.MacOSXSpellChecker";
 }
 
 #endif
diff --git a/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm b/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm
index edc801c4b20a..4c97ead10acb 100644
--- a/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm
+++ b/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm
@@ -561,7 +561,7 @@ OUString SAL_CALL
     MacSpellChecker::getServiceDisplayName( const Locale& /*rLocale*/ )
 {
     MutexGuard  aGuard( GetLinguMutex() );
-    return OUString( "macOS Spell Checker" );
+    return "macOS Spell Checker";
 }
 
 
diff --git a/sal/osl/unx/uunxapi.cxx b/sal/osl/unx/uunxapi.cxx
index d797de1c5028..f35c398cad20 100644
--- a/sal/osl/unx/uunxapi.cxx
+++ b/sal/osl/unx/uunxapi.cxx
@@ -151,7 +151,7 @@ static OString macxp_resolveAliasAndConvert(OString const & p)
     {
         strcpy(path, p.getStr());
         macxp_resolveAlias(path, PATH_MAX);
-        return OString(path);
+        return path;
     }
     return p;
 }
diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx
index 8cb8c7481146..0f2bdbdc6529 100644
--- a/sc/source/ui/vba/vbaapplication.cxx
+++ b/sc/source/ui/vba/vbaapplication.cxx
@@ -971,7 +971,7 @@ ScVbaApplication::getOperatingSystem()
 #if   defined(_WIN32)
         return OUString("Windows");
 #elif defined(MACOSX)
-        return OUString("Macintosh");
+        return "Macintosh";
 #elif defined(UNX)
         // M. Office is not available on Unix systems, so it is not documented.
         return "Unix";
diff --git a/shell/source/backends/macbe/macbackend.mm b/shell/source/backends/macbe/macbackend.mm
index d89aa0b6bc16..cb730c93d66c 100644
--- a/shell/source/backends/macbe/macbackend.mm
+++ b/shell/source/backends/macbe/macbackend.mm
@@ -376,7 +376,7 @@ css::uno::Any MacOSXBackend::getPropertyValue(
 
 OUString MacOSXBackend::getBackendName(void)
 {
-    return OUString("com.sun.star.comp.configuration.backend.MacOSXBackend");
+    return "com.sun.star.comp.configuration.backend.MacOSXBackend";
 }
 
 OUString SAL_CALL MacOSXBackend::getImplementationName(void)
diff --git a/vcl/osx/DragSource.cxx b/vcl/osx/DragSource.cxx
index 6203152829eb..331a262dbc91 100644
--- a/vcl/osx/DragSource.cxx
+++ b/vcl/osx/DragSource.cxx
@@ -56,7 +56,7 @@ bool DragSource::g_DropSuccess = false;
 
 static OUString dragSource_getImplementationName()
 {
-  return OUString("com.sun.star.comp.datatransfer.dnd.OleDragSource_V1");
+  return "com.sun.star.comp.datatransfer.dnd.OleDragSource_V1";
 }
 
 static Sequence<OUString> dragSource_getSupportedServiceNames()
diff --git a/vcl/osx/DropTarget.cxx b/vcl/osx/DropTarget.cxx
index 9f59043eeb66..9ad57085e35c 100644
--- a/vcl/osx/DropTarget.cxx
+++ b/vcl/osx/DropTarget.cxx
@@ -46,7 +46,7 @@ using namespace comphelper;
 
 static OUString dropTarget_getImplementationName()
 {
-    return OUString("com.sun.star.comp.datatransfer.dnd.OleDropTarget_V1");
+    return "com.sun.star.comp.datatransfer.dnd.OleDropTarget_V1";
 }
 
 static Sequence<OUString> dropTarget_getSupportedServiceNames()
diff --git a/vcl/osx/clipboard.cxx b/vcl/osx/clipboard.cxx
index 8656fe8c6575..58559e174272 100644
--- a/vcl/osx/clipboard.cxx
+++ b/vcl/osx/clipboard.cxx
@@ -61,7 +61,7 @@ using namespace css;
 
 static OUString clipboard_getImplementationName()
 {
-  return OUString("com.sun.star.datatransfer.clipboard.AquaClipboard");
+  return "com.sun.star.datatransfer.clipboard.AquaClipboard";
 }
 
 static uno::Sequence<OUString> clipboard_getSupportedServiceNames()
diff --git a/vcl/source/components/dtranscomp.cxx b/vcl/source/components/dtranscomp.cxx
index 5a2f146cca6c..2952eff97012 100644
--- a/vcl/source/components/dtranscomp.cxx
+++ b/vcl/source/components/dtranscomp.cxx
@@ -315,7 +315,7 @@ Sequence< OUString > DragSource_getSupportedServiceNames()
 OUString DragSource_getImplementationName()
 {
 #if defined MACOSX
-    return OUString("com.sun.star.comp.datatransfer.dnd.OleDragSource_V1");
+    return "com.sun.star.comp.datatransfer.dnd.OleDragSource_V1";
 #elif defined UNX
     return "com.sun.star.datatransfer.dnd.XdndSupport";
 #else


More information about the Libreoffice-commits mailing list