[Libreoffice-commits] .: Branch 'integration/dev300_m98' - 2 commits - i18npool/source svtools/inc svtools/Library_svt.mk svtools/Package_inc.mk unotools/source vcl/source vcl/workben

Michael Meeks mmeeks at kemper.freedesktop.org
Thu Feb 24 08:21:14 PST 2011


 i18npool/source/paper/paper.cxx               |    4 +
 svtools/Library_svt.mk                        |    1 
 svtools/Package_inc.mk                        |    2 
 svtools/inc/svtools/bindablecontrolhelper.hxx |   61 ++++++++++++++++++++++++++
 unotools/source/config/itemholder1.cxx        |    4 +
 vcl/source/gdi/impimagetree.cxx               |    3 -
 vcl/workben/outdevgrind.cxx                   |    7 --
 vcl/workben/svdem.cxx                         |    1 
 vcl/workben/svptest.cxx                       |    1 
 vcl/workben/vcldemo.cxx                       |    1 
 10 files changed, 75 insertions(+), 10 deletions(-)

New commits:
commit b96c599134171657cbac510e4917b4528439b660
Author: Michael Meeks <michael.meeks at novell.com>
Date:   Thu Feb 24 14:43:34 2011 +0000

    make tests more robust, and run-able.

diff --git a/vcl/workben/outdevgrind.cxx b/vcl/workben/outdevgrind.cxx
index b6131ce..9c091e2 100644
--- a/vcl/workben/outdevgrind.cxx
+++ b/vcl/workben/outdevgrind.cxx
@@ -940,11 +940,8 @@ int GrindApp::Main()
     uno::Reference< lang::XMultiServiceFactory > xFactory;
     try
     {
-        uno::Reference< uno::XComponentContext > xCtx = ::cppu::defaultBootstrap_InitialComponentContext();
-        xFactory = uno::Reference< lang::XMultiServiceFactory >(  xCtx->getServiceManager(), 
-                                                                  uno::UNO_QUERY );
-        if( xFactory.is() )
-            ::comphelper::setProcessServiceFactory( xFactory );
+        xFactory = cppu::createRegistryServiceFactory( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "types.rdb" ) ), rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "applicat.rdb" ) ), sal_True );
+        comphelper::setProcessServiceFactory (xFactory);
     }
     catch( uno::Exception& )
     {
diff --git a/vcl/workben/svdem.cxx b/vcl/workben/svdem.cxx
index d7fa9d5..34bd6f5 100644
--- a/vcl/workben/svdem.cxx
+++ b/vcl/workben/svdem.cxx
@@ -57,6 +57,7 @@ SAL_IMPLEMENT_MAIN()
 
     Reference< XMultiServiceFactory > xMS;
     xMS = cppu::createRegistryServiceFactory( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "types.rdb" ) ), rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "applicat.rdb" ) ), sal_True );
+    comphelper::setProcessServiceFactory (xMS);
 
     InitVCL( xMS );
     ::Main();
diff --git a/vcl/workben/svptest.cxx b/vcl/workben/svptest.cxx
index 2c54a86..d7ff391 100644
--- a/vcl/workben/svptest.cxx
+++ b/vcl/workben/svptest.cxx
@@ -63,6 +63,7 @@ SAL_IMPLEMENT_MAIN()
 
     Reference< XMultiServiceFactory > xMS;
     xMS = cppu::createRegistryServiceFactory( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "types.rdb" ) ), rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "applicat.rdb" ) ), sal_True );
+    comphelper::setProcessServiceFactory (xMS);
 
     InitVCL( xMS );
     ::Main();
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index e8c5786..f21b7e7 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -62,6 +62,7 @@ SAL_IMPLEMENT_MAIN()
 
     Reference< XMultiServiceFactory > xMS;
     xMS = cppu::createRegistryServiceFactory( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "types.rdb" ) ), rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "applicat.rdb" ) ), sal_True );
+    comphelper::setProcessServiceFactory (xMS);
 
     InitVCL( xMS );
     ::Main();
commit 00dcf4231a5499ee75ed2d0aefcccb144034bfee
Author: Michael Meeks <michael.meeks at novell.com>
Date:   Thu Feb 24 12:39:49 2011 +0000

    distribute bindablecontrolhelper, and be more robust for tests.

