summaryrefslogtreecommitdiff
path: root/sot
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-05-03 08:39:03 +0200
committerNoel Grandin <noel@peralex.com>2016-05-04 12:39:40 +0200
commit58a32075ca4f457f570af75aef368dd6c389aca7 (patch)
treee437dcbdeb248b4316cb8a9281d1543419853f6d /sot
parent7d47700972d267fe7c5270c5dadd45a523a2baec (diff)
use Any constructor instead of temporaries
Change-Id: Iffb82a2cee1a28d89eeea2b905aaa14086ee475a
Diffstat (limited to 'sot')
-rw-r--r--sot/source/sdstor/ucbstorage.cxx16
1 files changed, 4 insertions, 12 deletions
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index 264eafb26eb8..8aa42b0219db 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -677,9 +677,7 @@ UCBStorageStream_Impl::UCBStorageStream_Impl( const OUString& rName, StreamMode
{
sal_uInt8* pBuffer = aBuffer;
css::uno::Sequence < sal_Int8 > aSequ( reinterpret_cast<sal_Int8*>(pBuffer), RTL_DIGEST_LENGTH_SHA1 );
- css::uno::Any aAny;
- aAny <<= aSequ;
- m_pContent->setPropertyValue("EncryptionKey", aAny );
+ m_pContent->setPropertyValue("EncryptionKey", Any(aSequ) );
}
}
}
@@ -1098,12 +1096,10 @@ sal_Int16 UCBStorageStream_Impl::Commit()
// create wrapper to stream that is only used while reading inside package component
Reference < XInputStream > xStream = new FileStreamWrapper_Impl( m_aTempURL );
- Any aAny;
InsertCommandArgument aArg;
aArg.Data = xStream;
aArg.ReplaceExisting = true;
- aAny <<= aArg;
- m_pContent->executeCommand( "insert", aAny );
+ m_pContent->executeCommand( "insert", Any(aArg) );
// wrapper now controls lifetime of temporary file
m_aTempURL.clear();
@@ -2156,18 +2152,14 @@ sal_Int16 UCBStorage_Impl::Commit()
{
// name ( title ) of the element was changed
nLocalRet = COMMIT_RESULT_SUCCESS;
- Any aAny;
- aAny <<= pElement->m_aName;
- pContent->setPropertyValue("Title", aAny );
+ pContent->setPropertyValue("Title", Any(pElement->m_aName) );
}
if (pContent && pElement->IsLoaded() && pElement->GetContentType() != pElement->GetOriginalContentType())
{
// mediatype of the element was changed
nLocalRet = COMMIT_RESULT_SUCCESS;
- Any aAny;
- aAny <<= pElement->GetContentType();
- pContent->setPropertyValue("MediaType", aAny );
+ pContent->setPropertyValue("MediaType", Any(pElement->GetContentType()) );
}
if ( nLocalRet != COMMIT_RESULT_NOTHING_TO_DO )