From aae2ed3532ec6ce888b34486330e6ead043ab148 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Tue, 5 Jun 2007 17:11:26 +0000 Subject: INTEGRATION: CWS bgdlremove (1.5.40); FILE MERGED 2007/05/18 14:06:50 kso 1.5.40.2: #i77419# - cleanup of ucbhelper namespaces. 2007/05/11 12:59:02 kso 1.5.40.1: #i76911# - ucbhelper no longer uses VOS --- ucb/source/ucp/odma/odma_content.cxx | 122 +++++++++++++++--------------- ucb/source/ucp/odma/odma_contentcaps.cxx | 43 +++++------ ucb/source/ucp/odma/odma_datasupplier.cxx | 38 +++++----- ucb/source/ucp/odma/odma_resultset.cxx | 33 ++++---- 4 files changed, 115 insertions(+), 121 deletions(-) (limited to 'ucb/source/ucp') diff --git a/ucb/source/ucp/odma/odma_content.cxx b/ucb/source/ucp/odma/odma_content.cxx index 77a353ebfb..1a396adecd 100644 --- a/ucb/source/ucp/odma/odma_content.cxx +++ b/ucb/source/ucp/odma/odma_content.cxx @@ -4,9 +4,9 @@ * * $RCSfile: odma_content.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: obo $ $Date: 2006-09-17 13:57:15 $ + * last change: $Author: ihi $ $Date: 2007-06-05 18:08:59 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -139,7 +139,6 @@ #include #endif -using namespace com::sun; using namespace com::sun::star; using namespace odma; @@ -153,14 +152,14 @@ using namespace odma; Content::Content( const uno::Reference< lang::XMultiServiceFactory >& rxSMgr, ContentProvider* pProvider, - const uno::Reference< star::ucb::XContentIdentifier >& Identifier, - const ::vos::ORef& _rProps) + const uno::Reference< ucb::XContentIdentifier >& Identifier, + const ::rtl::Reference& _rProps) : ContentImplHelper( rxSMgr, pProvider, Identifier ) ,m_aProps(_rProps) ,m_pProvider(pProvider) ,m_pContent(NULL) { - OSL_ENSURE(m_aProps.isValid(),"No valid ContentPropeties!"); + OSL_ENSURE(m_aProps.is(),"No valid ContentPropeties!"); } //========================================================================= @@ -231,10 +230,10 @@ uno::Sequence< uno::Type > SAL_CALL Content::getTypes() CPPU_TYPE_REF( lang::XTypeProvider ), CPPU_TYPE_REF( lang::XServiceInfo ), CPPU_TYPE_REF( lang::XComponent ), - CPPU_TYPE_REF( star::ucb::XContent ), - CPPU_TYPE_REF( star::ucb::XCommandProcessor ), + CPPU_TYPE_REF( ucb::XContent ), + CPPU_TYPE_REF( ucb::XCommandProcessor ), CPPU_TYPE_REF( beans::XPropertiesChangeNotifier ), - CPPU_TYPE_REF( star::ucb::XCommandInfoChangeNotifier ), + CPPU_TYPE_REF( ucb::XCommandInfoChangeNotifier ), CPPU_TYPE_REF( beans::XPropertyContainer ), CPPU_TYPE_REF( beans::XPropertySetInfoChangeNotifier ), CPPU_TYPE_REF( container::XChild ) ); @@ -293,11 +292,11 @@ rtl::OUString SAL_CALL Content::getContentType() // virtual uno::Any SAL_CALL Content::execute( - const star::ucb::Command& aCommand, - sal_Int32 CommandId, - const uno::Reference< star::ucb::XCommandEnvironment >& Environment ) + const ucb::Command& aCommand, + sal_Int32 /*CommandId*/, + const uno::Reference< ucb::XCommandEnvironment >& Environment ) throw( uno::Exception, - star::ucb::CommandAbortedException, + ucb::CommandAbortedException, uno::RuntimeException ) { uno::Any aRet; @@ -381,7 +380,7 @@ uno::Any SAL_CALL Content::execute( else if ( aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "open" ) ) ) { - star::ucb::OpenCommandArgument2 aOpenCommand; + ucb::OpenCommandArgument2 aOpenCommand; if ( !( aCommand.Argument >>= aOpenCommand ) ) { OSL_ENSURE( sal_False, "Wrong argument type!" ); @@ -395,15 +394,15 @@ uno::Any SAL_CALL Content::execute( } sal_Bool bOpenFolder = - ( ( aOpenCommand.Mode == star::ucb::OpenMode::ALL ) || - ( aOpenCommand.Mode == star::ucb::OpenMode::FOLDERS ) || - ( aOpenCommand.Mode == star::ucb::OpenMode::DOCUMENTS ) ); + ( ( aOpenCommand.Mode == ucb::OpenMode::ALL ) || + ( aOpenCommand.Mode == ucb::OpenMode::FOLDERS ) || + ( aOpenCommand.Mode == ucb::OpenMode::DOCUMENTS ) ); if ( bOpenFolder) { // open as folder - return result set - uno::Reference< star::ucb::XDynamicResultSet > xSet + uno::Reference< ucb::XDynamicResultSet > xSet = new DynamicResultSet( m_xSMgr, this, aOpenCommand, @@ -417,13 +416,13 @@ uno::Any SAL_CALL Content::execute( // Check open mode if ( ( aOpenCommand.Mode - == star::ucb::OpenMode::DOCUMENT_SHARE_DENY_NONE ) || + == ucb::OpenMode::DOCUMENT_SHARE_DENY_NONE ) || ( aOpenCommand.Mode - == star::ucb::OpenMode::DOCUMENT_SHARE_DENY_WRITE ) ) + == ucb::OpenMode::DOCUMENT_SHARE_DENY_WRITE ) ) { // Unsupported. ucbhelper::cancelCommandExecution( - uno::makeAny( star::ucb::UnsupportedOpenModeException( + uno::makeAny( ucb::UnsupportedOpenModeException( rtl::OUString(), static_cast< cppu::OWeakObject * >( this ), sal_Int16( aOpenCommand.Mode ) ) ), @@ -435,7 +434,7 @@ uno::Any SAL_CALL Content::execute( rtl::OUString aURL = m_xIdentifier->getContentIdentifier(); rtl::OUString sFileURL = openDoc(); delete m_pContent; - m_pContent = new ::ucb::Content(sFileURL,NULL); + m_pContent = new ::ucbhelper::Content(sFileURL,NULL); if(!m_pContent->isDocument()) { rtl::OUString sErrorMsg(RTL_CONSTASCII_USTRINGPARAM("File: ")); @@ -489,7 +488,7 @@ uno::Any SAL_CALL Content::execute( // implementation. Support for this type of // sink is optional... ucbhelper::cancelCommandExecution( - uno::makeAny( com::sun::star::ucb::UnsupportedDataSinkException( + uno::makeAny( ucb::UnsupportedDataSinkException( rtl::OUString(), static_cast< cppu::OWeakObject * >( this ), aOpenCommand.Sink ) ), @@ -528,7 +527,7 @@ uno::Any SAL_CALL Content::execute( // insert ////////////////////////////////////////////////////////////////// - star::ucb::InsertCommandArgument arg; + ucb::InsertCommandArgument arg; if ( !( aCommand.Argument >>= arg ) ) { OSL_ENSURE( sal_False, "Wrong argument type!" ); @@ -545,7 +544,7 @@ uno::Any SAL_CALL Content::execute( } else if( ! aCommand.Name.compareToAscii( "transfer" ) ) { - com::sun::star::ucb::TransferInfo aTransferInfo; + ucb::TransferInfo aTransferInfo; if( ! ( aCommand.Argument >>= aTransferInfo ) ) { OSL_ENSURE( sal_False, "Wrong argument type!" ); @@ -557,13 +556,13 @@ uno::Any SAL_CALL Content::execute( Environment ); // Unreachable } - ::vos::ORef aProp = m_aProps; + ::rtl::Reference aProp = m_aProps; if(aProp->m_bIsFolder) { aProp = getContentProvider()->getContentPropertyWithTitle(aTransferInfo.NewTitle); - if(!aProp.isValid()) + if(!aProp.is()) aProp = getContentProvider()->getContentPropertyWithSavedAsName(aTransferInfo.NewTitle); - sal_Bool bError = !aProp.isValid(); + sal_Bool bError = !aProp.is(); if(bError) { sal_Char* pExtension = NULL; @@ -632,9 +631,9 @@ uno::Any SAL_CALL Content::execute( } else if ( odm == ODM_E_CANCEL) - ODMSTATUS odm = NODMActivate(ContentProvider::getHandle(), - ODM_DELETE, - lpszNewDocId); + NODMActivate(ContentProvider::getHandle(), + ODM_DELETE, + lpszNewDocId); delete lpszNewDocId; } @@ -649,8 +648,8 @@ uno::Any SAL_CALL Content::execute( rtl::OUString sFileURL = ContentProvider::openDoc(aProp); sal_Int32 nLastIndex = sFileURL.lastIndexOf( sal_Unicode('/') ); - ::ucb::Content aContent(sFileURL.copy(0,nLastIndex),NULL); - // aTransferInfo.NameClash = com::sun::star::ucb::NameClash::OVERWRITE; + ::ucbhelper::Content aContent(sFileURL.copy(0,nLastIndex),NULL); + // aTransferInfo.NameClash = ucb::NameClash::OVERWRITE; aTransferInfo.NewTitle = sFileURL.copy( 1 + nLastIndex ); aContent.executeCommand(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("transfer")),uno::makeAny(aTransferInfo)); getContentProvider()->saveDocument(aProp->m_sDocumentId); @@ -664,7 +663,7 @@ uno::Any SAL_CALL Content::execute( OSL_ENSURE( sal_False, "Content::execute - unsupported command!" ); ucbhelper::cancelCommandExecution( - uno::makeAny( star::ucb::UnsupportedCommandException( + uno::makeAny( ucb::UnsupportedCommandException( rtl::OUString(), static_cast< cppu::OWeakObject * >( this ) ) ), Environment ); @@ -676,7 +675,7 @@ uno::Any SAL_CALL Content::execute( //========================================================================= // virtual -void SAL_CALL Content::abort( sal_Int32 CommandId ) +void SAL_CALL Content::abort( sal_Int32 /*CommandId*/ ) throw( uno::RuntimeException ) { // @@@ Implement logic to abort running commands, if this makes @@ -710,14 +709,14 @@ void SAL_CALL Content::abort( sal_Int32 CommandId ) uno::Reference< sdbc::XRow > Content::getPropertyValues( const uno::Reference< lang::XMultiServiceFactory >& rSMgr, const uno::Sequence< beans::Property >& rProperties, - const ::vos::ORef& rData, - const vos::ORef< ::ucb::ContentProviderImplHelper >& rProvider, + const rtl::Reference& rData, + const rtl::Reference< ::ucbhelper::ContentProviderImplHelper >& rProvider, const rtl::OUString& rContentId ) { // Note: Empty sequence means "get values of all supported properties". - rtl::Reference< ::ucb::PropertyValueSet > xRow - = new ::ucb::PropertyValueSet( rSMgr ); + rtl::Reference< ::ucbhelper::PropertyValueSet > xRow + = new ::ucbhelper::PropertyValueSet( rSMgr ); sal_Int32 nCount = rProperties.getLength(); if ( nCount ) @@ -856,14 +855,14 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( xRow->appendTimestamp( beans::Property( rtl::OUString::createFromAscii( "DateCreated" ), -1, - getCppuType(static_cast< const com::sun::star::util::DateTime * >( 0 ) ), + getCppuType(static_cast< const util::DateTime * >( 0 ) ), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), rData->m_aDateCreated ); xRow->appendTimestamp( beans::Property( rtl::OUString::createFromAscii( "DateModified" ), -1, - getCppuType(static_cast< const com::sun::star::util::DateTime * >( 0 ) ), + getCppuType(static_cast< const util::DateTime * >( 0 ) ), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), rData->m_aDateModified ); @@ -914,22 +913,22 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( //========================================================================= uno::Reference< sdbc::XRow > Content::getPropertyValues( const uno::Sequence< beans::Property >& rProperties, - const uno::Reference< star::ucb::XCommandEnvironment >& xEnv ) + const uno::Reference< ucb::XCommandEnvironment >& /*xEnv*/ ) { osl::Guard< osl::Mutex > aGuard( m_aMutex ); return getPropertyValues( m_xSMgr, rProperties, m_aProps, - vos::ORef< - ::ucb::ContentProviderImplHelper >( - m_xProvider.getBodyPtr() ), + rtl::Reference< + ::ucbhelper::ContentProviderImplHelper >( + m_xProvider.get() ), m_xIdentifier->getContentIdentifier() ); } //========================================================================= uno::Sequence< uno::Any > Content::setPropertyValues( const uno::Sequence< beans::PropertyValue >& rValues, - const uno::Reference< star::ucb::XCommandEnvironment >& xEnv ) + const uno::Reference< ucb::XCommandEnvironment >& /*xEnv*/ ) { osl::ClearableGuard< osl::Mutex > aGuard( m_aMutex ); @@ -948,7 +947,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( const beans::PropertyValue* pValues = rValues.getConstArray(); sal_Int32 nCount = rValues.getLength(); - uno::Reference< star::ucb::XPersistentPropertySet > xAdditionalPropSet; + uno::Reference< ucb::XPersistentPropertySet > xAdditionalPropSet; sal_Bool bTriedToGetAdditonalPropSet = sal_False; for ( sal_Int32 n = 0; n < nCount; ++n ) @@ -1074,7 +1073,7 @@ void Content::queryChildren( ContentRefList& rChildren ) // from provider and extract the contents which are direct children // of this content. - ::ucb::ContentRefList aAllContents; + ::ucbhelper::ContentRefList aAllContents; m_xProvider->queryExistingContents( aAllContents ); OUString aURL = m_xIdentifier->getContentIdentifier(); @@ -1088,12 +1087,12 @@ void Content::queryChildren( ContentRefList& rChildren ) sal_Int32 nLen = aURL.getLength(); - ::ucb::ContentRefList::const_iterator it = aAllContents.begin(); - ::ucb::ContentRefList::const_iterator end = aAllContents.end(); + ::ucbhelper::ContentRefList::const_iterator it = aAllContents.begin(); + ::ucbhelper::ContentRefList::const_iterator end = aAllContents.end(); while ( it != end ) { - ::ucb::ContentImplHelperRef xChild = (*it); + ::ucbhelper::ContentImplHelperRef xChild = (*it); OUString aChildURL = xChild->getIdentifier()->getContentIdentifier(); // Is aURL a prefix of aChildURL? @@ -1109,7 +1108,7 @@ void Content::queryChildren( ContentRefList& rChildren ) // No further slashes / only a final slash. It's a child! rChildren.push_back( ContentRef( - static_cast< Content * >( xChild.getBodyPtr() ) ) ); + static_cast< Content * >( xChild.get() ) ) ); } } ++it; @@ -1120,8 +1119,7 @@ void Content::queryChildren( ContentRefList& rChildren ) void Content::insert( const uno::Reference< io::XInputStream > & xInputStream, sal_Bool bReplaceExisting, - const uno::Reference< - com::sun::star::ucb::XCommandEnvironment >& Environment ) + const uno::Reference< ucb::XCommandEnvironment >& Environment ) throw( uno::Exception ) { osl::ClearableGuard< osl::Mutex > aGuard( m_aMutex ); @@ -1134,7 +1132,7 @@ void Content::insert( uno::Sequence< rtl::OUString > aProps( 1 ); aProps[ 0 ] = rtl::OUString::createFromAscii( "zzzz" ); ucbhelper::cancelCommandExecution( - uno::makeAny( star::ucb::MissingPropertiesException( + uno::makeAny( ucb::MissingPropertiesException( rtl::OUString(), static_cast< cppu::OWeakObject * >( this ), aProps ) ), @@ -1147,7 +1145,7 @@ void Content::insert( OSL_ENSURE( sal_False, "Content::insert - No data stream!" ); ucbhelper::cancelCommandExecution( - uno::makeAny( star::ucb::MissingInputStreamException( + uno::makeAny( ucb::MissingInputStreamException( rtl::OUString(), static_cast< cppu::OWeakObject * >( this ) ) ), Environment ); @@ -1156,18 +1154,18 @@ void Content::insert( // Assemble new content identifier... - // uno::Reference< star::ucb::XContentIdentifier > xId = ...; + // uno::Reference< ucb::XContentIdentifier > xId = ...; // Fail, if a resource with given id already exists. if ( !bReplaceExisting ) // && hasData( m_xIdentifier ) ) { ucbhelper::cancelCommandExecution( - uno::makeAny( star::ucb::UnsupportedCommandException( + uno::makeAny( ucb::UnsupportedCommandException( rtl::OUString(), static_cast< cppu::OWeakObject * >( this ) ) ), Environment ); // ucbhelper::cancelCommandExecution( -// star::ucb::IOErrorCode_ALREADY_EXISTING, +// ucb::IOErrorCode_ALREADY_EXISTING, // Environment, // uno::makeAny(static_cast< cppu::OWeakObject * >( this )) // ); @@ -1189,7 +1187,7 @@ void Content::destroy( sal_Bool bDeletePhysical ) { // @@@ take care about bDeletePhysical -> trashcan support - uno::Reference< star::ucb::XContent > xThis = this; + uno::Reference< ucb::XContent > xThis = this; deleted(); @@ -1214,7 +1212,7 @@ void Content::destroy( sal_Bool bDeletePhysical ) // ----------------------------------------------------------------------------- ::rtl::OUString Content::openDoc() { - OSL_ENSURE(m_aProps.isValid(),"No valid content properties!"); + OSL_ENSURE(m_aProps.is(),"No valid content properties!"); return ContentProvider::openDoc(m_aProps); } // ----------------------------------------------------------------------------- @@ -1234,7 +1232,7 @@ void Content::changePropertyValue(const beans::PropertyValue& _rValue, osl::Guard< osl::Mutex > aGuard( m_aMutex ); // first we have to check if we could change the property inside the DMS ::rtl::OString sDocInfoValue = ::rtl::OUStringToOString(sNewValue,RTL_TEXTENCODING_ASCII_US); - WORD nDocInfo; + WORD nDocInfo = 0; if(&_rsMemberValue == &m_aProps->m_sTitle) nDocInfo = ODM_TITLETEXT; else if(&_rsMemberValue == &m_aProps->m_sAuthor) diff --git a/ucb/source/ucp/odma/odma_contentcaps.cxx b/ucb/source/ucp/odma/odma_contentcaps.cxx index 93df633fe2..c69662db42 100644 --- a/ucb/source/ucp/odma/odma_contentcaps.cxx +++ b/ucb/source/ucp/odma/odma_contentcaps.cxx @@ -4,9 +4,9 @@ * * $RCSfile: odma_contentcaps.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: obo $ $Date: 2006-09-17 13:57:29 $ + * last change: $Author: ihi $ $Date: 2007-06-05 18:09:27 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -73,7 +73,6 @@ #include "odma_content.hxx" #endif -using namespace com::sun; using namespace com::sun::star; using namespace odma; @@ -92,7 +91,7 @@ using namespace odma; // virtual uno::Sequence< beans::Property > Content::getProperties( - const uno::Reference< star::ucb::XCommandEnvironment > & xEnv ) + const uno::Reference< ucb::XCommandEnvironment > & /*xEnv*/ ) { // @@@ Add additional properties... @@ -149,13 +148,13 @@ uno::Sequence< beans::Property > Content::getProperties( beans::Property( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DateCreated" ) ), -1, - getCppuType(static_cast< const com::sun::star::util::DateTime * >( 0 ) ), + getCppuType(static_cast< const util::DateTime * >( 0 ) ), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), beans::Property( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DateModified" ) ), -1, - getCppuType(static_cast< const com::sun::star::util::DateTime * >( 0 ) ), + getCppuType(static_cast< const util::DateTime * >( 0 ) ), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), beans::Property( @@ -192,8 +191,8 @@ uno::Sequence< beans::Property > Content::getProperties( //========================================================================= // virtual -uno::Sequence< star::ucb::CommandInfo > Content::getCommands( - const uno::Reference< star::ucb::XCommandEnvironment > & xEnv ) +uno::Sequence< ucb::CommandInfo > Content::getCommands( + const uno::Reference< ucb::XCommandEnvironment > & /*xEnv*/ ) { // @@@ Add additional commands... @@ -207,28 +206,28 @@ uno::Sequence< star::ucb::CommandInfo > Content::getCommands( #define COMMAND_COUNT 8 - static star::ucb::CommandInfo aCommandInfoTable[] = + static ucb::CommandInfo aCommandInfoTable[] = { /////////////////////////////////////////////////////////////// // Required commands /////////////////////////////////////////////////////////////// - star::ucb::CommandInfo( + ucb::CommandInfo( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "getCommandInfo" ) ), -1, getCppuVoidType() ), - star::ucb::CommandInfo( + ucb::CommandInfo( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "getPropertySetInfo" ) ), -1, getCppuVoidType() ), - star::ucb::CommandInfo( + ucb::CommandInfo( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "getPropertyValues" ) ), -1, getCppuType( static_cast< uno::Sequence< beans::Property > * >( 0 ) ) ), - star::ucb::CommandInfo( + ucb::CommandInfo( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "setPropertyValues" ) ), -1, getCppuType( @@ -238,32 +237,32 @@ uno::Sequence< star::ucb::CommandInfo > Content::getCommands( // Optional standard commands /////////////////////////////////////////////////////////////// /* - star::ucb::CommandInfo( + ucb::CommandInfo( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "delete" ) ), -1, getCppuBooleanType() ), */ - star::ucb::CommandInfo( + ucb::CommandInfo( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "insert" ) ), -1, getCppuType( - static_cast< star::ucb::InsertCommandArgument * >( 0 ) ) + static_cast< ucb::InsertCommandArgument * >( 0 ) ) ), - star::ucb::CommandInfo( + ucb::CommandInfo( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "open" ) ), -1, - getCppuType( static_cast< star::ucb::OpenCommandArgument2 * >( 0 ) ) + getCppuType( static_cast< ucb::OpenCommandArgument2 * >( 0 ) ) ), - star::ucb::CommandInfo( + ucb::CommandInfo( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "close" ) ), -1, getCppuVoidType( ) ), - star::ucb::CommandInfo( + ucb::CommandInfo( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "transfer" ) ), -1, - getCppuType( static_cast< star::ucb::TransferInfo * >( 0 ) ) + getCppuType( static_cast< ucb::TransferInfo * >( 0 ) ) ) /////////////////////////////////////////////////////////////// @@ -272,6 +271,6 @@ uno::Sequence< star::ucb::CommandInfo > Content::getCommands( }; return uno::Sequence< - star::ucb::CommandInfo >( aCommandInfoTable, COMMAND_COUNT ); + ucb::CommandInfo >( aCommandInfoTable, COMMAND_COUNT ); } diff --git a/ucb/source/ucp/odma/odma_datasupplier.cxx b/ucb/source/ucp/odma/odma_datasupplier.cxx index 8832565c10..024f2e56e6 100644 --- a/ucb/source/ucp/odma/odma_datasupplier.cxx +++ b/ucb/source/ucp/odma/odma_datasupplier.cxx @@ -4,9 +4,9 @@ * * $RCSfile: odma_datasupplier.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: obo $ $Date: 2006-09-17 13:57:42 $ + * last change: $Author: ihi $ $Date: 2007-06-05 18:09:54 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -72,7 +72,6 @@ using namespace com::sun::star::lang; using namespace com::sun::star::ucb; using namespace com::sun::star::uno; using namespace com::sun::star::sdbc; -using namespace ucb; using namespace odma; @@ -87,13 +86,13 @@ namespace odma struct ResultListEntry { - ::rtl::OUString aId; - Reference< XContentIdentifier > xId; - Reference< XContent > xContent; - Reference< XRow > xRow; - ::vos::ORef rData; + ::rtl::OUString aId; + Reference< XContentIdentifier > xId; + Reference< XContent > xContent; + Reference< XRow > xRow; + ::rtl::Reference rData; - ResultListEntry( const ::vos::ORef& rEntry ) : rData( rEntry ) {} + ResultListEntry( const ::rtl::Reference& rEntry ) : rData( rEntry ) {} }; //========================================================================= @@ -114,7 +113,7 @@ struct DataSupplier_Impl { osl::Mutex m_aMutex; ResultList m_aResults; - vos::ORef< Content > m_xContent; + rtl::Reference< Content > m_xContent; Reference< XMultiServiceFactory > m_xSMgr; // @@@ The data source and an iterator for it // Entry m_aFolder; @@ -123,7 +122,7 @@ struct DataSupplier_Impl sal_Bool m_bCountFinal; DataSupplier_Impl( const Reference< XMultiServiceFactory >& rxSMgr, - const vos::ORef< Content >& rContent, + const rtl::Reference< Content >& rContent, sal_Int32 nOpenMode ) : m_xContent( rContent ), m_xSMgr( rxSMgr ), // m_aFolder( rxSMgr, rContent->getIdentifier()->getContentIdentifier() ), @@ -155,7 +154,7 @@ DataSupplier_Impl::~DataSupplier_Impl() //========================================================================= DataSupplier::DataSupplier( const Reference& rxSMgr, - const vos::ORef< ::odma::Content >& rContent, + const rtl::Reference< ::odma::Content >& rContent, sal_Int32 nOpenMode ) : m_pImpl( new DataSupplier_Impl( rxSMgr, rContent, nOpenMode ) ) { @@ -218,7 +217,8 @@ Reference< XContentIdentifier > DataSupplier::queryContentIdentifier( ::rtl::OUString aId = queryContentIdentifierString( nIndex ); if ( aId.getLength() ) { - Reference< XContentIdentifier > xId = new ucb::ContentIdentifier( aId ); + Reference< XContentIdentifier > xId + = new ucbhelper::ContentIdentifier( aId ); m_pImpl->m_aResults[ nIndex ]->xId = xId; return xId; } @@ -281,7 +281,7 @@ sal_Bool DataSupplier::getResult( sal_uInt32 nIndex ) sal_uInt32 nOldCount = m_pImpl->m_aResults.size(); sal_Bool bFound = sal_False; - sal_uInt32 nPos = nOldCount; +// sal_uInt32 nPos = nOldCount; // @@@ Obtain data and put it into result list... /* @@ -336,7 +336,7 @@ sal_Bool DataSupplier::getResult( sal_uInt32 nIndex ) bFound = sal_True; for(sal_uInt16 i = 0; i < nCount; ++i) { - ::vos::ORef rProps = new ContentProperties(); + ::rtl::Reference rProps = new ContentProperties(); rProps->m_sDocumentId = ::rtl::OString(&lpszDocId[ODM_DOCID_MAX*i]); rProps->m_sContentType = sContentType; m_pImpl->m_xContent->getContentProvider()->append(rProps); @@ -358,8 +358,8 @@ sal_Bool DataSupplier::getResult( sal_uInt32 nIndex ) if ( !bFound ) m_pImpl->m_bCountFinal = sal_True; - vos::ORef< ResultSet > xResultSet = getResultSet(); - if ( xResultSet.isValid() ) + rtl::Reference< ucbhelper::ResultSet > xResultSet = getResultSet(); + if ( xResultSet.is() ) { // Callbacks follow! aGuard.clear(); @@ -394,8 +394,8 @@ sal_uInt32 DataSupplier::totalCount() */ m_pImpl->m_bCountFinal = sal_True; - vos::ORef< ResultSet > xResultSet = getResultSet(); - if ( xResultSet.isValid() ) + rtl::Reference< ucbhelper::ResultSet > xResultSet = getResultSet(); + if ( xResultSet.is() ) { // Callbacks follow! aGuard.clear(); diff --git a/ucb/source/ucp/odma/odma_resultset.cxx b/ucb/source/ucp/odma/odma_resultset.cxx index 5c915c04e1..0b3724e39b 100644 --- a/ucb/source/ucp/odma/odma_resultset.cxx +++ b/ucb/source/ucp/odma/odma_resultset.cxx @@ -4,9 +4,9 @@ * * $RCSfile: odma_resultset.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: obo $ $Date: 2006-09-17 13:58:51 $ + * last change: $Author: ihi $ $Date: 2007-06-05 18:11:26 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -45,11 +45,9 @@ *************************************************************************/ -// @@@ Adjust multi-include-protection-ifdef and header file name. #ifndef ODMA_DATASUPPLIER_HXX #include "odma_datasupplier.hxx" #endif -// @@@ Adjust multi-include-protection-ifdef and header file name. #ifndef ODMA_RESULTSET_HXX #include "odma_resultset.hxx" #endif @@ -58,7 +56,6 @@ using namespace com::sun::star::lang; using namespace com::sun::star::ucb; using namespace com::sun::star::uno; -// @@@ Adjust namespace name. using namespace odma; //========================================================================= @@ -71,7 +68,7 @@ using namespace odma; DynamicResultSet::DynamicResultSet( const Reference< XMultiServiceFactory >& rxSMgr, - const vos::ORef< Content >& rxContent, + const rtl::Reference< Content >& rxContent, const OpenCommandArgument2& rCommand, const Reference< XCommandEnvironment >& rxEnv ) : ResultSetImplHelper( rxSMgr, rCommand ), @@ -89,24 +86,24 @@ DynamicResultSet::DynamicResultSet( void DynamicResultSet::initStatic() { m_xResultSet1 - = new ::ucb::ResultSet( m_xSMgr, - m_aCommand.Properties, - new DataSupplier( m_xSMgr, - m_xContent, - m_aCommand.Mode ), - m_xEnv ); + = new ::ucbhelper::ResultSet( m_xSMgr, + m_aCommand.Properties, + new DataSupplier( m_xSMgr, + m_xContent, + m_aCommand.Mode ), + m_xEnv ); } //========================================================================= void DynamicResultSet::initDynamic() { m_xResultSet1 - = new ::ucb::ResultSet( m_xSMgr, - m_aCommand.Properties, - new DataSupplier( m_xSMgr, - m_xContent, - m_aCommand.Mode ), - m_xEnv ); + = new ::ucbhelper::ResultSet( m_xSMgr, + m_aCommand.Properties, + new DataSupplier( m_xSMgr, + m_xContent, + m_aCommand.Mode ), + m_xEnv ); m_xResultSet2 = m_xResultSet1; } -- cgit v1.2.3