diff --git a/i18npool/source/paper/paper.cxx b/i18npool/source/paper/paper.cxx
index f49e171..c5043d6 100644
--- a/i18npool/source/paper/paper.cxx
+++ b/i18npool/source/paper/paper.cxx
@@ -232,7 +232,9 @@ PaperInfo PaperInfo::getSystemDefaultPaper()
     Sequence< Any > aArgs( 1 );
     try
     {
-        Reference< XMultiServiceFactory > xFactory = ::comphelper::getProcessServiceFactory();
+        Reference< XMultiServiceFactory > xFactory(
+            ::comphelper::getProcessServiceFactory(),
+            UNO_QUERY_THROW);
         xConfigProv = Reference< XMultiServiceFactory >(
             xFactory->createInstance( CREATE_OUSTRING( "com.sun.star.configuration.ConfigurationProvider" ) ),
             UNO_QUERY_THROW);
diff --git a/svtools/Library_svt.mk b/svtools/Library_svt.mk
index c477dee..f1e2683 100644
--- a/svtools/Library_svt.mk
+++ b/svtools/Library_svt.mk
@@ -211,6 +211,7 @@ $(eval $(call gb_Library_add_exception_objects,svt,\
 	svtools/source/java/javacontext \
 	svtools/source/java/javainteractionhandler \
 	svtools/source/misc/acceleratorexecute \
+	svtools/source/misc/bindablecontrolhelper \
 	svtools/source/misc/chartprettypainter \
 	svtools/source/misc/cliplistener \
 	svtools/source/misc/dialogclosedlistener \
diff --git a/svtools/Package_inc.mk b/svtools/Package_inc.mk
index f6a48e8..94213d5 100644
--- a/svtools/Package_inc.mk
+++ b/svtools/Package_inc.mk
@@ -31,6 +31,7 @@ $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/DocumentInfoPreview.hx
 $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/FilterConfigItem.hxx,svtools/FilterConfigItem.hxx))
 $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/QueryFolderName.hxx,svtools/QueryFolderName.hxx))
 $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/acceleratorexecute.hxx,svtools/acceleratorexecute.hxx))
+$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/bindablecontrolhelper.hxx,svtools/bindablecontrolhelper.hxx))
 $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/accessibilityoptions.hxx,svtools/accessibilityoptions.hxx))
 $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/accessiblefactory.hxx,svtools/accessiblefactory.hxx))
 $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/accessibletable.hxx,svtools/accessibletable.hxx))
@@ -104,6 +105,7 @@ $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/ivctrl.hxx,svtools/ivc
 $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/javacontext.hxx,svtools/javacontext.hxx))
 $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/javainteractionhandler.hxx,svtools/javainteractionhandler.hxx))
 $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/langtab.hxx,svtools/langtab.hxx))
+$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/langhelp.hxx,svtools/langhelp.hxx))
 $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/localresaccess.hxx,svtools/localresaccess.hxx))
 $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/menuoptions.hxx,svtools/menuoptions.hxx))
 $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/miscopt.hxx,svtools/miscopt.hxx))
diff --git a/svtools/inc/svtools/bindablecontrolhelper.hxx b/svtools/inc/svtools/bindablecontrolhelper.hxx
new file mode 100644
index 0000000..e53af10
--- /dev/null
+++ b/svtools/inc/svtools/bindablecontrolhelper.hxx
@@ -0,0 +1,61 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org.  If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SVTOOLS_INC_BINDABLECONTROL_HXX
+#define SVTOOLS_INC_BINDABLECONTROL_HXX
+
+#include "svtools/svtdllapi.h"
+
+#include <com/sun/star/frame/XModel.hpp>
+//........................................................................
+namespace svt
+{
+//........................................................................
+
+    //====================================================================
+    //= GraphicAccess
+    //====================================================================
+    /** helper class for obtaining streams (which also can be used with the ImageProducer)
+        from a resource
+    */
+    class BindableControlHelper
+    {
+    private:
+        BindableControlHelper();    // never implemented
+
+    public:
+        SVT_DLLPUBLIC static  void ApplyListSourceAndBindableData( const com::sun::star::uno::Reference< com::sun::star::frame::XModel >& xModel, const com::sun::star::uno::Reference< com::sun::star::uno::XInterface >& rObj, const rtl::OUString& rsCtrlSource, const rtl::OUString& rsRowSource );
+    };
+
+//........................................................................
+} // namespace svt
+//........................................................................
+
+#endif // SVTOOLS_INC_BINDABLECONTROL_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/unotools/source/config/itemholder1.cxx b/unotools/source/config/itemholder1.cxx
index 7c5a4bd..307c1d1 100644
--- a/unotools/source/config/itemholder1.cxx
+++ b/unotools/source/config/itemholder1.cxx
@@ -85,7 +85,9 @@ ItemHolder1::ItemHolder1()
 {
     try
     {
-        css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR = ::comphelper::getProcessServiceFactory();
+        css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR(
+            ::comphelper::getProcessServiceFactory(),
+            css::uno::UNO_QUERY_THROW);
         css::uno::Reference< css::lang::XComponent > xCfg(
             xSMGR->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationProvider"))),
             css::uno::UNO_QUERY);
diff --git a/vcl/source/gdi/impimagetree.cxx b/vcl/source/gdi/impimagetree.cxx
index 4c7048e..36fca8a 100644
--- a/vcl/source/gdi/impimagetree.cxx
+++ b/vcl/source/gdi/impimagetree.cxx
@@ -157,8 +157,6 @@ bool ImplImageTree::loadImage(
     try {
         found = doLoadImage(name, style, bitmap, localized);
     } catch (css::uno::RuntimeException &) {
-        if (!loadMissing)
-            throw;
     }
     if (found || !loadMissing)
         return found;
@@ -169,7 +167,6 @@ bool ImplImageTree::loadImage(
             rtl::OUStringToOString(name, RTL_TEXTENCODING_UTF8).getStr());
         found = loadDefaultImage(style, bitmap);
     } catch (css::uno::RuntimeException &) {
-        throw;
     }
     return found;
 }


More information about the Libreoffice-commits mailing list