summaryrefslogtreecommitdiff
path: root/comphelper/inc
diff options
context:
space:
mode:
authorDaniel Rentz [dr] <daniel.rentz@oracle.com>2010-11-09 15:15:30 +0100
committerDaniel Rentz [dr] <daniel.rentz@oracle.com>2010-11-09 15:15:30 +0100
commit376a1fd0f4f538f3fa3591b66201b59834d9f278 (patch)
tree665653b2ab47ab118a631b3e93c2658ca76b9cc8 /comphelper/inc
parent45a0ee3dc399b280e117fa61bdce0a4c56eba2fa (diff)
parent95f71183414a50d12cd4bbacf47d711672e63268 (diff)
dr77: rebase to DEV300m92
Diffstat (limited to 'comphelper/inc')
-rw-r--r--comphelper/inc/comphelper/componentmodule.hxx29
-rw-r--r--[-rwxr-xr-x]comphelper/inc/comphelper/docpasswordrequest.hxx54
-rw-r--r--comphelper/inc/comphelper/servicedecl.hxx27
3 files changed, 41 insertions, 69 deletions
diff --git a/comphelper/inc/comphelper/componentmodule.hxx b/comphelper/inc/comphelper/componentmodule.hxx
index 660a685d0fd3..61ddddebadbf 100644
--- a/comphelper/inc/comphelper/componentmodule.hxx
+++ b/comphelper/inc/comphelper/componentmodule.hxx
@@ -34,7 +34,6 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <com/sun/star/uno/Sequence.hxx>
-#include <com/sun/star/registry/XRegistryKey.hpp>
/** === end UNO includes === **/
#include <cppuhelper/factory.hxx>
@@ -140,28 +139,6 @@ namespace comphelper
*/
void registerImplementation( const ComponentDescription& _rComp );
- /** write the registration information of all known components
-
- Writes the registration information of all components which are currently registered into the
- specified registry.
-
- Usually used from within component_writeInfo.
-
- @param_rxServiceManager
- the service manager
- @param _rRootKey
- the registry key under which the information will be stored
- @return
- <TRUE/> if the registration of all implementations was successfull, <FALSE/> otherwise
- */
- sal_Bool writeComponentInfos(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxServiceManager,
- const ::com::sun::star::uno::Reference< ::com::sun::star::registry::XRegistryKey >& _rRootKey);
-
- /** version of writeComponentInfos which directly takes the arguments you got in your component_writeInfo call
- */
- sal_Bool writeComponentInfos( void* pServiceManager, void* pRegistryKey );
-
/** creates a Factory for the component with the given implementation name.
<p>Usually used from within component_getFactory.<p/>
@param _rxServiceManager
@@ -420,12 +397,6 @@ namespace comphelper
{ \
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; \
} \
- extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( \
- void* pServiceManager, void* pRegistryKey ) \
- { \
- initializer_function(); \
- return module_class::getInstance().writeComponentInfos( pServiceManager, pRegistryKey ); \
- } \
extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( \
const sal_Char* pImplementationName, void* pServiceManager, void* pRegistryKey ) \
{ \
diff --git a/comphelper/inc/comphelper/docpasswordrequest.hxx b/comphelper/inc/comphelper/docpasswordrequest.hxx
index cf04d22c7a6d..effc47392078 100755..100644
--- a/comphelper/inc/comphelper/docpasswordrequest.hxx
+++ b/comphelper/inc/comphelper/docpasswordrequest.hxx
@@ -34,8 +34,12 @@
#include <cppuhelper/implbase1.hxx>
#include <cppuhelper/weak.hxx>
+
namespace comphelper {
+class AbortContinuation;
+class PasswordContinuation;
+
// ============================================================================
/** Selects which UNO document password request type to use. */
@@ -47,8 +51,37 @@ enum DocPasswordRequestType
// ============================================================================
-class AbortContinuation;
-class PasswordContinuation;
+class COMPHELPER_DLLPUBLIC SimplePasswordRequest :
+ public ::com::sun::star::task::XInteractionRequest,
+ public ::cppu::OWeakObject
+{
+public:
+ explicit SimplePasswordRequest( com::sun::star::task::PasswordRequestMode eMode );
+ virtual ~SimplePasswordRequest();
+
+ // XInterface / OWeakObject
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL acquire( ) throw ();
+ virtual void SAL_CALL release( ) throw ();
+
+ sal_Bool isAbort() const;
+ sal_Bool isPassword() const;
+
+ ::rtl::OUString getPassword() const;
+
+private:
+ // XInteractionRequest
+ virtual ::com::sun::star::uno::Any SAL_CALL getRequest() throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > SAL_CALL getContinuations() throw( ::com::sun::star::uno::RuntimeException );
+
+private:
+ ::com::sun::star::uno::Any maRequest;
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > maContinuations;
+ AbortContinuation * mpAbort;
+ PasswordContinuation * mpPassword;
+};
+
+// ============================================================================
/** Implements the task.XInteractionRequest interface for requesting a password
string for a document.
@@ -79,20 +112,15 @@ public:
sal_Bool getRecommendReadOnly() const;
private:
- virtual ::com::sun::star::uno::Any SAL_CALL
- getRequest() throw( ::com::sun::star::uno::RuntimeException );
-
- virtual ::com::sun::star::uno::Sequence<
- ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > SAL_CALL
- getContinuations() throw( ::com::sun::star::uno::RuntimeException );
+ // XInteractionRequest
+ virtual ::com::sun::star::uno::Any SAL_CALL getRequest() throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > SAL_CALL getContinuations() throw( ::com::sun::star::uno::RuntimeException );
private:
- ::com::sun::star::uno::Any maRequest;
+ ::com::sun::star::uno::Any maRequest;
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > maContinuations;
- AbortContinuation* mpAbort;
- PasswordContinuation* mpPassword;
-
- sal_Bool mbPasswordToModify;
+ AbortContinuation * mpAbort;
+ PasswordContinuation * mpPassword;
};
// ============================================================================
diff --git a/comphelper/inc/comphelper/servicedecl.hxx b/comphelper/inc/comphelper/servicedecl.hxx
index 5d11d41831f5..adf120b3bae2 100644
--- a/comphelper/inc/comphelper/servicedecl.hxx
+++ b/comphelper/inc/comphelper/servicedecl.hxx
@@ -134,8 +134,6 @@ public:
m_pServiceNames(pSupportedServiceNames),
m_cDelim(cDelim) {}
- /// @internal gets called by component_writeInfoHelper()
- bool writeInfo( ::com::sun::star::registry::XRegistryKey * xKey ) const;
/// @internal gets called by component_getFactoryHelper()
void * getFactory( sal_Char const* pImplName ) const;
@@ -323,9 +321,6 @@ struct class_ : public serviceimpl_base< detail::ServiceImpl<ImplT_>, WithArgsT
// component_... helpers with arbitrary service declarations:
//
-#define COMPHELPER_SERVICEDECL_writeInfo(z_, n_, unused_) \
- bRet &= BOOST_PP_CAT(s, n_).writeInfo( xRegistryKey );
-
#define COMPHELPER_SERVICEDECL_getFactory(z_, n_, unused_) \
if (pRet == 0) \
pRet = BOOST_PP_CAT(s, n_).getFactory(pImplName);
@@ -333,11 +328,6 @@ struct class_ : public serviceimpl_base< detail::ServiceImpl<ImplT_>, WithArgsT
/** The following preprocessor repetitions generate functions like
<pre>
- inline sal_Bool component_writeInfoHelper(
- ::com::sun::star::lang::XMultiServiceFactory *,
- ::com::sun::star::registry::XRegistryKey * xRegistryKey,
- ServiceDecl const& s0, ServiceDecl const& s1, ... );
-
inline void * component_getFactoryHelper(
sal_Char const* pImplName,
::com::sun::star::lang::XMultiServiceFactory *,
@@ -351,15 +341,6 @@ struct class_ : public serviceimpl_base< detail::ServiceImpl<ImplT_>, WithArgsT
COMPHELPER_SERVICEDECL_COMPONENT_HELPER_MAX_ARGS; its default is 8.
*/
#define COMPHELPER_SERVICEDECL_make(z_, n_, unused_) \
-inline sal_Bool component_writeInfoHelper( \
- ::com::sun::star::lang::XMultiServiceFactory *, \
- ::com::sun::star::registry::XRegistryKey * xRegistryKey, \
- BOOST_PP_ENUM_PARAMS(n_, ServiceDecl const& s) ) \
-{ \
- bool bRet = true; \
- BOOST_PP_REPEAT(n_, COMPHELPER_SERVICEDECL_writeInfo, ~) \
- return bRet; \
-} \
inline void * component_getFactoryHelper( \
sal_Char const* pImplName, \
::com::sun::star::lang::XMultiServiceFactory *, \
@@ -381,7 +362,6 @@ BOOST_PP_REPEAT_FROM_TO(1, COMPHELPER_SERVICEDECL_COMPONENT_HELPER_MAX_ARGS,
#undef COMPHELPER_SERVICEDECL_COMPONENT_HELPER_MAX_ARGS
#undef COMPHELPER_SERVICEDECL_make
#undef COMPHELPER_SERVICEDECL_getFactory
-#undef COMPHELPER_SERVICEDECL_writeInfo
} // namespace service_decl
} // namespace comphelper
@@ -421,13 +401,6 @@ extern "C" \
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; \
} \
\
- SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( ::com::sun::star::lang::XMultiServiceFactory* pServiceManager, \
- ::com::sun::star::registry::XRegistryKey* pRegistryKey ) \
- { \
- return component_writeInfoHelper( pServiceManager, pRegistryKey, \
- BOOST_PP_SEQ_ENUM(varargs_) ); \
- } \
- \
SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( sal_Char const* pImplName, \
::com::sun::star::lang::XMultiServiceFactory* pServiceManager, \
::com::sun::star::registry::XRegistryKey* pRegistryKey ) \