diff options
author | Arnaud Versini <arnaud.versini@gmail.com> | 2012-07-28 20:34:39 +0200 |
---|---|---|
committer | Arnaud Versini <arnaud.versini@gmail.com> | 2012-07-28 20:34:53 +0200 |
commit | 363fb46d5d07758a4b02a135addd8913cda2f933 (patch) | |
tree | e6dec3bc31dca36f89390f658d57629c3ca81462 | |
parent | db4f5372cb2d83ba9263071978ef837de847a689 (diff) |
Use memset and memcmp insteadof rtl_zeroMemory and rtl_compareMemory in sc
Change-Id: Ia40c0af6844f736f0aad2566aec3c71f5016123e
-rw-r--r-- | sc/source/filter/qpro/qprostyle.cxx | 8 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlexprt.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/app/drwtrans.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/app/transobj.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/unoobj/afmtuno.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/unoobj/cellsuno.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/unoobj/dapiuno.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/unoobj/datauno.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/unoobj/docuno.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/unoobj/fielduno.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/unoobj/fmtuno.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/unoobj/nameuno.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/unoobj/scdetect.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/unoobj/srchuno.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/unoobj/styleuno.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/unoobj/textuno.cxx | 8 | ||||
-rw-r--r-- | sc/source/ui/unoobj/viewuno.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/vba/vbaworkbook.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/vba/vbaworksheet.cxx | 2 |
19 files changed, 28 insertions, 28 deletions
diff --git a/sc/source/filter/qpro/qprostyle.cxx b/sc/source/filter/qpro/qprostyle.cxx index 9284bb297dfe..dd859eb919a4 100644 --- a/sc/source/filter/qpro/qprostyle.cxx +++ b/sc/source/filter/qpro/qprostyle.cxx @@ -55,10 +55,10 @@ ScQProStyle::ScQProStyle() { - rtl_zeroMemory (maAlign, sizeof (maAlign)); - rtl_zeroMemory (maFont, sizeof (maFont)); - rtl_zeroMemory (maFontRecord, sizeof (maFontRecord)); - rtl_zeroMemory (maFontHeight, sizeof (maFontHeight)); + memset (maAlign, 0, sizeof (maAlign)); + memset (maFont, 0, sizeof (maFont)); + memset (maFontRecord, 0, sizeof (maFontRecord)); + memset (maFontHeight, 0, sizeof (maFontHeight)); } void ScQProStyle::SetFormat( ScDocument *pDoc, sal_uInt8 nCol, sal_uInt16 nRow, SCTAB nTab, sal_uInt16 nStyle ) diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index 9d8fbe38f1ee..3e22e75b283c 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -565,7 +565,7 @@ void ScXMLExport::SetSourceStream( const uno::Reference<io::XInputStream>& xNewS uno::Sequence<sal_Int8> aFileStart(nLen); sal_Int32 nRead = xSourceStream->readBytes( aFileStart, nLen ); - if ( nRead != nLen || rtl_compareMemory( aFileStart.getConstArray(), pXmlHeader, nLen ) != 0 ) + if ( nRead != nLen || memcmp( aFileStart.getConstArray(), pXmlHeader, nLen ) != 0 ) { // invalid - ignore stream, save normally xSourceStream.clear(); diff --git a/sc/source/ui/app/drwtrans.cxx b/sc/source/ui/app/drwtrans.cxx index 9faf217de132..a5137b913a1e 100644 --- a/sc/source/ui/app/drwtrans.cxx +++ b/sc/source/ui/app/drwtrans.cxx @@ -794,7 +794,7 @@ sal_Int64 SAL_CALL ScDrawTransferObj::getSomething( const com::sun::star::uno::S { sal_Int64 nRet; if( ( rId.getLength() == 16 ) && - ( 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) ) ) + ( 0 == memcmp( getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) ) ) { nRet = reinterpret_cast< sal_Int64 >( this ); } diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx index cd321712aaaf..cf0f3d01e43f 100644 --- a/sc/source/ui/app/transobj.cxx +++ b/sc/source/ui/app/transobj.cxx @@ -865,7 +865,7 @@ sal_Int64 SAL_CALL ScTransferObj::getSomething( const com::sun::star::uno::Seque { sal_Int64 nRet; if( ( rId.getLength() == 16 ) && - ( 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) ) ) + ( 0 == memcmp( getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) ) ) { nRet = reinterpret_cast< sal_Int64 >( this ); } diff --git a/sc/source/ui/unoobj/afmtuno.cxx b/sc/source/ui/unoobj/afmtuno.cxx index c14a337ac2ec..bb6b37a17af4 100644 --- a/sc/source/ui/unoobj/afmtuno.cxx +++ b/sc/source/ui/unoobj/afmtuno.cxx @@ -439,7 +439,7 @@ sal_Int64 SAL_CALL ScAutoFormatObj::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)); diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx index d98d0a31c640..dd95c270d5fe 100644 --- a/sc/source/ui/unoobj/cellsuno.cxx +++ b/sc/source/ui/unoobj/cellsuno.cxx @@ -4154,7 +4154,7 @@ sal_Int64 SAL_CALL ScCellRangesBase::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)); @@ -8732,7 +8732,7 @@ sal_Int64 SAL_CALL ScTableSheetObj::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)); diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx index dab0786b61c5..0d5e324d2b8c 100644 --- a/sc/source/ui/unoobj/dapiuno.cxx +++ b/sc/source/ui/unoobj/dapiuno.cxx @@ -1085,7 +1085,7 @@ sal_Int64 SAL_CALL ScDataPilotDescriptorBase::getSomething( const Sequence<sal_Int8 >& rId ) throw(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)); diff --git a/sc/source/ui/unoobj/datauno.cxx b/sc/source/ui/unoobj/datauno.cxx index f40135f46047..76ec00446450 100644 --- a/sc/source/ui/unoobj/datauno.cxx +++ b/sc/source/ui/unoobj/datauno.cxx @@ -821,7 +821,7 @@ sal_Int64 SAL_CALL ScSubTotalDescriptorBase::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)); diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index c43047cb157d..cad7ae418a8a 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -2043,14 +2043,14 @@ sal_Int64 SAL_CALL ScModelObj::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)); } if ( rId.getLength() == 16 && - 0 == rtl_compareMemory( SfxObjectShell::getUnoTunnelId().getConstArray(), + 0 == memcmp( SfxObjectShell::getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) ) { return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_IntPtr>(pDocShell )); diff --git a/sc/source/ui/unoobj/fielduno.cxx b/sc/source/ui/unoobj/fielduno.cxx index 31ee02be7dc0..bc8c95478fd5 100644 --- a/sc/source/ui/unoobj/fielduno.cxx +++ b/sc/source/ui/unoobj/fielduno.cxx @@ -1411,7 +1411,7 @@ sal_Int64 SAL_CALL ScEditFieldObj::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)); diff --git a/sc/source/ui/unoobj/fmtuno.cxx b/sc/source/ui/unoobj/fmtuno.cxx index 09adcf9c2406..8b981990be90 100644 --- a/sc/source/ui/unoobj/fmtuno.cxx +++ b/sc/source/ui/unoobj/fmtuno.cxx @@ -491,7 +491,7 @@ sal_Int64 SAL_CALL ScTableConditionalFormat::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)); @@ -1021,7 +1021,7 @@ sal_Int64 SAL_CALL ScTableValidationObj::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)); diff --git a/sc/source/ui/unoobj/nameuno.cxx b/sc/source/ui/unoobj/nameuno.cxx index 0990261392ef..c04b8e95c2f8 100644 --- a/sc/source/ui/unoobj/nameuno.cxx +++ b/sc/source/ui/unoobj/nameuno.cxx @@ -464,7 +464,7 @@ sal_Int64 SAL_CALL ScNamedRangeObj::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)); diff --git a/sc/source/ui/unoobj/scdetect.cxx b/sc/source/ui/unoobj/scdetect.cxx index 0e034c46a827..cd3baf852c39 100644 --- a/sc/source/ui/unoobj/scdetect.cxx +++ b/sc/source/ui/unoobj/scdetect.cxx @@ -169,7 +169,7 @@ static const SfxFilter* lcl_DetectExcelXML( SvStream& rStream, SfxFilterMatcher& if ( nBytesRead >= 3 && aBuffer[0] == 0xEF && aBuffer[1] == 0xBB && aBuffer[2] == 0xBF ) nXMLStart = 3; - if ( nBytesRead >= nXMLStart + 5 && rtl_compareMemory( aBuffer+nXMLStart, "<?xml", 5 ) == 0 ) + if ( nBytesRead >= nXMLStart + 5 && memcmp( aBuffer+nXMLStart, "<?xml", 5 ) == 0 ) { // Be consistent with XMLFilterDetect service: Check for presence of "Workbook" in XML file. diff --git a/sc/source/ui/unoobj/srchuno.cxx b/sc/source/ui/unoobj/srchuno.cxx index 7085b01c940a..e1c860f0060e 100644 --- a/sc/source/ui/unoobj/srchuno.cxx +++ b/sc/source/ui/unoobj/srchuno.cxx @@ -229,7 +229,7 @@ sal_Int64 SAL_CALL ScCellSearchObj::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)); diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx index 23e6ed4914e4..e1be3eaf5db0 100644 --- a/sc/source/ui/unoobj/styleuno.cxx +++ b/sc/source/ui/unoobj/styleuno.cxx @@ -1122,7 +1122,7 @@ sal_Int64 SAL_CALL ScStyleObj::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)); diff --git a/sc/source/ui/unoobj/textuno.cxx b/sc/source/ui/unoobj/textuno.cxx index f2686a821d65..81d2f97a7949 100644 --- a/sc/source/ui/unoobj/textuno.cxx +++ b/sc/source/ui/unoobj/textuno.cxx @@ -161,7 +161,7 @@ sal_Int64 SAL_CALL ScHeaderFooterContentObj::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)); @@ -655,7 +655,7 @@ sal_Int64 SAL_CALL ScCellTextCursor::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)); @@ -751,7 +751,7 @@ sal_Int64 SAL_CALL ScHeaderFooterTextCursor::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)); @@ -847,7 +847,7 @@ sal_Int64 SAL_CALL ScDrawTextCursor::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)); diff --git a/sc/source/ui/unoobj/viewuno.cxx b/sc/source/ui/unoobj/viewuno.cxx index b477620c8b4e..4d7a92786802 100644 --- a/sc/source/ui/unoobj/viewuno.cxx +++ b/sc/source/ui/unoobj/viewuno.cxx @@ -2286,7 +2286,7 @@ sal_Int64 SAL_CALL ScTabViewObj::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)); diff --git a/sc/source/ui/vba/vbaworkbook.cxx b/sc/source/ui/vba/vbaworkbook.cxx index d73ecca274fb..8e5b38f6049a 100644 --- a/sc/source/ui/vba/vbaworkbook.cxx +++ b/sc/source/ui/vba/vbaworkbook.cxx @@ -409,7 +409,7 @@ sal_Int64 ScVbaWorkbook::getSomething(const uno::Sequence<sal_Int8 >& rId ) throw(css::uno::RuntimeException) { if (rId.getLength() == 16 && - 0 == rtl_compareMemory( ScVbaWorksheet::getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 )) + 0 == memcmp( ScVbaWorksheet::getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 )) { return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_IntPtr>(this)); } diff --git a/sc/source/ui/vba/vbaworksheet.cxx b/sc/source/ui/vba/vbaworksheet.cxx index 9b2ec487966e..d7fac723ccfa 100644 --- a/sc/source/ui/vba/vbaworksheet.cxx +++ b/sc/source/ui/vba/vbaworksheet.cxx @@ -1161,7 +1161,7 @@ sal_Int64 SAL_CALL ScVbaWorksheet::getSomething(const uno::Sequence<sal_Int8 > & rId) throw(uno::RuntimeException) { if (rId.getLength() == 16 && - 0 == rtl_compareMemory( ScVbaWorksheet::getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 )) + 0 == memcmp( ScVbaWorksheet::getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 )) { return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_IntPtr>(this)); } |