Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


On 06/01/2012 03:27 PM, Noel Grandin wrote:
This is part of the ongoing quest to reach the wondrous land of the
shiny new UNO framework.

This patch series updates tons of places to use the new factory ::create
methods .

Unfortunately, it does not come with my usual guarantees - it compiles
and links, but the unit tests generate a bunch of errors.

I'm hoping Stephan can either patch up the problems or point me in the
right direction - build error log attached.

Pushed the first of your five patches now, as <http://cgit.freedesktop.org/libreoffice/core/commit/?id=b3c76dee6d44d07eae404b8d7341e6c88e6c4429> "fdo#46808, Adapt UNO services to new style, Part 7, updating ::create." It needed some trivial merge fixes; and I added a number of tweaks, esp. inclusion of svtools/util/svt.component in some tests (see attached fixes-0001.patch for reference).

Will look at the other four patches later.

Thanks,
Stephan
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 2ce2f9f..adaeaaa 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -5060,8 +5060,6 @@ SvxIconSelectorDialog::SvxIconSelectorDialog( Window *pWindow,
     m_xGraphProvider = uno::Reference< graphic::XGraphicProvider >(
         graphic::GraphicProvider::create( xComponentContext ) );
 
-    aBtnImport.Enable( sal_False );
-
     uno::Reference< beans::XPropertySet > xPropSet(
         xServiceManager->createInstance( ::rtl::OUString("com.sun.star.util.PathSettings"  ) ),
         uno::UNO_QUERY );
diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx
index 9d5a31d..039d3e4 100644
--- a/editeng/source/items/numitem.cxx
+++ b/editeng/source/items/numitem.cxx
@@ -82,7 +82,7 @@ void lcl_getFormatter(com::sun::star::uno::Reference<com::sun::star::text::XNumb
         }
         catch(const Exception&)
         {
-            OSL_TRACE("service missing: \"com.sun.star.text.DefaultNumberingProvider\"");
+            SAL_WARN("editeng", "service missing: \"com.sun.star.text.DefaultNumberingProvider\"");
         }
     }
 }
diff --git a/extensions/source/plugin/base/xplugin.cxx b/extensions/source/plugin/base/xplugin.cxx
index 6c75f66..4d2b042 100644
--- a/extensions/source/plugin/base/xplugin.cxx
+++ b/extensions/source/plugin/base/xplugin.cxx
@@ -42,6 +42,7 @@
 #include <com/sun/star/lang/XSingleServiceFactory.hpp>
 #include <com/sun/star/loader/XImplementationLoader.hpp>
 #include <com/sun/star/loader/CannotActivateFactoryException.hpp>
+#include <com/sun/star/plugin/PluginManager.hpp>
 
 #include <comphelper/componentcontext.hxx>
 #include <plugin/impl.hxx>
@@ -138,8 +139,8 @@ XPlugin_Impl::XPlugin_Impl( const uno::Reference< com::sun::star::lang::XMultiSe
     uno::Reference< com::sun::star::beans::XPropertySet >  xPS( m_xModel, UNO_QUERY );
     xPS->addPropertyChangeListener( OUString(), this );
 
-    Guard< Mutex > aGuard( PluginManager::get().getPluginMutex() );
-    PluginManager::get().getPlugins().push_back( this );
+    Guard< Mutex > aGuard( ::PluginManager::get().getPluginMutex() );
+    ::PluginManager::get().getPlugins().push_back( this );
 }
 
 void XPlugin_Impl::destroyInstance()
@@ -199,11 +200,11 @@ IMPL_LINK( XPlugin_Impl, secondLevelDispose, XPlugin_Impl*, /*pThis*/ )
 
     // may have become undisposable between PostUserEvent and here
     // or may have disposed and receive a second UserEvent
