diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2022-05-04 07:04:01 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2022-05-04 09:59:24 +0200 |
commit | 8342e4a5c7bd436f869e6c1c23d248556087ebdf (patch) | |
tree | 6db53f437b75fd138e7693dae45b80d743afa184 /package/source/zippackage | |
parent | 9c111cc4302bf344b4093693e64833d6bd870602 (diff) |
Just use Any ctor instead of makeAny in package
Change-Id: I527024f34b88ec764488a3766872f1941f8dbb4e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133794
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'package/source/zippackage')
-rw-r--r-- | package/source/zippackage/ZipPackage.cxx | 18 | ||||
-rw-r--r-- | package/source/zippackage/ZipPackageFolder.cxx | 8 | ||||
-rw-r--r-- | package/source/zippackage/ZipPackageStream.cxx | 10 | ||||
-rw-r--r-- | package/source/zippackage/zipfileaccess.cxx | 2 |
4 files changed, 19 insertions, 19 deletions
diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx index 36dc397ca0cf..9270bb70502e 100644 --- a/package/source/zippackage/ZipPackage.cxx +++ b/package/source/zippackage/ZipPackage.cxx @@ -798,7 +798,7 @@ Any SAL_CALL ZipPackage::getByHierarchicalName( const OUString& aName ) if (aName == "/") // root directory. - return makeAny ( uno::Reference < XUnoTunnel > ( m_xRootFolder ) ); + return Any ( uno::Reference < XUnoTunnel > ( m_xRootFolder ) ); nStreamIndex = aName.lastIndexOf ( '/' ); bool bFolder = nStreamIndex == nIndex-1; // last character is '/'. @@ -821,7 +821,7 @@ Any SAL_CALL ZipPackage::getByHierarchicalName( const OUString& aName ) sTemp = aName.copy ( nDirIndex == -1 ? 0 : nDirIndex+1, nStreamIndex-nDirIndex-1 ); if (pFolder && sTemp == pFolder->getName()) - return makeAny(uno::Reference<XUnoTunnel>(pFolder)); + return Any(uno::Reference<XUnoTunnel>(pFolder)); } else { @@ -867,7 +867,7 @@ Any SAL_CALL ZipPackage::getByHierarchicalName( const OUString& aName ) { if ( nStreamIndex != -1 ) m_aRecent[sDirName] = pPrevious; // cache it. - return makeAny ( uno::Reference < XUnoTunnel > ( pCurrent ) ); + return Any ( uno::Reference < XUnoTunnel > ( pCurrent ) ); } sTemp = aName.copy( nOldIndex ); @@ -1338,7 +1338,7 @@ uno::Reference< io::XInputStream > ZipPackage::writeTempFile() embed::UseBackupException aException( aErrTxt, uno::Reference< uno::XInterface >(), OUString() ); throw WrappedTargetException( aErrTxt, static_cast < OWeakObject * > ( this ), - makeAny ( aException ) ); + Any ( aException ) ); } } @@ -1362,7 +1362,7 @@ uno::Reference< XActiveDataStreamer > ZipPackage::openOriginalForOutput() try { Exception aDetect; - Any aAny = aOriginalContent.setPropertyValue("Size", makeAny( sal_Int64(0) ) ); + Any aAny = aOriginalContent.setPropertyValue("Size", Any( sal_Int64(0) ) ); if( !( aAny >>= aDetect ) ) bTruncSuccess = true; } @@ -1385,7 +1385,7 @@ uno::Reference< XActiveDataStreamer > ZipPackage::openOriginalForOutput() aArg.Sink = xSink; aArg.Properties = uno::Sequence< Property >( 0 ); // unused - aOriginalContent.executeCommand("open", makeAny( aArg ) ); + aOriginalContent.executeCommand("open", Any( aArg ) ); } catch( Exception& ) { @@ -1406,7 +1406,7 @@ void SAL_CALL ZipPackage::commitChanges() { IOException aException; throw WrappedTargetException(THROW_WHERE "This package is read only!", - static_cast < OWeakObject * > ( this ), makeAny ( aException ) ); + static_cast < OWeakObject * > ( this ), Any ( aException ) ); } // first the writeTempFile is called, if it returns a stream the stream should be written to the target // if no stream was returned, the file was written directly, nothing should be done @@ -1599,7 +1599,7 @@ void ZipPackage::DisconnectFromTargetAndThrowException_Impl( const uno::Referenc uno::Any aUrl = xTempFile->getPropertyValue("Uri"); aUrl >>= aTempURL; xTempFile->setPropertyValue("RemoveFile", - uno::makeAny( false ) ); + uno::Any( false ) ); } catch ( uno::Exception& ) { @@ -1610,7 +1610,7 @@ void ZipPackage::DisconnectFromTargetAndThrowException_Impl( const uno::Referenc embed::UseBackupException aException( aErrTxt, uno::Reference< uno::XInterface >(), aTempURL ); throw WrappedTargetException( aErrTxt, static_cast < OWeakObject * > ( this ), - makeAny ( aException ) ); + Any ( aException ) ); } uno::Sequence< sal_Int8 > ZipPackage::GetEncryptionKey() diff --git a/package/source/zippackage/ZipPackageFolder.cxx b/package/source/zippackage/ZipPackageFolder.cxx index 118ec39923c0..7e7168805f72 100644 --- a/package/source/zippackage/ZipPackageFolder.cxx +++ b/package/source/zippackage/ZipPackageFolder.cxx @@ -203,7 +203,7 @@ ZipContentInfo& ZipPackageFolder::doGetByName( const OUString& aName ) uno::Any SAL_CALL ZipPackageFolder::getByName( const OUString& aName ) { - return uno::makeAny ( doGetByName ( aName ).xTunnel ); + return uno::Any ( doGetByName ( aName ).xTunnel ); } uno::Sequence< OUString > SAL_CALL ZipPackageFolder::getElementNames( ) { @@ -358,12 +358,12 @@ uno::Any SAL_CALL ZipPackageFolder::getPropertyValue( const OUString& PropertyNa // if ( m_nFormat != embed::StorageFormats::PACKAGE ) // throw UnknownPropertyException(THROW_WHERE ); - return uno::makeAny ( msMediaType ); + return uno::Any ( msMediaType ); } else if ( PropertyName == "Version" ) - return uno::makeAny( m_sVersion ); + return uno::Any( m_sVersion ); else if ( PropertyName == "Size" ) - return uno::makeAny ( aEntry.nSize ); + return uno::Any ( aEntry.nSize ); else throw UnknownPropertyException(PropertyName); } diff --git a/package/source/zippackage/ZipPackageStream.cxx b/package/source/zippackage/ZipPackageStream.cxx index f2ec696b5cc8..c4f94806b9b8 100644 --- a/package/source/zippackage/ZipPackageStream.cxx +++ b/package/source/zippackage/ZipPackageStream.cxx @@ -293,12 +293,12 @@ uno::Reference< io::XInputStream > ZipPackageStream::TryToGetRawFromDataStream( uno::Reference< XPropertySet > xNewPSProps( xNewPackStream, UNO_QUERY_THROW ); // copy all the properties of this stream to the new stream - xNewPSProps->setPropertyValue("MediaType", makeAny( msMediaType ) ); - xNewPSProps->setPropertyValue("Compressed", makeAny( m_bToBeCompressed ) ); + xNewPSProps->setPropertyValue("MediaType", Any( msMediaType ) ); + xNewPSProps->setPropertyValue("Compressed", Any( m_bToBeCompressed ) ); if ( m_bToBeEncrypted ) { - xNewPSProps->setPropertyValue(ENCRYPTION_KEY_PROPERTY, makeAny( aKey ) ); - xNewPSProps->setPropertyValue("Encrypted", makeAny( true ) ); + xNewPSProps->setPropertyValue(ENCRYPTION_KEY_PROPERTY, Any( aKey ) ); + xNewPSProps->setPropertyValue("Encrypted", Any( true ) ); } // insert a new stream in the package @@ -308,7 +308,7 @@ uno::Reference< io::XInputStream > ZipPackageStream::TryToGetRawFromDataStream( uno::Reference< container::XNameContainer > xRootNameContainer( xTunnel, UNO_QUERY_THROW ); uno::Reference< XUnoTunnel > xNPSTunnel( xNewPackStream, UNO_QUERY ); - xRootNameContainer->insertByName("dummy", makeAny( xNPSTunnel ) ); + xRootNameContainer->insertByName("dummy", Any( xNPSTunnel ) ); // commit the temporary package pPackage->commitChanges(); diff --git a/package/source/zippackage/zipfileaccess.cxx b/package/source/zippackage/zipfileaccess.cxx index 318943b02a42..d9b17fd80b49 100644 --- a/package/source/zippackage/zipfileaccess.cxx +++ b/package/source/zippackage/zipfileaccess.cxx @@ -292,7 +292,7 @@ uno::Any SAL_CALL OZipFileAccess::getByName( const OUString& aName ) if ( !xEntryStream.is() ) throw uno::RuntimeException(THROW_WHERE ); - return uno::makeAny ( xEntryStream ); + return uno::Any ( xEntryStream ); } uno::Sequence< OUString > SAL_CALL OZipFileAccess::getElementNames() |