1 #ifndef _DESKTOP_CONFIGINIT_HXX_
2 #define _DESKTOP_CONFIGINIT_HXX_
4 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
5 #include <rtl/ustring.hxx>
7 /** creates a ConfigurationProvider instance
8 Important: exceptions thrown from that method will contain a readily
12 The default configuration provider for the application or<br/>
13 <NULL/>, if startup was canceled
15 @throw com::sun::star::configuration::CannotLoadConfigurationException
16 if the configuration provider can't be created
18 @throw com::sun::star::lang::ServiceNotRegisteredException
19 if the ConfigurationProvider service is unknwon
21 @throw com::sun::star::lang::WrappedTargetException
22 if the configuration backend could be created,
23 but incurred a failure later
27 com::sun::star::uno::Reference
< com::sun::star::lang::XMultiServiceFactory
>
28 CreateApplicationConfigurationProvider( );
30 //-----------------------------------------------------------------------------
31 #include <com/sun/star/task/XInteractionHandler.hpp>
34 sets an InteractionHandler for configuration errors in the current context.
37 class ConfigurationErrorHandler
40 typedef com::sun::star::uno::Reference
< com::sun::star::task::XInteractionHandler
> InteractionHandler
;
42 /// Constructor: Uses the default interaction handler
43 ConfigurationErrorHandler()
44 : m_pContext(0), m_xHandler()
47 /// Constructor: Uses an externally provided interaction handler
48 ConfigurationErrorHandler(const InteractionHandler
& xHandler
)
49 : m_pContext(0), m_xHandler( xHandler
)
52 ~ConfigurationErrorHandler();
54 static InteractionHandler
getDefaultInteractionHandler();
56 /// installs the handler into the current context
58 /// deinstalls the handler from the current context, restoring the previous context
63 InteractionHandler m_xHandler
;
65 // not implemented - suppress copy
66 ConfigurationErrorHandler(const ConfigurationErrorHandler
&);
67 void operator=(const ConfigurationErrorHandler
&);
70 //-----------------------------------------------------------------------------