ucb/source/core/FileAccess.cxx | 2 ucb/source/core/ucb.cxx | 6 - ucb/source/core/ucbcmds.cxx | 56 +++++++--------- ucb/source/core/ucbstore.cxx | 20 ++--- ucb/source/ucp/cmis/cmis_content.cxx | 34 +++++----- ucb/source/ucp/cmis/cmis_repo_content.cxx | 2 ucb/source/ucp/ext/ucpext_content.cxx | 13 +-- ucb/source/ucp/file/filglob.cxx | 8 +- ucb/source/ucp/file/filtask.cxx | 24 +++---- ucb/source/ucp/ftp/ftpcontent.cxx | 4 - ucb/source/ucp/ftp/ftpresultsetI.cxx | 2 ucb/source/ucp/hierarchy/hierarchycontent.cxx | 38 +++++------ ucb/source/ucp/hierarchy/hierarchydata.cxx | 14 ++-- ucb/source/ucp/package/pkgcontent.cxx | 52 +++++++-------- ucb/source/ucp/tdoc/tdoc_content.cxx | 70 ++++++++++---------- ucb/source/ucp/tdoc/tdoc_passwordrequest.cxx | 2 ucb/source/ucp/webdav-curl/ContentProperties.cxx | 28 ++++---- ucb/source/ucp/webdav-curl/webdavcontent.cxx | 78 +++++++++++------------ 18 files changed, 225 insertions(+), 228 deletions(-)
New commits: commit 605a34ccca64c86c89e4e8b6e4b049175a994d54 Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Tue May 3 12:19:50 2022 +0200 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Tue May 3 20:04:06 2022 +0200 Just use Any ctor instead of makeAny in ucb Change-Id: I5e6964b5fa02d27d37ee772c761c72ed5b50492c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133755 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/ucb/source/core/FileAccess.cxx b/ucb/source/core/FileAccess.cxx index e282d6b10c6d..24674ac07edd 100644 --- a/ucb/source/core/FileAccess.cxx +++ b/ucb/source/core/FileAccess.cxx @@ -288,7 +288,7 @@ void OFileAccess::kill( const OUString& FileURL ) ucbhelper::Content aCnt( aDeleteObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), mxEnvironment, comphelper::getProcessComponentContext() ); try { - aCnt.executeCommand( "delete", makeAny( true ) ); + aCnt.executeCommand( "delete", Any( true ) ); } catch ( css::ucb::CommandFailedException const & ) { diff --git a/ucb/source/core/ucb.cxx b/ucb/source/core/ucb.cxx index 48d02b3dfdae..4e41e8cff567 100644 --- a/ucb/source/core/ucb.cxx +++ b/ucb/source/core/ucb.cxx @@ -583,7 +583,7 @@ Any SAL_CALL UniversalContentBroker::execute( if ( !( aCommand.Argument >>= aArg ) ) { ucbhelper::cancelCommandExecution( - makeAny( IllegalArgumentException( + Any( IllegalArgumentException( "Wrong argument type!", static_cast< cppu::OWeakObject * >( this ), -1 ) ), @@ -607,7 +607,7 @@ Any SAL_CALL UniversalContentBroker::execute( if ( !( aCommand.Argument >>= aCheckinArg ) ) { ucbhelper::cancelCommandExecution( - makeAny( IllegalArgumentException( + Any( IllegalArgumentException( "Wrong argument type!", static_cast< cppu::OWeakObject * >( this ), -1 ) ), @@ -623,7 +623,7 @@ Any SAL_CALL UniversalContentBroker::execute( ucbhelper::cancelCommandExecution( - makeAny( UnsupportedCommandException( + Any( UnsupportedCommandException( OUString(), static_cast< cppu::OWeakObject * >( this ) ) ), Environment ); diff --git a/ucb/source/core/ucbcmds.cxx b/ucb/source/core/ucbcmds.cxx index 88c187199665..f0e45b7cbed5 100644 --- a/ucb/source/core/ucbcmds.cxx +++ b/ucb/source/core/ucbcmds.cxx @@ -433,7 +433,7 @@ bool setTitle( ucb::Command aSetPropsCommand( "setPropertyValues", -1, - uno::makeAny( aPropValues ) ); + uno::Any( aPropValues ) ); uno::Any aResult = xCommandProcessor->execute( aSetPropsCommand, 0, xEnv ); @@ -501,7 +501,7 @@ uno::Reference< ucb::XContent > createNew( ucb::Command aGetPropsCommand( "getPropertyValues", -1, - uno::makeAny( aPropsToObtain ) ); + uno::Any( aPropsToObtain ) ); uno::Reference< sdbc::XRow > xRow; xCommandProcessorT->execute( aGetPropsCommand, 0, rContext.xEnv ) >>= xRow; @@ -592,7 +592,7 @@ uno::Reference< ucb::XContent > createNew( else { ucbhelper::cancelCommandExecution( - uno::makeAny( lang::IllegalArgumentException( + uno::Any( lang::IllegalArgumentException( "Unknown transfer operation!", rContext.xProcessor, -1 ) ), @@ -614,7 +614,7 @@ uno::Reference< ucb::XContent > createNew( ucb::Command aCreateNewCommand( "createNewContent", -1, - uno::makeAny( *pTypeInfo ) ); + uno::Any( *pTypeInfo ) ); xCommandProcessorT->execute( aCreateNewCommand, 0, rContext.xEnv ) >>= xNew; @@ -681,7 +681,7 @@ void transferProperties( ucb::Command aGetPropsCommand1( "getPropertyValues", -1, - uno::makeAny( aAllProps ) ); + uno::Any( aAllProps ) ); uno::Reference< sdbc::XRow > xRow1; xCommandProcessorS->execute( @@ -793,7 +793,7 @@ void transferProperties( ucb::Command aSetPropsCommand( "setPropertyValues", -1, - uno::makeAny( aPropValues ) ); + uno::Any( aPropValues ) ); xCommandProcessorN->execute( aSetPropsCommand, 0, rContext.xEnv ); @@ -825,7 +825,7 @@ uno::Reference< io::XInputStream > getInputStream( ucb::Command aOpenCommand( "open", -1, - uno::makeAny( aArg ) ); + uno::Any( aArg ) ); xCommandProcessorS->execute( aOpenCommand, 0, rContext.xEnv ); xInputStream = xSink->getInputStream(); @@ -859,7 +859,7 @@ uno::Reference< io::XInputStream > getInputStream( ucb::Command aOpenCommand( "open", -1, - uno::makeAny( aArg ) ); + uno::Any( aArg ) ); xCommandProcessorS->execute( aOpenCommand, 0, rContext.xEnv ); @@ -897,7 +897,7 @@ uno::Reference< sdbc::XResultSet > getResultSet( ucb::Command aOpenCommand( "open", -1, - uno::makeAny( aArg ) ); + uno::Any( aArg ) ); try { uno::Reference< ucb::XDynamicResultSet > xSet; @@ -936,7 +936,7 @@ void handleNameClashRename( ucb::Command aGetPropsCommand( "getPropertyValues", -1, - uno::makeAny( aProps ) ); + uno::Any( aProps ) ); uno::Reference< sdbc::XRow > xRow; xCommandProcessorN->execute( aGetPropsCommand, 0, rContext.xEnv ) >>= xRow; @@ -960,7 +960,7 @@ void handleNameClashRename( if ( aOldTitle.isEmpty() ) { ucbhelper::cancelCommandExecution( - uno::makeAny( beans::UnknownPropertyException( + uno::Any( beans::UnknownPropertyException( "Unable to get property 'Title' from new object!", rContext.xProcessor ) ), rContext.xOrigEnv ); @@ -1048,7 +1048,7 @@ void handleNameClashRename( ucb::Command aInsertCommand( "insert", -1, - uno::makeAny( aArg ) ); + uno::Any( aArg ) ); xCommandProcessorN->execute( aInsertCommand, 0, rContext.xEnv ); @@ -1068,7 +1068,7 @@ void handleNameClashRename( if ( nTry == 50 ) { ucbhelper::cancelCommandExecution( - uno::makeAny( + uno::Any( ucb::UnsupportedNameClashException( "Unable to resolve name clash!", rContext.xProcessor, @@ -1090,7 +1090,7 @@ void globalTransfer_( if ( !bSourceIsFolder && xSourceProps->wasNull() ) { ucbhelper::cancelCommandExecution( - uno::makeAny( beans::UnknownPropertyException( + uno::Any( beans::UnknownPropertyException( "Unable to get property 'IsFolder' from source object!", rContext.xProcessor ) ), rContext.xOrigEnv ); @@ -1102,7 +1102,7 @@ void globalTransfer_( if ( !bSourceIsDocument && xSourceProps->wasNull() ) { ucbhelper::cancelCommandExecution( - uno::makeAny( beans::UnknownPropertyException( + uno::Any( beans::UnknownPropertyException( "Unable to get property 'IsDocument' from source object!", rContext.xProcessor ) ), rContext.xOrigEnv ); @@ -1145,11 +1145,10 @@ void globalTransfer_( xNew, uno::UNO_QUERY ); if ( !xCommandProcessorN.is() ) { - uno::Any aProps - = uno::makeAny(beans::PropertyValue( + uno::Any aProps(beans::PropertyValue( "Uri", -1, - uno::makeAny( + uno::Any( xNew->getIdentifier()-> getContentIdentifier()), beans::PropertyState_DIRECT_VALUE)); @@ -1243,7 +1242,7 @@ void globalTransfer_( ucb::Command aInsertCommand( "insert", -1, - uno::makeAny( aArg ) ); + uno::Any( aArg ) ); xCommandProcessorN->execute( aInsertCommand, 0, rContext.xEnv ); } @@ -1284,7 +1283,7 @@ void globalTransfer_( case ucb::NameClash::OVERWRITE: { ucbhelper::cancelCommandExecution( - uno::makeAny( + uno::Any( ucb::UnsupportedNameClashException( "BUG: insert + replace == true MUST NOT " "throw NameClashException.", @@ -1380,7 +1379,7 @@ void globalTransfer_( default: { ucbhelper::cancelCommandExecution( - uno::makeAny( + uno::Any( ucb::UnsupportedNameClashException( "default action, don't know how to " "handle name clash", @@ -1409,12 +1408,11 @@ void globalTransfer_( if ( !xChildRow.is() ) { - uno::Any aProps - = uno::makeAny( + uno::Any aProps( beans::PropertyValue( "Uri", -1, - uno::makeAny(rContext.aArg.SourceURL), + uno::Any(rContext.aArg.SourceURL), beans::PropertyState_DIRECT_VALUE)); ucbhelper::cancelCommandExecution( ucb::IOErrorCode_CANT_READ, @@ -1617,7 +1615,7 @@ void UniversalContentBroker::globalTransfer( ucb::Command aCommand( "transfer", // Name -1, // Handle - uno::makeAny( aTransferArg ) ); // Argument + uno::Any( aTransferArg ) ); // Argument xCommandProcessor->execute( aCommand, 0, xLocalEnv ); @@ -1654,7 +1652,7 @@ void UniversalContentBroker::globalTransfer( ucb::Command aCommand1( "transfer", -1, - uno::makeAny( aTransferArg1 ) ); + uno::Any( aTransferArg1 ) ); xCommandProcessor->execute( aCommand1, 0, xLocalEnv ); @@ -1784,7 +1782,7 @@ void UniversalContentBroker::globalTransfer( ucb::Command aGetPropsCommand( "getPropertyValues", -1, - uno::makeAny( aProps ) ); + uno::Any( aProps ) ); uno::Reference< sdbc::XRow > xRow; xCommandProcessor->execute( aGetPropsCommand, 0, xLocalEnv ) >>= xRow; @@ -1833,7 +1831,7 @@ void UniversalContentBroker::globalTransfer( ucb::Command aCommand( "delete", // Name -1, // Handle - uno::makeAny( true ) ); // Argument + uno::Any( true ) ); // Argument xCommandProcessor->execute( aCommand, 0, xLocalEnv ); } @@ -1910,7 +1908,7 @@ uno::Any UniversalContentBroker::checkIn( const ucb::CheckinArgument& rArg, { ucb::Command aCommand( "checkin", -1, - uno::makeAny( rArg ) ); + uno::Any( rArg ) ); aRet = xCommandProcessor->execute( aCommand, 0, xLocalEnv ); } diff --git a/ucb/source/core/ucbstore.cxx b/ucb/source/core/ucbstore.cxx index bac04d27d2da..01f7c70b56b1 100644 --- a/ucb/source/core/ucbstore.cxx +++ b/ucb/source/core/ucbstore.cxx @@ -301,7 +301,7 @@ PropertySetRegistry::openPropertySet( const OUString& key, sal_Bool create ) // Insert new item. xContainer->insertByName( - key, makeAny( xNameReplace ) ); + key, Any( xNameReplace ) ); // Commit changes. xBatch->commitChanges(); @@ -586,7 +586,7 @@ void PropertySetRegistry::renamePropertySet( const OUString& rOldKey, { // Insert new item. xContainer->insertByName( - rNewKey, makeAny( xNameReplace ) ); + rNewKey, Any( xNameReplace ) ); // Commit changes. xBatch->commitChanges(); } @@ -743,7 +743,7 @@ void PropertySetRegistry::renamePropertySet( const OUString& rOldKey, // Insert new item. xNewContainer->insertByName( - rPropName, makeAny( xNewPropNameReplace ) ); + rPropName, Any( xNewPropNameReplace ) ); // Commit changes. xBatch->commitChanges(); @@ -1162,7 +1162,7 @@ void SAL_CALL PersistentPropertySet::setPropertyValue( const OUString& aProperty // Write state ( Now it is a directly set value ) xNameReplace->replaceByName( "State", - makeAny( + Any( sal_Int32( PropertyState_DIRECT_VALUE ) ) ); @@ -1400,7 +1400,7 @@ void SAL_CALL PersistentPropertySet::addProperty( // Set handle xNameReplace->replaceByName( "Handle", - makeAny( sal_Int32( -1 ) ) ); + Any( sal_Int32( -1 ) ) ); // Set default value xNameReplace->replaceByName( @@ -1410,17 +1410,17 @@ void SAL_CALL PersistentPropertySet::addProperty( // Set state ( always "default" ) xNameReplace->replaceByName( "State", - makeAny( + Any( sal_Int32( PropertyState_DEFAULT_VALUE ) ) ); // Set attributes xNameReplace->replaceByName( "Attributes", - makeAny( sal_Int32( Attributes ) ) ); + Any( sal_Int32( Attributes ) ) ); // Insert new item. - xContainer->insertByName( Name, makeAny( xNameReplace ) ); + xContainer->insertByName( Name, Any( xNameReplace ) ); // Commit changes. xBatch->commitChanges(); @@ -1823,7 +1823,7 @@ void SAL_CALL PersistentPropertySet::setPropertyValues( // Write handle xNameReplace->replaceByName( "Handle", - makeAny( rNewValue.Handle ) ); + Any( rNewValue.Handle ) ); // Save old value OUString aValueName = aFullPropName +"/Value"; @@ -1838,7 +1838,7 @@ void SAL_CALL PersistentPropertySet::setPropertyValues( // Write state ( Now it is a directly set value ) xNameReplace->replaceByName( "State", - makeAny( + Any( sal_Int32( PropertyState_DIRECT_VALUE ) ) ); diff --git a/ucb/source/ucp/cmis/cmis_content.cxx b/ucb/source/ucp/cmis/cmis_content.cxx index 60e62315d869..59ad8df05118 100644 --- a/ucb/source/ucp/cmis/cmis_content.cxx +++ b/ucb/source/ucp/cmis/cmis_content.cxx @@ -240,17 +240,17 @@ namespace uno::Sequence< uno::Any > aArguments{ uno::Any(beans::PropertyValue( "Binding URL", - 1, - uno::makeAny( rURL.getBindingUrl() ), + uno::Any( rURL.getBindingUrl() ), beans::PropertyState_DIRECT_VALUE )), uno::Any(beans::PropertyValue( "Username", -1, - uno::makeAny( rURL.getUsername() ), + uno::Any( rURL.getUsername() ), beans::PropertyState_DIRECT_VALUE )), uno::Any(beans::PropertyValue( "Repository Id", -1, - uno::makeAny( rURL.getRepositoryId() ), + uno::Any( rURL.getRepositoryId() ), beans::PropertyState_DIRECT_VALUE )) }; return aArguments; @@ -595,7 +595,7 @@ namespace cmis uno::Any Content::getBadArgExcept() { - return uno::makeAny( lang::IllegalArgumentException( + return uno::Any( lang::IllegalArgumentException( "Wrong argument type!", static_cast< cppu::OWeakObject * >( this ), -1) ); } @@ -780,7 +780,7 @@ namespace cmis } else if ( rProp.Name == "CreatableContentsInfo" ) { - xRow->appendObject( rProp, uno::makeAny( queryCreatableContentsInfo( xEnv ) ) ); + xRow->appendObject( rProp, uno::Any( queryCreatableContentsInfo( xEnv ) ) ); } else if ( rProp.Name == "MediaType" ) { @@ -874,7 +874,7 @@ namespace cmis } ++i; } - xRow->appendObject( rProp.Name, uno::makeAny( aCmisProperties ) ); + xRow->appendObject( rProp.Name, uno::Any( aCmisProperties ) ); } catch ( const libcmis::Exception& ) { @@ -969,7 +969,7 @@ namespace cmis if ( !getObject( xEnv ) ) { uno::Sequence< uno::Any > aArgs{ uno::Any(m_xIdentifier->getContentIdentifier()) }; - uno::Any aErr = uno::makeAny( + uno::Any aErr( ucb::InteractiveAugmentedIOException(OUString(), static_cast< cppu::OWeakObject * >( this ), task::InteractionClassification_ERROR, bIsFolder ? ucb::IOErrorCode_NOT_EXISTING_PATH : ucb::IOErrorCode_NOT_EXISTING, aArgs) @@ -1000,7 +1000,7 @@ namespace cmis ) { ucbhelper::cancelCommandExecution( - uno::makeAny ( ucb::UnsupportedOpenModeException + uno::Any ( ucb::UnsupportedOpenModeException ( OUString(), static_cast< cppu::OWeakObject * >( this ), sal_Int16( rOpenCommand.Mode ) ) ), xEnv ); @@ -1014,7 +1014,7 @@ namespace cmis SAL_INFO( "ucb.ucp.cmis", "Failed to copy data to sink" ); ucbhelper::cancelCommandExecution( - uno::makeAny (ucb::UnsupportedDataSinkException + uno::Any (ucb::UnsupportedDataSinkException ( OUString(), static_cast< cppu::OWeakObject * >( this ), rOpenCommand.Sink ) ), xEnv ); @@ -1258,7 +1258,7 @@ namespace cmis if ( sSrcBindingUrl != m_aURL.getBindingUrl( ) ) { ucbhelper::cancelCommandExecution( - uno::makeAny( + uno::Any( ucb::InteractiveBadTransferURLException( "Unsupported URL scheme!", static_cast< cppu::OWeakObject * >( this ) ) ), @@ -1275,7 +1275,7 @@ namespace cmis { if ( !xInputStream.is() ) { - ucbhelper::cancelCommandExecution( uno::makeAny + ucbhelper::cancelCommandExecution( uno::Any ( ucb::MissingInputStreamException ( OUString(), static_cast< cppu::OWeakObject * >( this ) ) ), xEnv ); @@ -1304,7 +1304,7 @@ namespace cmis std::map< std::string, libcmis::PropertyPtr >::iterator it = m_pObjectProps.find( "cmis:name" ); if ( it == m_pObjectProps.end( ) ) { - ucbhelper::cancelCommandExecution( uno::makeAny + ucbhelper::cancelCommandExecution( uno::Any ( uno::RuntimeException( "Missing name property", static_cast< cppu::OWeakObject * >( this ) ) ), xEnv ); @@ -1332,7 +1332,7 @@ namespace cmis // Are the base type matching? if ( object->getBaseType( ) != m_pObjectType->getBaseType( )->getId() ) { - ucbhelper::cancelCommandExecution( uno::makeAny + ucbhelper::cancelCommandExecution( uno::Any ( uno::RuntimeException( "Can't change a folder into a document and vice-versa.", static_cast< cppu::OWeakObject * >( this ) ) ), xEnv ); @@ -1351,7 +1351,7 @@ namespace cmis } catch ( const libcmis::Exception& ) { - ucbhelper::cancelCommandExecution( uno::makeAny + ucbhelper::cancelCommandExecution( uno::Any ( uno::RuntimeException( "Error when setting document content", static_cast< cppu::OWeakObject * >( this ) ) ), xEnv ); @@ -1373,7 +1373,7 @@ namespace cmis } catch ( const libcmis::Exception& ) { - ucbhelper::cancelCommandExecution( uno::makeAny + ucbhelper::cancelCommandExecution( uno::Any ( uno::RuntimeException( "Error when creating folder", static_cast< cppu::OWeakObject * >( this ) ) ), xEnv ); @@ -1391,7 +1391,7 @@ namespace cmis } catch ( const libcmis::Exception& ) { - ucbhelper::cancelCommandExecution( uno::makeAny + ucbhelper::cancelCommandExecution( uno::Any ( uno::RuntimeException( "Error when creating document", static_cast< cppu::OWeakObject * >( this ) ) ), xEnv ); @@ -1875,7 +1875,7 @@ namespace cmis SAL_INFO( "ucb.ucp.cmis", "Unknown command to execute" ); ucbhelper::cancelCommandExecution - ( uno::makeAny( ucb::UnsupportedCommandException + ( uno::Any( ucb::UnsupportedCommandException ( OUString(), static_cast< cppu::OWeakObject * >( this ) ) ), xEnv ); diff --git a/ucb/source/ucp/cmis/cmis_repo_content.cxx b/ucb/source/ucp/cmis/cmis_repo_content.cxx index c55b670526b8..b6ee48ab7906 100644 --- a/ucb/source/ucp/cmis/cmis_repo_content.cxx +++ b/ucb/source/ucp/cmis/cmis_repo_content.cxx @@ -71,7 +71,7 @@ namespace cmis uno::Any RepoContent::getBadArgExcept() { - return uno::makeAny( lang::IllegalArgumentException( + return uno::Any( lang::IllegalArgumentException( "Wrong argument type!", static_cast< cppu::OWeakObject * >( this ), -1) ); } diff --git a/ucb/source/ucp/ext/ucpext_content.cxx b/ucb/source/ucp/ext/ucpext_content.cxx index 8dd120080133..71d6cbbaeb42 100644 --- a/ucb/source/ucp/ext/ucpext_content.cxx +++ b/ucb/source/ucp/ext/ucpext_content.cxx @@ -54,7 +54,6 @@ namespace ucb::ucp::ext using ::com::sun::star::uno::UNO_SET_THROW; using ::com::sun::star::uno::Exception; using ::com::sun::star::uno::Any; - using ::com::sun::star::uno::makeAny; using ::com::sun::star::uno::Sequence; using ::com::sun::star::uno::XComponentContext; using ::com::sun::star::ucb::XContentIdentifier; @@ -180,7 +179,7 @@ namespace ucb::ucp::ext Sequence< Property > Properties; if ( !( aCommand.Argument >>= Properties ) ) { - ::ucbhelper::cancelCommandExecution( makeAny( IllegalArgumentException( + ::ucbhelper::cancelCommandExecution( Any( IllegalArgumentException( OUString(), *this, -1 ) ), i_rEnvironment ); // unreachable @@ -193,7 +192,7 @@ namespace ucb::ucp::ext Sequence< PropertyValue > aProperties; if ( !( aCommand.Argument >>= aProperties ) ) { - ::ucbhelper::cancelCommandExecution( makeAny( IllegalArgumentException( + ::ucbhelper::cancelCommandExecution( Any( IllegalArgumentException( OUString(), *this, -1 ) ), i_rEnvironment ); // unreachable @@ -201,7 +200,7 @@ namespace ucb::ucp::ext if ( !aProperties.hasElements() ) { - ::ucbhelper::cancelCommandExecution( makeAny( IllegalArgumentException( + ::ucbhelper::cancelCommandExecution( Any( IllegalArgumentException( OUString(), *this, -1 ) ), i_rEnvironment ); // unreachable @@ -224,7 +223,7 @@ namespace ucb::ucp::ext OpenCommandArgument2 aOpenCommand; if ( !( aCommand.Argument >>= aOpenCommand ) ) { - ::ucbhelper::cancelCommandExecution( makeAny( IllegalArgumentException( + ::ucbhelper::cancelCommandExecution( Any( IllegalArgumentException( OUString(), *this, -1 ) ), i_rEnvironment ); // unreachable @@ -246,13 +245,13 @@ namespace ucb::ucp::ext { const OUString sPhysicalContentURL( getPhysicalURL() ); ::ucbhelper::Content aRequestedContent( sPhysicalContentURL, i_rEnvironment, m_xContext ); - aRet = aRequestedContent.executeCommand( "open", makeAny( aOpenCommand ) ); + aRet = aRequestedContent.executeCommand( "open", Any( aOpenCommand ) ); } } else { - ::ucbhelper::cancelCommandExecution( makeAny( UnsupportedCommandException( + ::ucbhelper::cancelCommandExecution( Any( UnsupportedCommandException( OUString(), *this ) ), i_rEnvironment ); // unreachable diff --git a/ucb/source/ucp/file/filglob.cxx b/ucb/source/ucp/file/filglob.cxx index d93c41b514de..30b0f2679e53 100644 --- a/ucb/source/ucp/file/filglob.cxx +++ b/ucb/source/ucp/file/filglob.cxx @@ -123,25 +123,25 @@ namespace { pArguments[i++] <<= PropertyValue("Uri", -1, - makeAny(rPhysicalUrl), + Any(rPhysicalUrl), PropertyState_DIRECT_VALUE); if (bResourceName) pArguments[i++] <<= PropertyValue("ResourceName", -1, - makeAny(aResourceName), + Any(aResourceName), PropertyState_DIRECT_VALUE); if (bResourceType) pArguments[i++] <<= PropertyValue("ResourceType", -1, - makeAny(aResourceType), + Any(aResourceType), PropertyState_DIRECT_VALUE); if (bRemoveProperty) pArguments[i++] <<= PropertyValue("Removable", -1, - makeAny(bRemovable), + Any(bRemovable), PropertyState_DIRECT_VALUE); return aArguments; diff --git a/ucb/source/ucp/file/filtask.cxx b/ucb/source/ucp/file/filtask.cxx index dcbe2a128b74..122ad052618c 100644 --- a/ucb/source/ucp/file/filtask.cxx +++ b/ucb/source/ucp/file/filtask.cxx @@ -2326,15 +2326,15 @@ TaskManager::commit( const TaskManager::ContentMap::iterator& it, it1 = properties.find( MyProperty( IsVolume ) ); if( it1 != properties.end() ) - it1->setValue( uno::makeAny( isVolume ) ); + it1->setValue( uno::Any( isVolume ) ); it1 = properties.find( MyProperty( IsFolder ) ); if( it1 != properties.end() ) - it1->setValue( uno::makeAny( isDirectory ) ); + it1->setValue( uno::Any( isDirectory ) ); it1 = properties.find( MyProperty( IsDocument ) ); if( it1 != properties.end() ) - it1->setValue( uno::makeAny( isFile ) ); + it1->setValue( uno::Any( isFile ) ); osl::VolumeInfo aVolumeInfo( osl_VolumeInfo_Mask_Attributes ); if( isVolume && @@ -2349,19 +2349,19 @@ TaskManager::commit( const TaskManager::ContentMap::iterator& it, it1 = properties.find( MyProperty( IsRemote ) ); if( it1 != properties.end() ) - it1->setValue( uno::makeAny( isRemote ) ); + it1->setValue( uno::Any( isRemote ) ); it1 = properties.find( MyProperty( IsRemoveable ) ); if( it1 != properties.end() ) - it1->setValue( uno::makeAny( isRemoveable ) ); + it1->setValue( uno::Any( isRemoveable ) ); it1 = properties.find( MyProperty( IsCompactDisc ) ); if( it1 != properties.end() ) - it1->setValue( uno::makeAny( isCompactDisc ) ); + it1->setValue( uno::Any( isCompactDisc ) ); it1 = properties.find( MyProperty( IsFloppy ) ); if( it1 != properties.end() ) - it1->setValue( uno::makeAny( isFloppy ) ); + it1->setValue( uno::Any( isFloppy ) ); } else { @@ -2390,7 +2390,7 @@ TaskManager::commit( const TaskManager::ContentMap::iterator& it, it1 = properties.find( MyProperty( Size ) ); if( it1 != properties.end() ) - it1->setValue( uno::makeAny( dirSize ) ); + it1->setValue( uno::Any( dirSize ) ); it1 = properties.find( MyProperty( IsReadOnly ) ); if( it1 != properties.end() ) @@ -2399,7 +2399,7 @@ TaskManager::commit( const TaskManager::ContentMap::iterator& it, { sal_uInt64 Attr = aFileStatus.getAttributes(); bool readonly = ( Attr & osl_File_Attribute_ReadOnly ) != 0; - it1->setValue( uno::makeAny( readonly ) ); + it1->setValue( uno::Any( readonly ) ); } } @@ -2410,7 +2410,7 @@ TaskManager::commit( const TaskManager::ContentMap::iterator& it, { sal_uInt64 Attr = aFileStatus.getAttributes(); bool ishidden = ( Attr & osl_File_Attribute_Hidden ) != 0; - it1->setValue( uno::makeAny( ishidden ) ); + it1->setValue( uno::Any( ishidden ) ); } } @@ -2443,13 +2443,13 @@ TaskManager::commit( const TaskManager::ContentMap::iterator& it, aDateTime.Day = myDateTime.Day; aDateTime.Month = myDateTime.Month; aDateTime.Year = myDateTime.Year; - it1->setValue( uno::makeAny( aDateTime ) ); + it1->setValue( uno::Any( aDateTime ) ); } } it1 = properties.find( MyProperty( CreatableContentsInfo ) ); if( it1 != properties.end() ) - it1->setValue( uno::makeAny( + it1->setValue( uno::Any( isDirectory || !aFileStatus.isValid( osl_FileStatus_Mask_Type ) ? queryCreatableContentsInfo() : uno::Sequence< ucb::ContentInfo >() ) ); diff --git a/ucb/source/ucp/ftp/ftpcontent.cxx b/ucb/source/ucp/ftp/ftpcontent.cxx index 3b035681da95..8e02302ebc4e 100644 --- a/ucb/source/ucp/ftp/ftpcontent.cxx +++ b/ucb/source/ucp/ftp/ftpcontent.cxx @@ -515,7 +515,7 @@ Any SAL_CALL FTPContent::execute( const Command& aCommand, ContentInfo aArg; if (!(aCommand.Argument >>= aArg)) { ucbhelper::cancelCommandExecution( - makeAny( + Any( IllegalArgumentException( "Wrong argument type!", static_cast< cppu::OWeakObject * >(this), @@ -730,7 +730,7 @@ Reference< XRow > FTPContent::getPropertyValues( xRow->appendString(rProp,aDirEntry.m_aName); else if(Name == "CreatableContentsInfo") xRow->appendObject(rProp, - makeAny(queryCreatableContentsInfo())); + Any(queryCreatableContentsInfo())); else if(aDirEntry.m_nMode != INETCOREFTP_FILEMODE_UNKNOWN) { if(Name == "ContentType") xRow->appendString(rProp, diff --git a/ucb/source/ucp/ftp/ftpresultsetI.cxx b/ucb/source/ucp/ftp/ftpresultsetI.cxx index d886a0dbf973..baef97284579 100644 --- a/ucb/source/ucp/ftp/ftpresultsetI.cxx +++ b/ucb/source/ucp/ftp/ftpresultsetI.cxx @@ -79,7 +79,7 @@ ResultSetI::ResultSetI(const Reference<XComponentContext>& rxContext, else if(Name == "CreatableContentsInfo") xRow->appendObject( rProp, - makeAny(FTPContent::queryCreatableContentsInfo_Static())); + Any(FTPContent::queryCreatableContentsInfo_Static())); else xRow->appendVoid(rProp); } diff --git a/ucb/source/ucp/hierarchy/hierarchycontent.cxx b/ucb/source/ucp/hierarchy/hierarchycontent.cxx index 2151cbaf3c71..1a773cd24564 100644 --- a/ucb/source/ucp/hierarchy/hierarchycontent.cxx +++ b/ucb/source/ucp/hierarchy/hierarchycontent.cxx @@ -309,7 +309,7 @@ uno::Any SAL_CALL HierarchyContent::execute( if ( !( aCommand.Argument >>= Properties ) ) { ucbhelper::cancelCommandExecution( - uno::makeAny( lang::IllegalArgumentException( + uno::Any( lang::IllegalArgumentException( "Wrong argument type!", static_cast< cppu::OWeakObject * >( this ), -1 ) ), @@ -329,7 +329,7 @@ uno::Any SAL_CALL HierarchyContent::execute( if ( !( aCommand.Argument >>= aProperties ) ) { ucbhelper::cancelCommandExecution( - uno::makeAny( lang::IllegalArgumentException( + uno::Any( lang::IllegalArgumentException( "Wrong argument type!", static_cast< cppu::OWeakObject * >( this ), -1 ) ), @@ -340,7 +340,7 @@ uno::Any SAL_CALL HierarchyContent::execute( if ( !aProperties.hasElements() ) { ucbhelper::cancelCommandExecution( - uno::makeAny( lang::IllegalArgumentException( + uno::Any( lang::IllegalArgumentException( "No properties!", static_cast< cppu::OWeakObject * >( this ), -1 ) ), @@ -376,7 +376,7 @@ uno::Any SAL_CALL HierarchyContent::execute( if ( !( aCommand.Argument >>= aOpenCommand ) ) { ucbhelper::cancelCommandExecution( - uno::makeAny( lang::IllegalArgumentException( + uno::Any( lang::IllegalArgumentException( "Wrong argument type!", static_cast< cppu::OWeakObject * >( this ), -1 ) ), @@ -399,7 +399,7 @@ uno::Any SAL_CALL HierarchyContent::execute( if ( !( aCommand.Argument >>= aArg ) ) { ucbhelper::cancelCommandExecution( - uno::makeAny( lang::IllegalArgumentException( + uno::Any( lang::IllegalArgumentException( "Wrong argument type!", static_cast< cppu::OWeakObject * >( this ), -1 ) ), @@ -454,7 +454,7 @@ uno::Any SAL_CALL HierarchyContent::execute( { OSL_FAIL( "Wrong argument type!" ); ucbhelper::cancelCommandExecution( - uno::makeAny( lang::IllegalArgumentException( + uno::Any( lang::IllegalArgumentException( "Wrong argument type!", static_cast< cppu::OWeakObject * >( this ), -1 ) ), @@ -476,7 +476,7 @@ uno::Any SAL_CALL HierarchyContent::execute( { OSL_FAIL( "Wrong argument type!" ); ucbhelper::cancelCommandExecution( - uno::makeAny( lang::IllegalArgumentException( + uno::Any( lang::IllegalArgumentException( "Wrong argument type!", static_cast< cppu::OWeakObject * >( this ), -1 ) ), @@ -493,7 +493,7 @@ uno::Any SAL_CALL HierarchyContent::execute( ucbhelper::cancelCommandExecution( - uno::makeAny( ucb::UnsupportedCommandException( + uno::Any( ucb::UnsupportedCommandException( OUString(), static_cast< cppu::OWeakObject * >( this ) ) ), Environment ); @@ -867,7 +867,7 @@ uno::Reference< sdbc::XRow > HierarchyContent::getPropertyValues( else if ( rProp.Name == "CreatableContentsInfo" ) { xRow->appendObject( - rProp, uno::makeAny( rData.getCreatableContentsInfo() ) ); + rProp, uno::Any( rData.getCreatableContentsInfo() ) ); } else if ( rProp.Name == "TargetURL" ) { @@ -955,7 +955,7 @@ uno::Reference< sdbc::XRow > HierarchyContent::getPropertyValues( cppu::UnoType<uno::Sequence< ucb::ContentInfo >>::get(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), - uno::makeAny( rData.getCreatableContentsInfo() ) ); + uno::Any( rData.getCreatableContentsInfo() ) ); // Append all Additional Core Properties. @@ -1290,7 +1290,7 @@ void HierarchyContent::insert( sal_Int32 nNameClashResolve, if ( m_eKind == ROOT ) { ucbhelper::cancelCommandExecution( - uno::makeAny( ucb::UnsupportedCommandException( + uno::Any( ucb::UnsupportedCommandException( "Not supported by root folder!", static_cast< cppu::OWeakObject * >( this ) ) ), xEnv ); @@ -1302,7 +1302,7 @@ void HierarchyContent::insert( sal_Int32 nNameClashResolve, { uno::Sequence<OUString> aProps { "Title" }; ucbhelper::cancelCommandExecution( - uno::makeAny( ucb::MissingPropertiesException( + uno::Any( ucb::MissingPropertiesException( OUString(), static_cast< cppu::OWeakObject * >( this ), aProps ) ), @@ -1324,7 +1324,7 @@ void HierarchyContent::insert( sal_Int32 nNameClashResolve, if ( hasData( xId ) ) { ucbhelper::cancelCommandExecution( - uno::makeAny( + uno::Any( ucb::NameClashException( OUString(), static_cast< cppu::OWeakObject * >( this ), @@ -1356,7 +1356,7 @@ void HierarchyContent::insert( sal_Int32 nNameClashResolve, if ( nTry == 1000 ) { ucbhelper::cancelCommandExecution( - uno::makeAny( + uno::Any( ucb::UnsupportedNameClashException( "Unable to resolve name clash!", static_cast< cppu::OWeakObject * >( this ), @@ -1378,7 +1378,7 @@ void HierarchyContent::insert( sal_Int32 nNameClashResolve, if ( hasData( xId ) ) { ucbhelper::cancelCommandExecution( - uno::makeAny( + uno::Any( ucb::UnsupportedNameClashException( OUString(), static_cast< cppu::OWeakObject * >( this ), @@ -1433,7 +1433,7 @@ void HierarchyContent::destroy( bool bDeletePhysical, if ( m_eState != PERSISTENT ) { ucbhelper::cancelCommandExecution( - uno::makeAny( ucb::UnsupportedCommandException( + uno::Any( ucb::UnsupportedCommandException( "Not persistent!", static_cast< cppu::OWeakObject * >( this ) ) ), xEnv ); @@ -1444,7 +1444,7 @@ void HierarchyContent::destroy( bool bDeletePhysical, if ( m_eKind == ROOT ) { ucbhelper::cancelCommandExecution( - uno::makeAny( ucb::UnsupportedCommandException( + uno::Any( ucb::UnsupportedCommandException( "Not supported by root folder!", static_cast< cppu::OWeakObject * >( this ) ) ), xEnv ); @@ -1481,7 +1481,7 @@ void HierarchyContent::transfer( if ( m_eState != PERSISTENT ) { ucbhelper::cancelCommandExecution( - uno::makeAny( ucb::UnsupportedCommandException( + uno::Any( ucb::UnsupportedCommandException( "Not persistent!", static_cast< cppu::OWeakObject * >( this ) ) ), xEnv ); @@ -1492,7 +1492,7 @@ void HierarchyContent::transfer( if ( !rInfo.SourceURL.startsWith( HIERARCHY_URL_SCHEME ":/" ) ) { ucbhelper::cancelCommandExecution( - uno::makeAny( ucb::InteractiveBadTransferURLException( + uno::Any( ucb::InteractiveBadTransferURLException( OUString(), static_cast< cppu::OWeakObject * >( this ) ) ), xEnv ); diff --git a/ucb/source/ucp/hierarchy/hierarchydata.cxx b/ucb/source/ucp/hierarchy/hierarchydata.cxx index 737ef9809044..bbdde5c2d1ff 100644 --- a/ucb/source/ucp/hierarchy/hierarchydata.cxx +++ b/ucb/source/ucp/hierarchy/hierarchydata.cxx @@ -376,7 +376,7 @@ bool HierarchyEntry::setData( const HierarchyEntryData& rData ) // Set Title value. xNameReplace->replaceByName( "Title", - uno::makeAny( rData.getTitle() ) ); + uno::Any( rData.getTitle() ) ); // Set TargetURL value. @@ -392,18 +392,18 @@ bool HierarchyEntry::setData( const HierarchyEntryData& rData ) xNameReplace->replaceByName( "TargetURL", - uno::makeAny( aValue ) ); + uno::Any( aValue ) ); // Set Type value. sal_Int32 nType = rData.getType() == HierarchyEntryData::LINK ? 0 : 1; xNameReplace->replaceByName( "Type", - uno::makeAny( nType ) ); + uno::Any( nType ) ); if ( xContainer.is() ) xContainer->insertByName( - m_aName, uno::makeAny( xNameReplace ) ); + m_aName, uno::Any( xNameReplace ) ); // Commit changes. xBatch->commitChanges(); @@ -678,7 +678,7 @@ bool HierarchyEntry::move( xNewNameReplace->replaceByName( "Title", - uno::makeAny( rData.getTitle() ) ); + uno::Any( rData.getTitle() ) ); // TargetURL property may contain a reference to the Office // installation directory. To ensure a reloctable office @@ -690,11 +690,11 @@ bool HierarchyEntry::move( aValue = m_xOfficeInstDirs->makeRelocatableURL( aValue ); xNewNameReplace->replaceByName( "TargetURL", - uno::makeAny( aValue ) ); + uno::Any( aValue ) ); sal_Int32 nType = rData.getType() == HierarchyEntryData::LINK ? 0 : 1; xNewNameReplace->replaceByName( "Type", - uno::makeAny( nType ) ); + uno::Any( nType ) ); xNewNameContainer->insertByName( aNewKey, aEntry ); xNewParentBatch->commitChanges(); diff --git a/ucb/source/ucp/package/pkgcontent.cxx b/ucb/source/ucp/package/pkgcontent.cxx index a22ab7bdaaed..7fa8a13930f4 100644 --- a/ucb/source/ucp/package/pkgcontent.cxx +++ b/ucb/source/ucp/package/pkgcontent.cxx @@ -401,7 +401,7 @@ uno::Any SAL_CALL Content::execute( if ( !( aCommand.Argument >>= Properties ) ) { ucbhelper::cancelCommandExecution( - uno::makeAny( lang::IllegalArgumentException( + uno::Any( lang::IllegalArgumentException( "Wrong argument type!", static_cast< cppu::OWeakObject * >( this ), -1 ) ), @@ -421,7 +421,7 @@ uno::Any SAL_CALL Content::execute( if ( !( aCommand.Argument >>= aProperties ) ) { ucbhelper::cancelCommandExecution( - uno::makeAny( lang::IllegalArgumentException( + uno::Any( lang::IllegalArgumentException( "Wrong argument type!", static_cast< cppu::OWeakObject * >( this ), -1 ) ), @@ -432,7 +432,7 @@ uno::Any SAL_CALL Content::execute( if ( !aProperties.hasElements() ) { ucbhelper::cancelCommandExecution( - uno::makeAny( lang::IllegalArgumentException( + uno::Any( lang::IllegalArgumentException( "No properties!", static_cast< cppu::OWeakObject * >( this ), -1 ) ), @@ -470,7 +470,7 @@ uno::Any SAL_CALL Content::execute( if ( !( aCommand.Argument >>= aOpenCommand ) ) { ucbhelper::cancelCommandExecution( - uno::makeAny( lang::IllegalArgumentException( + uno::Any( lang::IllegalArgumentException( "Wrong argument type!", static_cast< cppu::OWeakObject * >( this ), -1 ) ), @@ -490,7 +490,7 @@ uno::Any SAL_CALL Content::execute( if ( !( aCommand.Argument >>= aArg ) ) { ucbhelper::cancelCommandExecution( - uno::makeAny( lang::IllegalArgumentException( + uno::Any( lang::IllegalArgumentException( "Wrong argument type!", static_cast< cppu::OWeakObject * >( this ), -1 ) ), @@ -543,7 +543,7 @@ uno::Any SAL_CALL Content::execute( if ( !( aCommand.Argument >>= aInfo ) ) { ucbhelper::cancelCommandExecution( - uno::makeAny( lang::IllegalArgumentException( + uno::Any( lang::IllegalArgumentException( "Wrong argument type!", static_cast< cppu::OWeakObject * >( this ), -1 ) ), @@ -565,7 +565,7 @@ uno::Any SAL_CALL Content::execute( { OSL_FAIL( "Wrong argument type!" ); ucbhelper::cancelCommandExecution( - uno::makeAny( lang::IllegalArgumentException( + uno::Any( lang::IllegalArgumentException( "Wrong argument type!", static_cast< cppu::OWeakObject * >( this ), -1 ) ), @@ -604,7 +604,7 @@ uno::Any SAL_CALL Content::execute( ucbhelper::cancelCommandExecution( - uno::makeAny( ucb::UnsupportedCommandException( + uno::Any( ucb::UnsupportedCommandException( OUString(), static_cast< cppu::OWeakObject * >( this ) ) ), Environment ); @@ -756,7 +756,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( else if ( rProp.Name == "CreatableContentsInfo" ) { xRow->appendObject( - rProp, uno::makeAny( + rProp, uno::Any( rData.getCreatableContentsInfo( PackageUri( rContentId ) ) ) ); } @@ -868,7 +868,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( cppu::UnoType<uno::Sequence< ucb::ContentInfo >>::get(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), - uno::makeAny( + uno::Any( rData.getCreatableContentsInfo( PackageUri( rContentId ) ) ) ); xRow->appendString( beans::Property( @@ -1342,7 +1342,7 @@ uno::Any Content::open( uno::Reference< ucb::XDynamicResultSet > xSet = new DynamicResultSet( m_xContext, this, rArg, xEnv ); - return uno::makeAny( xSet ); + return uno::Any( xSet ); } else { @@ -1355,7 +1355,7 @@ uno::Any Content::open( { // Currently(?) unsupported. ucbhelper::cancelCommandExecution( - uno::makeAny( ucb::UnsupportedOpenModeException( + uno::Any( ucb::UnsupportedOpenModeException( OUString(), static_cast< cppu::OWeakObject * >( this ), sal_Int16( rArg.Mode ) ) ), @@ -1451,7 +1451,7 @@ uno::Any Content::open( // implementation. Support for this type of // sink is optional... ucbhelper::cancelCommandExecution( - uno::makeAny( + uno::Any( ucb::UnsupportedDataSinkException( OUString(), static_cast< cppu::OWeakObject * >( this ), @@ -1488,7 +1488,7 @@ void Content::insert( if ( !xStream.is() ) { ucbhelper::cancelCommandExecution( - uno::makeAny( ucb::MissingInputStreamException( + uno::Any( ucb::MissingInputStreamException( OUString(), static_cast< cppu::OWeakObject * >( this ) ) ), xEnv ); @@ -1515,7 +1515,7 @@ void Content::insert( if ( hasData( aNewUri ) ) { ucbhelper::cancelCommandExecution( - uno::makeAny( ucb::NameClashException( + uno::Any( ucb::NameClashException( OUString(), static_cast< cppu::OWeakObject * >( this ), task::InteractionClassification_ERROR, @@ -1546,7 +1546,7 @@ void Content::insert( if ( nTry == 1000 ) { ucbhelper::cancelCommandExecution( - uno::makeAny( + uno::Any( ucb::UnsupportedNameClashException( "Unable to resolve name clash!", static_cast< cppu::OWeakObject * >( this ), @@ -1568,7 +1568,7 @@ void Content::insert( if ( hasData( aNewUri ) ) { ucbhelper::cancelCommandExecution( - uno::makeAny( + uno::Any( ucb::UnsupportedNameClashException( OUString(), static_cast< cppu::OWeakObject * >( this ), @@ -1634,7 +1634,7 @@ void Content::destroy( if ( m_eState != PERSISTENT ) { ucbhelper::cancelCommandExecution( - uno::makeAny( ucb::UnsupportedCommandException( + uno::Any( ucb::UnsupportedCommandException( "Not persistent!", static_cast< cppu::OWeakObject * >( this ) ) ), xEnv ); @@ -1671,7 +1671,7 @@ void Content::transfer( if ( m_eState != PERSISTENT ) { ucbhelper::cancelCommandExecution( - uno::makeAny( ucb::UnsupportedCommandException( + uno::Any( ucb::UnsupportedCommandException( "Not persistent!", static_cast< cppu::OWeakObject * >( this ) ) ), xEnv ); @@ -1684,7 +1684,7 @@ void Content::transfer( m_aUri.getUri(), PACKAGE_URL_SCHEME_LENGTH + 3 ) != 0 ) ) { ucbhelper::cancelCommandExecution( - uno::makeAny( ucb::InteractiveBadTransferURLException( + uno::Any( ucb::InteractiveBadTransferURLException( OUString(), static_cast< cppu::OWeakObject * >( this ) ) ), xEnv ); @@ -2338,7 +2338,7 @@ bool Content::storeData( const uno::Reference< io::XInputStream >& xStream ) { xPackagePropSet->setPropertyValue( "EncryptionKey", - uno::makeAny( m_aProps.aEncryptionKey ) ); + uno::Any( m_aProps.aEncryptionKey ) ); m_nModifiedProps &= ~ENCRYPTIONKEY_MODIFIED; } catch ( beans::UnknownPropertyException const & ) @@ -2402,7 +2402,7 @@ bool Content::storeData( const uno::Reference< io::XInputStream >& xStream ) } xParentContainer->insertByName( m_aProps.aTitle, - uno::makeAny( xNew ) ); + uno::Any( xNew ) ); } catch ( lang::IllegalArgumentException const & ) { @@ -2462,7 +2462,7 @@ bool Content::storeData( const uno::Reference< io::XInputStream >& xStream ) { xPropSet->setPropertyValue( "MediaType", - uno::makeAny( m_aProps.aMediaType ) ); + uno::Any( m_aProps.aMediaType ) ); m_nModifiedProps &= ~MEDIATYPE_MODIFIED; } @@ -2471,7 +2471,7 @@ bool Content::storeData( const uno::Reference< io::XInputStream >& xStream ) if ( !isFolder() ) xPropSet->setPropertyValue( "Compressed", - uno::makeAny( m_aProps.bCompressed ) ); + uno::Any( m_aProps.bCompressed ) ); m_nModifiedProps &= ~COMPRESSED_MODIFIED; } @@ -2481,7 +2481,7 @@ bool Content::storeData( const uno::Reference< io::XInputStream >& xStream ) if ( !isFolder() ) xPropSet->setPropertyValue( "Encrypted", - uno::makeAny( m_aProps.bEncrypted ) ); + uno::Any( m_aProps.bEncrypted ) ); m_nModifiedProps &= ~ENCRYPTED_MODIFIED; } @@ -2491,7 +2491,7 @@ bool Content::storeData( const uno::Reference< io::XInputStream >& xStream ) if ( !isFolder() ) xPropSet->setPropertyValue( "EncryptionKey", - uno::makeAny( m_aProps.aEncryptionKey ) ); + uno::Any( m_aProps.aEncryptionKey ) ); m_nModifiedProps &= ~ENCRYPTIONKEY_MODIFIED; } diff --git a/ucb/source/ucp/tdoc/tdoc_content.cxx b/ucb/source/ucp/tdoc/tdoc_content.cxx index 39d44cd42628..9323380bba71 100644 --- a/ucb/source/ucp/tdoc/tdoc_content.cxx +++ b/ucb/source/ucp/tdoc/tdoc_content.cxx @@ -337,7 +337,7 @@ uno::Any SAL_CALL Content::execute( if ( !( aCommand.Argument >>= Properties ) ) { ucbhelper::cancelCommandExecution( - uno::makeAny( lang::IllegalArgumentException( + uno::Any( lang::IllegalArgumentException( "Wrong argument type!", static_cast< cppu::OWeakObject * >( this ), -1 ) ), @@ -357,7 +357,7 @@ uno::Any SAL_CALL Content::execute( if ( !( aCommand.Argument >>= aProperties ) ) { ucbhelper::cancelCommandExecution( - uno::makeAny( lang::IllegalArgumentException( + uno::Any( lang::IllegalArgumentException( "Wrong argument type!", static_cast< cppu::OWeakObject * >( this ), -1 ) ), @@ -368,7 +368,7 @@ uno::Any SAL_CALL Content::execute( if ( !aProperties.hasElements() ) { ucbhelper::cancelCommandExecution( - uno::makeAny( lang::IllegalArgumentException( + uno::Any( lang::IllegalArgumentException( "No properties!", static_cast< cppu::OWeakObject * >( this ), -1 ) ), @@ -404,7 +404,7 @@ uno::Any SAL_CALL Content::execute( if ( !( aCommand.Argument >>= aOpenCommand ) ) { ucbhelper::cancelCommandExecution( - uno::makeAny( lang::IllegalArgumentException( + uno::Any( lang::IllegalArgumentException( "Wrong argument type!", static_cast< cppu::OWeakObject * >( this ), -1 ) ), @@ -424,7 +424,7 @@ uno::Any SAL_CALL Content::execute( if ( ( eType != FOLDER ) && ( eType != STREAM ) ) { ucbhelper::cancelCommandExecution( - uno::makeAny( ucb::UnsupportedCommandException( + uno::Any( ucb::UnsupportedCommandException( "insert command only supported by " "folders and streams!", static_cast< cppu::OWeakObject * >( this ) ) ), @@ -439,7 +439,7 @@ uno::Any SAL_CALL Content::execute( if ( aParentUri.isDocument() ) { ucbhelper::cancelCommandExecution( - uno::makeAny( ucb::UnsupportedCommandException( + uno::Any( ucb::UnsupportedCommandException( "insert command not supported by " "streams that are direct children " "of document root!", @@ -454,7 +454,7 @@ uno::Any SAL_CALL Content::execute( if ( !( aCommand.Argument >>= aArg ) ) { ucbhelper::cancelCommandExecution( - uno::makeAny( lang::IllegalArgumentException( + uno::Any( lang::IllegalArgumentException( "Wrong argument type!", static_cast< cppu::OWeakObject * >( this ), -1 ) ), @@ -480,7 +480,7 @@ uno::Any SAL_CALL Content::execute( if ( ( eType != FOLDER ) && ( eType != STREAM ) ) { ucbhelper::cancelCommandExecution( - uno::makeAny( ucb::UnsupportedCommandException( + uno::Any( ucb::UnsupportedCommandException( "delete command only supported by " "folders and streams!", static_cast< cppu::OWeakObject * >( @@ -526,7 +526,7 @@ uno::Any SAL_CALL Content::execute( if ( ( eType != FOLDER ) && ( eType != DOCUMENT ) ) { ucbhelper::cancelCommandExecution( - uno::makeAny( ucb::UnsupportedCommandException( + uno::Any( ucb::UnsupportedCommandException( "transfer command only supported " "by folders and documents!", static_cast< cppu::OWeakObject * >( @@ -541,7 +541,7 @@ uno::Any SAL_CALL Content::execute( { OSL_FAIL( "Wrong argument type!" ); ucbhelper::cancelCommandExecution( - uno::makeAny( lang::IllegalArgumentException( + uno::Any( lang::IllegalArgumentException( "Wrong argument type!", static_cast< cppu::OWeakObject * >( this ), -1 ) ), @@ -564,7 +564,7 @@ uno::Any SAL_CALL Content::execute( if ( ( eType != FOLDER ) && ( eType != DOCUMENT ) ) { ucbhelper::cancelCommandExecution( - uno::makeAny( ucb::UnsupportedCommandException( + uno::Any( ucb::UnsupportedCommandException( "createNewContent command only " "supported by folders and " "documents!", @@ -580,7 +580,7 @@ uno::Any SAL_CALL Content::execute( { OSL_FAIL( "Wrong argument type!" ); ucbhelper::cancelCommandExecution( - uno::makeAny( lang::IllegalArgumentException( + uno::Any( lang::IllegalArgumentException( "Wrong argument type!", static_cast< cppu::OWeakObject * >( this ), -1 ) ), @@ -597,7 +597,7 @@ uno::Any SAL_CALL Content::execute( ucbhelper::cancelCommandExecution( - uno::makeAny( ucb::UnsupportedCommandException( + uno::Any( ucb::UnsupportedCommandException( OUString(), static_cast< cppu::OWeakObject * >( this ) ) ), Environment ); @@ -892,7 +892,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( else if ( rProp.Name == "CreatableContentsInfo" ) { xRow->appendObject( - rProp, uno::makeAny( rData.getCreatableContentsInfo() ) ); + rProp, uno::Any( rData.getCreatableContentsInfo() ) ); } else if ( rProp.Name == "Storage" ) { @@ -901,7 +901,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( if ( eType == FOLDER ) xRow->appendObject( rProp, - uno::makeAny( + uno::Any( pProvider->queryStorageClone( rContentId ) ) ); else xRow->appendVoid( rProp ); @@ -913,7 +913,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( if ( eType == DOCUMENT ) xRow->appendObject( rProp, - uno::makeAny( + uno::Any( pProvider->queryDocumentModel( rContentId ) ) ); else xRow->appendVoid( rProp ); @@ -992,7 +992,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( cppu::UnoType<uno::Sequence< ucb::ContentInfo >>::get(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), - uno::makeAny( rData.getCreatableContentsInfo() ) ); + uno::Any( rData.getCreatableContentsInfo() ) ); // Storage is only supported by folders. if ( eType == FOLDER ) @@ -1002,7 +1002,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( cppu::UnoType<embed::XStorage>::get(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), - uno::makeAny( pProvider->queryStorageClone( rContentId ) ) ); + uno::Any( pProvider->queryStorageClone( rContentId ) ) ); // DocumentModel is only supported by documents. if ( eType == DOCUMENT ) @@ -1012,7 +1012,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( cppu::UnoType<frame::XModel>::get(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), - uno::makeAny( + uno::Any( pProvider->queryDocumentModel( rContentId ) ) ); // Append all Additional Core Properties. @@ -1323,7 +1323,7 @@ uno::Any Content::open( uno::Reference< ucb::XDynamicResultSet > xSet = new DynamicResultSet( m_xContext, this, rArg ); - return uno::makeAny( xSet ); + return uno::Any( xSet ); } else { @@ -1336,7 +1336,7 @@ uno::Any Content::open( { // Currently(?) unsupported. ucbhelper::cancelCommandExecution( - uno::makeAny( ucb::UnsupportedOpenModeException( + uno::Any( ucb::UnsupportedOpenModeException( OUString(), static_cast< cppu::OWeakObject * >( this ), sal_Int16( rArg.Mode ) ) ), @@ -1463,7 +1463,7 @@ uno::Any Content::open( else { ucbhelper::cancelCommandExecution( - uno::makeAny( + uno::Any( ucb::UnsupportedDataSinkException( OUString(), static_cast< cppu::OWeakObject * >( this ), @@ -1518,7 +1518,7 @@ void Content::insert( const uno::Reference< io::XInputStream >& xData, if ( !xData.is() ) { ucbhelper::cancelCommandExecution( - uno::makeAny( ucb::MissingInputStreamException( + uno::Any( ucb::MissingInputStreamException( OUString(), static_cast< cppu::OWeakObject * >( this ) ) ), xEnv ); @@ -1541,7 +1541,7 @@ void Content::insert( const uno::Reference< io::XInputStream >& xData, if ( hasData( aNewUri ) ) { ucbhelper::cancelCommandExecution( - uno::makeAny( ucb::NameClashException( + uno::Any( ucb::NameClashException( OUString(), static_cast< cppu::OWeakObject * >( this ), task::InteractionClassification_ERROR, @@ -1573,7 +1573,7 @@ void Content::insert( const uno::Reference< io::XInputStream >& xData, if ( nTry == 1000 ) { ucbhelper::cancelCommandExecution( - uno::makeAny( + uno::Any( ucb::UnsupportedNameClashException( "Unable to resolve name clash!", static_cast< cppu::OWeakObject * >( this ), @@ -1597,7 +1597,7 @@ void Content::insert( const uno::Reference< io::XInputStream >& xData, if ( hasData( aNewUri ) ) { ucbhelper::cancelCommandExecution( - uno::makeAny( + uno::Any( ucb::UnsupportedNameClashException( OUString(), static_cast< cppu::OWeakObject * >( this ), @@ -1663,7 +1663,7 @@ void Content::destroy( bool bDeletePhysical, if ( m_eState != PERSISTENT ) { ucbhelper::cancelCommandExecution( - uno::makeAny( ucb::UnsupportedCommandException( + uno::Any( ucb::UnsupportedCommandException( "Not persistent!", static_cast< cppu::OWeakObject * >( this ) ) ), xEnv ); @@ -1798,7 +1798,7 @@ void Content::transfer( if ( m_eState != PERSISTENT ) { ucbhelper::cancelCommandExecution( - uno::makeAny( ucb::UnsupportedCommandException( + uno::Any( ucb::UnsupportedCommandException( "Not persistent!", static_cast< cppu::OWeakObject * >( this ) ) ), xEnv ); @@ -1811,7 +1811,7 @@ void Content::transfer( { // Invalid length (to short). ucbhelper::cancelCommandExecution( - uno::makeAny( ucb::InteractiveBadTransferURLException( + uno::Any( ucb::InteractiveBadTransferURLException( OUString(), static_cast< cppu::OWeakObject * >( this ) ) ), xEnv ); @@ -1825,7 +1825,7 @@ void Content::transfer( { // Invalid scheme. ucbhelper::cancelCommandExecution( - uno::makeAny( ucb::InteractiveBadTransferURLException( + uno::Any( ucb::InteractiveBadTransferURLException( OUString(), static_cast< cppu::OWeakObject * >( this ) ) ), xEnv ); @@ -1837,7 +1837,7 @@ void Content::transfer( if ( !aSourceUri.isValid() ) { ucbhelper::cancelCommandExecution( - uno::makeAny( lang::IllegalArgumentException( + uno::Any( lang::IllegalArgumentException( "Invalid source URI! Syntax!", static_cast< cppu::OWeakObject * >( this ), -1 ) ), @@ -1848,7 +1848,7 @@ void Content::transfer( if ( aSourceUri.isRoot() || aSourceUri.isDocument() ) { ucbhelper::cancelCommandExecution( - uno::makeAny( lang::IllegalArgumentException( + uno::Any( lang::IllegalArgumentException( "Invalid source URI! Must describe a folder or stream!", static_cast< cppu::OWeakObject * >( this ), -1 ) ), @@ -1897,7 +1897,7 @@ void Content::transfer( if ( xStorage->isStreamElement( aSourceUri.getDecodedName() ) ) { ucbhelper::cancelCommandExecution( - uno::makeAny( lang::IllegalArgumentException( + uno::Any( lang::IllegalArgumentException( "Invalid source URI! " "Streams cannot be created as " "children of document root!", @@ -1926,7 +1926,7 @@ void Content::transfer( if ( !bOK ) { ucbhelper::cancelCommandExecution( - uno::makeAny( lang::IllegalArgumentException( + uno::Any( lang::IllegalArgumentException( "Invalid source URI! Unable to determine source type!", static_cast< cppu::OWeakObject * >( this ), -1 ) ), @@ -2235,7 +2235,7 @@ bool Content::storeData( const uno::Reference< io::XInputStream >& xData, // its contents will be lost on save of the document!!! xPropSet->setPropertyValue( "MediaType", - uno::makeAny( + uno::Any( OUString( // @@@ better mediatype "application/binary" ) ) ); } diff --git a/ucb/source/ucp/tdoc/tdoc_passwordrequest.cxx b/ucb/source/ucp/tdoc/tdoc_passwordrequest.cxx index b190ba1884d8..412b39fe8a62 100644 --- a/ucb/source/ucp/tdoc/tdoc_passwordrequest.cxx +++ b/ucb/source/ucp/tdoc/tdoc_passwordrequest.cxx @@ -175,7 +175,7 @@ DocumentPasswordRequest::DocumentPasswordRequest( aRequest.Mode = eMode; aRequest.Name = rDocumentName; - setRequest( uno::makeAny( aRequest ) ); + setRequest( uno::Any( aRequest ) ); // Fill continuations... uno::Sequence< diff --git a/ucb/source/ucp/webdav-curl/ContentProperties.cxx b/ucb/source/ucp/webdav-curl/ContentProperties.cxx index 397d225f2068..d78d138ab215 100644 --- a/ucb/source/ucp/webdav-curl/ContentProperties.cxx +++ b/ucb/source/ucp/webdav-curl/ContentProperties.cxx @@ -86,13 +86,13 @@ ContentProperties::ContentProperties( const DAVResource& rResource ) (*m_xProps)[ OUString( "Title" ) ] = PropertyValue( - uno::makeAny( aURI.GetPathBaseNameUnescaped() ), true ); + uno::Any( aURI.GetPathBaseNameUnescaped() ), true ); } catch ( DAVException const & ) { (*m_xProps)[ OUString( "Title" ) ] = PropertyValue( - uno::makeAny( + uno::Any( OUString( "*** unknown ***" ) ), true ); } @@ -113,11 +113,11 @@ ContentProperties::ContentProperties( m_bTrailingSlash( false ) { (*m_xProps)[ OUString( "Title" ) ] - = PropertyValue( uno::makeAny( rTitle ), true ); + = PropertyValue( uno::Any( rTitle ), true ); (*m_xProps)[ OUString( "IsFolder" ) ] - = PropertyValue( uno::makeAny( bFolder ), true ); + = PropertyValue( uno::Any( bFolder ), true ); (*m_xProps)[ OUString( "IsDocument" ) ] - = PropertyValue( uno::makeAny( bool( !bFolder ) ), true ); + = PropertyValue( uno::Any( bool( !bFolder ) ), true ); } @@ -126,7 +126,7 @@ ContentProperties::ContentProperties( const OUString & rTitle ) m_bTrailingSlash( false ) { (*m_xProps)[ OUString( "Title" ) ] - = PropertyValue( uno::makeAny( rTitle ), true ); + = PropertyValue( uno::Any( rTitle ), true ); } @@ -383,7 +383,7 @@ void ContentProperties::addProperty( const OUString & rName, DateTimeHelper::convert( aValue, aDate ); (*m_xProps)[ OUString( "DateCreated" ) ] - = PropertyValue( uno::makeAny( aDate ), true ); + = PropertyValue( uno::Any( aDate ), true ); } // else if ( rName.equals( DAVProperties::DISPLAYNAME ) ) // { @@ -398,7 +398,7 @@ void ContentProperties::addProperty( const OUString & rName, rValue >>= aValue; (*m_xProps)[ OUString( "Size" ) ] - = PropertyValue( uno::makeAny( aValue.toInt64() ), true ); + = PropertyValue( uno::Any( aValue.toInt64() ), true ); } else if ( rName.equalsIgnoreAsciiCase( "Content-Length" ) ) { @@ -410,7 +410,7 @@ void ContentProperties::addProperty( const OUString & rName, rValue >>= aValue; (*m_xProps)[ OUString( "Size" ) ] - = PropertyValue( uno::makeAny( aValue.toInt64() ), true ); + = PropertyValue( uno::Any( aValue.toInt64() ), true ); } else if ( rName == DAVProperties::GETCONTENTTYPE ) { @@ -439,7 +439,7 @@ void ContentProperties::addProperty( const OUString & rName, DateTimeHelper::convert( aValue, aDate ); (*m_xProps)[ OUString( "DateModified" ) ] - = PropertyValue( uno::makeAny( aDate ), true ); + = PropertyValue( uno::Any( aDate ), true ); } else if ( rName.equalsIgnoreAsciiCase( "Last-Modified" ) ) { @@ -453,7 +453,7 @@ void ContentProperties::addProperty( const OUString & rName, DateTimeHelper::convert( aValue, aDate ); (*m_xProps)[ OUString( "DateModified" ) ] - = PropertyValue( uno::makeAny( aDate ), true ); + = PropertyValue( uno::Any( aDate ), true ); } // else if ( rName.equals( DAVProperties::LOCKDISCOVERY ) ) // { @@ -468,11 +468,11 @@ void ContentProperties::addProperty( const OUString & rName, aValue.equalsIgnoreAsciiCase( "collection" ); (*m_xProps)[ OUString( "IsFolder" ) ] - = PropertyValue( uno::makeAny( bFolder ), true ); + = PropertyValue( uno::Any( bFolder ), true ); (*m_xProps)[ OUString( "IsDocument" ) ] - = PropertyValue( uno::makeAny( bool( !bFolder ) ), true ); + = PropertyValue( uno::Any( bool( !bFolder ) ), true ); (*m_xProps)[ OUString( "ContentType" ) ] - = PropertyValue( uno::makeAny( bFolder + = PropertyValue( uno::Any( bFolder ? OUString( WEBDAV_COLLECTION_TYPE ) : OUString( WEBDAV_CONTENT_TYPE ) ), true ); } diff --git a/ucb/source/ucp/webdav-curl/webdavcontent.cxx b/ucb/source/ucp/webdav-curl/webdavcontent.cxx index 30fc16f2de56..acd850a24e9b 100644 --- a/ucb/source/ucp/webdav-curl/webdavcontent.cxx +++ b/ucb/source/ucp/webdav-curl/webdavcontent.cxx @@ -448,7 +448,7 @@ uno::Any SAL_CALL Content::execute( if ( !( aCommand.Argument >>= Properties ) ) { ucbhelper::cancelCommandExecution( - uno::makeAny( lang::IllegalArgumentException( + uno::Any( lang::IllegalArgumentException( "Wrong argument type!", static_cast< cppu::OWeakObject * >( this ), -1 ) ), @@ -468,7 +468,7 @@ uno::Any SAL_CALL Content::execute( if ( !( aCommand.Argument >>= aProperties ) ) { ucbhelper::cancelCommandExecution( - uno::makeAny( lang::IllegalArgumentException( + uno::Any( lang::IllegalArgumentException( "Wrong argument type!", static_cast< cppu::OWeakObject * >( this ), -1 ) ), @@ -479,7 +479,7 @@ uno::Any SAL_CALL Content::execute( if ( !aProperties.getLength() ) { ucbhelper::cancelCommandExecution( - uno::makeAny( lang::IllegalArgumentException( + uno::Any( lang::IllegalArgumentException( "No properties!", static_cast< cppu::OWeakObject * >( this ), -1 ) ), @@ -519,7 +519,7 @@ uno::Any SAL_CALL Content::execute( if ( !( aCommand.Argument >>= aTmp ) ) { ucbhelper::cancelCommandExecution( - uno::makeAny( lang::IllegalArgumentException( + uno::Any( lang::IllegalArgumentException( "Wrong argument type!", static_cast< cppu::OWeakObject * >( this ), -1 ) ), @@ -549,7 +549,7 @@ uno::Any SAL_CALL Content::execute( if ( !( aCommand.Argument >>= arg ) ) { ucbhelper::cancelCommandExecution( - uno::makeAny( lang::IllegalArgumentException( + uno::Any( lang::IllegalArgumentException( "Wrong argument type!", static_cast< cppu::OWeakObject * >( this ), -1 ) ), @@ -613,7 +613,7 @@ uno::Any SAL_CALL Content::execute( if ( !( aCommand.Argument >>= transferArgs ) ) { ucbhelper::cancelCommandExecution( - uno::makeAny( lang::IllegalArgumentException( + uno::Any( lang::IllegalArgumentException( "Wrong argument type!", static_cast< cppu::OWeakObject * >( this ), -1 ) ), @@ -633,7 +633,7 @@ uno::Any SAL_CALL Content::execute( if ( !( aCommand.Argument >>= aArg ) ) { ucbhelper::cancelCommandExecution( - uno::makeAny( lang::IllegalArgumentException( + uno::Any( lang::IllegalArgumentException( "Wrong argument type!", static_cast< cppu::OWeakObject * >( this ), -1 ) ), @@ -683,7 +683,7 @@ uno::Any SAL_CALL Content::execute( if ( !( aCommand.Argument >>= aArg ) ) { ucbhelper::cancelCommandExecution( - uno::makeAny( lang::IllegalArgumentException( + uno::Any( lang::IllegalArgumentException( "Wrong argument type!", static_cast< cppu::OWeakObject * >( this ), -1 ) ), @@ -699,7 +699,7 @@ uno::Any SAL_CALL Content::execute( if ( !( aCommand.Argument >>= aPropArg )) { ucbhelper::cancelCommandExecution( - uno::makeAny( lang::IllegalArgumentException( + uno::Any( lang::IllegalArgumentException( "Wrong argument type!", static_cast< cppu::OWeakObject * >( this ), -1 ) ), @@ -714,15 +714,15 @@ uno::Any SAL_CALL Content::execute( } catch ( const beans::PropertyExistException &e ) { - ucbhelper::cancelCommandExecution( uno::makeAny( e ), Environment ); + ucbhelper::cancelCommandExecution( uno::Any( e ), Environment ); } catch ( const beans::IllegalTypeException&e ) { - ucbhelper::cancelCommandExecution( uno::makeAny( e ), Environment ); + ucbhelper::cancelCommandExecution( uno::Any( e ), Environment ); } catch ( const lang::IllegalArgumentException&e ) { - ucbhelper::cancelCommandExecution( uno::makeAny( e ), Environment ); + ucbhelper::cancelCommandExecution( uno::Any( e ), Environment ); } } else if ( aCommand.Name == "removeProperty" ) @@ -731,7 +731,7 @@ uno::Any SAL_CALL Content::execute( if ( !( aCommand.Argument >>= sPropName ) ) { ucbhelper::cancelCommandExecution( - uno::makeAny( lang::IllegalArgumentException( + uno::Any( lang::IllegalArgumentException( "Wrong argument type!", static_cast< cppu::OWeakObject * >( this ), -1 ) ), @@ -746,11 +746,11 @@ uno::Any SAL_CALL Content::execute( } catch( const beans::UnknownPropertyException &e ) { - ucbhelper::cancelCommandExecution( uno::makeAny( e ), Environment ); + ucbhelper::cancelCommandExecution( uno::Any( e ), Environment ); } catch( const beans::NotRemoveableException &e ) { - ucbhelper::cancelCommandExecution( uno::makeAny( e ), Environment ); + ucbhelper::cancelCommandExecution( uno::Any( e ), Environment ); } } else @@ -760,7 +760,7 @@ uno::Any SAL_CALL Content::execute( ucbhelper::cancelCommandExecution( - uno::makeAny( ucb::UnsupportedCommandException( + uno::Any( ucb::UnsupportedCommandException( aCommand.Name, static_cast< cppu::OWeakObject * >( this ) ) ), Environment ); @@ -1584,7 +1584,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( if (!xProps) xProps.reset(new ContentProperties(aUnescapedTitle)); else - xProps->addProperty("Title", uno::makeAny(aUnescapedTitle), true); + xProps->addProperty("Title", uno::Any(aUnescapedTitle), true); } else { @@ -1593,20 +1593,20 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( else xProps->addProperty( "Title", - uno::makeAny( aUnescapedTitle ), + uno::Any( aUnescapedTitle ), true ); xProps->addProperty( "IsFolder", - uno::makeAny( false ), + uno::Any( false ), true ); xProps->addProperty( "IsDocument", - uno::makeAny( true ), + uno::Any( true ), true ); xProps->addProperty( "ContentType", - uno::makeAny( OUString(WEBDAV_CONTENT_TYPE) ), + uno::Any( OUString(WEBDAV_CONTENT_TYPE) ), true ); } } @@ -1637,7 +1637,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( util::DateTime aDate; xProps->addProperty( (*it), - uno::makeAny( aDate ), + uno::Any( aDate ), true ); } else if (bNetworkAccessAllowed) // don't set these if connection failed @@ -1648,14 +1648,14 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( { xProps->addProperty( (*it), - uno::makeAny( false ), + uno::Any( false ), true ); } else if ((*it) == "IsDocument") { xProps->addProperty( (*it), - uno::makeAny( true ), + uno::Any( true ), true ); } } @@ -1671,7 +1671,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( // Add BaseURI property, if requested. xProps->addProperty( "BaseURI", - uno::makeAny( getBaseURI( xResAccess ) ), + uno::Any( getBaseURI( xResAccess ) ), true ); } else if ( rName == "CreatableContentsInfo" ) @@ -1682,7 +1682,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( >>= bFolder; xProps->addProperty( "CreatableContentsInfo", - uno::makeAny( bFolder + uno::Any( bFolder ? queryCreatableContentsInfo() : uno::Sequence< ucb::ContentInfo >() ), true ); @@ -2150,7 +2150,7 @@ uno::Any Content::open( // Error: Not a folder! ucbhelper::cancelCommandExecution( - uno::makeAny( + uno::Any( lang::IllegalArgumentException( "Non-folder resource cannot be opened as folder! Wrong Open Mode!", static_cast< cppu::OWeakObject * >( this ), @@ -2169,7 +2169,7 @@ uno::Any Content::open( { // Currently(?) unsupported. ucbhelper::cancelCommandExecution( - uno::makeAny( + uno::Any( ucb::UnsupportedOpenModeException( OUString(), static_cast< cppu::OWeakObject * >( this ), @@ -2297,7 +2297,7 @@ uno::Any Content::open( // implementation. Support for this type of // sink is optional... ucbhelper::cancelCommandExecution( - uno::makeAny( + uno::Any( ucb::UnsupportedDataSinkException( OUString(), static_cast< cppu::OWeakObject * >( this ), @@ -2385,7 +2385,7 @@ void Content::post( else { ucbhelper::cancelCommandExecution( - uno::makeAny( + uno::Any( ucb::UnsupportedDataSinkException( OUString(), static_cast< cppu::OWeakObject * >( this ), @@ -2470,7 +2470,7 @@ void Content::insert( uno::Sequence<OUString> aProps { "Title" }; ucbhelper::cancelCommandExecution( - uno::makeAny( ucb::MissingPropertiesException( + uno::Any( ucb::MissingPropertiesException( OUString(), static_cast< cppu::OWeakObject * >( this ), aProps ) ), @@ -2511,7 +2511,7 @@ void Content::insert( if ( xIH.is() ) { - uno::Any aExAsAny( uno::makeAny( aEx ) ); + uno::Any aExAsAny( aEx ); rtl::Reference< ucbhelper::SimpleInteractionRequest > xRequest = new ucbhelper::SimpleInteractionRequest( @@ -2645,7 +2645,7 @@ void Content::insert( } ucbhelper::cancelCommandExecution( - uno::makeAny( + uno::Any( ucb::NameClashException( OUString(), static_cast< cppu::OWeakObject * >( this ), @@ -2679,7 +2679,7 @@ void Content::insert( if ( !xInputStream.is() ) { ucbhelper::cancelCommandExecution( - uno::makeAny( + uno::Any( ucb::MissingInputStreamException( OUString(), static_cast< cppu::OWeakObject * >( this ) ) ), @@ -2769,7 +2769,7 @@ void Content::transfer( if ( aScheme != HTTP_URL_SCHEME && aScheme != HTTPS_URL_SCHEME ) { ucbhelper::cancelCommandExecution( - uno::makeAny( + uno::Any( ucb::InteractiveBadTransferURLException( "Unsupported URL scheme!", static_cast< cppu::OWeakObject * >( this ) ) ), @@ -2802,7 +2802,7 @@ void Content::transfer( ( sourceURI.GetHost() != targetURI.GetHost() ) ) { ucbhelper::cancelCommandExecution( - uno::makeAny( ucb::InteractiveBadTransferURLException( + uno::Any( ucb::InteractiveBadTransferURLException( "Different hosts!", static_cast< cppu::OWeakObject * >( this ) ) ), Environment ); @@ -2926,7 +2926,7 @@ void Content::transfer( case 0/*ucb::NameClash::ERROR*/: { ucbhelper::cancelCommandExecution( - uno::makeAny( + uno::Any( ucb::NameClashException( OUString(), static_cast< cppu::OWeakObject * >( this ), @@ -2946,7 +2946,7 @@ void Content::transfer( default: { ucbhelper::cancelCommandExecution( - uno::makeAny( + uno::Any( ucb::UnsupportedNameClashException( OUString(), static_cast< cppu::OWeakObject * >( this ), @@ -3550,7 +3550,7 @@ uno::Any Content::MapDAVException( const DAVException & e, bool bWrite ) case SC_NOT_FOUND: { uno::Sequence<uno::Any> aArgs{ uno::Any(beans::PropertyValue( - "Uri", -1, uno::makeAny(aURL), beans::PropertyState_DIRECT_VALUE)) }; + "Uri", -1, uno::Any(aURL), beans::PropertyState_DIRECT_VALUE)) }; aException <<= ucb::InteractiveAugmentedIOException(