[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 3 commits - pyuno/source scripting/source vcl/unx

Herbert Dürr hdu at apache.org
Fri Jul 12 03:07:55 PDT 2013


 pyuno/source/module/pyuno.cxx           |    6 +-----
 pyuno/source/module/pyuno_callable.cxx  |    6 ------
 pyuno/source/module/pyuno_impl.hxx      |    2 --
 scripting/source/pyprov/pythonscript.py |   24 ++++++++++++++++--------
 vcl/unx/gtk/window/gtkframe.cxx         |    2 +-
 5 files changed, 18 insertions(+), 22 deletions(-)

New commits:
commit 5e2c3fd88906494965979bd20ca852391bee3bac
Author: Herbert Dürr <hdu at apache.org>
Date:   Fri Jul 12 09:10:27 2013 +0000

    #i120788# remove unused members from PyUNO_callable_Internals
    
    Patch by: Tsutomu Uchino <hanya.runo at gmail.com>

diff --git a/pyuno/source/module/pyuno.cxx b/pyuno/source/module/pyuno.cxx
index e0dd930..dc329b0 100644
--- a/pyuno/source/module/pyuno.cxx
+++ b/pyuno/source/module/pyuno.cxx
@@ -357,8 +357,6 @@ PyObject *PyUNO_invoke( PyObject *object, const char *name , PyObject *args )
             callable = PyUNO_callable_new (
                 me->members->xInvocation,
                 attrName,
-                runtime.getImpl()->cargo->xInvocation,
-                runtime.getImpl()->cargo->xTypeConverter,
                 ACCEPT_UNO_ANY);
             paras = args;
         }
@@ -515,9 +513,7 @@ PyObject* PyUNO_getattr (PyObject* self, char* name)
             //Create a callable object to invoke this...
             PyRef ret = PyUNO_callable_new (
                 me->members->xInvocation,
-                attrName,
-                runtime.getImpl()->cargo->xInvocation,
-                runtime.getImpl()->cargo->xTypeConverter);
+                attrName);
             Py_XINCREF( ret.get() );
             return ret.get();
 
diff --git a/pyuno/source/module/pyuno_callable.cxx b/pyuno/source/module/pyuno_callable.cxx
index 174cbdb..057b10e 100644
--- a/pyuno/source/module/pyuno_callable.cxx
+++ b/pyuno/source/module/pyuno_callable.cxx
@@ -44,8 +44,6 @@ namespace pyuno
 typedef struct
 {
     Reference<XInvocation2> xInvocation;
-    Reference<XSingleServiceFactory> xInvocationFactory;
-    Reference<XTypeConverter> xTypeConverter;
     OUString methodName;
     ConversionMode mode;
 } PyUNO_callable_Internals;
