[Libreoffice-commits] .: 3 commits - package/source sd/source xmlhelp/source
Arnaud Versini
aversini at kemper.freedesktop.org
Sun Jul 29 07:45:39 PDT 2012
package/source/zipapi/XUnbufferedStream.cxx | 4 +--
package/source/zipapi/ZipFile.cxx | 18 ++++++++--------
package/source/zippackage/ZipPackage.cxx | 2 -
package/source/zippackage/ZipPackageFolder.cxx | 4 ++-
package/source/zippackage/ZipPackageStream.cxx | 3 +-
sd/source/filter/eppt/pptexanimations.cxx | 7 ++----
sd/source/ui/app/sdxfer.cxx | 2 -
sd/source/ui/dlg/sdtreelb.cxx | 2 -
sd/source/ui/framework/factories/Pane.cxx | 2 -
sd/source/ui/framework/factories/ViewShellWrapper.cxx | 2 -
sd/source/ui/unoidl/DrawController.cxx | 2 -
sd/source/ui/unoidl/unomodel.cxx | 5 +---
sd/source/ui/unoidl/unopage.cxx | 3 --
sd/source/ui/unoidl/unopback.cxx | 1
sd/source/ui/unoidl/unosrch.cxx | 1
sd/source/ui/view/ViewTabBar.cxx | 2 -
xmlhelp/source/cxxhelp/inc/qe/Query.hxx | 1
xmlhelp/source/cxxhelp/provider/bufferedinputstream.cxx | 7 +++---
xmlhelp/source/cxxhelp/provider/databases.cxx | 15 ++++++-------
xmlhelp/source/cxxhelp/provider/urlparameter.cxx | 5 +---
20 files changed, 42 insertions(+), 46 deletions(-)
New commits:
commit acd3b2f07026a78a0b819dae0a4a308d115bb1b5
Author: Arnaud Versini <arnaud.versini at gmail.com>
Date: Sun Jul 29 14:42:26 2012 +0200
Replace usage of rtl/memory.h in xmlhelp with their equivalent from string.h
Change-Id: I02a1af9bac1e1283f33bc204cd8737ebd2ebd06c
diff --git a/xmlhelp/source/cxxhelp/inc/qe/Query.hxx b/xmlhelp/source/cxxhelp/inc/qe/Query.hxx
index 9aa5e95..9a3eb48 100644
--- a/xmlhelp/source/cxxhelp/inc/qe/Query.hxx
+++ b/xmlhelp/source/cxxhelp/inc/qe/Query.hxx
@@ -20,7 +20,6 @@
#define _XMLSEARCH_QE_QUERY_HXX_
#include <sal/types.h>
-#include <rtl/memory.h>
#include <rtl/ustring.hxx>
#include <vector>
diff --git a/xmlhelp/source/cxxhelp/provider/bufferedinputstream.cxx b/xmlhelp/source/cxxhelp/provider/bufferedinputstream.cxx
index 4384a2c..ef84cc8 100644
--- a/xmlhelp/source/cxxhelp/provider/bufferedinputstream.cxx
+++ b/xmlhelp/source/cxxhelp/provider/bufferedinputstream.cxx
@@ -26,6 +26,7 @@
*
************************************************************************/
+#include <string.h>
#include <rtl/memory.h>
#include "bufferedinputstream.hxx"
@@ -69,10 +70,10 @@ BufferedInputStream::BufferedInputStream(const Reference<XInputStream>& xInputSt
{
tmp = m_pBuffer;
m_pBuffer = new sal_Int8[m_nBufferSize+num];
- rtl_copyMemory((void *)(m_pBuffer),
+ memcpy((void *)(m_pBuffer),
(void *)(tmp),
sal_uInt32(m_nBufferSize));
- rtl_copyMemory((void *)(m_pBuffer+m_nBufferSize),
+ memcpy((void *)(m_pBuffer+m_nBufferSize),
(void *)(aData.getArray()),
sal_uInt32(num));
m_nBufferSize += num;
@@ -142,7 +143,7 @@ sal_Int32 SAL_CALL BufferedInputStream::readBytes( Sequence< sal_Int8 >& aData,s
if( aData.getLength() < nBytesToRead )
aData.realloc(nBytesToRead);
- rtl_copyMemory((void*)(aData.getArray()),
+ memcpy((void*)(aData.getArray()),
(void*)(m_pBuffer+m_nBufferLocation),
nBytesToRead);
diff --git a/xmlhelp/source/cxxhelp/provider/databases.cxx b/xmlhelp/source/cxxhelp/provider/databases.cxx
index 2abd91b..51ef2cb 100644
--- a/xmlhelp/source/cxxhelp/provider/databases.cxx
+++ b/xmlhelp/source/cxxhelp/provider/databases.cxx
@@ -32,7 +32,6 @@
#include <osl/process.h>
#include <rtl/uri.hxx>
#include <osl/file.hxx>
-#include <rtl/memory.h>
#include <com/sun/star/lang/Locale.hpp>
#include <rtl/ustrbuf.hxx>
#include "inputstream.hxx"
@@ -1197,11 +1196,11 @@ void Databases::popupDocument( URLParameter* urlPar,char **buffer,int *byteCount
*buffer = new char[ 1+*byteCount ];
- rtl_copyMemory( *buffer,pop1,l1 );
- rtl_copyMemory( *buffer+l1,pop2,l2 );
- rtl_copyMemory( *buffer+(l1+l2),pop3,l3 );
- rtl_copyMemory( *buffer+(l1+l2+l3),pop4,l4 );
- rtl_copyMemory( *buffer+(l1+l2+l3+l4),pop5,l5 );
+ memcpy( *buffer,pop1,l1 );
+ memcpy( *buffer+l1,pop2,l2 );
+ memcpy( *buffer+(l1+l2),pop3,l3 );
+ memcpy( *buffer+(l1+l2+l3),pop4,l4 );
+ memcpy( *buffer+(l1+l2+l3+l4),pop5,l5 );
(*buffer)[*byteCount] = 0;
}
@@ -1306,7 +1305,7 @@ void Databases::cascadingStylesheet( const rtl::OUString& Language,
*byteCount = m_nCustomCSSDocLength;
*buffer = new char[ 1 + *byteCount ];
(*buffer)[*byteCount] = 0;
- rtl_copyMemory( *buffer,m_pCustomCSSDoc,m_nCustomCSSDocLength );
+ memcpy( *buffer,m_pCustomCSSDoc,m_nCustomCSSDocLength );
}
@@ -1377,7 +1376,7 @@ void Databases::setActiveText( const rtl::OUString& Module,
*byteCount = nSize;
*buffer = new char[ 1 + nSize ];
(*buffer)[nSize] = 0;
- rtl_copyMemory( *buffer, pData, nSize );
+ memcpy( *buffer, pData, nSize );
}
else
{
diff --git a/xmlhelp/source/cxxhelp/provider/urlparameter.cxx b/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
index fddd2ac..2060c3d 100644
--- a/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
+++ b/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
@@ -32,7 +32,6 @@
#include <string.h>
#include <osl/diagnose.hxx>
#include <osl/thread.h>
-#include <rtl/memory.h>
#include <osl/file.hxx>
#include <cppuhelper/weak.hxx>
#include <cppuhelper/queryinterface.hxx>
@@ -1206,8 +1205,8 @@ void InputStreamTransformer::addToBuffer( const char* buffer_,int len_ )
char* tmp = buffer;
buffer = new char[ len+len_ ];
- rtl_copyMemory( (void*)(buffer),(void*)(tmp),sal_uInt32( len ) );
- rtl_copyMemory( (void*)(buffer+len),(void*)(buffer_),sal_uInt32( len_ ) );
+ memcpy( (void*)(buffer),(void*)(tmp),sal_uInt32( len ) );
+ memcpy( (void*)(buffer+len),(void*)(buffer_),sal_uInt32( len_ ) );
delete[] tmp;
len += len_;
}
commit 04710a69122d383071520ae3d39664a5edb80520
Author: Arnaud Versini <arnaud.versini at gmail.com>
Date: Sat Jul 28 22:48:28 2012 +0200
Replace usage of rtl/memory.h in sd with their equivalent from string.h
Change-Id: I79ab2e420783b06b3cba627795a108addb5a2e8b
diff --git a/sd/source/filter/eppt/pptexanimations.cxx b/sd/source/filter/eppt/pptexanimations.cxx
index a2edb89..736a595 100644
--- a/sd/source/filter/eppt/pptexanimations.cxx
+++ b/sd/source/filter/eppt/pptexanimations.cxx
@@ -64,7 +64,6 @@
#include <com/sun/star/container/XChild.hpp>
#include <comphelper/processfactory.hxx>
#include <rtl/ustrbuf.hxx>
-#include <rtl/memory.h>
#include <vcl/vclenum.hxx>
#include <svx/svdotext.hxx>
@@ -553,7 +552,7 @@ void AnimationExporter::exportNode( SvStream& rStrm, Reference< XAnimationNode >
{
EscherExAtom aAnimNodeExAtom( rStrm, DFF_msofbtAnimNode );
AnimationNode aAnim;
- rtl_zeroMemory( &aAnim, sizeof( aAnim ) );
+ memset( &aAnim, 0, sizeof( aAnim ) );
aAnim.mnGroupType = mso_Anim_GroupType_PAR;
aAnim.mnNodeType = 1;
// attribute Restart
@@ -799,7 +798,7 @@ void AnimationExporter::exportAnimNode( SvStream& rStrm, const Reference< XAnima
{
EscherExAtom aAnimNodeExAtom( rStrm, DFF_msofbtAnimNode );
AnimationNode aAnim;
- rtl_zeroMemory( &aAnim, sizeof( aAnim ) );
+ memset( &aAnim, 0, sizeof( aAnim ) );
// attribute Restart
switch( xNode->getRestart() )
@@ -889,7 +888,7 @@ void AnimationExporter::exportAnimNode( SvStream& rStrm, const Reference< XAnima
void AnimationExporter::GetUserData( const Sequence< NamedValue >& rUserData, const Any ** pAny, sal_Size nLen )
{
// storing user data into pAny, to allow direct access later
- rtl_zeroMemory( pAny, nLen );
+ memset( pAny, 0, nLen );
if ( rUserData.getLength() )
{
const NamedValue* p = rUserData.getConstArray();
diff --git a/sd/source/ui/app/sdxfer.cxx b/sd/source/ui/app/sdxfer.cxx
index fe168f7..353709c 100644
--- a/sd/source/ui/app/sdxfer.cxx
+++ b/sd/source/ui/app/sdxfer.cxx
@@ -758,7 +758,7 @@ sal_Int64 SAL_CALL SdTransferable::getSomething( const ::com::sun::star::uno::Se
sal_Int64 nRet;
if( ( rId.getLength() == 16 ) &&
- ( 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) ) )
+ ( 0 == memcmp( getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) ) )
{
nRet = sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_IntPtr>(this));
}
diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx
index 0aea780..4c38087 100644
--- a/sd/source/ui/dlg/sdtreelb.cxx
+++ b/sd/source/ui/dlg/sdtreelb.cxx
@@ -166,7 +166,7 @@ sal_Int64 SAL_CALL SdPageObjsTLB::SdPageObjsTransferable::getSomething( const ::
sal_Int64 nRet;
if( ( rId.getLength() == 16 ) &&
- ( 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) ) )
+ ( 0 == memcmp( getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) ) )
{
nRet = (sal_Int64)(sal_IntPtr)this;
}
diff --git a/sd/source/ui/framework/factories/Pane.cxx b/sd/source/ui/framework/factories/Pane.cxx
index 6ae18d0..cf29d16 100644
--- a/sd/source/ui/framework/factories/Pane.cxx
+++ b/sd/source/ui/framework/factories/Pane.cxx
@@ -210,7 +210,7 @@ sal_Int64 SAL_CALL Pane::getSomething (const Sequence<sal_Int8>& rId)
sal_Int64 nResult = 0;
if (rId.getLength() == 16
- && rtl_compareMemory(getUnoTunnelId().getConstArray(), rId.getConstArray(), 16) == 0)
+ && memcmp(getUnoTunnelId().getConstArray(), rId.getConstArray(), 16) == 0)
{
nResult = reinterpret_cast<sal_Int64>(this);
}
diff --git a/sd/source/ui/framework/factories/ViewShellWrapper.cxx b/sd/source/ui/framework/factories/ViewShellWrapper.cxx
index c66be3c..1108ffe 100644
--- a/sd/source/ui/framework/factories/ViewShellWrapper.cxx
+++ b/sd/source/ui/framework/factories/ViewShellWrapper.cxx
@@ -195,7 +195,7 @@ sal_Int64 SAL_CALL ViewShellWrapper::getSomething (const Sequence<sal_Int8>& rId
sal_Int64 nResult = 0;
if (rId.getLength() == 16
- && rtl_compareMemory(getUnoTunnelId().getConstArray(), rId.getConstArray(), 16) == 0)
+ && memcmp(getUnoTunnelId().getConstArray(), rId.getConstArray(), 16) == 0)
{
nResult = reinterpret_cast<sal_Int64>(this);
}
diff --git a/sd/source/ui/unoidl/DrawController.cxx b/sd/source/ui/unoidl/DrawController.cxx
index 6e48581..48d9318 100644
--- a/sd/source/ui/unoidl/DrawController.cxx
+++ b/sd/source/ui/unoidl/DrawController.cxx
@@ -621,7 +621,7 @@ sal_Int64 SAL_CALL DrawController::getSomething (const Sequence<sal_Int8>& rId)
sal_Int64 nResult = 0;
if (rId.getLength() == 16
- && rtl_compareMemory(getUnoTunnelId().getConstArray(), rId.getConstArray(), 16) == 0)
+ && memcmp(getUnoTunnelId().getConstArray(), rId.getConstArray(), 16) == 0)
{
nResult = sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_IntPtr>(this));
}
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 1ddca54..264fdec 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -42,7 +42,6 @@
#include <comphelper/servicehelper.hxx>
#include <comphelper/serviceinfohelper.hxx>
-#include <rtl/memory.h>
#include <editeng/unofield.hxx>
#include <unomodel.hxx>
#include <sfx2/dispatch.hxx>
@@ -331,10 +330,10 @@ sal_Int64 SAL_CALL SdXImpressDocument::getSomething( const ::com::sun::star::uno
{
if( rIdentifier.getLength() == 16 )
{
- if( (0 == rtl_compareMemory( SdXImpressDocument::getUnoTunnelId().getConstArray(), rIdentifier.getConstArray(), 16 )) )
+ if( (0 == memcmp( SdXImpressDocument::getUnoTunnelId().getConstArray(), rIdentifier.getConstArray(), 16 )) )
return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_IntPtr>(this));
- if( (0 == rtl_compareMemory( SdrModel::getUnoTunnelImplementationId().getConstArray(), rIdentifier.getConstArray(), 16 )) )
+ if( (0 == memcmp( SdrModel::getUnoTunnelImplementationId().getConstArray(), rIdentifier.getConstArray(), 16 )) )
return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_IntPtr>(mpDoc));
}
diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index f9c0669..fcdae15 100644
--- a/sd/source/ui/unoidl/unopage.cxx
+++ b/sd/source/ui/unoidl/unopage.cxx
@@ -59,7 +59,6 @@
#include <svx/svdorect.hxx>
#include <osl/mutex.hxx>
#include <svl/style.hxx>
-#include <rtl/memory.h>
#include <comphelper/serviceinfohelper.hxx>
#include <comphelper/extract.hxx>
@@ -348,7 +347,7 @@ const ::com::sun::star::uno::Sequence< sal_Int8 > & SdGenericDrawPage::getUnoTun
sal_Int64 SAL_CALL SdGenericDrawPage::getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& rId ) throw(::com::sun::star::uno::RuntimeException)
{
- if( rId.getLength() == 16 && 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(),
+ if( rId.getLength() == 16 && 0 == memcmp( getUnoTunnelId().getConstArray(),
rId.getConstArray(), 16 ) )
{
return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_IntPtr>(this));
diff --git a/sd/source/ui/unoidl/unopback.cxx b/sd/source/ui/unoidl/unopback.cxx
index 02654d0..040e9b8 100644
--- a/sd/source/ui/unoidl/unopback.cxx
+++ b/sd/source/ui/unoidl/unopback.cxx
@@ -32,7 +32,6 @@
#include <svl/itemset.hxx>
#include <svx/svdpool.hxx>
#include <comphelper/extract.hxx>
-#include <rtl/memory.h>
#include <svx/xflbstit.hxx>
#include <svx/xflbmtit.hxx>
#include <svx/svdobj.hxx>
diff --git a/sd/source/ui/unoidl/unosrch.cxx b/sd/source/ui/unoidl/unosrch.cxx
index f9f77d1..0dd1219 100644
--- a/sd/source/ui/unoidl/unosrch.cxx
+++ b/sd/source/ui/unoidl/unosrch.cxx
@@ -35,7 +35,6 @@
#include <editeng/unotext.hxx>
#include <comphelper/extract.hxx>
-#include <rtl/memory.h>
#include "unohelp.hxx"
#include "unoprnms.hxx"
diff --git a/sd/source/ui/view/ViewTabBar.cxx b/sd/source/ui/view/ViewTabBar.cxx
index 99521a6..be29215 100644
--- a/sd/source/ui/view/ViewTabBar.cxx
+++ b/sd/source/ui/view/ViewTabBar.cxx
@@ -408,7 +408,7 @@ sal_Int64 SAL_CALL ViewTabBar::getSomething (const Sequence<sal_Int8>& rId)
sal_Int64 nResult = 0;
if (rId.getLength() == 16
- && rtl_compareMemory(getUnoTunnelId().getConstArray(), rId.getConstArray(), 16) == 0)
+ && memcmp(getUnoTunnelId().getConstArray(), rId.getConstArray(), 16) == 0)
{
nResult = reinterpret_cast<sal_Int64>(this);
}
commit 4be123fed2b8d7e10bb98cd753e3b5cbc1d7293a
Author: Arnaud Versini <arnaud.versini at gmail.com>
Date: Sat Jul 28 22:01:59 2012 +0200
Use memcpy & memcmp insteadof rtl_copyMemory & rtl_compareMemory in package
Change-Id: Ia24406ff31949e00725db74bbe5b016894a22f50
diff --git a/package/source/zipapi/XUnbufferedStream.cxx b/package/source/zipapi/XUnbufferedStream.cxx
index 961cfff..7ef9b09 100644
--- a/package/source/zipapi/XUnbufferedStream.cxx
+++ b/package/source/zipapi/XUnbufferedStream.cxx
@@ -182,7 +182,7 @@ sal_Int32 SAL_CALL XUnbufferedStream::readBytes( Sequence< sal_Int8 >& aData, sa
{
sal_Int16 nHeadRead = static_cast< sal_Int16 >(( nRequestedBytes > mnHeaderToRead ?
mnHeaderToRead : nRequestedBytes ));
- rtl_copyMemory ( aData.getArray(), maHeader.getConstArray() + maHeader.getLength() - mnHeaderToRead, nHeadRead );
+ memcpy ( aData.getArray(), maHeader.getConstArray() + maHeader.getLength() - mnHeaderToRead, nHeadRead );
mnHeaderToRead = mnHeaderToRead - nHeadRead;
if ( nHeadRead < nRequestedBytes )
@@ -275,7 +275,7 @@ sal_Int32 SAL_CALL XUnbufferedStream::readBytes( Sequence< sal_Int8 >& aData, sa
{
sal_Int32 nOldLen = maCompBuffer.getLength();
maCompBuffer.realloc( nOldLen + aSuffix.getLength() );
- rtl_copyMemory( maCompBuffer.getArray() + nOldLen, aSuffix.getConstArray(), aSuffix.getLength() );
+ memcpy( maCompBuffer.getArray() + nOldLen, aSuffix.getConstArray(), aSuffix.getLength() );
}
}
}
diff --git a/package/source/zipapi/ZipFile.cxx b/package/source/zipapi/ZipFile.cxx
index e67b07e..81f1793 100644
--- a/package/source/zipapi/ZipFile.cxx
+++ b/package/source/zipapi/ZipFile.cxx
@@ -276,19 +276,19 @@ void ZipFile::StaticFillHeader( const ::rtl::Reference< EncryptionData >& rData,
*(pHeader++) = static_cast< sal_Int8 >(( nMediaTypeLength >> 8 ) & 0xFF);
// Then the salt content
- rtl_copyMemory ( pHeader, rData->m_aSalt.getConstArray(), nSaltLength );
+ memcpy ( pHeader, rData->m_aSalt.getConstArray(), nSaltLength );
pHeader += nSaltLength;
// Then the IV content
- rtl_copyMemory ( pHeader, rData->m_aInitVector.getConstArray(), nIVLength );
+ memcpy ( pHeader, rData->m_aInitVector.getConstArray(), nIVLength );
pHeader += nIVLength;
// Then the digest content
- rtl_copyMemory ( pHeader, rData->m_aDigest.getConstArray(), nDigestLength );
+ memcpy ( pHeader, rData->m_aDigest.getConstArray(), nDigestLength );
pHeader += nDigestLength;
// Then the mediatype itself
- rtl_copyMemory ( pHeader, aMediaType.getStr(), nMediaTypeLength );
+ memcpy ( pHeader, aMediaType.getStr(), nMediaTypeLength );
pHeader += nMediaTypeLength;
}
@@ -356,15 +356,15 @@ sal_Bool ZipFile::StaticFillData ( ::rtl::Reference< BaseEncryptionData > & rDa
if ( nSaltLength == rStream->readBytes ( aBuffer, nSaltLength ) )
{
rData->m_aSalt.realloc ( nSaltLength );
- rtl_copyMemory ( rData->m_aSalt.getArray(), aBuffer.getConstArray(), nSaltLength );
+ memcpy ( rData->m_aSalt.getArray(), aBuffer.getConstArray(), nSaltLength );
if ( nIVLength == rStream->readBytes ( aBuffer, nIVLength ) )
{
rData->m_aInitVector.realloc ( nIVLength );
- rtl_copyMemory ( rData->m_aInitVector.getArray(), aBuffer.getConstArray(), nIVLength );
+ memcpy ( rData->m_aInitVector.getArray(), aBuffer.getConstArray(), nIVLength );
if ( nDigestLength == rStream->readBytes ( aBuffer, nDigestLength ) )
{
rData->m_aDigest.realloc ( nDigestLength );
- rtl_copyMemory ( rData->m_aDigest.getArray(), aBuffer.getConstArray(), nDigestLength );
+ memcpy ( rData->m_aDigest.getArray(), aBuffer.getConstArray(), nDigestLength );
if ( nMediaTypeLength == rStream->readBytes ( aBuffer, nMediaTypeLength ) )
{
@@ -464,7 +464,7 @@ sal_Bool ZipFile::StaticHasValidPassword( const uno::Reference< lang::XMultiServ
{
sal_Int32 nOldLen = aDecryptBuffer.getLength();
aDecryptBuffer.realloc( nOldLen + aDecryptBuffer2.getLength() );
- rtl_copyMemory( aDecryptBuffer.getArray() + nOldLen, aDecryptBuffer2.getArray(), aDecryptBuffer2.getLength() );
+ memcpy( aDecryptBuffer.getArray() + nOldLen, aDecryptBuffer2.getArray(), aDecryptBuffer2.getLength() );
}
if ( aDecryptBuffer.getLength() > n_ConstDigestLength )
@@ -479,7 +479,7 @@ sal_Bool ZipFile::StaticHasValidPassword( const uno::Reference< lang::XMultiServ
// If we don't have a digest, then we have to assume that the password is correct
if ( rData->m_aDigest.getLength() != 0 &&
( aDigestSeq.getLength() != rData->m_aDigest.getLength() ||
- 0 != rtl_compareMemory ( aDigestSeq.getConstArray(),
+ 0 != memcmp ( aDigestSeq.getConstArray(),
rData->m_aDigest.getConstArray(),
aDigestSeq.getLength() ) ) )
{
diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx
index 8cd044f..35c7379 100644
--- a/package/source/zippackage/ZipPackage.cxx
+++ b/package/source/zippackage/ZipPackage.cxx
@@ -1697,7 +1697,7 @@ Sequence< sal_Int8 > ZipPackage::getUnoTunnelImplementationId( void )
sal_Int64 SAL_CALL ZipPackage::getSomething( const uno::Sequence< sal_Int8 >& aIdentifier )
throw( RuntimeException )
{
- if ( aIdentifier.getLength() == 16 && 0 == rtl_compareMemory( getUnoTunnelImplementationId().getConstArray(), aIdentifier.getConstArray(), 16 ) )
+ if ( aIdentifier.getLength() == 16 && 0 == memcmp( getUnoTunnelImplementationId().getConstArray(), aIdentifier.getConstArray(), 16 ) )
return reinterpret_cast < sal_Int64 > ( this );
return 0;
}
diff --git a/package/source/zippackage/ZipPackageFolder.cxx b/package/source/zippackage/ZipPackageFolder.cxx
index b9c19c9..60de629 100644
--- a/package/source/zippackage/ZipPackageFolder.cxx
+++ b/package/source/zippackage/ZipPackageFolder.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <string.h>
+
#include <ZipPackageFolder.hxx>
#include <ZipFile.hxx>
#include <ZipOutputStream.hxx>
@@ -764,7 +766,7 @@ sal_Int64 SAL_CALL ZipPackageFolder::getSomething( const uno::Sequence< sal_Int8
{
sal_Int64 nMe = 0;
if ( aIdentifier.getLength() == 16 &&
- 0 == rtl_compareMemory(static_getImplementationId().getConstArray(), aIdentifier.getConstArray(), 16 ) )
+ 0 == memcmp(static_getImplementationId().getConstArray(), aIdentifier.getConstArray(), 16 ) )
nMe = reinterpret_cast < sal_Int64 > ( this );
return nMe;
}
diff --git a/package/source/zippackage/ZipPackageStream.cxx b/package/source/zippackage/ZipPackageStream.cxx
index e816c49..fa066bd 100644
--- a/package/source/zippackage/ZipPackageStream.cxx
+++ b/package/source/zippackage/ZipPackageStream.cxx
@@ -28,6 +28,7 @@
#include <com/sun/star/xml/crypto/DigestID.hpp>
#include <com/sun/star/xml/crypto/CipherID.hpp>
+#include <string.h>
#include <ZipPackageStream.hxx>
#include <ZipPackage.hxx>
@@ -691,7 +692,7 @@ sal_Int64 SAL_CALL ZipPackageStream::getSomething( const Sequence< sal_Int8 >& a
{
sal_Int64 nMe = 0;
if ( aIdentifier.getLength() == 16 &&
- 0 == rtl_compareMemory( static_getImplementationId().getConstArray(), aIdentifier.getConstArray(), 16 ) )
+ 0 == memcmp( static_getImplementationId().getConstArray(), aIdentifier.getConstArray(), 16 ) )
nMe = reinterpret_cast < sal_Int64 > ( this );
return nMe;
}
More information about the Libreoffice-commits
mailing list