summaryrefslogtreecommitdiff
path: root/sot
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-07-31 14:31:49 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-07-31 19:16:06 +0200
commit9ae4f8b5bf70a693ffb60ceac4f9625cf15b1181 (patch)
treec8b0e773f467325595bcc7d8a40c744ab6768430 /sot
parentca7dab5d96e73b7b4b045e2460e0b2ee150757db (diff)
getArray->getConstArray
Change-Id: I951dd4a02c9ead98e7eb13ae2995ba2e1e57b38a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119740 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sot')
-rw-r--r--sot/source/sdstor/ucbstorage.cxx6
-rw-r--r--sot/source/unoolestorage/xolesimplestorage.cxx2
2 files changed, 4 insertions, 4 deletions
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index 683ceada14b8..31db79361f5c 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -759,7 +759,7 @@ void UCBStorageStream_Impl::ReadSourceWriteTemporary()
do
{
aReaded = m_rSource->readBytes( aData, 32000 );
- m_pStream->WriteBytes(aData.getArray(), aReaded);
+ m_pStream->WriteBytes(aData.getConstArray(), aReaded);
} while( aReaded == 32000 );
}
catch (const Exception &)
@@ -791,7 +791,7 @@ sal_uInt64 UCBStorageStream_Impl::ReadSourceWriteTemporary(sal_uInt64 aLength)
{
sal_Int32 aToCopy = std::min<sal_Int32>( aLength - nInd, 32000 );
aReaded = m_rSource->readBytes( aData, aToCopy );
- aResult += m_pStream->WriteBytes(aData.getArray(), aReaded);
+ aResult += m_pStream->WriteBytes(aData.getConstArray(), aReaded);
}
if( aResult < aLength )
@@ -842,7 +842,7 @@ std::size_t UCBStorageStream_Impl::GetData(void* pData, std::size_t const nSize)
{
Sequence<sal_Int8> aData( aToRead );
std::size_t aReaded = m_rSource->readBytes( aData, aToRead );
- aResult += m_pStream->WriteBytes(static_cast<void*>(aData.getArray()), aReaded);
+ aResult += m_pStream->WriteBytes(static_cast<const void*>(aData.getConstArray()), aReaded);
memcpy( pData, aData.getArray(), aReaded );
}
catch (const Exception &)
diff --git a/sot/source/unoolestorage/xolesimplestorage.cxx b/sot/source/unoolestorage/xolesimplestorage.cxx
index 5a7f561b0a22..6f2147c6415f 100644
--- a/sot/source/unoolestorage/xolesimplestorage.cxx
+++ b/sot/source/unoolestorage/xolesimplestorage.cxx
@@ -203,7 +203,7 @@ void OLESimpleStorage::InsertInputStreamToStorage_Impl( BaseStorage* pStorage, c
{
nRead = xInputStream->readBytes( aData, nBytesCount );
- sal_Int32 nWritten = pNewStream->Write( aData.getArray(), nRead );
+ sal_Int32 nWritten = pNewStream->Write( aData.getConstArray(), nRead );
if ( nWritten < nRead )
throw io::IOException();
} while( nRead == nBytesCount );