diff options
Diffstat (limited to 'ucb/source/ucp/file')
-rw-r--r-- | ucb/source/ucp/file/filglob.cxx | 22 | ||||
-rw-r--r-- | ucb/source/ucp/file/filrset.cxx | 8 | ||||
-rw-r--r-- | ucb/source/ucp/file/prov.cxx | 12 | ||||
-rw-r--r-- | ucb/source/ucp/file/shell.cxx | 14 |
4 files changed, 16 insertions, 40 deletions
diff --git a/ucb/source/ucp/file/filglob.cxx b/ucb/source/ucp/file/filglob.cxx index 1f34f8fdea68..6b88bb57dc8f 100644 --- a/ucb/source/ucp/file/filglob.cxx +++ b/ucb/source/ucp/file/filglob.cxx @@ -263,16 +263,13 @@ namespace fileaccess { { IllegalArgumentException excep; excep.ArgumentPosition = 0; - aAny <<= excep; - cancelCommandExecution( - aAny,xEnv); + cancelCommandExecution(Any(excep), xEnv); } else if( errorCode == TASKHANDLING_UNSUPPORTED_OPEN_MODE ) { UnsupportedOpenModeException excep; excep.Mode = sal::static_int_cast< sal_Int16 >(minorCode); - aAny <<= excep; - cancelCommandExecution( aAny,xEnv ); + cancelCommandExecution( Any(excep),xEnv ); } else if(errorCode == TASKHANDLING_DELETED_STATE_IN_OPEN_COMMAND || errorCode == TASKHANDLING_INSERTED_STATE_IN_OPEN_COMMAND || @@ -554,8 +551,7 @@ namespace fileaccess { excep.Classification = InteractionClassification_ERROR; excep.Context = Reference<XInterface>( xComProc, UNO_QUERY ); excep.Message = "file exists and overwrite forbidden"; - aAny <<= excep; - cancelCommandExecution( aAny,xEnv ); + cancelCommandExecution( Any(excep), xEnv ); } else if( errorCode == TASKHANDLING_INVALID_NAME_MKDIR ) { @@ -579,8 +575,7 @@ namespace fileaccess { if(isHandled) throw excep; else { - aAny <<= excep; - cancelCommandExecution( aAny,xEnv ); + cancelCommandExecution( Any(excep), xEnv ); } // ioErrorCode = IOErrorCode_INVALID_CHARACTER; // cancelCommandExecution( @@ -600,8 +595,7 @@ namespace fileaccess { if(isHandled) throw excep; else { - aAny <<= excep; - cancelCommandExecution( aAny,xEnv ); + cancelCommandExecution( Any(excep), xEnv ); } // ioErrorCode = IOErrorCode_ALREADY_EXISTING; // cancelCommandExecution( @@ -853,9 +847,8 @@ namespace fileaccess { excep.Classification = InteractionClassification_ERROR; excep.Context = Reference<XInterface>( xComProc, UNO_QUERY ); excep.Message = "name clash during copy or move"; - aAny <<= excep; - cancelCommandExecution(aAny,xEnv); + cancelCommandExecution(Any(excep), xEnv); } else if( errorCode == TASKHANDLING_NAMECLASHSUPPORT_FOR_MOVE || errorCode == TASKHANDLING_NAMECLASHSUPPORT_FOR_COPY ) @@ -865,8 +858,7 @@ namespace fileaccess { excep.Context = Reference<XInterface>( xComProc, UNO_QUERY ); excep.Message = "name clash value not supported during copy or move"; - aAny <<= excep; - cancelCommandExecution(aAny,xEnv); + cancelCommandExecution(Any(excep), xEnv); } else { diff --git a/ucb/source/ucp/file/filrset.cxx b/ucb/source/ucp/file/filrset.cxx index 8dfd07273e8a..20222bbadf71 100644 --- a/ucb/source/ucp/file/filrset.cxx +++ b/ucb/source/ucp/file/filrset.cxx @@ -752,16 +752,12 @@ uno::Any SAL_CALL XResultSet_impl::getPropertyValue( { if( PropertyName == "IsRowCountFinal" ) { - uno::Any aAny; - aAny <<= m_bRowCountFinal; - return aAny; + return uno::Any(m_bRowCountFinal); } else if ( PropertyName == "RowCount" ) { - uno::Any aAny; sal_Int32 count = sal::static_int_cast<sal_Int32>(m_aItems.size()); - aAny <<= count; - return aAny; + return uno::Any(count); } else throw beans::UnknownPropertyException( THROW_WHERE ); diff --git a/ucb/source/ucp/file/prov.cxx b/ucb/source/ucp/file/prov.cxx index 5eb00115f356..09d2184b9c1c 100644 --- a/ucb/source/ucp/file/prov.cxx +++ b/ucb/source/ucp/file/prov.cxx @@ -456,21 +456,15 @@ FileProvider::getPropertyValue( initProperties(); if( aPropertyName == "FileSystemNotation" ) { - Any aAny; - aAny <<= m_FileSystemNotation; - return aAny; + return Any(m_FileSystemNotation); } else if( aPropertyName == "HomeDirectory" ) { - Any aAny; - aAny <<= m_HomeDirectory; - return aAny; + return Any(m_HomeDirectory); } else if( aPropertyName == "HostName" ) { - Any aAny; - aAny <<= m_HostName; - return aAny; + return Any(m_HostName); } else throw UnknownPropertyException( THROW_WHERE ); diff --git a/ucb/source/ucp/file/shell.cxx b/ucb/source/ucp/file/shell.cxx index 46152804180b..f422ca33a02a 100644 --- a/ucb/source/ucp/file/shell.cxx +++ b/ucb/source/ucp/file/shell.cxx @@ -294,13 +294,11 @@ shell::shell( const uno::Reference< uno::XComponentContext >& rxContext, // ContentType - uno::Any aAny; - aAny <<= OUString(); m_aDefaultProperties.insert( MyProperty( false, ContentType, -1 , cppu::UnoType<OUString>::get(), - aAny, + uno::Any(OUString()), beans::PropertyState_DEFAULT_VALUE, beans::PropertyAttribute::MAYBEVOID | beans::PropertyAttribute::BOUND @@ -2203,7 +2201,6 @@ void SAL_CALL shell::commit( const shell::ContentMap::iterator& it, const osl::FileStatus& aFileStatus ) { - uno::Any aAny; shell::PropertySet::iterator it1; if( it->second.properties == nullptr ) @@ -2219,8 +2216,7 @@ shell::commit( const shell::ContentMap::iterator& it, { if( aFileStatus.isValid( osl_FileStatus_Mask_FileName ) ) { - aAny <<= aFileStatus.getFileName(); - it1->setValue( aAny ); + it1->setValue( uno::Any(aFileStatus.getFileName()) ); } } @@ -2229,8 +2225,7 @@ shell::commit( const shell::ContentMap::iterator& it, { if( aFileStatus.isValid( osl_FileStatus_Mask_FileURL ) ) { - aAny <<= aFileStatus.getFileURL(); - it1->setValue( aAny ); + it1->setValue( uno::Any(aFileStatus.getFileURL()) ); } } @@ -2327,8 +2322,7 @@ shell::commit( const shell::ContentMap::iterator& it, } else { - bool dummy = false; - aAny <<= dummy; + uno::Any aAny(false); it1 = properties.find( MyProperty( IsRemote ) ); if( it1 != properties.end() ) it1->setValue( aAny ); |