@@ -249,8 +247,6 @@ static PyTypeObject PyUNO_callable_Type =
 PyRef PyUNO_callable_new (
     const Reference<XInvocation2> &my_inv,
     const OUString & methodName,
-    const Reference<XSingleServiceFactory> &xInvocationFactory,
-    const Reference<XTypeConverter> &tc,
     enum ConversionMode mode )
 {
     PyUNO_callable* self;
@@ -262,8 +258,6 @@ PyRef PyUNO_callable_new (
     self->members = new PyUNO_callable_Internals;
     self->members->xInvocation = my_inv;
     self->members->methodName = methodName;
-    self->members->xInvocationFactory = xInvocationFactory;
-    self->members->xTypeConverter = tc;
     self->members->mode = mode;
 
     return PyRef( (PyObject*)self, SAL_NO_ACQUIRE );
diff --git a/pyuno/source/module/pyuno_impl.hxx b/pyuno/source/module/pyuno_impl.hxx
index 348a646..fefaefa 100644
--- a/pyuno/source/module/pyuno_impl.hxx
+++ b/pyuno/source/module/pyuno_impl.hxx
@@ -158,8 +158,6 @@ com::sun::star::uno::TypeClass StringToTypeClass (char* string);
 PyRef PyUNO_callable_new (
     const com::sun::star::uno::Reference<com::sun::star::script::XInvocation2> &xInv,
     const rtl::OUString &methodName,
-    const com::sun::star::uno::Reference<com::sun::star::lang::XSingleServiceFactory> &ssf,
-    const com::sun::star::uno::Reference<com::sun::star::script::XTypeConverter> &tc,
     ConversionMode mode = REJECT_UNO_ANY );
 
 PyObject* PyUNO_Type_new (const char *typeName , com::sun::star::uno::TypeClass t , const Runtime &r );
commit 9dc7f72febe9d294304f70cc7b9cdeab1c67dc8b
Author: Herbert Dürr <hdu at apache.org>
Date:   Fri Jul 12 08:56:00 2013 +0000

    #i120083# make python loglevel and log output changeable through environment vars
    
    Set the log level with the environment variable "PYSCRIPT_LOG_LEVEL"
    "DEBUG" (for debugging)
    "ERROR" (show errors only)
    "NONE"  (or anything else) (for production) is the default
    and the log output type with the enviroment variable "PYSCRIPT_LOG_STDOUT"
    "0" (log output to user/Scripts/python/log.txt)
    "1" (or anything else) (log output to stdout)
    
    Patch by: Tsutomu Uchino <hanya.runo at gmail.com>
    Review by: Herbert Durr <hdu at apache.org>
    
    Note: Commit message edited by ASF infra team to work around a known issue with the
    ASF svn install (not an issue with svn) and UTF-8 handling. This is a temporary
    issue that we hope to resolve soon.

diff --git a/scripting/source/pyprov/pythonscript.py b/scripting/source/pyprov/pythonscript.py
index 7fca7aa..23e82b5 100644
--- a/scripting/source/pyprov/pythonscript.py
+++ b/scripting/source/pyprov/pythonscript.py
@@ -34,16 +34,24 @@ except NameError:
     unicode = str
 
 class LogLevel:
-    NONE = 0
-    ERROR = 1
-    DEBUG = 2
+    NONE = 0   # production level
+    ERROR = 1  # for script developers
+    DEBUG = 2  # for script framework developers
+
+PYSCRIPT_LOG_ENV = "PYSCRIPT_LOG_LEVEL"
+PYSCRIPT_LOG_STDOUT_ENV = "PYSCRIPT_LOG_STDOUT"
 
 # Configuration ----------------------------------------------------
-LogLevel.use = LogLevel.NONE                # production level
-#LogLevel.use = LogLevel.ERROR               # for script developers
-#LogLevel.use = LogLevel.DEBUG               # for script framework developers
-LOG_STDOUT = True                           # True, writes to stdout (difficult on windows)
-                                            # False, writes to user/Scripts/python/log.txt
+LogLevel.use = LogLevel.NONE
+if os.environ.get(PYSCRIPT_LOG_ENV) == "ERROR":
+    LogLevel.use = LogLevel.ERROR
+elif os.environ.get(PYSCRIPT_LOG_ENV) == "DEBUG":
+    LogLevel.use = LogLevel.DEBUG
+
+# True, writes to stdout (difficult on windows)
+# False, writes to user/Scripts/python/log.txt
+LOG_STDOUT = os.environ.get(PYSCRIPT_LOG_STDOUT_ENV, "1") != "0"
+
 ENABLE_EDIT_DIALOG=False                    # offers a minimal editor for editing.
 #-------------------------------------------------------------------
 
commit de97eb1fa4eb67d8b0490249f433a26fa5bd8e6a
Author: Andre Fischer <af at apache.org>
Date:   Fri Jul 12 08:25:25 2013 +0000

    122709: Removed debug code.

diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index 977d713..870d63e 100644
--- a/vcl/unx/gtk/window/gtkframe.cxx
+++ b/vcl/unx/gtk/window/gtkframe.cxx
@@ -1245,7 +1245,7 @@ Size GtkSalFrame::calcDefaultSize()
     long h = aScreenSize.Height();
 
 
-    if (true || aScreenSize.Width() <= 1024)
+    if (aScreenSize.Width() <= 1024)
     {
         // For small screen use the old default values.  Original comment:
         // fill in holy default values brought to us by product management


More information about the Libreoffice-commits mailing list