-    std::list<XPlugin_Impl*>& rList = PluginManager::get().getPlugins();
+    std::list<XPlugin_Impl*>& rList = ::PluginManager::get().getPlugins();
     std::list<XPlugin_Impl*>::iterator iter;
 
     {
-        Guard< Mutex > aPluginGuard( PluginManager::get().getPluginMutex() );
+        Guard< Mutex > aPluginGuard( ::PluginManager::get().getPluginMutex() );
         for( iter = rList.begin(); iter != rList.end(); ++iter )
         {
             if( *iter == this )
@@ -223,7 +224,7 @@ IMPL_LINK( XPlugin_Impl, secondLevelDispose, XPlugin_Impl*, /*pThis*/ )
     uno::Reference< com::sun::star::beans::XPropertySet >  xPS( m_xModel, UNO_QUERY );
     xPS->removePropertyChangeListener( OUString(), this );
     {
-        Guard< Mutex > aPluginGuard( PluginManager::get().getPluginMutex() );
+        Guard< Mutex > aPluginGuard( ::PluginManager::get().getPluginMutex() );
         rList.remove( this );
     }
     m_aNPWindow.window = NULL;
@@ -513,8 +514,8 @@ void XPlugin_Impl::loadPlugin()
     Guard< Mutex > aGuard( m_aMutex );
 
     std::list<PluginComm*>::iterator iter;
-    for( iter = PluginManager::get().getPluginComms().begin();
-         iter != PluginManager::get().getPluginComms().end(); ++iter )
+    for( iter = ::PluginManager::get().getPluginComms().begin();
+         iter != ::PluginManager::get().getPluginComms().end(); ++iter )
     {
         if( OStringToOUString( (*iter)->getLibName(), m_aEncoding ) == m_aDescription.PluginName )
         {
@@ -894,7 +895,7 @@ void XPlugin_Impl::setPosSize( sal_Int32 nX_, sal_Int32 nY_, sal_Int32 nWidth_,
 
 PluginDescription XPlugin_Impl::fitDescription( const OUString& rURL )
 {
-    uno::Reference< XPluginManager >  xPMgr( 
PluginManager::create(comphelper::ComponentContext(m_xSMgr).getUNOContext()) );
+    uno::Reference< XPluginManager >  xPMgr( 
plugin::PluginManager::create(comphelper::ComponentContext(m_xSMgr).getUNOContext()) );
 
     Sequence< PluginDescription > aDescrs = xPMgr->getPluginDescriptions();
     const PluginDescription* pDescrs = aDescrs.getConstArray();
diff --git a/sc/CppunitTest_sc_macros_test.mk b/sc/CppunitTest_sc_macros_test.mk
index c503a04..7d1a8fb 100644
--- a/sc/CppunitTest_sc_macros_test.mk
+++ b/sc/CppunitTest_sc_macros_test.mk
@@ -106,6 +106,7 @@ $(eval $(call gb_CppunitTest_use_components,sc_macros_test,\
     sfx2/util/sfx \
     sot/util/sot \
     svl/source/fsstor/fsstorage \
+    svtools/util/svt \
     toolkit/util/tk \
     ucb/source/core/ucb1 \
     ucb/source/ucp/file/ucpfile1 \
diff --git a/sd/source/filter/grf/sdgrffilter.cxx b/sd/source/filter/grf/sdgrffilter.cxx
index 5f69dfe..2ad8a7a 100644
--- a/sd/source/filter/grf/sdgrffilter.cxx
+++ b/sd/source/filter/grf/sdgrffilter.cxx
@@ -526,7 +526,6 @@ void SdGRFFilter::SaveGraphic( const ::com::sun::star::uno::Reference< ::com::su
             if( xGraphStream.is() )
             {
                 Reference< XSimpleFileAccess2 > xFileAccess( SimpleFileAccess::create(xContext) );
-//                Reference< XSimpleFileAccess2 > xFileAccess( 
xSM->createInstance("com.sun.star.ucb.SimpleFileAccess" ), UNO_QUERY_THROW );
                 xFileAccess->writeFile( sPath, xGraphStream );
             }
             else
diff --git a/sfx2/source/doc/plugin.cxx b/sfx2/source/doc/plugin.cxx
index 4aa72cc..5f86248 100644
--- a/sfx2/source/doc/plugin.cxx
+++ b/sfx2/source/doc/plugin.cxx
@@ -103,7 +103,7 @@ sal_Bool SAL_CALL PluginObject::load(
     const uno::Reference < frame::XFrame >& xFrame )
 throw( uno::RuntimeException )
 {
-    uno::Reference< plugin::XPluginManager >  xPMgr( 
plugin::PluginManager::create(comphelper::ComponentContext(mxFact).getUNOContext()) );
+    uno::Reference< plugin::XPluginManager > xPMgr( 
plugin::PluginManager::create(comphelper::ComponentContext(mxFact).getUNOContext()) );
 
     if ( SvtMiscOptions().IsPluginsEnabled() )
     {
diff --git a/sw/CppunitTest_sw_subsequent_rtfexport.mk b/sw/CppunitTest_sw_subsequent_rtfexport.mk
index f763e5d..3943f7e 100644
--- a/sw/CppunitTest_sw_subsequent_rtfexport.mk
+++ b/sw/CppunitTest_sw_subsequent_rtfexport.mk
@@ -61,6 +61,7 @@ $(eval $(call gb_CppunitTest_use_components,sw_subsequent_rtfexport,\
     package/util/package2 \
     sfx2/util/sfx \
     svl/source/fsstor/fsstorage \
+    svtools/util/svt \
     sw/util/msword \
     sw/util/sw \
     sw/util/swd \
diff --git a/sw/CppunitTest_sw_subsequent_ww8tok.mk b/sw/CppunitTest_sw_subsequent_ww8tok.mk
index 069c917..80e0089 100644
--- a/sw/CppunitTest_sw_subsequent_ww8tok.mk
+++ b/sw/CppunitTest_sw_subsequent_ww8tok.mk
@@ -64,6 +64,7 @@ $(eval $(call gb_CppunitTest_use_components,sw_subsequent_ww8tok,\
     sw/util/swd \
     sfx2/util/sfx \
     svl/source/fsstor/fsstorage \
+    svtools/util/svt \
     toolkit/util/tk \
     ucb/source/core/ucb1 \
     ucb/source/ucp/file/ucpfile1 \
diff --git a/writerfilter/CppunitTest_writerfilter_rtftok.mk 
b/writerfilter/CppunitTest_writerfilter_rtftok.mk
index 393e210..9b660d3 100644
--- a/writerfilter/CppunitTest_writerfilter_rtftok.mk
+++ b/writerfilter/CppunitTest_writerfilter_rtftok.mk
@@ -56,7 +56,7 @@ $(eval $(call gb_CppunitTest_use_ure,writerfilter_rtftok))
 
 $(eval $(call gb_CppunitTest_use_components,writerfilter_rtftok,\
        configmgr/source/configmgr \
-    svtools/util/svt \
+       svtools/util/svt \
        ucb/source/core/ucb1 \
        ucb/source/ucp/file/ucpfile1 \
        writerfilter/util/writerfilter \

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.