[Libreoffice-commits] core.git: Branch 'feature/tiled-editing' - 5 commits - drawinglayer/source javaunohelper/source jvmfwk/plugins scaddins/source

Miklos Vajna vmiklos at collabora.co.uk
Wed Jan 7 05:50:26 PST 2015


 drawinglayer/source/primitive2d/polygonprimitive2d.cxx |    4 ++--
 javaunohelper/source/javaunohelper.cxx                 |   16 ++++++++--------
 jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx    |    2 +-
 scaddins/source/analysis/analysis.cxx                  |    3 ++-
 4 files changed, 13 insertions(+), 12 deletions(-)

New commits:
commit 32160868fe10f6812601fda9731a09ccc2e0aea9
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Wed Jan 7 11:38:23 2015 +0100

    javaunohelper: missing include
    
    Change-Id: Ie8427e9ad7a2a03d6698ee95ce0f11fb458c00e3

diff --git a/javaunohelper/source/javaunohelper.cxx b/javaunohelper/source/javaunohelper.cxx
index 99a9252..d55fe3b 100644
--- a/javaunohelper/source/javaunohelper.cxx
+++ b/javaunohelper/source/javaunohelper.cxx
@@ -21,6 +21,7 @@
 
 #include <osl/diagnose.h>
 #include <osl/module.hxx>
+#include <osl/thread.h>
 
 #include <uno/environment.hxx>
 #include <uno/lbnames.h>
commit 3ddb27dd973d8de0b880823941e19554af1c1569
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Wed Jan 7 11:23:53 2015 +0100

    drawinglayer: fix Android build
    
    Change-Id: Ie214c91f59780db9baa40cea01b6ddef3019febf

diff --git a/drawinglayer/source/primitive2d/polygonprimitive2d.cxx b/drawinglayer/source/primitive2d/polygonprimitive2d.cxx
index a4f667e..c6bbfd2 100644
--- a/drawinglayer/source/primitive2d/polygonprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/polygonprimitive2d.cxx
@@ -29,7 +29,7 @@
 #include <comphelper/random.hxx>
 
 using namespace com::sun::star;
-
+using namespace std;
 
 
 namespace drawinglayer
@@ -217,7 +217,7 @@ namespace drawinglayer
     {
         double getRandomColorRange()
         {
-            return comphelper::rng::uniform_real_distribution(0.0, std::nextafter(1.0, DBL_MAX));
+            return comphelper::rng::uniform_real_distribution(0.0, nextafter(1.0, DBL_MAX));
         }
     }
 
commit e46b69b04c9a64f6b3bfe90e2547bc2df47ca19e
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Wed Jan 7 11:12:48 2015 +0100

    jvmfwk: fix Android build
    
    Change-Id: Ib183158e51f7bebbb6add92e460a33fa132c1c9d

diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
index d3ac151..de1d979 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
@@ -83,7 +83,7 @@ namespace {
 
 struct PluginMutex: public ::rtl::Static<osl::Mutex, PluginMutex> {};
 
-#if defined UNX
+#if defined(UNX) && !defined(ANDROID)
 OString getPluginJarPath(
     const OUString & sVendor,
     const OUString& sLocation,
commit 40c0cd545d498652edc34b15df281b0e7a98149e
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Wed Jan 7 11:07:30 2015 +0100

    scaddins: fix Android build
    
    _GLIBCXX_USE_C99_MATH_TR1 is defined on Linux, so nextafter() is
    imported into the std namespace, but it isn't defined on Android. So
    just import the whole namespace to make both happy.
    
    Change-Id: I8a94198ff65557e64d4ea9f833e3eee5e1aa26ec

diff --git a/scaddins/source/analysis/analysis.cxx b/scaddins/source/analysis/analysis.cxx
index d124a79..20edfc6 100644
--- a/scaddins/source/analysis/analysis.cxx
+++ b/scaddins/source/analysis/analysis.cxx
@@ -38,6 +38,7 @@
 #define MY_IMPLNAME                 "com.sun.star.sheet.addin.AnalysisImpl"
 
 using namespace                 ::com::sun::star;
+using namespace std;
 
 extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL analysis_component_getFactory(
     const sal_Char* pImplName, void* pServiceManager, void* /*pRegistryKey*/ )
@@ -702,7 +703,7 @@ double SAL_CALL AnalysisAddIn::getRandbetween( double fMin, double fMax ) throw(
     if( fMin > fMax )
         throw lang::IllegalArgumentException();
 
-    double fRet = floor(comphelper::rng::uniform_real_distribution(fMin, std::nextafter(fMax+1, -DBL_MAX)));
+    double fRet = floor(comphelper::rng::uniform_real_distribution(fMin, nextafter(fMax+1, -DBL_MAX)));
     RETURN_FINITE( fRet );
 }
 
commit c4a79bd0633e1eaedc819928011d7148362c68be
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Jan 7 10:16:18 2015 +0000

    WaE: -Werror=unused-variable with #define DISABLE_DYNLOADING
    
    and also a leak in that mode with a missing ReleaseStringChars after
    GetStringChars in one use, and a use after free in the other use where
    ReleaseStringChars is called
    
    Change-Id: I2da0310429daf8519554fd7aaf47bba9f6f0e85c

diff --git a/javaunohelper/source/javaunohelper.cxx b/javaunohelper/source/javaunohelper.cxx
index 05ad4c0..99a9252 100644
--- a/javaunohelper/source/javaunohelper.cxx
+++ b/javaunohelper/source/javaunohelper.cxx
@@ -54,16 +54,16 @@ jboolean Java_com_sun_star_comp_helper_SharedLibraryLoader_component_1writeInfo(
 {
     bool bRet = false;
 
-    const jchar* pJLibName = pJEnv->GetStringChars( jLibName, NULL );
-    OUString aLibName( pJLibName );
-    pJEnv->ReleaseStringChars( jLibName, pJLibName);
+    const jchar* pJLibName = pJEnv->GetStringChars(jLibName, NULL);
+    OUString aLibName(pJLibName);
+    pJEnv->ReleaseStringChars(jLibName, pJLibName);
 
 #ifdef DISABLE_DYNLOADING
     (void) jSMgr;
     (void) jRegKey;
     (void) loader;
 
-    fprintf(stderr, "Hmm, %s called for %s\n", __PRETTY_FUNCTION__, OUStringToOString(pJLibName, RTL_TEXTENCODING_JAVA_UTF8).getStr());
+    fprintf(stderr, "Hmm, %s called for %s\n", __PRETTY_FUNCTION__, OUStringToOString(aLibName, osl_getThreadTextEncoding()).getStr());
 #else
     osl::Module lib(aLibName, SAL_LOADMODULE_LAZY | SAL_LOADMODULE_GLOBAL);
     if (lib.is())
@@ -140,6 +140,8 @@ jobject Java_com_sun_star_comp_helper_SharedLibraryLoader_component_1getFactory(
     jobject jSMgr, jobject jRegKey, jobject loader )
 {
     const jchar* pJLibName = pJEnv->GetStringChars(jLibName, NULL);
+    OUString aLibName(pJLibName);
+    pJEnv->ReleaseStringChars(jLibName, pJLibName);
 
 #ifdef DISABLE_DYNLOADING
     (void) jImplName;
@@ -147,12 +149,9 @@ jobject Java_com_sun_star_comp_helper_SharedLibraryLoader_component_1getFactory(
     (void) jRegKey;
     (void) loader;
 
-    fprintf(stderr, "Hmm, %s called for %s\n", __PRETTY_FUNCTION__, OUStringToOString(pJLibName, RTL_TEXTENCODING_JAVA_UTF8).getStr());
+    fprintf(stderr, "Hmm, %s called for %s\n", __PRETTY_FUNCTION__, OUStringToOString(aLibName, osl_getThreadTextEncoding()).getStr());
 #endif
 
-    OUString aLibName( pJLibName );
-    pJEnv->ReleaseStringChars( jLibName, pJLibName);
-
     aLibName += OUString( SAL_DLLEXTENSION );
 
     jobject joSLL_cpp = 0;


More information about the Libreoffice-commits mailing list