[Libreoffice-commits] .: 2 commits - desktop/source solenv/gbuild

Caolán McNamara caolan at kemper.freedesktop.org
Fri Sep 16 07:25:37 PDT 2011


 desktop/source/app/appinit.cxx |   50 ++++++++++++++++++++++++-----------------
 solenv/gbuild/gbuild.mk        |    6 ++++
 2 files changed, 36 insertions(+), 20 deletions(-)

New commits:
commit 10890bcd4205c82cf79170a61ca5efbb277f8c09
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Sep 16 15:13:28 2011 +0100

    can't guess the right paths for the internal python on macox

diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index eb708ca..546c4dc 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -332,6 +332,12 @@ endif
 ifeq ($(SYSTEM_PYTHON),YES)
 gb_PYTHONTARGET :=
 gb_PYTHON := $(PYTHON)
+else ifeq ($(OS),MACOSX)
+#fixme: remove this MACOSX ifeq branch by filling in gb_PYTHON_PRECOMMAND in
+#gbuild/platform/macosx.mk correctly for mac, e.g. PYTHONPATH and PYTHONHOME
+#dirs for in-tree internal python
+gb_PYTHONTARGET :=
+gb_PYTHON := $(PYTHON)
 else
 gb_PYTHONTARGET := $(OUTDIR)/bin/python
 gb_PYTHON := $(gb_PYTHON_PRECOMMAND) $(gb_PYTHONTARGET)
commit 4acffc240b4845beedfe66eaa571b814d65e2e57
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Sep 16 14:48:31 2011 +0100

    catch by const reference

diff --git a/desktop/source/app/appinit.cxx b/desktop/source/app/appinit.cxx
index 1362437..cabc8dd 100644
--- a/desktop/source/app/appinit.cxx
+++ b/desktop/source/app/appinit.cxx
@@ -134,8 +134,10 @@ static bool configureUcb(bool bServer, rtl::OUString const & rPortalConnect)
 #ifdef GNOME_VFS_ENABLED
     // register GnomeUCP if necessary
     ::ucbhelper::ContentBroker* cb = ::ucbhelper::ContentBroker::get();
-    if(cb) {
-        try {
+    if(cb)
+    {
+        try
+        {
             Reference< XCurrentContext > xCurrentContext(
                 getCurrentContext());
             if (xCurrentContext.is())
@@ -169,12 +171,15 @@ static bool configureUcb(bool bServer, rtl::OUString const & rPortalConnect)
                                 xCP,
                                 rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".*")),
                                 false);
-                    } catch (...)
+                    }
+                    catch (...)
                     {
                     }
                 }
             }
-        } catch (RuntimeException &e) {
+        }
+        catch (const RuntimeException &)
+        {
         }
     }
 #endif // GNOME_VFS_ENABLED
@@ -193,7 +198,7 @@ Reference< XMultiServiceFactory > Desktop::CreateApplicationServiceManager()
 
         return xMS;
     }
-    catch( ::com::sun::star::uno::Exception& )
+    catch (const ::com::sun::star::uno::Exception&)
     {
     }
 
@@ -213,7 +218,7 @@ void Desktop::DestroyApplicationServiceManager( Reference< XMultiServiceFactory
                 xComp->dispose();
             }
         }
-        catch ( UnknownPropertyException& )
+        catch (const UnknownPropertyException&)
         {
         }
     }
@@ -299,28 +304,33 @@ void Desktop::createAcceptor(const OUString& aAcceptString)
     // check whether the requested acceptor already exists
     AcceptorMap &rMap = acceptorMap::get();
     AcceptorMap::const_iterator pIter = rMap.find(aAcceptString);
-    if (pIter == rMap.end() ) {
-
+    if (pIter == rMap.end() )
+    {
         Sequence< Any > aSeq( 2 );
         aSeq[0] <<= aAcceptString;
         aSeq[1] <<= bAccept;
         Reference<XInitialization> rAcceptor(
             ::comphelper::getProcessServiceFactory()->createInstance(
             OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.office.Acceptor" ))), UNO_QUERY );
-        if ( rAcceptor.is() ) {
-            try{
+        if ( rAcceptor.is() )
+        {
+            try
+            {
                 rAcceptor->initialize( aSeq );
                 rMap.insert(AcceptorMap::value_type(aAcceptString, rAcceptor));
-            } catch (com::sun::star::uno::Exception&) {
-            // no error handling needed...
-            // acceptor just won't come up
-            OSL_FAIL("Acceptor could not be created.");
+            }
+            catch (const com::sun::star::uno::Exception&)
+            {
+                // no error handling needed...
+                // acceptor just won't come up
+                OSL_FAIL("Acceptor could not be created.");
+            }
+        }
+        else
+        {
+            // there is already an acceptor with this description
+            OSL_FAIL("Acceptor already exists.");
         }
-    } else {
-        // there is already an acceptor with this description
-        OSL_FAIL("Acceptor already exists.");
-    }
-
     }
 }
 
@@ -390,7 +400,7 @@ void Desktop::CreateTemporaryDirectory()
         SvtPathOptions aOpt;
         aTempBaseURL = aOpt.GetTempPath();
     }
-    catch ( RuntimeException& e )
+    catch (RuntimeException& e)
     {
         // Catch runtime exception here: We have to add language dependent info
         // to the exception message. Fallback solution uses hard coded string.


More information about the Libreoffice-commits mailing list