summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-02-24 14:09:52 +0000
committerAshod Nakashian <ashod.nakashian@collabora.co.uk>2017-12-05 08:17:26 -0500
commit1c5dfa9bd3c24fdeec92e8334461a70d07202f0f (patch)
tree554d001432abd5518f366eef314a0918a9b6c5e8 /oox
parentab087a1254cf8074b2cf14cb8eee1cbdfd1b1f3e (diff)
vector::data seems more natural than &vector::front
Change-Id: I0ce48075ad186cf1f9bd3e13fa76269fa9819af1 (cherry picked from commit 3a74745367a73ed9351379fc32bbe9253cdae697) (cherry picked from commit 3437713c11d60f99470fc1d0e2a8e5c56d5a6fe8)
Diffstat (limited to 'oox')
-rw-r--r--oox/source/dump/dumperbase.cxx4
-rw-r--r--oox/source/helper/binaryinputstream.cxx2
-rw-r--r--oox/source/ole/vbainputstream.cxx2
3 files changed, 4 insertions, 4 deletions
diff --git a/oox/source/dump/dumperbase.cxx b/oox/source/dump/dumperbase.cxx
index 373e665cd14a..a4fca11906a8 100644
--- a/oox/source/dump/dumperbase.cxx
+++ b/oox/source/dump/dumperbase.cxx
@@ -2144,9 +2144,9 @@ OUString InputObjectBase::dumpCharArray( const String& rName, sal_Int32 nLen, rt
if( nDumpSize > 0 )
{
::std::vector< sal_Char > aBuffer( static_cast< std::size_t >( nLen ) + 1 );
- sal_Int32 nCharsRead = mxStrm->readMemory( &aBuffer.front(), nLen );
+ sal_Int32 nCharsRead = mxStrm->readMemory(aBuffer.data(), nLen);
aBuffer[ nCharsRead ] = 0;
- aString = OStringToOUString( OString( &aBuffer.front() ), eTextEnc );
+ aString = OStringToOUString(OString(aBuffer.data()), eTextEnc);
}
if( bHideTrailingNul )
aString = StringHelper::trimTrailingNul( aString );
diff --git a/oox/source/helper/binaryinputstream.cxx b/oox/source/helper/binaryinputstream.cxx
index e3f300a604df..5a568dc68c49 100644
--- a/oox/source/helper/binaryinputstream.cxx
+++ b/oox/source/helper/binaryinputstream.cxx
@@ -66,7 +66,7 @@ OString BinaryInputStream::readCharArray( sal_Int32 nChars, bool bAllowNulChars
if( !bAllowNulChars )
::std::replace( aBuffer.begin(), aBuffer.end(), '\0', '?' );
- return OString( reinterpret_cast< sal_Char* >( &aBuffer.front() ), nCharsRead );
+ return OString(reinterpret_cast<sal_Char*>(aBuffer.data()), nCharsRead);
}
OUString BinaryInputStream::readCharArrayUC( sal_Int32 nChars, rtl_TextEncoding eTextEnc, bool bAllowNulChars )
diff --git a/oox/source/ole/vbainputstream.cxx b/oox/source/ole/vbainputstream.cxx
index e3c545231e73..0e9262ceab04 100644
--- a/oox/source/ole/vbainputstream.cxx
+++ b/oox/source/ole/vbainputstream.cxx
@@ -194,7 +194,7 @@ bool VbaInputStream::updateChunk()
else
{
maChunk.resize( nChunkLen );
- mpInStrm->readMemory( &maChunk.front(), nChunkLen );
+ mpInStrm->readMemory(maChunk.data(), nChunkLen);
}
// decompression sometimes leaves the stream pos offset 1 place ( at
// least ) past or before the expected stream pos.