Kaydet (Commit) 8ccd11e1 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

New loplugin:dynexcspec: Add @throws documentation, xmlsecurity

Change-Id: I2447c028add359952e4bd36dbdc1d5431fe48104
üst 843e2a9d
......@@ -21,6 +21,8 @@ class SAL_NO_VTABLE SAL_DLLPUBLIC_RTTI Certificate
public:
/// Returns the SHA-256 thumbprint.
///
/// @throws css::uno::RuntimeException
virtual css::uno::Sequence<sal_Int8> getSHA256Thumbprint() throw (css::uno::RuntimeException, std::exception) = 0;
protected:
......
......@@ -306,12 +306,15 @@ public:
throw (css::uno::RuntimeException, std::exception) override;
};
/// @throws css::uno::RuntimeException
OUString SAXEventKeeperImpl_getImplementationName()
throw ( css::uno::RuntimeException );
/// @throws css::uno::RuntimeException
css::uno::Sequence< OUString > SAL_CALL SAXEventKeeperImpl_getSupportedServiceNames( )
throw ( css::uno::RuntimeException );
/// @throws css::uno::Exception
css::uno::Reference< css::uno::XInterface >
SAL_CALL SAXEventKeeperImpl_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory > & rSMgr)
throw ( css::uno::Exception );
......
......@@ -104,6 +104,8 @@ protected:
* perform the security operation.
* Any derived class will implement this method respectively.
*/
/// @throws css::uno::Exception
/// @throws css::uno::RuntimeException
virtual void tryToPerform( )
throw (css::uno::Exception, css::uno::RuntimeException){};
......@@ -121,6 +123,8 @@ protected:
* be transferred to a listener by this method.
* Any derived class will implement this method respectively.
*/
/// @throws css::uno::Exception
/// @throws css::uno::RuntimeException
virtual void notifyResultListener() const
throw (css::uno::Exception, css::uno::RuntimeException)
{};
......
......@@ -97,12 +97,15 @@ public:
throw (css::uno::RuntimeException, std::exception) override;
};
/// @throws css::uno::RuntimeException
OUString SignatureCreatorImpl_getImplementationName()
throw ( css::uno::RuntimeException );
/// @throws css::uno::RuntimeException
css::uno::Sequence< OUString > SAL_CALL SignatureCreatorImpl_getSupportedServiceNames( )
throw ( css::uno::RuntimeException );
/// @throws css::uno::Exception
css::uno::Reference< css::uno::XInterface >
SAL_CALL SignatureCreatorImpl_createInstance(
const css::uno::Reference< css::lang::XMultiServiceFactory > & rSMgr)
......
......@@ -96,6 +96,8 @@ protected:
* For a SignatureCreator, it performs signing operation;
* for a SignatureVerifier, verification operation is performed.
*/
/// @throws css::uno::Exception
/// @throws css::uno::RuntimeException
virtual void startEngine( const css::uno::Reference<
css::xml::crypto::XXMLSignatureTemplate >&)
throw (css::uno::Exception, css::uno::RuntimeException)
......
......@@ -86,12 +86,15 @@ public:
throw (css::uno::RuntimeException, std::exception) override;
};
/// @throws css::uno::RuntimeException
OUString SignatureVerifierImpl_getImplementationName()
throw ( css::uno::RuntimeException );
/// @throws css::uno::RuntimeException
css::uno::Sequence< OUString > SAL_CALL SignatureVerifierImpl_getSupportedServiceNames( )
throw ( css::uno::RuntimeException );
/// @throws css::uno::Exception
css::uno::Reference< css::uno::XInterface >
SAL_CALL SignatureVerifierImpl_createInstance(
const css::uno::Reference< css::lang::XMultiServiceFactory > & rSMgr)
......
......@@ -45,27 +45,41 @@ class SAXHelper final
void setCurrentNode(const xmlNodePtr pNode);
xmlDocPtr getDocument() { return m_pParserCtxt->myDoc;}
/// @throws css::xml::sax::SAXException
/// @throws css::uno::RuntimeException
void startDocument()
throw( css::xml::sax::SAXException , css::uno::RuntimeException ) ;
/// @throws css::xml::sax::SAXException
/// @throws css::uno::RuntimeException
void endDocument()
throw( css::xml::sax::SAXException , css::uno::RuntimeException ) ;
/// @throws css::xml::sax::SAXException
/// @throws css::uno::RuntimeException
void startElement(
const OUString& aName ,
const css::uno::Sequence<
css::xml::csax::XMLAttribute >& aAttributes )
throw( css::xml::sax::SAXException , css::uno::RuntimeException ) ;
/// @throws css::xml::sax::SAXException
/// @throws css::uno::RuntimeException
void endElement( const OUString& aName )
throw( css::xml::sax::SAXException , css::uno::RuntimeException ) ;
/// @throws css::xml::sax::SAXException
/// @throws css::uno::RuntimeException
void characters( const OUString& aChars )
throw( css::xml::sax::SAXException , css::uno::RuntimeException ) ;
/// @throws css::xml::sax::SAXException
/// @throws css::uno::RuntimeException
void ignorableWhitespace( const OUString& aWhitespaces )
throw( css::xml::sax::SAXException , css::uno::RuntimeException ) ;
/// @throws css::xml::sax::SAXException
/// @throws css::uno::RuntimeException
void processingInstruction(
const OUString& aTarget ,
const OUString& aData )
......
......@@ -89,18 +89,21 @@ private:
private:
void getNextSAXEvent();
/// @throws css::xml::sax::SAXException
static void sendStartElement(
const css::uno::Reference< css::xml::sax::XDocumentHandler >& xHandler,
const css::uno::Reference< css::xml::sax::XDocumentHandler >& xHandler2,
const xmlNodePtr pNode)
throw (css::xml::sax::SAXException);
/// @throws css::xml::sax::SAXException
static void sendEndElement(
const css::uno::Reference< css::xml::sax::XDocumentHandler >& xHandler,
const css::uno::Reference< css::xml::sax::XDocumentHandler >& xHandler2,
const xmlNodePtr pNode)
throw (css::xml::sax::SAXException);
/// @throws css::xml::sax::SAXException
static void sendNode(
const css::uno::Reference< css::xml::sax::XDocumentHandler >& xHandler,
const css::uno::Reference< css::xml::sax::XDocumentHandler >& xHandler2,
......@@ -241,13 +244,16 @@ public:
throw (css::uno::RuntimeException, std::exception) override;
};
/// @throws css::uno::RuntimeException
OUString XMLDocumentWrapper_XmlSecImpl_getImplementationName()
throw ( css::uno::RuntimeException );
/// @throws css::uno::RuntimeException
css::uno::Sequence< OUString > SAL_CALL
XMLDocumentWrapper_XmlSecImpl_getSupportedServiceNames( )
throw ( css::uno::RuntimeException );
/// @throws css::uno::Exception
css::uno::Reference< css::uno::XInterface >
SAL_CALL XMLDocumentWrapper_XmlSecImpl_createInstance(
const css::uno::Reference< css::uno::XComponentContext > &)
......
......@@ -40,7 +40,9 @@ class CertificateContainer : public ::cppu::WeakImplHelper< css::lang::XServiceI
Map certTrustMap;
static bool SAL_CALL searchMap( const OUString & url, const OUString & certificate_name, Map &_certMap );
/// @throws css::uno::RuntimeException
bool SAL_CALL isTemporaryCertificate( const OUString & url, const OUString & certificate_name ) throw(css::uno::RuntimeException);
/// @throws css::uno::RuntimeException
bool SAL_CALL isCertificateTrust( const OUString & url, const OUString & certificate_name ) throw(css::uno::RuntimeException);
public:
......@@ -52,11 +54,14 @@ class CertificateContainer : public ::cppu::WeakImplHelper< css::lang::XServiceI
virtual css::security::CertificateContainerStatus SAL_CALL hasCertificate( const OUString & url, const OUString & certificate_name ) throw(css::uno::RuntimeException, std::exception) override;
// provide factory
/// @throws css::uno::RuntimeException
static OUString SAL_CALL impl_getStaticImplementationName( ) throw(css::uno::RuntimeException);
/// @throws css::uno::RuntimeException
static css::uno::Sequence< OUString > SAL_CALL
impl_getStaticSupportedServiceNames( ) throw(css::uno::RuntimeException);
/// @throws css::uno::RuntimeException
static css::uno::Reference< css::uno::XInterface > SAL_CALL
impl_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory >& xServiceManager ) throw( css::uno::RuntimeException );
......
......@@ -54,8 +54,11 @@ private:
//Indicates if the document already contains a document signature
bool m_bHasDocumentSignature;
/// @throws css::uno::RuntimeException
bool ImplViewSignatures( const css::uno::Reference< css::embed::XStorage >& rxStorage, const css::uno::Reference< css::io::XStream >& xSignStream, DocumentSignatureMode eMode, bool bReadOnly ) throw (css::uno::RuntimeException, std::exception);
/// @throws css::uno::RuntimeException
void ImplViewSignatures( const css::uno::Reference< css::embed::XStorage >& rxStorage, const css::uno::Reference< css::io::XInputStream >& xSignStream, DocumentSignatureMode eMode, bool bReadOnly ) throw (css::uno::RuntimeException, std::exception);
/// @throws css::uno::RuntimeException
css::uno::Sequence< css::security::DocumentSignatureInformation > ImplVerifySignatures( const css::uno::Reference< css::embed::XStorage >& rxStorage, const ::com::sun::star::uno::Reference< css::io::XInputStream >& xSignStream, DocumentSignatureMode eMode ) throw (css::uno::RuntimeException);
public:
......@@ -63,7 +66,9 @@ public:
virtual ~DocumentDigitalSignatures() override;
// for service registration...
/// @throws css::uno::RuntimeException
static OUString GetImplementationName() throw (css::uno::RuntimeException);
/// @throws css::uno::RuntimeException
static css::uno::Sequence < OUString > GetSupportedServiceNames() throw (css::uno::RuntimeException);
//XInitialization
......@@ -102,6 +107,7 @@ public:
css::uno::Reference< css::security::XCertificate > SAL_CALL chooseCertificate(OUString& rDescription) throw (css::uno::RuntimeException, std::exception) override;
};
/// @throws css::uno::Exception
css::uno::Reference< css::uno::XInterface > SAL_CALL DocumentDigitalSignatures_CreateInstance(
const css::uno::Reference< css::uno::XComponentContext >& rCtx) throw ( css::uno::Exception );
......
......@@ -85,12 +85,15 @@ public:
throw (css::uno::RuntimeException, std::exception) override;
};
/// @throws css::uno::RuntimeException
OUString DecryptorImpl_getImplementationName()
throw ( css::uno::RuntimeException );
/// @throws css::uno::RuntimeException
css::uno::Sequence< OUString > SAL_CALL DecryptorImpl_getSupportedServiceNames( )
throw ( css::uno::RuntimeException );
/// @throws css::uno::Exception
css::uno::Reference< css::uno::XInterface >
SAL_CALL DecryptorImpl_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr)
throw ( css::uno::Exception );
......
......@@ -79,6 +79,8 @@ protected:
* For a Encryptor, it performs encryption operation;
* for a Decryptor, decryption operation is performed.
*/
/// @throws css::uno::Exception
/// @throws css::uno::RuntimeException
virtual void startEngine( const css::uno::Reference< css::xml::crypto::XXMLEncryptionTemplate >&)
throw (css::uno::Exception, css::uno::RuntimeException)
{};
......
......@@ -105,12 +105,15 @@ public:
throw (css::uno::RuntimeException, std::exception) override;
};
/// @throws css::uno::RuntimeException
OUString EncryptorImpl_getImplementationName()
throw ( css::uno::RuntimeException );
/// @throws css::uno::RuntimeException
css::uno::Sequence< OUString > SAL_CALL EncryptorImpl_getSupportedServiceNames( )
throw ( css::uno::RuntimeException );
/// @throws css::uno::Exception
css::uno::Reference< css::uno::XInterface >
SAL_CALL EncryptorImpl_createInstance(
const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr)
......
......@@ -82,9 +82,11 @@ class XMLEncryptionTemplateImpl : public ::cppu::WeakImplHelper<
//Helper for XServiceInfo
static css::uno::Sequence< OUString > impl_getSupportedServiceNames() ;
/// @throws css::uno::RuntimeException
static OUString impl_getImplementationName() throw( css::uno::RuntimeException ) ;
//Helper for registry
/// @throws css::uno::RuntimeException
static css::uno::Reference< css::uno::XInterface > SAL_CALL impl_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory >& aServiceManager ) throw( css::uno::RuntimeException ) ;
static css::uno::Reference< css::lang::XSingleServiceFactory > impl_createFactory( const css::uno::Reference< css::lang::XMultiServiceFactory >& aServiceManager ) ;
......
......@@ -90,9 +90,11 @@ class XMLSignatureTemplateImpl : public ::cppu::WeakImplHelper<
//Helper for XServiceInfo
static css::uno::Sequence< OUString > impl_getSupportedServiceNames() ;
/// @throws css::uno::RuntimeException
static OUString impl_getImplementationName() throw( css::uno::RuntimeException ) ;
//Helper for registry
/// @throws css::uno::RuntimeException
static css::uno::Reference< css::uno::XInterface > SAL_CALL impl_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory >& aServiceManager ) throw( css::uno::RuntimeException ) ;
static css::uno::Reference< css::lang::XSingleServiceFactory > impl_createFactory( const css::uno::Reference< css::lang::XMultiServiceFactory >& aServiceManager ) ;
......
......@@ -63,12 +63,15 @@ public:
throw (css::uno::RuntimeException, std::exception) override;
};
/// @throws css::uno::RuntimeException
OUString ONSSInitializer_getImplementationName()
throw ( css::uno::RuntimeException );
/// @throws css::uno::RuntimeException
css::uno::Sequence< OUString > SAL_CALL ONSSInitializer_getSupportedServiceNames()
throw ( css::uno::RuntimeException );
/// @throws css::uno::Exception
css::uno::Reference< css::uno::XInterface >
SAL_CALL ONSSInitializer_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory > & rSMgr )
throw ( css::uno::Exception );
......
......@@ -80,9 +80,11 @@ private:
//Helper for XServiceInfo
static css::uno::Sequence< OUString > impl_getSupportedServiceNames() ;
/// @throws css::uno::RuntimeException
static OUString impl_getImplementationName() throw( css::uno::RuntimeException ) ;
//Helper for registry
/// @throws css::uno::RuntimeException
static css::uno::Reference< css::uno::XInterface > SAL_CALL impl_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory >& aServiceManager ) throw( css::uno::RuntimeException ) ;
static css::uno::Reference< css::lang::XSingleServiceFactory > impl_createFactory( const css::uno::Reference< css::lang::XMultiServiceFactory >& aServiceManager ) ;
......@@ -105,13 +107,23 @@ private:
static const css::uno::Sequence< sal_Int8 >& getUnoTunnelId() ;
/// @throws css::uno::Exception
/// @throws css::uno::RuntimeException
void setCertDb( CERTCertDBHandle* aCertDb ) throw( css::uno::Exception , css::uno::RuntimeException ) ;
/// @throws css::uno::Exception
/// @throws css::uno::RuntimeException
void adoptSymKey( PK11SymKey* aSymKey ) throw( css::uno::Exception , css::uno::RuntimeException ) ;
/// @throws css::uno::Exception
/// @throws css::uno::RuntimeException
PK11SymKey* getSymKey( unsigned int position ) throw( css::uno::Exception , css::uno::RuntimeException ) ;
/// @throws css::uno::Exception
/// @throws css::uno::RuntimeException
SECKEYPublicKey* getPubKey( unsigned int position ) throw( css::uno::Exception , css::uno::RuntimeException ) ;
/// @throws css::uno::Exception
/// @throws css::uno::RuntimeException
SECKEYPrivateKey* getPriKey( unsigned int position ) throw( css::uno::Exception , css::uno::RuntimeException ) ;
virtual css::uno::Sequence< css::uno::Reference< css::security::XCertificate > > SAL_CALL getPersonalCertificates() throw( css::uno::SecurityException , css::uno::RuntimeException, std::exception ) override ;
......@@ -125,12 +137,17 @@ private:
//Native methods
/// @throws css::uno::RuntimeException
xmlSecKeysMngrPtr createKeysManager() throw( css::uno::Exception , css::uno::RuntimeException ) ;
/// @throws css::uno::Exception
/// @throws css::uno::RuntimeException
static void destroyKeysManager(xmlSecKeysMngrPtr pKeysMngr) throw( css::uno::Exception , css::uno::RuntimeException ) ;
private:
void updateSlots();
/// @throws css::uno::Exception
/// @throws css::uno::RuntimeException
void addCryptoSlot( PK11SlotInfo* aSlot ) throw( css::uno::Exception , css::uno::RuntimeException ) ;
} ;
......
......@@ -59,12 +59,15 @@ public:
throw (css::uno::RuntimeException, std::exception) override;
};
/// @throws css::uno::RuntimeException
OUString SEInitializer_NssImpl_getImplementationName()
throw ( css::uno::RuntimeException );
/// @throws css::uno::RuntimeException
css::uno::Sequence< OUString > SAL_CALL SEInitializer_NssImpl_getSupportedServiceNames( )
throw ( css::uno::RuntimeException );
/// @throws css::uno::Exception
css::uno::Reference< css::uno::XInterface >
SAL_CALL SEInitializer_NssImpl_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory > & rxMSF)
throw ( css::uno::Exception );
......
......@@ -91,6 +91,7 @@ class X509Certificate_NssImpl : public ::cppu::WeakImplHelper<
//Helper methods
void setCert( CERTCertificate* cert ) ;
const CERTCertificate* getNssCert() const ;
/// @throws css::uno::RuntimeException
void setRawCert( const css::uno::Sequence< sal_Int8 >& rawCert ) throw ( css::uno::RuntimeException) ;
} ;
......
......@@ -70,9 +70,11 @@ class XMLEncryption_NssImpl : public ::cppu::WeakImplHelper<
//Helper for XServiceInfo
static css::uno::Sequence< OUString > impl_getSupportedServiceNames() ;
/// @throws css::uno::RuntimeException
static OUString impl_getImplementationName() throw( css::uno::RuntimeException ) ;
//Helper for registry
/// @throws css::uno::RuntimeException
static css::uno::Reference< css::uno::XInterface > SAL_CALL impl_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory >& aServiceManager ) throw( css::uno::RuntimeException ) ;
static css::uno::Reference< css::lang::XSingleServiceFactory > impl_createFactory( const css::uno::Reference< css::lang::XMultiServiceFactory >& aServiceManager ) ;
......
......@@ -85,9 +85,11 @@ class XMLSecurityContext_NssImpl : public ::cppu::WeakImplHelper<
//Helper for XServiceInfo
static css::uno::Sequence< OUString > impl_getSupportedServiceNames() ;
/// @throws css::uno::RuntimeException
static OUString impl_getImplementationName() throw( css::uno::RuntimeException ) ;
//Helper for registry
/// @throws css::uno::RuntimeException
static css::uno::Reference< css::uno::XInterface > SAL_CALL impl_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory >& aServiceManager ) throw( css::uno::RuntimeException ) ;
static css::uno::Reference< css::lang::XSingleServiceFactory > impl_createFactory( const css::uno::Reference< css::lang::XMultiServiceFactory >& aServiceManager ) ;
......
......@@ -69,9 +69,11 @@ class XMLSignature_NssImpl : public ::cppu::WeakImplHelper<
//Helper for XServiceInfo
static css::uno::Sequence< OUString > impl_getSupportedServiceNames() ;
/// @throws css::uno::RuntimeException
static OUString impl_getImplementationName() throw( css::uno::RuntimeException ) ;
//Helper for registry
/// @throws css::uno::RuntimeException
static css::uno::Reference< css::uno::XInterface > SAL_CALL impl_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory >& aServiceManager ) throw( css::uno::RuntimeException ) ;
static css::uno::Reference< css::lang::XSingleServiceFactory > impl_createFactory( const css::uno::Reference< css::lang::XMultiServiceFactory >& aServiceManager ) ;
......
......@@ -36,8 +36,10 @@ namespace xml_security { namespace serial_number_adapter {
css::uno::Reference< css::uno::XInterface > SAL_CALL create(
css::uno::Reference< css::uno::XComponentContext > const &);
/// @throws css::uno::RuntimeException
OUString implementationName() throw (css::uno::RuntimeException);
/// @throws css::uno::RuntimeException
css::uno::Sequence< OUString > serviceNames()
throw (css::uno::RuntimeException);
......
......@@ -61,6 +61,7 @@ public:
/* css::lang::XUnoTunnel */
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier )
throw (css::uno::RuntimeException, std::exception) override;
/// @throws css::uno::RuntimeException
static css::uno::Sequence < sal_Int8 > getUnoTunnelImplementationId()
throw(css::uno::RuntimeException);
......@@ -87,12 +88,15 @@ public:
void setNativeElement(const xmlNodePtr pNode);
};
/// @throws css::uno::RuntimeException
OUString XMLElementWrapper_XmlSecImpl_getImplementationName()
throw ( css::uno::RuntimeException );
/// @throws css::uno::RuntimeException
css::uno::Sequence< OUString > SAL_CALL XMLElementWrapper_XmlSecImpl_getSupportedServiceNames( )
throw ( css::uno::RuntimeException );
/// @throws css::uno::Exception
css::uno::Reference< css::uno::XInterface >
SAL_CALL XMLElementWrapper_XmlSecImpl_createInstance(
const css::uno::Reference< css::uno::XComponentContext > &)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment