diff options
author | Kai Sommerfeld <kso@openoffice.org> | 2000-12-01 06:59:53 +0000 |
---|---|---|
committer | Kai Sommerfeld <kso@openoffice.org> | 2000-12-01 06:59:53 +0000 |
commit | 1a31eb228041d189f59ab39dfd34cdc6dd07c1da (patch) | |
tree | b8f3871f8cd2465740b601d9c36b71d20a94947b /ucbhelper | |
parent | 95efbf5e1c399e01a2cf0d1cc1400a30545a9ff9 (diff) |
#80644# - ::ucb::ContentCreationException -> ::com::sun::star::ucb::ContentCreationException
Diffstat (limited to 'ucbhelper')
-rw-r--r-- | ucbhelper/inc/ucbhelper/content.hxx | 43 | ||||
-rw-r--r-- | ucbhelper/source/client/content.cxx | 51 | ||||
-rw-r--r-- | ucbhelper/workben/ucbexplorer/ucbexplorer.cxx | 8 |
3 files changed, 52 insertions, 50 deletions
diff --git a/ucbhelper/inc/ucbhelper/content.hxx b/ucbhelper/inc/ucbhelper/content.hxx index 6c2c4092af17..aaa18e85c9cb 100644 --- a/ucbhelper/inc/ucbhelper/content.hxx +++ b/ucbhelper/inc/ucbhelper/content.hxx @@ -2,9 +2,9 @@ * * $RCSfile: content.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 17:03:36 $ + * last change: $Author: kso $ $Date: 2000-12-01 07:49:56 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -62,6 +62,9 @@ #ifndef _UCBHELPER_CONTENT_HXX #define _UCBHELPER_CONTENT_HXX +#ifndef _COM_SUN_STAR_UCB_CONTENTCREATIONEXCEPTION_HPP_ +#include <com/sun/star/ucb/ContentCreationException.hpp> +#endif #ifndef _COM_SUN_STAR_UNO_REFERENCE_HXX_ #include <com/sun/star/uno/Reference.hxx> #endif @@ -102,34 +105,6 @@ namespace ucb //========================================================================= /** - * This exception will be thrown from class ucb::Content constructors. - */ -class ContentCreationException : public ::com::sun::star::uno::Exception -{ -public: - enum Reason - { - UNKNOWN, - NO_CONTENT_BROKER, - NO_IDENTIFIER_FACTORY, - IDENTIFIER_CREATION_FAILED, - NO_CONTENT_PROVIDER, - CONTENT_CREATION_FAILED - }; - -private: - Reason m_eReason; - -public: - ContentCreationException( Reason eReason = UNKNOWN ) - : m_eReason( eReason ) {} - - const Reason getReason() const { return m_eReason; } -}; - -//========================================================================= - -/** * These are the possible values for the parameter eMode of method * ucb::Content::createCursor. */ @@ -171,7 +146,7 @@ public: Content( const rtl::OUString& rURL, const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >& rEnv ) - throw ( ContentCreationException, + throw ( ::com::sun::star::ucb::ContentCreationException, ::com::sun::star::uno::RuntimeException ); /** * Constructor. @@ -186,7 +161,7 @@ public: ::com::sun::star::ucb::XContentIdentifier >& rId, const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >& rEnv ) - throw ( ContentCreationException, + throw ( ::com::sun::star::ucb::ContentCreationException, ::com::sun::star::uno::RuntimeException ); /** * Constructor. @@ -200,7 +175,9 @@ public: Content( const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContent >& rContent, const ::com::sun::star::uno::Reference< - ::com::sun::star::ucb::XCommandEnvironment >& rEnv ); + ::com::sun::star::ucb::XCommandEnvironment >& rEnv ) + throw ( ::com::sun::star::ucb::ContentCreationException, + ::com::sun::star::uno::RuntimeException ); /** * Copy Constructor. * diff --git a/ucbhelper/source/client/content.cxx b/ucbhelper/source/client/content.cxx index 580fb519ccaa..8ecc2cd5d6b1 100644 --- a/ucbhelper/source/client/content.cxx +++ b/ucbhelper/source/client/content.cxx @@ -2,9 +2,9 @@ * * $RCSfile: content.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: kso $ $Date: 2000-11-01 08:06:56 $ + * last change: $Author: kso $ $Date: 2000-12-01 07:50:37 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -72,6 +72,9 @@ #include <vos/refernce.hxx> #endif +#ifndef _COM_SUN_STAR_UCB_CONTENTCREATIONERROR_HPP_ +#include <com/sun/star/ucb/ContentCreationError.hpp> +#endif #ifndef _COM_SUN_STAR_UCB_XCOMMANDENVIRONMENT_HPP_ #include <com/sun/star/ucb/XCommandEnvironment.hpp> #endif @@ -213,7 +216,9 @@ Content::Content( const OUString& rURL, ucb::ContentBroker* pBroker = ucb::ContentBroker::get(); if ( !pBroker ) throw ContentCreationException( - ContentCreationException::NO_CONTENT_BROKER ); + OUString::createFromAscii( "No Content Broker!" ), + Reference< XInterface >(), + ContentCreationError_NO_CONTENT_BROKER ); VOS_ENSURE( pBroker->getContentProviderManagerInterface() ->queryContentProviders().getLength(), @@ -223,19 +228,25 @@ Content::Content( const OUString& rURL, = pBroker->getContentIdentifierFactoryInterface(); if ( !xIdFac.is() ) throw ContentCreationException( - ContentCreationException::NO_IDENTIFIER_FACTORY ); + OUString::createFromAscii( "No Content Identifier factory!" ), + Reference< XInterface >(), + ContentCreationError_NO_IDENTIFIER_FACTORY ); Reference< XContentIdentifier > xId = xIdFac->createContentIdentifier( rURL ); if ( !xId.is() ) throw ContentCreationException( - ContentCreationException::IDENTIFIER_CREATION_FAILED ); + OUString::createFromAscii( "No Content Identifier!" ), + Reference< XInterface >(), + ContentCreationError_IDENTIFIER_CREATION_FAILED ); Reference< XContentProvider > xProvider = pBroker->getContentProviderInterface(); if ( !xProvider.is() ) throw ContentCreationException( - ContentCreationException::NO_CONTENT_PROVIDER ); + OUString::createFromAscii( "No Content Provider!" ), + Reference< XInterface >(), + ContentCreationError_NO_CONTENT_PROVIDER ); Reference< XContent > xContent; try @@ -245,12 +256,16 @@ Content::Content( const OUString& rURL, catch ( IllegalIdentifierException ) { throw ContentCreationException( - ContentCreationException::CONTENT_CREATION_FAILED ); + OUString::createFromAscii( "No Content!" ), + Reference< XInterface >(), + ContentCreationError_CONTENT_CREATION_FAILED ); } if ( !xContent.is() ) throw ContentCreationException( - ContentCreationException::CONTENT_CREATION_FAILED ); + OUString::createFromAscii( "No Content!" ), + Reference< XInterface >(), + ContentCreationError_CONTENT_CREATION_FAILED ); m_xImpl = new Content_Impl( pBroker->getServiceManager(), xContent, rEnv ); } @@ -263,7 +278,9 @@ Content::Content( const Reference< XContentIdentifier >& rId, ucb::ContentBroker* pBroker = ucb::ContentBroker::get(); if ( !pBroker ) throw ContentCreationException( - ContentCreationException::NO_CONTENT_BROKER ); + OUString::createFromAscii( "No Content Broker!" ), + Reference< XInterface >(), + ContentCreationError_NO_CONTENT_BROKER ); VOS_ENSURE( pBroker->getContentProviderManagerInterface() ->queryContentProviders().getLength(), @@ -273,7 +290,9 @@ Content::Content( const Reference< XContentIdentifier >& rId, = pBroker->getContentProviderInterface(); if ( !xProvider.is() ) throw ContentCreationException( - ContentCreationException::NO_CONTENT_PROVIDER ); + OUString::createFromAscii( "No Content Provider!" ), + Reference< XInterface >(), + ContentCreationError_NO_CONTENT_PROVIDER ); Reference< XContent > xContent; try @@ -283,12 +302,16 @@ Content::Content( const Reference< XContentIdentifier >& rId, catch ( IllegalIdentifierException ) { throw ContentCreationException( - ContentCreationException::CONTENT_CREATION_FAILED ); + OUString::createFromAscii( "No Content!" ), + Reference< XInterface >(), + ContentCreationError_CONTENT_CREATION_FAILED ); } if ( !xContent.is() ) throw ContentCreationException( - ContentCreationException::CONTENT_CREATION_FAILED ); + OUString::createFromAscii( "No Content!" ), + Reference< XInterface >(), + ContentCreationError_CONTENT_CREATION_FAILED ); m_xImpl = new Content_Impl( pBroker->getServiceManager(), xContent, rEnv ); } @@ -300,7 +323,9 @@ Content::Content( const Reference< XContent >& rContent, ucb::ContentBroker* pBroker = ucb::ContentBroker::get(); if ( !pBroker ) throw ContentCreationException( - ContentCreationException::NO_CONTENT_BROKER ); + OUString::createFromAscii( "No Content Broker!" ), + Reference< XInterface >(), + ContentCreationError_NO_CONTENT_BROKER ); VOS_ENSURE( pBroker->getContentProviderManagerInterface() ->queryContentProviders().getLength(), diff --git a/ucbhelper/workben/ucbexplorer/ucbexplorer.cxx b/ucbhelper/workben/ucbexplorer/ucbexplorer.cxx index 9644301603dd..e7ab04d98785 100644 --- a/ucbhelper/workben/ucbexplorer/ucbexplorer.cxx +++ b/ucbhelper/workben/ucbexplorer/ucbexplorer.cxx @@ -2,9 +2,9 @@ * * $RCSfile: ucbexplorer.cxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: kso $ $Date: 2000-11-29 10:22:23 $ + * last change: $Author: kso $ $Date: 2000-12-01 07:48:54 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -568,7 +568,7 @@ BOOL UcbExplorerListBoxEntry::createNewContent( const ContentInfo& rInfo, aSourceContent.openStream( xSourceData.getBodyPtr() ); xData = xSourceData->getInputStream(); } - catch ( ::ucb::ContentCreationException& ) + catch ( ContentCreationException& ) { DBG_ERROR( "UcbExplorerListBoxEntry::createNewContent - " "No content for document data!" ); @@ -1124,7 +1124,7 @@ UcbExplorerListBoxEntry* UcbExplorerTreeListBox::InsertEntry( ::ucb::Content aContent( rURL, xEnv ); return InsertEntry( aContent, pParent ); } - catch ( ::ucb::ContentCreationException& ) + catch ( ContentCreationException& ) { DBG_ERROR( "UcbExplorerTreeListBox::InsertEntry - ContentCreationException!" ); |