svl/source/items/style.cxx | 3 ++- svl/source/misc/inethist.cxx | 6 +++--- svl/source/misc/strmadpt.cxx | 11 ++++++----- svl/source/numbers/numuno.cxx | 2 +- 4 files changed, 12 insertions(+), 10 deletions(-)
New commits: commit a3ffd9ed6ee0723de407691de93340af9975d3b7 Author: Arnaud Versini <arnaud.vers...@gmail.com> Date: Sun Sep 2 14:55:54 2012 +0200 Replace usage of rtl/memory.h in svl with equivalent from string.h Change-Id: I44e6b162a190939bfa17e04f551309d6249c48df diff --git a/svl/source/items/style.cxx b/svl/source/items/style.cxx index 06f70e0..3f6b768 100644 --- a/svl/source/items/style.cxx +++ b/svl/source/items/style.cxx @@ -33,6 +33,7 @@ #include <unotools/syslocale.hxx> #include <algorithm> #include <comphelper/servicehelper.hxx> +#include <string.h> #ifdef DBG_UTIL class DbgStyleSheetReferences @@ -942,7 +943,7 @@ SfxUnoStyleSheet* SfxUnoStyleSheet::getUnoStyleSheet( const ::com::sun::star::un ::sal_Int64 SAL_CALL SfxUnoStyleSheet::getSomething( const ::com::sun::star::uno::Sequence< ::sal_Int8 >& rId ) throw (::com::sun::star::uno::RuntimeException) { - if( rId.getLength() == 16 && 0 == rtl_compareMemory( getIdentifier().getConstArray(), rId.getConstArray(), 16 ) ) + if( rId.getLength() == 16 && 0 == memcmp( getIdentifier().getConstArray(), rId.getConstArray(), 16 ) ) { return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_uIntPtr>(this)); } diff --git a/svl/source/misc/inethist.cxx b/svl/source/misc/inethist.cxx index 3530ced..8233358 100644 --- a/svl/source/misc/inethist.cxx +++ b/svl/source/misc/inethist.cxx @@ -20,10 +20,10 @@ #include <svl/inethist.hxx> #include <algorithm> +#include <string.h> #include "rtl/instance.hxx" #include "rtl/crc.h" -#include "rtl/memory.h" #include <tools/solar.h> #include <tools/debug.hxx> #include <tools/string.hxx> @@ -273,7 +273,7 @@ void INetURLHistory_Impl::move (sal_uInt16 nSI, sal_uInt16 nDI) if (nSI < nDI) { // shift left. - rtl_moveMemory ( + memmove ( &m_pHash[nSI ], &m_pHash[nSI + 1], (nDI - nSI) * sizeof(hash_entry)); @@ -281,7 +281,7 @@ void INetURLHistory_Impl::move (sal_uInt16 nSI, sal_uInt16 nDI) if (nSI > nDI) { // shift right. - rtl_moveMemory ( + memmove ( &m_pHash[nDI + 1], &m_pHash[nDI ], (nSI - nDI) * sizeof(hash_entry)); diff --git a/svl/source/misc/strmadpt.cxx b/svl/source/misc/strmadpt.cxx index cf1d41e..77a8676 100644 --- a/svl/source/misc/strmadpt.cxx +++ b/svl/source/misc/strmadpt.cxx @@ -23,8 +23,9 @@ #include <algorithm> #include <limits> #include <set> +#include <string.h> + #include <rtl/alloc.h> -#include <rtl/memory.h> #include <svl/instrm.hxx> #include <svl/outstrm.hxx> #include <svl/strmadpt.hxx> @@ -511,7 +512,7 @@ sal_uLong SvInputStream::GetData(void * pData, sal_uLong nSize) SetError(ERRCODE_IO_CANTREAD); return nRead; } - rtl_copyMemory(static_cast< sal_Int8 * >(pData) + nRead, + memcpy(static_cast< sal_Int8 * >(pData) + nRead, aBuffer.getConstArray(), sal_uInt32(nCount)); nRead += nCount; if (nCount < nRemain) @@ -879,7 +880,7 @@ sal_uInt32 SvDataPipe_Impl::read() sal_uInt32 nBlock = std::min(sal_uInt32(m_pReadPage->m_pEnd - m_pReadPage->m_pRead), nRemain); - rtl_copyMemory(m_pReadBuffer, m_pReadPage->m_pRead, nBlock); + memcpy(m_pReadBuffer, m_pReadPage->m_pRead, nBlock); m_pReadPage->m_pRead += nBlock; m_pReadBuffer += nBlock; m_nReadBufferSize -= nBlock; @@ -942,7 +943,7 @@ sal_uInt32 SvDataPipe_Impl::write(sal_Int8 const * pBuffer, sal_uInt32 nSize) if (nBlock > 0) { - rtl_copyMemory(m_pReadBuffer + m_nReadBufferFilled, pBuffer, + memcpy(m_pReadBuffer + m_nReadBufferFilled, pBuffer, nBlock); m_nReadBufferFilled += nBlock; nRemain -= nBlock; @@ -963,7 +964,7 @@ sal_uInt32 SvDataPipe_Impl::write(sal_Int8 const * pBuffer, sal_uInt32 nSize) = std::min(sal_uInt32(m_pWritePage->m_aBuffer + m_nPageSize - m_pWritePage->m_pEnd), nRemain); - rtl_copyMemory(m_pWritePage->m_pEnd, pBuffer, nBlock); + memcpy(m_pWritePage->m_pEnd, pBuffer, nBlock); m_pWritePage->m_pEnd += nBlock; pBuffer += nBlock; nRemain -= nBlock; diff --git a/svl/source/numbers/numuno.cxx b/svl/source/numbers/numuno.cxx index ee68795..8e5b4a1 100644 --- a/svl/source/numbers/numuno.cxx +++ b/svl/source/numbers/numuno.cxx @@ -106,7 +106,7 @@ sal_Int64 SAL_CALL SvNumberFormatsSupplierObj::getSomething( const uno::Sequence<sal_Int8 >& rId ) throw(uno::RuntimeException) { if ( rId.getLength() == 16 && - 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(), + 0 == memcmp( getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) ) { return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_IntPtr>(this)); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits