diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-01-26 09:07:24 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-01-26 09:07:24 +0100 |
commit | 00424a277b5a92bd71f78103049850ae966be626 (patch) | |
tree | 2ea37be277862e0ffdfe415f14bdfbae284a6109 /ucb | |
parent | 9f5c54856fe24f5ada639f7eaff2cfbf744c8cfe (diff) |
loplugin:dynexcspec
Change-Id: I5e30befa9338bfd72e237e2bdb7c157526d32b85
Diffstat (limited to 'ucb')
-rw-r--r-- | ucb/source/ucp/webdav/DAVResourceAccess.cxx | 1 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/DAVResourceAccess.hxx | 23 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/DAVSession.hxx | 19 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/DAVSessionFactory.hxx | 1 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/SerfSession.hxx | 4 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/SerfUri.hxx | 2 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/webdavcontent.hxx | 22 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/webdavprovider.cxx | 21 |
8 files changed, 89 insertions, 4 deletions
diff --git a/ucb/source/ucp/webdav/DAVResourceAccess.cxx b/ucb/source/ucp/webdav/DAVResourceAccess.cxx index 87447f2dcf2c..9fd3a179a16f 100644 --- a/ucb/source/ucp/webdav/DAVResourceAccess.cxx +++ b/ucb/source/ucp/webdav/DAVResourceAccess.cxx @@ -546,6 +546,7 @@ void DAVResourceAccess::abort() namespace { + /// @throws DAVException void resetInputStream( const uno::Reference< io::XInputStream > & rStream ) throw( DAVException ) { diff --git a/ucb/source/ucp/webdav/DAVResourceAccess.hxx b/ucb/source/ucp/webdav/DAVResourceAccess.hxx index 52ff98106a0c..1327a0b40c68 100644 --- a/ucb/source/ucp/webdav/DAVResourceAccess.hxx +++ b/ucb/source/ucp/webdav/DAVResourceAccess.hxx @@ -61,6 +61,7 @@ public: DAVResourceAccess & operator=( const DAVResourceAccess & rOther ); + /// @throws DAVException void setURL( const OUString & rNewURL ) throw ( DAVException ); @@ -75,6 +76,7 @@ public: // allprop & named + /// @throws DAVException void PROPFIND( const Depth nDepth, const std::vector< OUString > & rPropertyNames, @@ -83,38 +85,45 @@ public: throw ( DAVException ); // propnames + /// @throws DAVException void PROPFIND( const Depth nDepth, std::vector< DAVResourceInfo > & rResInfo, const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv ) throw ( DAVException ); + /// @throws DAVException void PROPPATCH( const std::vector< ProppatchValue > & rValues, const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv ) throw ( DAVException ); + /// @throws DAVException void HEAD( const std::vector< OUString > & rHeaderNames, // empty == 'all' DAVResource & rResource, const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv ) throw ( DAVException ); + /// @throws DAVException css::uno::Reference< css::io::XInputStream > GET( const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv ) throw ( DAVException ); + /// @throws DAVException void GET( css::uno::Reference< css::io::XOutputStream > & rStream, const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv ) throw ( DAVException ); + /// @throws DAVException css::uno::Reference< css::io::XInputStream > GET( const std::vector< OUString > & rHeaderNames, // empty == 'all' DAVResource & rResource, const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv ) throw ( DAVException ); + /// @throws DAVException css::uno::Reference< css::io::XInputStream > GET( DAVRequestHeaders & rRequestHeaders, const std::vector< rtl::OUString > & rHeaderNames, // empty == 'all' @@ -122,6 +131,7 @@ public: const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv ) throw ( DAVException ); + /// @throws DAVException void GET( css::uno::Reference< css::io::XOutputStream > & rStream, const std::vector< OUString > & rHeaderNames, // empty == 'all' @@ -129,11 +139,13 @@ public: const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv ) throw ( DAVException ); + /// @throws DAVException void PUT( const css::uno::Reference< css::io::XInputStream > & rStream, const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv ) throw ( DAVException ); + /// @throws DAVException css::uno::Reference< css::io::XInputStream > POST( const OUString & rContentType, const OUString & rReferer, @@ -141,6 +153,7 @@ public: const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv ) throw ( DAVException ); + /// @throws DAVException void POST( const OUString & rContentType, const OUString & rReferer, @@ -149,10 +162,12 @@ public: const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv ) throw ( DAVException ); + /// @throws DAVException void MKCOL( const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv ) throw ( DAVException ); + /// @throws DAVException void COPY( const OUString & rSourcePath, const OUString & rDestinationURI, @@ -160,6 +175,7 @@ public: const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv ) throw ( DAVException ); + /// @throws DAVException void MOVE( const OUString & rSourcePath, const OUString & rDestinationURI, @@ -167,11 +183,13 @@ public: const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv ) throw ( DAVException ); + /// @throws DAVException void DESTROY( const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv ) throw ( DAVException ); // set new lock. + /// @throws DAVException void LOCK( css::ucb::Lock & inLock, const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv ) @@ -185,10 +203,12 @@ public: throw ( DAVException ); #endif + /// @throws DAVException void UNLOCK( const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv ) throw ( DAVException ); + /// @throws DAVException void static abort() throw ( DAVException ); @@ -203,10 +223,13 @@ public: private: const OUString & getRequestURI() const; + /// @throws DAVException bool detectRedirectCycle( const OUString& rRedirectURL ) throw ( DAVException ); + /// @throws DAVException bool handleException( DAVException & e, int errorCount ) throw ( DAVException ); + /// @throws DAVException void initialize() throw ( DAVException ); }; diff --git a/ucb/source/ucp/webdav/DAVSession.hxx b/ucb/source/ucp/webdav/DAVSession.hxx index fc6e4c18a4e8..4a28d40a8d27 100644 --- a/ucb/source/ucp/webdav/DAVSession.hxx +++ b/ucb/source/ucp/webdav/DAVSession.hxx @@ -74,6 +74,7 @@ public: */ // allprop & named + /// @throws DAVException virtual void PROPFIND( const OUString & inPath, const Depth inDepth, const std::vector< OUString > & inPropertyNames, @@ -82,33 +83,39 @@ public: throw( DAVException ) = 0; // propnames + /// @throws DAVException virtual void PROPFIND( const OUString & inPath, const Depth inDepth, std::vector< DAVResourceInfo > & ioResInfo, const DAVRequestEnvironment & rEnv ) throw( DAVException ) = 0; + /// @throws DAVException virtual void PROPPATCH( const OUString & inPath, const std::vector< ProppatchValue > & inValues, const DAVRequestEnvironment & rEnv ) throw( DAVException ) = 0; + /// @throws DAVException virtual void HEAD( const OUString & inPath, const std::vector< OUString > & inHeaderNames, DAVResource & ioResource, const DAVRequestEnvironment & rEnv ) throw( DAVException ) = 0; + /// @throws DAVException virtual css::uno::Reference< css::io::XInputStream > GET( const OUString & inPath, const DAVRequestEnvironment & rEnv ) throw( DAVException ) = 0; + /// @throws DAVException virtual void GET( const OUString & inPath, css::uno::Reference< css::io::XOutputStream >& o, const DAVRequestEnvironment & rEnv ) throw( DAVException ) = 0; + /// @throws DAVException virtual css::uno::Reference< css::io::XInputStream > GET( const OUString & inPath, const std::vector< OUString > & inHeaderNames, @@ -116,6 +123,7 @@ public: const DAVRequestEnvironment & rEnv ) throw( DAVException ) = 0; + /// @throws DAVException virtual void GET( const OUString & inPath, css::uno::Reference< css::io::XOutputStream >& o, @@ -124,11 +132,13 @@ public: const DAVRequestEnvironment & rEnv ) throw( DAVException ) = 0; + /// @throws DAVException virtual void PUT( const OUString & inPath, const css::uno::Reference< css::io::XInputStream >& s, const DAVRequestEnvironment & rEnv ) throw( DAVException ) = 0; + /// @throws DAVException virtual css::uno::Reference< css::io::XInputStream > POST( const OUString & inPath, const OUString & rContentType, @@ -137,6 +147,7 @@ public: const DAVRequestEnvironment & rEnv ) throw ( DAVException ) = 0; + /// @throws DAVException virtual void POST( const OUString & inPath, const OUString & rContentType, const OUString & rReferer, @@ -145,42 +156,50 @@ public: const DAVRequestEnvironment & rEnv ) throw ( DAVException ) = 0; + /// @throws DAVException virtual void MKCOL( const OUString & inPath, const DAVRequestEnvironment & rEnv ) throw( DAVException ) = 0; + /// @throws DAVException virtual void COPY( const OUString & inSource, const OUString & inDestination, const DAVRequestEnvironment & rEnv, bool inOverwrite = false ) throw( DAVException ) = 0; + /// @throws DAVException virtual void MOVE( const OUString & inSource, const OUString & inDestination, const DAVRequestEnvironment & rEnv, bool inOverwrite = false ) throw( DAVException ) = 0; + /// @throws DAVException virtual void DESTROY( const OUString & inPath, const DAVRequestEnvironment & rEnv ) throw( DAVException ) = 0; // set new lock. + /// @throws DAVException virtual void LOCK( const OUString & inPath, css::ucb::Lock & inLock, const DAVRequestEnvironment & rEnv ) throw ( DAVException ) = 0; // refresh existing lock. + /// @throws DAVException virtual sal_Int64 LOCK( const OUString & inPath, sal_Int64 nTimeout, const DAVRequestEnvironment & rEnv ) throw ( DAVException ) = 0; + /// @throws DAVException virtual void UNLOCK( const OUString & inPath, const DAVRequestEnvironment & rEnv ) throw ( DAVException ) = 0; + /// @throws DAVException virtual void abort() throw( DAVException ) = 0; diff --git a/ucb/source/ucp/webdav/DAVSessionFactory.hxx b/ucb/source/ucp/webdav/DAVSessionFactory.hxx index 18307fc0bf19..fb2b5338a1e0 100644 --- a/ucb/source/ucp/webdav/DAVSessionFactory.hxx +++ b/ucb/source/ucp/webdav/DAVSessionFactory.hxx @@ -49,6 +49,7 @@ class DAVSessionFactory : public salhelper::SimpleReferenceObject public: virtual ~DAVSessionFactory() override; + /// @throws DAVException rtl::Reference< DAVSession > createDAVSession( const OUString & inUri, const css::uno::Reference< css::uno::XComponentContext >& rxContext ) diff --git a/ucb/source/ucp/webdav/SerfSession.hxx b/ucb/source/ucp/webdav/SerfSession.hxx index 02b6eb3f1938..9bcc112a4d59 100644 --- a/ucb/source/ucp/webdav/SerfSession.hxx +++ b/ucb/source/ucp/webdav/SerfSession.hxx @@ -71,6 +71,7 @@ protected: virtual ~SerfSession() override; public: + /// @throws DAVException SerfSession( const rtl::Reference< DAVSessionFactory > & rSessionFactory, const OUString& inUri, const ucbhelper::InternetProxyDecider & rProxyDecider ) @@ -246,12 +247,15 @@ public: private: friend class SerfLockStore; + /// @throws DAVException void Init() throw ( DAVException ); + /// @throws DAVException void Init( const DAVRequestEnvironment & rEnv ) throw ( DAVException ); + /// @throws DAVException void HandleError( std::shared_ptr<SerfRequestProcessor> rReqProc ) throw ( DAVException ); diff --git a/ucb/source/ucp/webdav/SerfUri.hxx b/ucb/source/ucp/webdav/SerfUri.hxx index b7a145405a39..31361582c253 100644 --- a/ucb/source/ucp/webdav/SerfUri.hxx +++ b/ucb/source/ucp/webdav/SerfUri.hxx @@ -50,7 +50,9 @@ class SerfUri void calculateURI (); public: + /// @throws DAVException explicit SerfUri( const OUString & inUri ) throw ( DAVException ); + /// @throws DAVException explicit SerfUri( const apr_uri_t * inUri ) throw ( DAVException ); ~SerfUri( ); diff --git a/ucb/source/ucp/webdav/webdavcontent.hxx b/ucb/source/ucp/webdav/webdavcontent.hxx index 75e47cf2a6c3..57341fcab0ea 100644 --- a/ucb/source/ucp/webdav/webdavcontent.hxx +++ b/ucb/source/ucp/webdav/webdavcontent.hxx @@ -90,14 +90,17 @@ private: getCommands( const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv ) override; virtual OUString getParentURL() override; + /// @throws css::uno::Exception bool isFolder( const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv ) throw ( css::uno::Exception ); + /// @throws css::uno::Exception css::uno::Reference< css::sdbc::XRow > getPropertyValues( const css::uno::Sequence< css::beans::Property >& rProperties, const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv ) throw ( css::uno::Exception ); + /// @throws css::uno::Exception css::uno::Sequence< css::uno::Any > setPropertyValues( const css::uno::Sequence< css::beans::PropertyValue >& rValues, const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv ) @@ -113,10 +116,12 @@ private: const OUString getBaseURI( const std::unique_ptr< DAVResourceAccess > & rResAccess ); + /// @throws css::uno::Exception ResourceType getResourceType( const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv ) throw ( css::uno::Exception ); + /// @throws css::uno::Exception ResourceType getResourceType( const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv, const std::unique_ptr< DAVResourceAccess > & rResAccess, @@ -124,6 +129,7 @@ private: throw ( css::uno::Exception ); // Command "open" + /// @throws css::uno::Exception css::uno::Any open( const css::ucb::OpenCommandArgument2 & rArg, const css::uno::Reference< @@ -131,35 +137,42 @@ private: throw( css::uno::Exception ); // Command "post" + /// @throws css::uno::Exception void post( const css::ucb::PostCommandArgument2 & rArg, const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv ) throw( css::uno::Exception ); // Command "insert" + /// @throws css::uno::Exception void insert( const css::uno::Reference< css::io::XInputStream > & xInputStream, bool bReplaceExisting, const css::uno::Reference< css::ucb::XCommandEnvironment >& Environment ) throw( css::uno::Exception ); // Command "transfer" + /// @throws css::uno::Exception void transfer( const css::ucb::TransferInfo & rArgs, const css::uno::Reference< css::ucb::XCommandEnvironment >& Environment ) throw( css::uno::Exception ); // Command "delete" + /// @throws css::uno::Exception void destroy( bool bDeletePhysical ) throw( css::uno::Exception ); // Command "lock" + /// @throws css::uno::Exception void lock( const css::uno::Reference< css::ucb::XCommandEnvironment >& Environment ) throw( css::uno::Exception ); // Command "unlock" + /// @throws css::uno::Exception void unlock( const css::uno::Reference< css::ucb::XCommandEnvironment >& Environment ) throw( css::uno::Exception ); css::uno::Any MapDAVException( const DAVException & e, bool bWrite ); + /// @throws css::uno::Exception void cancelCommandExecution( const DAVException & e, const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv, @@ -172,6 +185,10 @@ private: const css::uno::Reference< css::ucb::XCommandEnvironment >& Environment ); // XPropertyContainer replacement + /// @throws css::beans::PropertyExistException + /// @throws css::beans::IllegalTypeException + /// @throws css::lang::IllegalArgumentException + /// @throws css::uno::RuntimeException void addProperty( const css::ucb::PropertyCommandArgument &aCmdArg, const css::uno::Reference< css::ucb::XCommandEnvironment >& Environment ) throw( css::beans::PropertyExistException, @@ -179,17 +196,22 @@ private: css::lang::IllegalArgumentException, css::uno::RuntimeException ); + /// @throws css::beans::PropertyExistException + /// @throws css::beans::NotRemoveableException + /// @throws css::uno::RuntimeException void removeProperty( const rtl::OUString& Name, const css::uno::Reference< css::ucb::XCommandEnvironment >& Environment ) throw( css::beans::UnknownPropertyException, css::beans::NotRemoveableException, css::uno::RuntimeException ); public: + /// @throws css::ucb::ContentCreationException Content( const css::uno::Reference< css::uno::XComponentContext >& rxContext, ContentProvider* pProvider, const css::uno::Reference< css::ucb::XContentIdentifier >& Identifier, rtl::Reference< DAVSessionFactory > const & rSessionFactory ) throw ( css::ucb::ContentCreationException ); + /// @throws css::ucb::ContentCreationException Content( const css::uno::Reference< css::uno::XComponentContext >& rxContext, ContentProvider* pProvider, const css::uno::Reference< css::ucb::XContentIdentifier >& Identifier, diff --git a/ucb/source/ucp/webdav/webdavprovider.cxx b/ucb/source/ucp/webdav/webdavprovider.cxx index cbc7cc32ec32..4a76fa8f7f73 100644 --- a/ucb/source/ucp/webdav/webdavprovider.cxx +++ b/ucb/source/ucp/webdav/webdavprovider.cxx @@ -82,11 +82,24 @@ XTYPEPROVIDER_IMPL_3( ContentProvider, // XServiceInfo methods. +XSERVICEINFO_COMMOM_IMPL( ContentProvider, + OUString( "com.sun.star.comp.WebDAVContentProvider" ) ) +/// @throws css::uno::Exception +static css::uno::Reference< css::uno::XInterface > SAL_CALL +ContentProvider_CreateInstance( const css::uno::Reference< css::lang::XMultiServiceFactory> & rSMgr ) + throw( css::uno::Exception ) +{ + css::lang::XServiceInfo* pX = + static_cast<css::lang::XServiceInfo*>(new ContentProvider( ucbhelper::getComponentContext(rSMgr) )); + return css::uno::Reference< css::uno::XInterface >::query( pX ); +} -XSERVICEINFO_IMPL_1_CTX( ContentProvider, - OUString( "com.sun.star.comp.WebDAVContentProvider" ), - WEBDAV_CONTENT_PROVIDER_SERVICE_NAME ); - +css::uno::Sequence< OUString > +ContentProvider::getSupportedServiceNames_Static() +{ + css::uno::Sequence< OUString > aSNS { WEBDAV_CONTENT_PROVIDER_SERVICE_NAME }; + return aSNS; +} // Service factory implementation. |