diff options
24 files changed, 83 insertions, 84 deletions
diff --git a/basegfx/source/polygon/b2dpolypolygon.cxx b/basegfx/source/polygon/b2dpolypolygon.cxx index f1032f108a86..9c6b1eb50fe9 100644 --- a/basegfx/source/polygon/b2dpolypolygon.cxx +++ b/basegfx/source/polygon/b2dpolypolygon.cxx @@ -137,34 +137,34 @@ public: const basegfx::B2DPolygon* begin() const { - if(maPolygons.empty()) + if (maPolygons.empty()) return nullptr; else - return &maPolygons.front(); + return maPolygons.data(); } const basegfx::B2DPolygon* end() const { - if(maPolygons.empty()) + if (maPolygons.empty()) return nullptr; else - return (&maPolygons.back())+1; + return maPolygons.data() + maPolygons.size(); } basegfx::B2DPolygon* begin() { - if(maPolygons.empty()) + if (maPolygons.empty()) return nullptr; else - return &maPolygons.front(); + return maPolygons.data(); } basegfx::B2DPolygon* end() { - if(maPolygons.empty()) + if (maPolygons.empty()) return nullptr; else - return &(maPolygons.back())+1; + return maPolygons.data() + maPolygons.size(); } }; diff --git a/basegfx/source/polygon/b3dpolypolygon.cxx b/basegfx/source/polygon/b3dpolypolygon.cxx index 74c8b835298a..9aa8c7809982 100644 --- a/basegfx/source/polygon/b3dpolypolygon.cxx +++ b/basegfx/source/polygon/b3dpolypolygon.cxx @@ -155,34 +155,34 @@ public: const basegfx::B3DPolygon* begin() const { - if(maPolygons.empty()) + if (maPolygons.empty()) return nullptr; else - return &maPolygons.front(); + return maPolygons.data(); } const basegfx::B3DPolygon* end() const { - if(maPolygons.empty()) + if (maPolygons.empty()) return nullptr; else - return (&maPolygons.back())+1; + return maPolygons.data() + maPolygons.size(); } basegfx::B3DPolygon* begin() { - if(maPolygons.empty()) + if (maPolygons.empty()) return nullptr; else - return &maPolygons.front(); + return maPolygons.data(); } basegfx::B3DPolygon* end() { - if(maPolygons.empty()) + if (maPolygons.empty()) return nullptr; else - return &(maPolygons.back())+1; + return maPolygons.data() + maPolygons.size(); } }; diff --git a/include/oox/helper/binaryinputstream.hxx b/include/oox/helper/binaryinputstream.hxx index bbc2550cb2c6..d83b8c9eb1fc 100644 --- a/include/oox/helper/binaryinputstream.hxx +++ b/include/oox/helper/binaryinputstream.hxx @@ -242,7 +242,7 @@ template< typename Type > sal_Int32 BinaryInputStream::readArray( ::std::vector< Type >& orVector, sal_Int32 nElemCount ) { orVector.resize( static_cast< size_t >( nElemCount ) ); - return orVector.empty() ? 0 : readArray( &orVector.front(), nElemCount ); + return orVector.empty() ? 0 : readArray(orVector.data(), nElemCount); } diff --git a/include/oox/helper/containerhelper.hxx b/include/oox/helper/containerhelper.hxx index 9c0632a53aa0..a5cd96615183 100644 --- a/include/oox/helper/containerhelper.hxx +++ b/include/oox/helper/containerhelper.hxx @@ -293,7 +293,7 @@ template< typename VectorType > typedef typename VectorType::value_type ValueType; if( rVector.empty() ) return css::uno::Sequence< ValueType >(); - return css::uno::Sequence< ValueType >( &rVector.front(), static_cast< sal_Int32 >( rVector.size() ) ); + return css::uno::Sequence<ValueType>(rVector.data(), static_cast<sal_Int32>(rVector.size())); } template< typename MatrixType > 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. diff --git a/sc/source/filter/excel/excimp8.cxx b/sc/source/filter/excel/excimp8.cxx index a0fed54c1ab1..959b8b0e77a4 100644 --- a/sc/source/filter/excel/excimp8.cxx +++ b/sc/source/filter/excel/excimp8.cxx @@ -352,7 +352,7 @@ void ImportExcel8::Feat() sal_uInt32 nCbSD = aIn.ReaduInt32(); // TODO: could here be some sanity check applied to not allocate 4GB? aProt.maSecurityDescriptor.resize( nCbSD); - std::size_t nRead = aIn.Read( &aProt.maSecurityDescriptor.front(), nCbSD); + std::size_t nRead = aIn.Read(aProt.maSecurityDescriptor.data(), nCbSD); if (nRead < nCbSD) aProt.maSecurityDescriptor.resize( nRead); } diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx index 350324b98d89..b70b3b913ce5 100644 --- a/sc/source/filter/excel/xiescher.cxx +++ b/sc/source/filter/excel/xiescher.cxx @@ -2720,7 +2720,7 @@ void XclImpListBoxObj::DoProcessControl( ScfPropertySet& rPropSet ) const if( !aSelVec.empty() ) { - Sequence< sal_Int16 > aSelSeq( &aSelVec.front(), static_cast< sal_Int32 >( aSelVec.size() ) ); + Sequence<sal_Int16> aSelSeq(aSelVec.data(), static_cast<sal_Int32>(aSelVec.size())); rPropSet.SetProperty( "DefaultSelection", aSelSeq ); } } @@ -3669,7 +3669,7 @@ OUString XclImpDffConverter::ReadHlinkProperty( SvStream& rDffStrm ) const // copy from DFF stream to memory stream ::std::vector< sal_uInt8 > aBuffer( nBufferSize ); - sal_uInt8* pnData = &aBuffer.front(); + sal_uInt8* pnData = aBuffer.data(); if (rDffStrm.ReadBytes(pnData, nBufferSize) == nBufferSize) { aMemStream.WriteBytes(pnData, nBufferSize); diff --git a/sc/source/filter/excel/xistream.cxx b/sc/source/filter/excel/xistream.cxx index 6c350e412e57..a3dbf8a0693a 100644 --- a/sc/source/filter/excel/xistream.cxx +++ b/sc/source/filter/excel/xistream.cxx @@ -151,7 +151,7 @@ uno::Sequence< beans::NamedValue > XclImpBiff5Decrypter::OnVerifyPassword( const OSL_ENSURE( aDocId.getLength() == 16, "Unexpected length of the sequence!" ); ::msfilter::MSCodec_Std97 aCodec97; - aCodec97.InitKey( &aPassVect.front(), reinterpret_cast<sal_uInt8 const *>(aDocId.getConstArray()) ); + aCodec97.InitKey(aPassVect.data(), reinterpret_cast<sal_uInt8 const *>(aDocId.getConstArray())); // merge the EncryptionData, there should be no conflicts ::comphelper::SequenceAsHashMap aEncryptionHash( maEncryptionData ); @@ -254,8 +254,8 @@ uno::Sequence< beans::NamedValue > XclImpBiff8Decrypter::OnVerifyPassword( const *aIt = static_cast< sal_uInt16 >( *pcChar ); // init codec - mpCodec->InitKey( &aPassVect.front(), &maSalt.front() ); - if ( mpCodec->VerifyKey( &maVerifier.front(), &maVerifierHash.front() ) ) + mpCodec->InitKey(aPassVect.data(), maSalt.data()); + if (mpCodec->VerifyKey(maVerifier.data(), maVerifierHash.data())) maEncryptionData = mpCodec->GetEncryptionData(); } @@ -271,7 +271,7 @@ bool XclImpBiff8Decrypter::OnVerifyEncryptionData( const uno::Sequence< beans::N // init codec mpCodec->InitCodec( rEncryptionData ); - if ( mpCodec->VerifyKey( &maVerifier.front(), &maVerifierHash.front() ) ) + if (mpCodec->VerifyKey(maVerifier.data(), maVerifierHash.data())) maEncryptionData = rEncryptionData; } diff --git a/sc/source/filter/excel/xlformula.cxx b/sc/source/filter/excel/xlformula.cxx index e98fea704942..684ce569be47 100644 --- a/sc/source/filter/excel/xlformula.cxx +++ b/sc/source/filter/excel/xlformula.cxx @@ -739,7 +739,7 @@ void XclTokenArray::ReadSize( XclImpStream& rStrm ) void XclTokenArray::ReadArray( XclImpStream& rStrm ) { if( !maTokVec.empty() ) - rStrm.Read( &maTokVec.front(), GetSize() ); + rStrm.Read(maTokVec.data(), GetSize()); } void XclTokenArray::Read( XclImpStream& rStrm ) @@ -756,9 +756,9 @@ void XclTokenArray::WriteSize( XclExpStream& rStrm ) const void XclTokenArray::WriteArray( XclExpStream& rStrm ) const { if( !maTokVec.empty() ) - rStrm.Write( &maTokVec.front(), GetSize() ); + rStrm.Write(maTokVec.data(), GetSize()); if( !maExtDataVec.empty() ) - rStrm.Write( &maExtDataVec.front(), maExtDataVec.size() ); + rStrm.Write(maExtDataVec.data(), maExtDataVec.size()); } void XclTokenArray::Write( XclExpStream& rStrm ) const diff --git a/sc/source/filter/inc/fapihelper.hxx b/sc/source/filter/inc/fapihelper.hxx index edde1c4211cf..649c8ac45698 100644 --- a/sc/source/filter/inc/fapihelper.hxx +++ b/sc/source/filter/inc/fapihelper.hxx @@ -89,7 +89,7 @@ template< typename Type > css::uno::Sequence< Type > ScfApiHelper::VectorToSequence( const ::std::vector< Type >& rVector ) { OSL_ENSURE( !rVector.empty(), "ScfApiHelper::VectorToSequence - vector is empty" ); - return css::uno::Sequence< Type >( &rVector.front(), static_cast< sal_Int32 >( rVector.size() ) ); + return css::uno::Sequence<Type>(rVector.data(), static_cast< sal_Int32 >(rVector.size())); } // Property sets ============================================================== diff --git a/sc/source/filter/inc/xlformula.hxx b/sc/source/filter/inc/xlformula.hxx index a5e9f9516b57..a0fcc25b35c6 100644 --- a/sc/source/filter/inc/xlformula.hxx +++ b/sc/source/filter/inc/xlformula.hxx @@ -387,7 +387,7 @@ public: /** Returns the size of the token array in bytes. */ sal_uInt16 GetSize() const; /** Returns read-only access to the byte vector storing token data. */ - inline const sal_uInt8* GetData() const { return maTokVec.empty() ? nullptr : &maTokVec.front(); } + inline const sal_uInt8* GetData() const { return maTokVec.empty() ? nullptr : maTokVec.data(); } /** Returns true, if the formula contains a volatile function. */ inline bool IsVolatile() const { return mbVolatile; } diff --git a/sc/source/filter/oox/biffcodec.cxx b/sc/source/filter/oox/biffcodec.cxx index 4cfb84e19e08..2f490f2ea2d5 100644 --- a/sc/source/filter/oox/biffcodec.cxx +++ b/sc/source/filter/oox/biffcodec.cxx @@ -127,8 +127,8 @@ Sequence< NamedValue > BiffDecoder_RCF::implVerifyPassword( const OUString& rPas *aIt = static_cast< sal_uInt16 >( *pcChar ); // init codec - maCodec.initKey( &aPassVect.front(), &maSalt.front() ); - if( maCodec.verifyKey( &maVerifier.front(), &maVerifierHash.front() ) ) + maCodec.initKey(aPassVect.data(), maSalt.data()); + if (maCodec.verifyKey(maVerifier.data(), maVerifierHash.data())) maEncryptionData = maCodec.getEncryptionData(); } @@ -144,7 +144,7 @@ bool BiffDecoder_RCF::implVerifyEncryptionData( const Sequence< NamedValue >& rE // init codec maCodec.initCodec( rEncryptionData ); - if( maCodec.verifyKey( &maVerifier.front(), &maVerifierHash.front() ) ) + if (maCodec.verifyKey(maVerifier.data(), maVerifierHash.data())) maEncryptionData = rEncryptionData; } diff --git a/sd/source/ui/remotecontrol/BluetoothServer.cxx b/sd/source/ui/remotecontrol/BluetoothServer.cxx index be1534df4ade..9662e6135ce5 100644 --- a/sd/source/ui/remotecontrol/BluetoothServer.cxx +++ b/sd/source/ui/remotecontrol/BluetoothServer.cxx @@ -461,7 +461,7 @@ sal_Int32 OSXBluetoothWrapper::readLine( OString& aLine ) std::ostringstream s; if (mBuffer.size() > 0) { - for (unsigned char *p = reinterpret_cast<unsigned char *>(&mBuffer.front()); p != reinterpret_cast<unsigned char *>(&mBuffer.front()) + mBuffer.size(); p++) + for (unsigned char *p = reinterpret_cast<unsigned char *>(mBuffer.data()); p != reinterpret_cast<unsigned char *>(mBuffer.data()) + mBuffer.size(); p++) { if (*p == '\n') s << "\\n"; diff --git a/sdext/source/presenter/PresenterAccessibility.cxx b/sdext/source/presenter/PresenterAccessibility.cxx index 044d0fc728f5..3dd042d6cc79 100644 --- a/sdext/source/presenter/PresenterAccessibility.cxx +++ b/sdext/source/presenter/PresenterAccessibility.cxx @@ -1289,7 +1289,7 @@ css::uno::Sequence<sal_Int16> SAL_CALL AccessibleStateSet::getStates() for (sal_uInt16 nIndex=0; nIndex<sizeof(mnStateSet)*8; ++nIndex) if ((mnStateSet & GetStateMask(nIndex)) != 0) aStates.push_back(nIndex); - return Sequence<sal_Int16>(&aStates.front(), aStates.size()); + return Sequence<sal_Int16>(aStates.data(), aStates.size()); } //===== AccessibleRelationSet ================================================= diff --git a/sfx2/source/doc/oleprops.cxx b/sfx2/source/doc/oleprops.cxx index 8cf5f31a50e2..6866aa43cfbb 100644 --- a/sfx2/source/doc/oleprops.cxx +++ b/sfx2/source/doc/oleprops.cxx @@ -277,9 +277,9 @@ OUString SfxOleStringHelper::ImplLoadString8( SvStream& rStrm ) const { // load character buffer ::std::vector< sal_Char > aBuffer( static_cast< size_t >( nSize + 1 ), 0 ); - rStrm.ReadBytes(&aBuffer.front(), static_cast<std::size_t>(nSize)); + rStrm.ReadBytes(aBuffer.data(), static_cast<std::size_t>(nSize)); // create string from encoded character array - aValue = OUString( &aBuffer.front(), strlen( &aBuffer.front() ), GetTextEncoding() ); + aValue = OUString(aBuffer.data(), strlen(aBuffer.data()), GetTextEncoding()); } return aValue; } @@ -308,7 +308,7 @@ OUString SfxOleStringHelper::ImplLoadString16( SvStream& rStrm ) rStrm.SeekRel( 2 ); // create string from character array aBuffer.push_back( 0 ); - aValue = OUString( &aBuffer.front() ); + aValue = OUString(aBuffer.data()); } return aValue; } diff --git a/sfx2/source/sidebar/Theme.cxx b/sfx2/source/sidebar/Theme.cxx index 097e4df762c2..706a49848bb9 100644 --- a/sfx2/source/sidebar/Theme.cxx +++ b/sfx2/source/sidebar/Theme.cxx @@ -568,7 +568,7 @@ css::uno::Sequence<css::beans::Property> SAL_CALL Theme::getProperties() } return css::uno::Sequence<css::beans::Property>( - &aProperties.front(), + aProperties.data(), aProperties.size()); } diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx index 1b420b73d0ba..7b16eaaee4ff 100644 --- a/sw/source/core/layout/atrfrm.cxx +++ b/sw/source/core/layout/atrfrm.cxx @@ -918,15 +918,15 @@ void SwFormatCol::SetGutterWidth( sal_uInt16 nNew, sal_uInt16 nAct ) else { sal_uInt16 nHalf = nNew / 2; - for ( size_t i = 0; i < m_aColumns.size(); ++i ) + for (size_t i = 0; i < m_aColumns.size(); ++i) { - SwColumn *pCol = &m_aColumns[i]; - pCol->SetLeft ( nHalf ); - pCol->SetRight( nHalf ); + SwColumn &rCol = m_aColumns[i]; + rCol.SetLeft(nHalf); + rCol.SetRight(nHalf); if ( i == 0 ) - pCol->SetLeft( 0 ); + rCol.SetLeft(0); else if ( i+1 == m_aColumns.size() ) - pCol->SetRight( 0 ); + rCol.SetRight(0); } } } @@ -992,42 +992,41 @@ void SwFormatCol::Calc( sal_uInt16 nGutterWidth, sal_uInt16 nAct ) (nAct - ((GetNumCols()-1) * nGutterWidth)) / GetNumCols(); sal_uInt16 nAvail = nAct; - //The fist column is PrtWidth + (gap width / 2) + //The first column is PrtWidth + (gap width / 2) const sal_uInt16 nLeftWidth = nPrtWidth + nGutterHalf; - SwColumn *pCol = &m_aColumns.front(); - pCol->SetWishWidth( nLeftWidth ); - pCol->SetRight( nGutterHalf ); - pCol->SetLeft ( 0 ); + SwColumn &rFirstCol = m_aColumns.front(); + rFirstCol.SetWishWidth(nLeftWidth); + rFirstCol.SetRight(nGutterHalf); + rFirstCol.SetLeft(0); nAvail = nAvail - nLeftWidth; //Column 2 to n-1 is PrtWidth + gap width const sal_uInt16 nMidWidth = nPrtWidth + nGutterWidth; - sal_uInt16 i; - for ( i = 1; i < GetNumCols()-1; ++i ) + for (sal_uInt16 i = 1; i < GetNumCols()-1; ++i) { - pCol = &m_aColumns[i]; - pCol->SetWishWidth( nMidWidth ); - pCol->SetLeft ( nGutterHalf ); - pCol->SetRight( nGutterHalf ); + SwColumn &rCol = m_aColumns[i]; + rCol.SetWishWidth(nMidWidth); + rCol.SetLeft(nGutterHalf); + rCol.SetRight(nGutterHalf); nAvail = nAvail - nMidWidth; } //The last column is equivalent to the first one - to compensate rounding //errors we add the remaining space of the other columns to the last one. - pCol = &m_aColumns.back(); - pCol->SetWishWidth( nAvail ); - pCol->SetLeft ( nGutterHalf ); - pCol->SetRight( 0 ); + SwColumn &rLastCol = m_aColumns.back(); + rLastCol.SetWishWidth(nAvail); + rLastCol.SetLeft(nGutterHalf); + rLastCol.SetRight(0); //Convert the current width to the requested width. - for ( i = 0; i < m_aColumns.size(); ++i ) + for (sal_uInt16 i = 0; i < m_aColumns.size(); ++i) { - pCol = &m_aColumns[i]; - long nTmp = pCol->GetWishWidth(); + SwColumn &rCol = m_aColumns[i]; + long nTmp = rCol.GetWishWidth(); nTmp *= GetWishWidth(); nTmp /= nAct; - pCol->SetWishWidth( sal_uInt16(nTmp) ); + rCol.SetWishWidth(sal_uInt16(nTmp)); } } diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx index 2dea97d55e24..374f58d89e11 100644 --- a/sw/source/filter/ww8/wrtw8sty.cxx +++ b/sw/source/filter/ww8/wrtw8sty.cxx @@ -387,9 +387,9 @@ void WW8AttributeOutput::EndStyle() impl_SkipOdd( m_rWW8Export.pO, m_rWW8Export.pTableStrm->Tell() ); short nLen = m_rWW8Export.pO->size() - 2; // length of the style - sal_uInt8* p = &m_rWW8Export.pO->front() + nPOPosStdLen1; + sal_uInt8* p = m_rWW8Export.pO->data() + nPOPosStdLen1; ShortToSVBT16( nLen, p ); // nachtragen - p = &m_rWW8Export.pO->front() + nPOPosStdLen2; + p = m_rWW8Export.pO->data() + nPOPosStdLen2; ShortToSVBT16( nLen, p ); // dito m_rWW8Export.pTableStrm->WriteBytes(m_rWW8Export.pO->data(), m_rWW8Export.pO->size()); @@ -538,7 +538,7 @@ void MSWordStyles::WriteProperties( const SwFormat* pFormat, bool bParProp, sal_ void WW8AttributeOutput::EndStyleProperties( bool /*bParProp*/ ) { sal_uInt16 nLen = m_rWW8Export.pO->size() - m_nStyleStartSize; - sal_uInt8* pUpxLen = &m_rWW8Export.pO->front() + m_nStyleLenPos; // Laenge zum Nachtragen + sal_uInt8* pUpxLen = m_rWW8Export.pO->data() + m_nStyleLenPos; // Laenge zum Nachtragen ShortToSVBT16( nLen, pUpxLen ); // add default length } diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx index 5268fbd4cd97..2a6470dceb8a 100644 --- a/vcl/source/control/tabctrl.cxx +++ b/vcl/source/control/tabctrl.cxx @@ -1186,14 +1186,14 @@ void TabControl::ImplPaint(vcl::RenderContext& rRenderContext, const Rectangle& // overlapped on the left side. Other toolkits ignore this option. if (bDrawTabsRTL) { - pFirstTab = &mpTabCtrlData->maItemList.front(); - pLastTab = &mpTabCtrlData->maItemList.back(); + pFirstTab = mpTabCtrlData->maItemList.data(); + pLastTab = pFirstTab + mpTabCtrlData->maItemList.size(); idx = mpTabCtrlData->maItemList.size() - 1; } else { - pLastTab = &mpTabCtrlData->maItemList.back(); - pFirstTab = &mpTabCtrlData->maItemList.front(); + pLastTab = mpTabCtrlData->maItemList.data(); + pFirstTab = pLastTab + mpTabCtrlData->maItemList.size(); idx = 0; } @@ -2642,14 +2642,14 @@ void NotebookbarTabControl::ImplPaint(vcl::RenderContext& rRenderContext, const // overlapped on the left side. Other toolkits ignore this option. if (bDrawTabsRTL) { - pFirstTab = &mpTabCtrlData->maItemList.front(); - pLastTab = &mpTabCtrlData->maItemList.back(); + pFirstTab = mpTabCtrlData->maItemList.data(); + pLastTab = pFirstTab + mpTabCtrlData->maItemList.size(); idx = mpTabCtrlData->maItemList.size() - 1; } else { - pLastTab = &mpTabCtrlData->maItemList.back(); - pFirstTab = &mpTabCtrlData->maItemList.front(); + pLastTab = mpTabCtrlData->maItemList.data(); + pFirstTab = pLastTab + mpTabCtrlData->maItemList.size(); idx = 0; } diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx index b17897aaae60..89abf96edbb5 100644 --- a/vcl/source/gdi/dibtools.cxx +++ b/vcl/source/gdi/dibtools.cxx @@ -819,7 +819,7 @@ bool ImplReadDIBBody( SvStream& rIStm, Bitmap& rBmp, AlphaMask* pBmpAlpha, sal_u const size_t nToRead(std::min<size_t>(nUncodedSize - nDataPos, aData.size() - nDataPos)); assert(nToRead > 0); assert(!aData.empty()); - const long nRead = aCodec.Read(rIStm, &aData.front() + nDataPos, sal_uInt32(nToRead)); + const long nRead = aCodec.Read(rIStm, aData.data() + nDataPos, sal_uInt32(nToRead)); if (nRead > 0) { nDataPos += static_cast<unsigned long>(nRead); @@ -853,7 +853,7 @@ bool ImplReadDIBBody( SvStream& rIStm, Bitmap& rBmp, AlphaMask* pBmpAlpha, sal_u pMemStm.reset( new SvMemoryStream); pIStm = pMemStm.get(); assert(!aData.empty()); - pMemStm->SetBuffer( &aData.front(), nUncodedSize, nUncodedSize ); + pMemStm->SetBuffer(aData.data(), nUncodedSize, nUncodedSize); nOffset = 0; } else diff --git a/vcl/source/gdi/embeddedfontshelper.cxx b/vcl/source/gdi/embeddedfontshelper.cxx index 5e4e24204c01..8bea667b8c1b 100644 --- a/vcl/source/gdi/embeddedfontshelper.cxx +++ b/vcl/source/gdi/embeddedfontshelper.cxx @@ -143,7 +143,7 @@ bool EmbeddedFontsHelper::addEmbeddedFont( const uno::Reference< io::XInputStrea } if( !eot ) { - sufficientFontRights = sufficientTTFRights( &fontData.front(), fontData.size(), FontRights::EditingAllowed ); + sufficientFontRights = sufficientTTFRights(fontData.data(), fontData.size(), FontRights::EditingAllowed); } if( !sufficientFontRights ) { diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx index c6de50804293..f4dee74f99a3 100644 --- a/vcl/unx/generic/window/salframe.cxx +++ b/vcl/unx/generic/window/salframe.cxx @@ -743,7 +743,7 @@ void X11SalFrame::Init( SalFrameStyleFlags nSalFrameStyle, SalX11Screen nXScreen if( !netwm_icon.empty() && GetDisplay()->getWMAdaptor()->getAtom( WMAdaptor::NET_WM_ICON )) XChangeProperty( GetXDisplay(), mhWindow, GetDisplay()->getWMAdaptor()->getAtom( WMAdaptor::NET_WM_ICON ), - XA_CARDINAL, 32, PropModeReplace, reinterpret_cast<unsigned char*>(&netwm_icon.front()), netwm_icon.size()); + XA_CARDINAL, 32, PropModeReplace, reinterpret_cast<unsigned char*>(netwm_icon.data()), netwm_icon.size()); } m_nWorkArea = GetDisplay()->getWMAdaptor()->getCurrentWorkArea(); @@ -1078,7 +1078,7 @@ void X11SalFrame::SetIcon( sal_uInt16 nIcon ) if( !netwm_icon.empty() && GetDisplay()->getWMAdaptor()->getAtom( WMAdaptor::NET_WM_ICON )) XChangeProperty( GetXDisplay(), mhWindow, GetDisplay()->getWMAdaptor()->getAtom( WMAdaptor::NET_WM_ICON ), - XA_CARDINAL, 32, PropModeReplace, reinterpret_cast<unsigned char*>(&netwm_icon.front()), netwm_icon.size()); + XA_CARDINAL, 32, PropModeReplace, reinterpret_cast<unsigned char*>(netwm_icon.data()), netwm_icon.size()); } } } |