[Libreoffice-commits] .: 8 commits - dbaccess/source dictionaries extensions/source framework/inc framework/source helpcontent2 offapi/com sfx2/source translations
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Oct 24 09:13:10 PDT 2012
dbaccess/source/core/dataaccess/ModelImpl.cxx | 6 +-
dictionaries | 2
extensions/source/update/check/updatecheck.cxx | 35 +++++--------
framework/inc/dispatch/mailtodispatcher.hxx | 6 +-
framework/inc/dispatch/systemexec.hxx | 4 -
framework/inc/services.h | 5 -
framework/inc/services/autorecovery.hxx | 3 -
framework/source/dispatch/mailtodispatcher.cxx | 46 ++++++++----------
framework/source/dispatch/systemexec.cxx | 17 ++----
framework/source/layoutmanager/helpers.cxx | 12 +---
framework/source/layoutmanager/helpers.hxx | 2
framework/source/layoutmanager/layoutmanager.cxx | 11 +---
framework/source/services/autorecovery.cxx | 5 +
framework/source/services/dispatchhelper.cxx | 2
framework/source/services/substitutepathvars.cxx | 2
helpcontent2 | 2
offapi/com/sun/star/frame/XGlobalEventBroadcaster.idl | 3 +
sfx2/source/inc/eventsupplier.hxx | 5 -
translations | 2
19 files changed, 76 insertions(+), 94 deletions(-)
New commits:
commit a2e8ac6228f4863eef84ca8a9fca73a3808c1b18
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Wed Oct 24 18:08:59 2012 +0200
Update dictionaries, helpcontent2, translations to origin master HEADs
...as 49a92ab374280eb340d8566d0ccc211a7fb52768 "commit changes in dictionries,
helpcontent2, and translations" had erroneously moved them back to old commits.
Change-Id: Iea6165ab2011de0b25129759442948cb3d0e3083
diff --git a/dictionaries b/dictionaries
index a5162a2..b5b5c88 160000
--- a/dictionaries
+++ b/dictionaries
@@ -1 +1 @@
-Subproject commit a5162a210e3ff07e44307dbf60717d5d5a40608d
+Subproject commit b5b5c88c12835a7043c09f0d5140ff1318e9671b
diff --git a/helpcontent2 b/helpcontent2
index 6b83924..a43f72a 160000
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 6b8392485c4b81d0a398a8c88a0e1f7ab53365f5
+Subproject commit a43f72ace3d84b3ba0df35ec589a21a1d5de2299
diff --git a/translations b/translations
index 2548be5..6d66e32 160000
--- a/translations
+++ b/translations
@@ -1 +1 @@
-Subproject commit 2548be535019c0a869c5759419c6964db5f82471
+Subproject commit 6d66e3242a10fbf54ae7d843fc823cf348fcec26
commit 13bedc55b1d533eadcfd4932ef57076e3642caaf
Author: Noel Grandin <noel at peralex.com>
Date: Wed Oct 17 15:00:30 2012 +0200
fdo#46808, use service constructor for frame::GlobalEventBroadcaster
Add document::XEventBroadcaster interface to XGlobalEventBroadcaster,
because a client uses it, and the service always implements it.
This is safe to do because we haven't released an LO version with
XGlobalEventBroadcaster in it yet.
diff --git a/dbaccess/source/core/dataaccess/ModelImpl.cxx b/dbaccess/source/core/dataaccess/ModelImpl.cxx
index 66745a5..2d62e2c 100644
--- a/dbaccess/source/core/dataaccess/ModelImpl.cxx
+++ b/dbaccess/source/core/dataaccess/ModelImpl.cxx
@@ -32,6 +32,7 @@
#include <com/sun/star/container/XSet.hpp>
#include <com/sun/star/document/MacroExecMode.hpp>
+#include <com/sun/star/frame/GlobalEventBroadcaster.hpp>
#include <com/sun/star/embed/XTransactedObject.hpp>
#include <com/sun/star/embed/XTransactionBroadcaster.hpp>
#include <com/sun/star/sdb/BooleanComparisonMode.hpp>
@@ -976,9 +977,8 @@ Reference< XModel > ODatabaseModelImpl::createNewModel_deliverOwnership( bool _b
try
{
- Reference< XSet > xModelCollection;
- if ( m_aContext.createComponent( "com.sun.star.frame.GlobalEventBroadcaster", xModelCollection ) )
- xModelCollection->insert( makeAny( xModel ) );
+ Reference< XGlobalEventBroadcaster > xModelCollection = GlobalEventBroadcaster::create( m_aContext.getUNOContext() );
+ xModelCollection->insert( makeAny( xModel ) );
}
catch( const Exception& )
{
diff --git a/framework/inc/services.h b/framework/inc/services.h
index 7d30422..cfbee13 100644
--- a/framework/inc/services.h
+++ b/framework/inc/services.h
@@ -81,7 +81,6 @@ namespace framework{
#define SERVICENAME_TOOLBARCONTROLLERFACTORY DECLARE_ASCII("com.sun.star.frame.ToolBarControllerFactory" )
#define SERVICENAME_LICENSE SERVICENAME_JOB
#define SERVICENAME_AUTORECOVERY DECLARE_ASCII("com.sun.star.frame.AutoRecovery" )
-#define SERVICENAME_GLOBALEVENTBROADCASTER DECLARE_ASCII("com.sun.star.frame.GlobalEventBroadcaster" )
#define SERVICENAME_STATUSBARFACTORY DECLARE_ASCII("com.sun.star.ui.StatusBarFactory" )
#define SERVICENAME_UICATEGORYDESCRIPTION DECLARE_ASCII("com.sun.star.ui.UICategoryDescription" )
#define SERVICENAME_STATUSBARCONTROLLERFACTORY DECLARE_ASCII("com.sun.star.frame.StatusbarControllerFactory" )
diff --git a/framework/inc/services/autorecovery.hxx b/framework/inc/services/autorecovery.hxx
index 9f7c61c..94347a0 100644
--- a/framework/inc/services/autorecovery.hxx
+++ b/framework/inc/services/autorecovery.hxx
@@ -40,6 +40,7 @@
#include <com/sun/star/lang/XTypeProvider.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/frame/GlobalEventBroadcaster.hpp>
#include <com/sun/star/frame/XDispatch.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/document/XEventListener.hpp>
@@ -344,7 +345,7 @@ class AutoRecovery : public css::lang::XTypeProvider
/** @short holds the global event broadcaster alive,
where we listen for new created documents.
*/
- css::uno::Reference< css::document::XEventBroadcaster > m_xNewDocBroadcaster;
+ css::uno::Reference< css::frame::XGlobalEventBroadcaster > m_xNewDocBroadcaster;
//---------------------------------------
/** @short proxy weak binding to forward Events to ourself without
diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx
index 6390970..d6928eb 100644
--- a/framework/source/services/autorecovery.cxx
+++ b/framework/source/services/autorecovery.cxx
@@ -45,6 +45,7 @@
#include <com/sun/star/ucb/NameClash.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
+#include <com/sun/star/frame/GlobalEventBroadcaster.hpp>
#include <com/sun/star/frame/XLoadable.hpp>
#include <com/sun/star/frame/XModel2.hpp>
#include <com/sun/star/frame/ModuleManager.hpp>
@@ -1365,7 +1366,7 @@ void AutoRecovery::implts_startListening()
ReadGuard aReadLock(m_aLock);
css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR = m_xSMGR;
css::uno::Reference< css::util::XChangesNotifier > xCFG (m_xRecoveryCFG, css::uno::UNO_QUERY);
- css::uno::Reference< css::document::XEventBroadcaster > xBroadcaster = m_xNewDocBroadcaster;
+ css::uno::Reference< css::frame::XGlobalEventBroadcaster > xBroadcaster = m_xNewDocBroadcaster;
sal_Bool bListenForDocEvents = m_bListenForDocEvents;
aReadLock.unlock();
// <- SAFE ----------------------------------
@@ -1382,7 +1383,7 @@ void AutoRecovery::implts_startListening()
if (!xBroadcaster.is())
{
- xBroadcaster = css::uno::Reference< css::document::XEventBroadcaster >(xSMGR->createInstance(SERVICENAME_GLOBALEVENTBROADCASTER), css::uno::UNO_QUERY_THROW);
+ xBroadcaster = css::frame::GlobalEventBroadcaster::create( comphelper::getComponentContext(xSMGR) );
// SAFE -> ----------------------------------
WriteGuard aWriteLock(m_aLock);
m_xNewDocBroadcaster = xBroadcaster;
diff --git a/offapi/com/sun/star/frame/XGlobalEventBroadcaster.idl b/offapi/com/sun/star/frame/XGlobalEventBroadcaster.idl
index c784fcc..9a311fa 100644
--- a/offapi/com/sun/star/frame/XGlobalEventBroadcaster.idl
+++ b/offapi/com/sun/star/frame/XGlobalEventBroadcaster.idl
@@ -22,6 +22,7 @@
#include <com/sun/star/container/XSet.idl>
#include <com/sun/star/document/XDocumentEventBroadcaster.idl>
#include <com/sun/star/document/XDocumentEventListener.idl>
+#include <com/sun/star/document/XEventBroadcaster.idl>
#include <com/sun/star/document/XEventsSupplier.idl>
module com { module sun { module star { module frame {
@@ -43,6 +44,8 @@ interface XGlobalEventBroadcaster
*/
interface ::com::sun::star::document::XDocumentEventBroadcaster;
+ interface ::com::sun::star::document::XEventBroadcaster;
+
interface ::com::sun::star::container::XSet;
interface ::com::sun::star::document::XDocumentEventListener;
diff --git a/sfx2/source/inc/eventsupplier.hxx b/sfx2/source/inc/eventsupplier.hxx
index a7aefd2..2a8aea4 100644
--- a/sfx2/source/inc/eventsupplier.hxx
+++ b/sfx2/source/inc/eventsupplier.hxx
@@ -37,7 +37,7 @@
#include <cppuhelper/weak.hxx>
#include <cppuhelper/implbase1.hxx>
#include <cppuhelper/implbase2.hxx>
-#include <cppuhelper/implbase4.hxx>
+#include <cppuhelper/implbase3.hxx>
#include <comphelper/sequenceashashmap.hxx>
#include <comphelper/sequenceasvector.hxx>
#include <sfx2/sfxuno.hxx>
@@ -172,9 +172,8 @@ class ModelCollectionEnumeration : public ModelCollectionMutexBase
//=============================================================================
//TODO: remove support of obsolete document::XEventBroadcaster/Listener
class SfxGlobalEvents_Impl : public ModelCollectionMutexBase
- , public ::cppu::WeakImplHelper4< ::com::sun::star::lang::XServiceInfo
+ , public ::cppu::WeakImplHelper3< ::com::sun::star::lang::XServiceInfo
, ::com::sun::star::frame::XGlobalEventBroadcaster
- , ::com::sun::star::document::XEventBroadcaster
, ::com::sun::star::document::XEventListener
>
{
commit 22d3fb11c65dd0679aab780ca789d2d4d74deac2
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Wed Oct 24 17:07:40 2012 +0200
Related fdo#46808: Improve previous commit slightly
Change-Id: Ie81ae8a75847fdbc70e69349d0646f0bb558b7d0
diff --git a/framework/source/services/dispatchhelper.cxx b/framework/source/services/dispatchhelper.cxx
index 52e18fc..f70f853 100644
--- a/framework/source/services/dispatchhelper.cxx
+++ b/framework/source/services/dispatchhelper.cxx
@@ -44,7 +44,7 @@ namespace framework{
DEFINE_XSERVICEINFO_MULTISERVICE(DispatchHelper ,
::cppu::OWeakObject ,
- DECLARE_ASCII("com.sun.star.frame.DispatchHelper"),
+ "com.sun.star.frame.DispatchHelper",
IMPLEMENTATIONNAME_DISPATCHHELPER)
DEFINE_INIT_SERVICE( DispatchHelper, {} )
commit b8abd0368854329efb5ce91606e99fe448944ff9
Author: Noel Grandin <noel at peralex.com>
Date: Wed Oct 17 14:19:26 2012 +0200
fdo#46808, use service constructor for frame::DispatchHelper
diff --git a/framework/inc/services.h b/framework/inc/services.h
index 8610063..7d30422 100644
--- a/framework/inc/services.h
+++ b/framework/inc/services.h
@@ -57,7 +57,6 @@ namespace framework{
#define SERVICENAME_DISPATCHRECORDER DECLARE_ASCII("com.sun.star.frame.DispatchRecorder" )
#define SERVICENAME_PROTOCOLHANDLER DECLARE_ASCII("com.sun.star.frame.ProtocolHandler" )
#define SERVICENAME_PATHSETTINGS DECLARE_ASCII("com.sun.star.util.PathSettings" )
-#define SERVICENAME_DISPATCHHELPER DECLARE_ASCII("com.sun.star.frame.DispatchHelper" )
#define SERVICENAME_DETECTORFACTORY DECLARE_ASCII("com.sun.star.document.ExtendedTypeDetectionFactory" )
#define SERVICENAME_SCRIPTCONVERTER DECLARE_ASCII("com.sun.star.script.Converter" )
#define SERVICENAME_LAYOUTMANAGER DECLARE_ASCII("com.sun.star.frame.LayoutManager" )
diff --git a/framework/source/layoutmanager/helpers.cxx b/framework/source/layoutmanager/helpers.cxx
index ef48be2..a954551 100644
--- a/framework/source/layoutmanager/helpers.cxx
+++ b/framework/source/layoutmanager/helpers.cxx
@@ -33,7 +33,7 @@
#include <com/sun/star/ui/DockingArea.hpp>
#include <com/sun/star/awt/Toolkit.hpp>
#include <com/sun/star/awt/XTopWindow.hpp>
-#include <com/sun/star/frame/XDispatchHelper.hpp>
+#include <com/sun/star/frame/DispatchHelper.hpp>
#include <com/sun/star/awt/XDockableWindow.hpp>
#include <com/sun/star/awt/XDockableWindowListener.hpp>
#include <com/sun/star/awt/XWindowListener.hpp>
@@ -308,10 +308,9 @@ sal_Bool implts_isFrameOrWindowTop( const uno::Reference< frame::XFrame >& xFram
return sal_False;
}
-void impl_setDockingWindowVisibility( const css::uno::Reference< css::lang::XMultiServiceFactory>& rSMGR, const css::uno::Reference< css::frame::XFrame >& rFrame, const ::rtl::OUString& rDockingWindowName, bool bVisible )
+void impl_setDockingWindowVisibility( const css::uno::Reference< css::uno::XComponentContext>& rxContext, const css::uno::Reference< css::frame::XFrame >& rFrame, const ::rtl::OUString& rDockingWindowName, bool bVisible )
{
const ::rtl::OUString aDockWinPrefixCommand( RTL_CONSTASCII_USTRINGPARAM( "DockingWindow" ));
- css::uno::WeakReference< css::frame::XDispatchHelper > xDispatchHelper;
sal_Int32 nID = rDockingWindowName.toInt32();
sal_Int32 nIndex = nID - DOCKWIN_ID_BASE;
@@ -328,12 +327,7 @@ void impl_setDockingWindowVisibility( const css::uno::Reference< css::lang::XMul
aArgs[0].Name = aDockWinArgName;
aArgs[0].Value = css::uno::makeAny( bVisible );
- css::uno::Reference< css::frame::XDispatchHelper > xDispatcher( xDispatchHelper );
- if ( !xDispatcher.is())
- {
- xDispatcher = css::uno::Reference< css::frame::XDispatchHelper >(
- rSMGR->createInstance(SERVICENAME_DISPATCHHELPER), css::uno::UNO_QUERY_THROW);
- }
+ css::uno::Reference< css::frame::XDispatchHelper > xDispatcher = css::frame::DispatchHelper::create( rxContext );
aDockWinCommand = aDockWinCommand + aDockWinArgName;
xDispatcher->executeDispatch(
diff --git a/framework/source/layoutmanager/helpers.hxx b/framework/source/layoutmanager/helpers.hxx
index dbe1cd0..e2e667c 100644
--- a/framework/source/layoutmanager/helpers.hxx
+++ b/framework/source/layoutmanager/helpers.hxx
@@ -77,7 +77,7 @@ void parseResourceURL( const rtl::OUString& aResourceURL, rtl::OUString& aElemen
::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > impl_getModelFromFrame( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame );
sal_Bool implts_isPreviewModel( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel );
sal_Bool implts_isFrameOrWindowTop( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame );
-void impl_setDockingWindowVisibility( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& rSMGR, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& rDockingWindowName, bool bVisible );
+void impl_setDockingWindowVisibility( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& rxContext, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& rDockingWindowName, bool bVisible );
void impl_addWindowListeners( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xThis, const ::com::sun::star::uno::Reference< css::ui::XUIElement >& xUIElement );
::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > implts_createToolkitWindow( const css::uno::Reference< ::com::sun::star::awt::XToolkit2 >& rToolkit, const css::uno::Reference< ::com::sun::star::awt::XWindowPeer >& rParent );
diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx
index 9bb9692..37e08e6 100644
--- a/framework/source/layoutmanager/layoutmanager.cxx
+++ b/framework/source/layoutmanager/layoutmanager.cxx
@@ -63,7 +63,7 @@
#include <com/sun/star/container/XNameContainer.hpp>
#include <com/sun/star/frame/LayoutManagerEvents.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
-#include <com/sun/star/frame/XDispatchHelper.hpp>
+#include <com/sun/star/frame/DispatchHelper.hpp>
#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/util/URLTransformer.hpp>
@@ -1639,7 +1639,7 @@ throw (RuntimeException)
uno::Reference< lang::XMultiServiceFactory > xSMGR( m_xSMGR );
aWriteLock.unlock();
- impl_setDockingWindowVisibility( xSMGR, xFrame, aElementName, false );
+ impl_setDockingWindowVisibility( comphelper::getComponentContext(xSMGR), xFrame, aElementName, false );
bMustBeLayouted = false;
bNotify = false;
}
@@ -1860,7 +1860,7 @@ throw (RuntimeException)
uno::Reference< lang::XMultiServiceFactory > xSMGR( m_xSMGR );
aReadGuard.unlock();
- impl_setDockingWindowVisibility( xSMGR, xFrame, aElementName, true );
+ impl_setDockingWindowVisibility( comphelper::getComponentContext(xSMGR), xFrame, aElementName, true );
}
else if ( aElementType.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("toolpanel")))
{
@@ -1950,7 +1950,7 @@ throw (RuntimeException)
uno::Reference< lang::XMultiServiceFactory > xSMGR( m_xSMGR );
aReadGuard.unlock();
- impl_setDockingWindowVisibility( xSMGR, xFrame, aElementName, false );
+ impl_setDockingWindowVisibility( comphelper::getComponentContext(xSMGR), xFrame, aElementName, false );
}
if ( bMustLayout )
@@ -2670,8 +2670,7 @@ IMPL_LINK_NOARG(LayoutManager, MenuBarClose)
if ( !xProvider.is())
return 0;
- uno::Reference< frame::XDispatchHelper > xDispatcher(
- xSMGR->createInstance(SERVICENAME_DISPATCHHELPER), uno::UNO_QUERY_THROW);
+ uno::Reference< frame::XDispatchHelper > xDispatcher = frame::DispatchHelper::create( comphelper::getComponentContext( xSMGR ) );
xDispatcher->executeDispatch(
xProvider,
diff --git a/framework/source/services/dispatchhelper.cxx b/framework/source/services/dispatchhelper.cxx
index e3b264e..52e18fc 100644
--- a/framework/source/services/dispatchhelper.cxx
+++ b/framework/source/services/dispatchhelper.cxx
@@ -44,7 +44,7 @@ namespace framework{
DEFINE_XSERVICEINFO_MULTISERVICE(DispatchHelper ,
::cppu::OWeakObject ,
- SERVICENAME_DISPATCHHELPER ,
+ DECLARE_ASCII("com.sun.star.frame.DispatchHelper"),
IMPLEMENTATIONNAME_DISPATCHHELPER)
DEFINE_INIT_SERVICE( DispatchHelper, {} )
commit 900dc2b70dc020fc077c300963a0746118820f06
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Wed Oct 24 17:05:19 2012 +0200
Related fdo#46808: Improve previous commit slightly
Change-Id: If633be759ab2aa4f42548f02a58fedb858783551
diff --git a/framework/source/services/substitutepathvars.cxx b/framework/source/services/substitutepathvars.cxx
index 4d9134b..68178a5 100644
--- a/framework/source/services/substitutepathvars.cxx
+++ b/framework/source/services/substitutepathvars.cxx
@@ -570,7 +570,7 @@ void SubstitutePathVariables_Impl::ReadSharePointRuleSetFromConfiguration(
//*****************************************************************************************************************
DEFINE_XSERVICEINFO_ONEINSTANCESERVICE ( SubstitutePathVariables ,
::cppu::OWeakObject ,
- DECLARE_ASCII("com.sun.star.util.PathSubstitution"),
+ "com.sun.star.util.PathSubstitution",
IMPLEMENTATIONNAME_SUBSTITUTEPATHVARIABLES )
DEFINE_INIT_SERVICE ( SubstitutePathVariables, {} )
commit 3bf3b01dfcea0316ca6bd2ae7a2887b138235462
Author: Noel Grandin <noel at peralex.com>
Date: Wed Oct 17 14:09:28 2012 +0200
inline a #define that it only used in one cxx file
diff --git a/framework/inc/services.h b/framework/inc/services.h
index a9e93d3..8610063 100644
--- a/framework/inc/services.h
+++ b/framework/inc/services.h
@@ -56,7 +56,6 @@ namespace framework{
#define SERVICENAME_DISPATCHRECORDERSUPPLIER DECLARE_ASCII("com.sun.star.frame.DispatchRecorderSupplier" )
#define SERVICENAME_DISPATCHRECORDER DECLARE_ASCII("com.sun.star.frame.DispatchRecorder" )
#define SERVICENAME_PROTOCOLHANDLER DECLARE_ASCII("com.sun.star.frame.ProtocolHandler" )
-#define SERVICENAME_SUBSTITUTEPATHVARIABLES DECLARE_ASCII("com.sun.star.util.PathSubstitution" )
#define SERVICENAME_PATHSETTINGS DECLARE_ASCII("com.sun.star.util.PathSettings" )
#define SERVICENAME_DISPATCHHELPER DECLARE_ASCII("com.sun.star.frame.DispatchHelper" )
#define SERVICENAME_DETECTORFACTORY DECLARE_ASCII("com.sun.star.document.ExtendedTypeDetectionFactory" )
diff --git a/framework/source/services/substitutepathvars.cxx b/framework/source/services/substitutepathvars.cxx
index 23d7b77..4d9134b 100644
--- a/framework/source/services/substitutepathvars.cxx
+++ b/framework/source/services/substitutepathvars.cxx
@@ -570,7 +570,7 @@ void SubstitutePathVariables_Impl::ReadSharePointRuleSetFromConfiguration(
//*****************************************************************************************************************
DEFINE_XSERVICEINFO_ONEINSTANCESERVICE ( SubstitutePathVariables ,
::cppu::OWeakObject ,
- SERVICENAME_SUBSTITUTEPATHVARIABLES ,
+ DECLARE_ASCII("com.sun.star.util.PathSubstitution"),
IMPLEMENTATIONNAME_SUBSTITUTEPATHVARIABLES )
DEFINE_INIT_SERVICE ( SubstitutePathVariables, {} )
commit 488090754938cbb1e5cf24dd4a585a4a605956f0
Author: Noel Grandin <noel at peralex.com>
Date: Wed Oct 17 14:03:44 2012 +0200
remove unused #define
diff --git a/framework/inc/services.h b/framework/inc/services.h
index 1796336..a9e93d3 100644
--- a/framework/inc/services.h
+++ b/framework/inc/services.h
@@ -78,7 +78,6 @@ namespace framework{
#define SERVICENAME_DOCUMENTACCELERATORCONFIGURATION DECLARE_ASCII("com.sun.star.ui.DocumentAcceleratorConfiguration")
#define SERVICENAME_STORAGEFACTORY DECLARE_ASCII("com.sun.star.embed.StorageFactory" )
#define SERVICENAME_FILESYSTEMSTORAGEFACTORY DECLARE_ASCII("com.sun.star.embed.FileSystemStorageFactory" )
-#define SERVICENAME_TEMPFILE DECLARE_ASCII("com.sun.star.io.TempFile" )
#define SERVICENAME_PACKAGESTRUCTURECREATOR DECLARE_ASCII("com.sun.star.embed.PackageStructureCreator" )
#define SERVICENAME_TOOLBARFACTORY DECLARE_ASCII("com.sun.star.ui.ToolBarFactory" )
#define SERVICENAME_TOOLBARCONTROLLERFACTORY DECLARE_ASCII("com.sun.star.frame.ToolBarControllerFactory" )
commit d26f3acf2874f64fd89c8197163651443d4b1733
Author: Noel Grandin <noel at peralex.com>
Date: Wed Oct 17 13:54:31 2012 +0200
fdo#46808, use service constructor for system::SystemShellExecute
diff --git a/extensions/source/update/check/updatecheck.cxx b/extensions/source/update/check/updatecheck.cxx
index c6fb071..fcd2d82 100644
--- a/extensions/source/update/check/updatecheck.cxx
+++ b/extensions/source/update/check/updatecheck.cxx
@@ -913,9 +913,7 @@ UpdateCheck::install()
{
osl::MutexGuard aGuard(m_aMutex);
- const uno::Reference< c3s::XSystemShellExecute > xShellExecute(
- createService( UNISTRING( "com.sun.star.system.SystemShellExecute" ), m_xContext ),
- uno::UNO_QUERY );
+ const uno::Reference< c3s::XSystemShellExecute > xShellExecute = c3s::SystemShellExecute::create( m_xContext );
try {
// Construct install command ??
@@ -927,29 +925,26 @@ UpdateCheck::install()
aURL = getReleaseNote(m_aUpdateInfo, 4);
storeReleaseNote(2, aURL);
- if( xShellExecute.is() )
- {
- rtl::OUString aInstallImage(m_aImageName);
- osl::FileBase::getSystemPathFromFileURL(aInstallImage, aInstallImage);
+ rtl::OUString aInstallImage(m_aImageName);
+ osl::FileBase::getSystemPathFromFileURL(aInstallImage, aInstallImage);
- rtl::OUString aParameter;
- sal_Int32 nFlags = c3s::SystemShellExecuteFlags::DEFAULTS;
+ rtl::OUString aParameter;
+ sal_Int32 nFlags = c3s::SystemShellExecuteFlags::DEFAULTS;
#if ( defined LINUX || defined SOLARIS )
- nFlags = 42;
- aParameter = getBaseInstallation();
- if( !aParameter.isEmpty() )
- osl::FileBase::getSystemPathFromFileURL(aParameter, aParameter);
+ nFlags = 42;
+ aParameter = getBaseInstallation();
+ if( !aParameter.isEmpty() )
+ osl::FileBase::getSystemPathFromFileURL(aParameter, aParameter);
- aParameter += UNISTRING(" &");
+ aParameter += UNISTRING(" &");
#endif
- rtl::Reference< UpdateCheckConfig > rModel = UpdateCheckConfig::get( m_xContext );
- rModel->clearLocalFileName();
+ rtl::Reference< UpdateCheckConfig > rModel = UpdateCheckConfig::get( m_xContext );
+ rModel->clearLocalFileName();
- xShellExecute->execute(aInstallImage, aParameter, nFlags);
- ShutdownThread *pShutdownThread = new ShutdownThread( m_xContext );
- (void) pShutdownThread;
- }
+ xShellExecute->execute(aInstallImage, aParameter, nFlags);
+ ShutdownThread *pShutdownThread = new ShutdownThread( m_xContext );
+ (void) pShutdownThread;
} catch(const uno::Exception&) {
m_aUpdateHandler->setErrorMessage( m_aUpdateHandler->getDefaultInstErrMsg() );
}
diff --git a/framework/inc/dispatch/mailtodispatcher.hxx b/framework/inc/dispatch/mailtodispatcher.hxx
index 91acd5b..72ad639 100644
--- a/framework/inc/dispatch/mailtodispatcher.hxx
+++ b/framework/inc/dispatch/mailtodispatcher.hxx
@@ -76,14 +76,14 @@ class MailToDispatcher : // interfaces
private:
/// reference to global uno service manager which had created us
- css::uno::Reference< css::lang::XMultiServiceFactory > m_xFactory;
+ css::uno::Reference< css::uno::XComponentContext > m_xContext;
/* interface */
public:
// ctor/dtor
- MailToDispatcher( const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory );
- virtual ~MailToDispatcher( );
+ MailToDispatcher( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
+ virtual ~MailToDispatcher( );
// XInterface, XTypeProvider, XServiceInfo
FWK_DECLARE_XINTERFACE
diff --git a/framework/inc/dispatch/systemexec.hxx b/framework/inc/dispatch/systemexec.hxx
index 3469e42..c0e2b64 100644
--- a/framework/inc/dispatch/systemexec.hxx
+++ b/framework/inc/dispatch/systemexec.hxx
@@ -78,13 +78,13 @@ class SystemExec : // interfaces
private:
/// reference to global uno service manager which had created us
- css::uno::Reference< css::lang::XMultiServiceFactory > m_xFactory;
+ css::uno::Reference< css::uno::XComponentContext > m_xContext;
/* interface */
public:
// ctor/dtor
- SystemExec( const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory );
+ SystemExec( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
virtual ~SystemExec( );
// XInterface, XTypeProvider, XServiceInfo
diff --git a/framework/inc/services.h b/framework/inc/services.h
index 6af3d9a..1796336 100644
--- a/framework/inc/services.h
+++ b/framework/inc/services.h
@@ -55,7 +55,6 @@ namespace framework{
#define SERVICENAME_JOB DECLARE_ASCII("com.sun.star.task.Job" )
#define SERVICENAME_DISPATCHRECORDERSUPPLIER DECLARE_ASCII("com.sun.star.frame.DispatchRecorderSupplier" )
#define SERVICENAME_DISPATCHRECORDER DECLARE_ASCII("com.sun.star.frame.DispatchRecorder" )
-#define SERVICENAME_SYSTEMSHELLEXECUTE DECLARE_ASCII("com.sun.star.system.SystemShellExecute" )
#define SERVICENAME_PROTOCOLHANDLER DECLARE_ASCII("com.sun.star.frame.ProtocolHandler" )
#define SERVICENAME_SUBSTITUTEPATHVARIABLES DECLARE_ASCII("com.sun.star.util.PathSubstitution" )
#define SERVICENAME_PATHSETTINGS DECLARE_ASCII("com.sun.star.util.PathSettings" )
diff --git a/framework/source/dispatch/mailtodispatcher.cxx b/framework/source/dispatch/mailtodispatcher.cxx
index 903e33c..6555f3a 100644
--- a/framework/source/dispatch/mailtodispatcher.cxx
+++ b/framework/source/dispatch/mailtodispatcher.cxx
@@ -31,7 +31,7 @@
#include <general.h>
#include <services.h>
-#include <com/sun/star/system/XSystemShellExecute.hpp>
+#include <com/sun/star/system/SystemShellExecute.hpp>
#include <com/sun/star/system/SystemShellExecuteFlags.hpp>
#include <com/sun/star/frame/DispatchResultState.hpp>
@@ -60,7 +60,7 @@ DEFINE_XTYPEPROVIDER_5(MailToDispatcher ,
css::frame::XNotifyingDispatch,
css::frame::XDispatch )
-DEFINE_XSERVICEINFO_MULTISERVICE(MailToDispatcher ,
+DEFINE_XSERVICEINFO_MULTISERVICE_2(MailToDispatcher ,
::cppu::OWeakObject ,
SERVICENAME_PROTOCOLHANDLER ,
IMPLEMENTATIONNAME_MAILTODISPATCHER)
@@ -81,15 +81,15 @@ DEFINE_INIT_SERVICE(MailToDispatcher,
@short standard ctor
@descr These initialize a new instance of ths class with needed informations for work.
- @param xFactory
+ @param rxContext
reference to uno servicemanager for creation of new services
*/
-MailToDispatcher::MailToDispatcher( const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory )
+MailToDispatcher::MailToDispatcher( const css::uno::Reference< css::uno::XComponentContext >& rxContext )
// Init baseclasses first
: ThreadHelpBase( &Application::GetSolarMutex() )
, OWeakObject ( )
// Init member
- , m_xFactory ( xFactory )
+ , m_xContext ( rxContext )
{
}
@@ -101,7 +101,7 @@ MailToDispatcher::MailToDispatcher( const css::uno::Reference< css::lang::XMulti
*/
MailToDispatcher::~MailToDispatcher()
{
- m_xFactory = NULL;
+ m_xContext = NULL;
}
//_________________________________________________________________________________________________________________
@@ -228,29 +228,27 @@ sal_Bool MailToDispatcher::implts_dispatch( const css::util::URL&
{
sal_Bool bSuccess = sal_False;
- css::uno::Reference< css::lang::XMultiServiceFactory > xFactory;
+ css::uno::Reference< css::uno::XComponentContext > xContext;
/* SAFE */{
ReadGuard aReadLock( m_aLock );
- xFactory = m_xFactory;
+ xContext = m_xContext;
/* SAFE */}
- css::uno::Reference< css::system::XSystemShellExecute > xSystemShellExecute( xFactory->createInstance(SERVICENAME_SYSTEMSHELLEXECUTE), css::uno::UNO_QUERY );
- if (xSystemShellExecute.is())
+ css::uno::Reference< css::system::XSystemShellExecute > xSystemShellExecute = css::system::SystemShellExecute::create( xContext );
+
+ try
+ {
+ // start mail client
+ // Because there is no notofocation about success - we use case of
+ // no detected exception as SUCCESS - FAILED otherwhise.
+ xSystemShellExecute->execute( aURL.Complete, ::rtl::OUString(), css::system::SystemShellExecuteFlags::URIS_ONLY );
+ bSuccess = sal_True;
+ }
+ catch (const css::lang::IllegalArgumentException&)
+ {
+ }
+ catch (const css::system::SystemShellExecuteException&)
{
- try
- {
- // start mail client
- // Because there is no notofocation about success - we use case of
- // no detected exception as SUCCESS - FAILED otherwhise.
- xSystemShellExecute->execute( aURL.Complete, ::rtl::OUString(), css::system::SystemShellExecuteFlags::URIS_ONLY );
- bSuccess = sal_True;
- }
- catch (const css::lang::IllegalArgumentException&)
- {
- }
- catch (const css::system::SystemShellExecuteException&)
- {
- }
}
return bSuccess;
diff --git a/framework/source/dispatch/systemexec.cxx b/framework/source/dispatch/systemexec.cxx
index 4d67609..1934552 100644
--- a/framework/source/dispatch/systemexec.cxx
+++ b/framework/source/dispatch/systemexec.cxx
@@ -31,7 +31,7 @@
#include <general.h>
#include <services.h>
-#include <com/sun/star/system/XSystemShellExecute.hpp>
+#include <com/sun/star/system/SystemShellExecute.hpp>
#include <com/sun/star/util/PathSubstitution.hpp>
#include <com/sun/star/util/XStringSubstitution.hpp>
#include <com/sun/star/system/SystemShellExecuteFlags.hpp>
@@ -63,7 +63,7 @@ DEFINE_XTYPEPROVIDER_5(SystemExec ,
css::frame::XNotifyingDispatch,
css::frame::XDispatch )
-DEFINE_XSERVICEINFO_MULTISERVICE(SystemExec ,
+DEFINE_XSERVICEINFO_MULTISERVICE_2(SystemExec ,
::cppu::OWeakObject ,
SERVICENAME_PROTOCOLHANDLER ,
IMPLEMENTATIONNAME_SYSTEMEXEC)
@@ -80,12 +80,12 @@ DEFINE_INIT_SERVICE(SystemExec,
//_________________________________________________________________________________________________________________
-SystemExec::SystemExec( const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory )
+SystemExec::SystemExec( const css::uno::Reference< css::uno::XComponentContext >& rxContext )
// Init baseclasses first
: ThreadHelpBase( &Application::GetSolarMutex() )
, OWeakObject ( )
// Init member
- , m_xFactory ( xFactory )
+ , m_xContext ( rxContext )
{
}
@@ -93,7 +93,7 @@ SystemExec::SystemExec( const css::uno::Reference< css::lang::XMultiServiceFacto
SystemExec::~SystemExec()
{
- m_xFactory = NULL;
+ m_xContext = NULL;
}
//_________________________________________________________________________________________________________________
@@ -149,7 +149,7 @@ void SAL_CALL SystemExec::dispatchWithNotification( const css::util::URL&
// SAFE ->
ReadGuard aReadLock(m_aLock);
- css::uno::Reference< css::lang::XMultiServiceFactory > xFactory = m_xFactory;
+ css::uno::Reference< css::uno::XComponentContext > xContext = m_xContext;
aReadLock.unlock();
// <- SAFE
@@ -157,14 +157,11 @@ void SAL_CALL SystemExec::dispatchWithNotification( const css::util::URL&
try
{
- css::uno::Reference< css::uno::XComponentContext > xContext( comphelper::getComponentContext(xFactory) );
css::uno::Reference< css::util::XStringSubstitution > xPathSubst( css::util::PathSubstitution::create(xContext) );
::rtl::OUString sSystemURL = xPathSubst->substituteVariables(sSystemURLWithVariables, sal_True); // sal_True force an exception if unknown variables exists !
- css::uno::Reference< css::system::XSystemShellExecute > xShell(
- xFactory->createInstance(SERVICENAME_SYSTEMSHELLEXECUTE),
- css::uno::UNO_QUERY_THROW);
+ css::uno::Reference< css::system::XSystemShellExecute > xShell = css::system::SystemShellExecute::create( xContext );
xShell->execute(sSystemURL, ::rtl::OUString(), css::system::SystemShellExecuteFlags::URIS_ONLY);
impl_notifyResultListener(xListener, css::frame::DispatchResultState::SUCCESS);
More information about the Libreoffice-commits
mailing list