[Libreoffice-commits] core.git: 4 commits - cppuhelper/source cppu/Library_cppu.mk cppu/source include/xmloff vcl/win xmloff/source

Matúš Kukan matus.kukan at collabora.com
Wed Dec 11 08:58:13 PST 2013


 cppu/Library_cppu.mk               |    1 
 cppu/source/uno/env_subst.cxx      |   47 -------------------------------------
 cppu/source/uno/env_subst.hxx      |   35 ---------------------------
 cppu/source/uno/lbenv.cxx          |    2 -
 cppuhelper/source/shlib.cxx        |    2 -
 include/xmloff/xmlexp.hxx          |    2 -
 vcl/win/source/window/salframe.cxx |    3 +-
 xmloff/source/core/xmlexp.cxx      |    2 -
 8 files changed, 4 insertions(+), 90 deletions(-)

New commits:
commit 87b2bc2cc31b4bc334af8d598684a340242d3633
Author: Matúš Kukan <matus.kukan at collabora.com>
Date:   Wed Dec 11 16:03:38 2013 +0100

    Use static for this getenv call too.
    
    Change-Id: Ieb8dd13763c6d5e6d30ce641683de79d89d135df

diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx
index 3602c83..c342b7f 100644
--- a/vcl/win/source/window/salframe.cxx
+++ b/vcl/win/source/window/salframe.cxx
@@ -291,7 +291,8 @@ SalFrame* ImplSalCreateFrame( WinSalInstance* pInst,
     DWORD       nExSysStyle = 0;
     sal_Bool        bSubFrame = FALSE;
 
-    if( getenv( "SAL_SYNCHRONIZE" ) )   // no buffering of drawing commands
+    static const char* pEnvSynchronize = getenv("SAL_SYNCHRONIZE");
+    if ( pEnvSynchronize )   // no buffering of drawing commands
         GdiSetBatchLimit( 1 );
 
     static const char* pEnvTransparentFloats = getenv("SAL_TRANSPARENT_FLOATS" );
commit 58b46086e64b6cbe288c146b017d5d4de1ce6db0
Author: Matúš Kukan <matus.kukan at collabora.com>
Date:   Wed Dec 11 15:58:45 2013 +0100

    Remove unused SvXMLExport::mbEnableExperimentalOdfExport.
    
    Change-Id: Ib2dbc4af73394c9c35a7f273fd8966b91ac3eb84

diff --git a/include/xmloff/xmlexp.hxx b/include/xmloff/xmlexp.hxx
index 7ef8f3f..b80d096 100644
--- a/include/xmloff/xmlexp.hxx
+++ b/include/xmloff/xmlexp.hxx
@@ -149,7 +149,6 @@ class XMLOFF_DLLPUBLIC SvXMLExport : public ::cppu::WeakImplHelper6<
 
     sal_uInt16  mnExportFlags;
     sal_uInt16  mnErrorFlags;
-    bool  mbEnableExperimentalOdfExport;
 
 public:
 
@@ -546,7 +545,6 @@ public:
 
     // Written OpenDocument file format doesn't fit to the created text document (#i69627#)
     sal_Bool writeOutlineStyleAsNormalListStyle() const;
-       bool isExperimentalOdfExportEnabled() const { return mbEnableExperimentalOdfExport; }
 
     ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > GetTargetStorage();
 
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index 68811c1..b92e729 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -408,8 +408,6 @@ void SvXMLExport::_InitCtor()
     // Determine model type (#i51726#)
     _DetermineModelType();
 
-    mbEnableExperimentalOdfExport = getenv("ENABLE_EXPERIMENTAL_ODF_EXPORT") != NULL;
-
     // cl: but only if we do export to current oasis format, old openoffice format *must* always be compatible
     if( (getExportFlags() & EXPORT_OASIS) != 0 )
     {
commit 938657613982d0edecc1aa71e9314cff6a0bb56f
Author: Matúš Kukan <matus.kukan at collabora.com>
Date:   Wed Dec 11 13:54:05 2013 +0100

    Let's have a static variable for getenv("UNO_ENV_LOG").
    
    Change-Id: Id382726b86726515a9ae3017c11fad0420136a4c

diff --git a/cppuhelper/source/shlib.cxx b/cppuhelper/source/shlib.cxx
index 73f880947..6176b23 100644
--- a/cppuhelper/source/shlib.cxx
+++ b/cppuhelper/source/shlib.cxx
@@ -83,7 +83,7 @@ static void getLibEnv(oslModule                lib,
     if (!pEnv->is() && pEnvTypeName)
     {
         *pSourceEnv_name = OUString::createFromAscii(pEnvTypeName);
-        const char * pUNO_ENV_LOG = ::getenv( "UNO_ENV_LOG" );
+        static const char * pUNO_ENV_LOG = ::getenv( "UNO_ENV_LOG" );
         if (pUNO_ENV_LOG && rtl_str_getLength(pUNO_ENV_LOG) )
         {
             OString implName(OUStringToOString(cImplName, RTL_TEXTENCODING_ASCII_US));
commit acf233e2bb259759c9167a32e17fcf13e1f54f6c
Author: Matúš Kukan <matus.kukan at collabora.com>
Date:   Wed Dec 11 13:51:48 2013 +0100

    cppu: Avoid uno_direct_getEnvironment() indirection.
    
    "UNO_ENV_SUBST:" should not be used.
    
    Change-Id: If23b174de792cd69dc79e70dd8f5e8a31badb96d

diff --git a/cppu/Library_cppu.mk b/cppu/Library_cppu.mk
index eacaf83..c00fd8e 100644
--- a/cppu/Library_cppu.mk
+++ b/cppu/Library_cppu.mk
@@ -43,7 +43,6 @@ $(eval $(call gb_Library_add_exception_objects,cppu,\
 	cppu/source/uno/cascade_mapping \
 	cppu/source/uno/data \
 	cppu/source/uno/EnvStack \
-	cppu/source/uno/env_subst \
 	cppu/source/uno/IdentityMapping \
 	cppu/source/uno/lbenv \
 	cppu/source/uno/lbmap \
diff --git a/cppu/source/uno/env_subst.cxx b/cppu/source/uno/env_subst.cxx
deleted file mode 100644
index 63ed295..0000000
--- a/cppu/source/uno/env_subst.cxx
+++ /dev/null
@@ -1,47 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * 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/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include "rtl/ustring.hxx"
-#include "uno/environment.h"
-#include "env_subst.hxx"
-
-
-CPPU_DLLPUBLIC void SAL_CALL uno_getEnvironment(uno_Environment ** ppEnv,
-                                 rtl_uString      * pEnvDcp,
-                                 void             * pContext)
-    SAL_THROW_EXTERN_C()
-{
-    rtl::OUString envDcp(pEnvDcp);
-
-    rtl::OString  a_envName("UNO_ENV_SUBST:");
-    a_envName += rtl::OUStringToOString(envDcp, RTL_TEXTENCODING_ASCII_US);
-    char * c_value = getenv(a_envName.getStr());
-    if (c_value && *c_value)
-    {
-        rtl::OString a_envDcp(a_envName.copy(a_envName.indexOf(':') + 1));
-
-        OSL_TRACE("UNO_ENV_SUBST \"%s\" -> \"%s\"", a_envDcp.getStr(), c_value);
-
-        envDcp = rtl::OUString::createFromAscii(c_value);
-    }
-
-    uno_direct_getEnvironment(ppEnv, envDcp.pData, pContext);
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cppu/source/uno/env_subst.hxx b/cppu/source/uno/env_subst.hxx
deleted file mode 100644
index 70a24a3..0000000
--- a/cppu/source/uno/env_subst.hxx
+++ /dev/null
@@ -1,35 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * 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/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef INCLUDED_env_substs_hxx
-#define INCLUDED_env_substs_hxx
-
-#include "rtl/ustring.hxx"
-#include "uno/environment.h"
-
-
-extern "C" void SAL_CALL uno_direct_getEnvironment(uno_Environment ** ppEnv,
-                                                   rtl_uString      * pEnvDcp,
-                                                   void             * pContext)
-    SAL_THROW_EXTERN_C();
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cppu/source/uno/lbenv.cxx b/cppu/source/uno/lbenv.cxx
index 04dfa2d..107be17 100644
--- a/cppu/source/uno/lbenv.cxx
+++ b/cppu/source/uno/lbenv.cxx
@@ -1154,7 +1154,7 @@ CPPU_DLLPUBLIC void SAL_CALL uno_createEnvironment(
 }
 
 //##############################################################################
-void SAL_CALL uno_direct_getEnvironment(
+CPPU_DLLPUBLIC void SAL_CALL uno_getEnvironment(
     uno_Environment ** ppEnv, rtl_uString * pEnvDcp, void * pContext )
     SAL_THROW_EXTERN_C()
 {


More information about the Libreoffice-commits mailing list