diff options
author | Povilas Kanapickas <povilas.kanapickas@gmail.com> | 2010-10-18 19:37:48 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@novell.com> | 2010-10-18 19:38:00 +0100 |
commit | bc8fcf207ffeee1dd6fb4a361b0ad5c5def21beb (patch) | |
tree | 43f54910146344613e641bd0b54cee3069292624 /ucb | |
parent | 34f1c06830ae530bea4f11aca91e2836a53fd764 (diff) |
remove non-compiled code
Diffstat (limited to 'ucb')
-rw-r--r-- | ucb/source/ucp/hierarchy/hierarchycontent.cxx | 6 | ||||
-rw-r--r-- | ucb/source/ucp/hierarchy/hierarchydata.cxx | 33 | ||||
-rw-r--r-- | ucb/source/ucp/hierarchy/hierarchyprovider.cxx | 12 | ||||
-rw-r--r-- | ucb/source/ucp/odma/odma_content.cxx | 85 | ||||
-rw-r--r-- | ucb/source/ucp/odma/odma_provider.cxx | 13 | ||||
-rw-r--r-- | ucb/source/ucp/package/pkgcontent.cxx | 6 | ||||
-rw-r--r-- | ucb/source/ucp/tdoc/tdoc_content.cxx | 7 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/NeonSession.cxx | 9 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/webdavcontent.cxx | 21 | ||||
-rw-r--r-- | ucb/workben/ucb/ucbdemo.cxx | 44 |
10 files changed, 3 insertions, 233 deletions
diff --git a/ucb/source/ucp/hierarchy/hierarchycontent.cxx b/ucb/source/ucp/hierarchy/hierarchycontent.cxx index e66e0e396c16..e9c5546dc496 100644 --- a/ucb/source/ucp/hierarchy/hierarchycontent.cxx +++ b/ucb/source/ucp/hierarchy/hierarchycontent.cxx @@ -122,12 +122,6 @@ HierarchyContent* HierarchyContent::create( RTL_CONSTASCII_STRINGPARAM( HIERARCHY_LINK_CONTENT_TYPE ) ) ) return 0; -#if 0 - // Fail, if content does exist. - if ( hasData( rxSMgr, pProvider, Identifier ) ) - return 0; -#endif - return new HierarchyContent( rxSMgr, pProvider, Identifier, Info ); } diff --git a/ucb/source/ucp/hierarchy/hierarchydata.cxx b/ucb/source/ucp/hierarchy/hierarchydata.cxx index 198f79f1953c..82bd9e6df98d 100644 --- a/ucb/source/ucp/hierarchy/hierarchydata.cxx +++ b/ucb/source/ucp/hierarchy/hierarchydata.cxx @@ -525,15 +525,6 @@ sal_Bool HierarchyEntry::move( if ( aNewPath == m_aPath ) return sal_True; -#if 0 - // In the "near future"... ( not yet implemented in config db ) - - - get update access for m_aPath - - update access -> XNamed - - xNamed::setName( newName ) - - updateaccess commit -#else - sal_Bool bOldRoot = sal_True; uno::Reference< util::XChangesBatch > xOldParentBatch; @@ -825,30 +816,6 @@ sal_Bool HierarchyEntry::move( return sal_False; } -#if 0 - ////////////////////////////////////////////////////////////////////// - // (4) Commit changes... - ////////////////////////////////////////////////////////////////////// - - try - { - xNewParentBatch->commitChanges(); - - if ( bDifferentParents ) - xOldParentBatch->commitChanges(); - } - catch ( lang::WrappedTargetException const & ) - { - // commitChanges - - OSL_ENSURE( sal_False, - "HierarchyEntry::move - caught WrappedTargetException!" ); - return sal_False; - } -#endif - - return sal_True; -#endif } //========================================================================= diff --git a/ucb/source/ucp/hierarchy/hierarchyprovider.cxx b/ucb/source/ucp/hierarchy/hierarchyprovider.cxx index 67b2a36294cc..1e5fdbfc3e79 100644 --- a/ucb/source/ucp/hierarchy/hierarchyprovider.cxx +++ b/ucb/source/ucp/hierarchy/hierarchyprovider.cxx @@ -165,21 +165,9 @@ void SAL_CALL HierarchyContentProvider::initialize( const uno::Sequence< uno::Any >& aArguments ) throw( uno::Exception, uno::RuntimeException ) { -#if 0 - if ( aArguments.getLength() > 0 ) - { - // Extract config provider from service init args. - aArguments[ 0 ] >>= m_xConfigProvider; - - OSL_ENSURE( m_xConfigProvider.is(), - "HierarchyContentProvider::initialize - " - "No config provider!" ); - } -#else if ( aArguments.getLength() > 0 ) OSL_ENSURE( false, "HierarchyContentProvider::initialize : not supported!" ); -#endif } //========================================================================= diff --git a/ucb/source/ucp/odma/odma_content.cxx b/ucb/source/ucp/odma/odma_content.cxx index 9c3d8492e3fe..f1cd571dd10f 100644 --- a/ucb/source/ucp/odma/odma_content.cxx +++ b/ucb/source/ucp/odma/odma_content.cxx @@ -124,10 +124,6 @@ uno::Any SAL_CALL Content::queryInterface( const uno::Type & rType ) uno::Any aRet; // @@@ Add support for additional interfaces. -#if 0 - aRet = cppu::queryInterface( rType, - static_cast< yyy::Xxxxxxxxx * >( this ) ); -#endif return aRet.hasValue() ? aRet : ContentImplHelper::queryInterface( rType ); } @@ -944,59 +940,6 @@ uno::Sequence< uno::Any > Content::setPropertyValues( return aRet; } - -#if 0 -//========================================================================= -void Content::queryChildren( ContentRefList& rChildren ) -{ - // @@@ Adapt method to your URL scheme... - - // Obtain a list with a snapshot of all currently instanciated contents - // from provider and extract the contents which are direct children - // of this content. - - ::ucbhelper::ContentRefList aAllContents; - m_xProvider->queryExistingContents( aAllContents ); - - OUString aURL = m_xIdentifier->getContentIdentifier(); - sal_Int32 nPos = aURL.lastIndexOf( '/' ); - - if ( nPos != ( aURL.getLength() - 1 ) ) - { - // No trailing slash found. Append. - aURL += OUString::createFromAscii( "/" ); - } - - sal_Int32 nLen = aURL.getLength(); - - ::ucbhelper::ContentRefList::const_iterator it = aAllContents.begin(); - ::ucbhelper::ContentRefList::const_iterator end = aAllContents.end(); - - while ( it != end ) - { - ::ucbhelper::ContentImplHelperRef xChild = (*it); - OUString aChildURL = xChild->getIdentifier()->getContentIdentifier(); - - // Is aURL a prefix of aChildURL? - if ( ( aChildURL.getLength() > nLen ) && - ( aChildURL.compareTo( aURL, nLen ) == 0 ) ) - { - sal_Int32 nPos = nLen; - nPos = aChildURL.indexOf( '/', nPos ); - - if ( ( nPos == -1 ) || - ( nPos == ( aChildURL.getLength() - 1 ) ) ) - { - // No further slashes / only a final slash. It's a child! - rChildren.push_back( - ContentRef( - static_cast< Content * >( xChild.get() ) ) ); - } - } - ++it; - } -} -#endif //========================================================================= void Content::insert( const uno::Reference< io::XInputStream > & xInputStream, @@ -1062,34 +1005,6 @@ void Content::insert( aGuard.clear(); inserted(); } -#if 0 -//========================================================================= -void Content::destroy( sal_Bool bDeletePhysical ) - throw( uno::Exception ) -{ - // @@@ take care about bDeletePhysical -> trashcan support - - uno::Reference< ucb::XContent > xThis = this; - - deleted(); - - osl::Guard< osl::Mutex > aGuard( m_aMutex ); - - // Process instanciated children... - - ContentRefList aChildren; - queryChildren( aChildren ); - - ContentRefList::const_iterator it = aChildren.begin(); - ContentRefList::const_iterator end = aChildren.end(); - - while ( it != end ) - { - (*it)->destroy( bDeletePhysical ); - ++it; - } -} -#endif // ----------------------------------------------------------------------------- ::rtl::OUString Content::openDoc() diff --git a/ucb/source/ucp/odma/odma_provider.cxx b/ucb/source/ucp/odma/odma_provider.cxx index f08021cceaf4..84c7038108b0 100644 --- a/ucb/source/ucp/odma/odma_provider.cxx +++ b/ucb/source/ucp/odma/odma_provider.cxx @@ -191,21 +191,10 @@ uno::Reference< ucb::XContent > SAL_CALL ContentProvider::queryContent( sCanonicURL.matchIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM(ODMA_URL_SCHEME ODMA_URL_SHORT)))) throw ucb::IllegalIdentifierException(); - // @@@ Further id checks may go here... -#if 0 - if ( id-check-failes ) - throw ucb::IllegalIdentifierException(); -#endif // @@@ Id normalization may go here... -#if 0 - // Normalize URL and create new Id. - rtl::OUString aCanonicURL = ( Identifier->getContentIdentifier() ); - uno::Reference< ucb::XContentIdentifier > xCanonicId - = new ::ucb::ContentIdentifier( m_xSMgr, aCanonicURL ); -#else + uno::Reference< ucb::XContentIdentifier > xCanonicId = Identifier; -#endif osl::MutexGuard aGuard( m_aMutex ); diff --git a/ucb/source/ucp/package/pkgcontent.cxx b/ucb/source/ucp/package/pkgcontent.cxx index 1b9c75010656..349d613a470b 100644 --- a/ucb/source/ucp/package/pkgcontent.cxx +++ b/ucb/source/ucp/package/pkgcontent.cxx @@ -234,13 +234,7 @@ Content* Content::create( uno::Reference< container::XHierarchicalNameAccess > xPackage; -#if 0 - // Fail, if content does exist. - if ( hasData( pProvider, aURI, xPackage ) ) - return 0; -#else xPackage = pProvider->createPackage( aURI.getPackage(), aURI.getParam() ); -#endif uno::Reference< ucb::XContentIdentifier > xId = new ::ucbhelper::ContentIdentifier( rxSMgr, aURI.getUri() ); diff --git a/ucb/source/ucp/tdoc/tdoc_content.cxx b/ucb/source/ucp/tdoc/tdoc_content.cxx index 4fa081793f74..2a50f8d051b3 100644 --- a/ucb/source/ucp/tdoc/tdoc_content.cxx +++ b/ucb/source/ucp/tdoc/tdoc_content.cxx @@ -147,13 +147,6 @@ Content* Content::create( return 0; } -#if 0 - // Fail, if content does exist. - if ( Content::hasData( pProvider, - Uri( Identifier->getContentIdentifier() ) ) ) - return 0; -#endif - return new Content( rxSMgr, pProvider, Identifier, Info ); } diff --git a/ucb/source/ucp/webdav/NeonSession.cxx b/ucb/source/ucp/webdav/NeonSession.cxx index 78247249c032..958b26dca153 100644 --- a/ucb/source/ucp/webdav/NeonSession.cxx +++ b/ucb/source/ucp/webdav/NeonSession.cxx @@ -263,15 +263,6 @@ extern "C" int NeonSession_NeonAuth( void * inUserData, * cancel the request. (if non-zero, username and password are * ignored.) */ -#if 0 - // Give'em only a limited mumber of retries.. - if ( attempt > 9 ) - { - // abort - return -1; - } -#endif - NeonSession * theSession = static_cast< NeonSession * >( inUserData ); DAVAuthListener * pListener = theSession->getRequestEnvironment().m_xAuthListener.get(); diff --git a/ucb/source/ucp/webdav/webdavcontent.cxx b/ucb/source/ucp/webdav/webdavcontent.cxx index 31be23798dd6..e7f36d16a619 100644 --- a/ucb/source/ucp/webdav/webdavcontent.cxx +++ b/ucb/source/ucp/webdav/webdavcontent.cxx @@ -852,27 +852,6 @@ void SAL_CALL Content::removeProperty( const rtl::OUString& Name ) // XCommandProcessor commands! uno::Reference< ucb::XCommandEnvironment > xEnv; -#if 0 - // @@@ REMOVEABLE z.Z. nicht richtig an der PropSetInfo gesetzt!!! - try - { - beans::Property aProp - = getPropertySetInfo( xEnv, sal_False /* don't cache data */ ) - ->getPropertyByName( Name ); - - if ( !( aProp.Attributes & beans::PropertyAttribute::REMOVEABLE ) ) - { - // Not removeable! - throw beans::NotRemoveableException(); - } - } - catch ( beans::UnknownPropertyException const & ) - { - //OSL_ENSURE( sal_False, "removeProperty - Unknown property!" ); - throw; - } -#endif - ////////////////////////////////////////////////////////////////////// // Try to remove property from server. ////////////////////////////////////////////////////////////////////// diff --git a/ucb/workben/ucb/ucbdemo.cxx b/ucb/workben/ucb/ucbdemo.cxx index da536a28baf4..32f253f1be47 100644 --- a/ucb/workben/ucb/ucbdemo.cxx +++ b/ucb/workben/ucb/ucbdemo.cxx @@ -439,21 +439,11 @@ sal_Bool Ucb::init() aArgs[1] <<= m_aConfigurationKey2; aArgs[2] <<= rtl::OUString::createFromAscii("PIPE"); aArgs[3] <<= aPipe; -#if 0 - m_xProv - = uno::Reference< XContentProvider >( - m_xFac-> - createInstanceWithArguments( - rtl::OUString::createFromAscii( - "com.sun.star.ucb." - "UniversalContentBroker"), - aArgs), - uno::UNO_QUERY); -#else + ::ucbhelper::ContentBroker::initialize( m_xFac, aArgs ); m_xProv = ::ucbhelper::ContentBroker::get()->getContentProviderInterface(); -#endif + } catch (uno::Exception const &) {} @@ -1311,36 +1301,6 @@ void UcbContent::transfer( const rtl::OUString& rSourceURL, sal_Bool bMove ) m_rUCB.getContentProvider(), uno::UNO_QUERY ); if ( xCommandProcessor.is() ) { - -#if 0 - ucb::Command aCommand( - rtl::OUString::createFromAscii( "getCommandInfo" ), -1, Any() ); - uno::Reference< ucb::XCommandInfo > xInfo; - xCommandProcessor->execute( - aCommand, 0, uno::Reference< ucb::XCommandEnvironment >() ) - >>= xInfo; - if ( xInfo.is() ) - { - ucb::CommandInfo aInfo - = xInfo->getCommandInfoByName( - rtl::OUString::createFromAscii( "globalTransfer" ) ); - - uno::Sequence< ucb::CommandInfo > aCommands - = xInfo->getCommands(); - const ucb::CommandInfo* pCommands = aCommands.getConstArray(); - - String aText( UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( "Commands:\n" ) ) ); - sal_uInt32 nCount = aCommands.getLength(); - for ( sal_uInt32 n = 0; n < nCount; ++n ) - { - aText.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " " ) ); - aText += String( pCommands[ n ].Name ); - aText += '\n'; - } - print( aText ); - } -#endif ucb::GlobalTransferCommandArgument aArg( bMove ? ucb::TransferCommandOperation_MOVE : ucb::TransferCommandOperation_COPY, |