comphelper/source/compare/AnyCompareFactory.cxx | 18 +++++++++--------- filter/source/msfilter/escherex.cxx | 2 +- sw/source/filter/ww8/rtfsdrexport.cxx | 3 ++- 3 files changed, 12 insertions(+), 11 deletions(-)
New commits: commit 6cd1012563902e273eeef0d4250729c6fb0e5641 Author: Michael Stahl <mst...@redhat.com> Date: Thu Feb 5 15:30:21 2015 +0100 svx: remove silly cast Change-Id: Ia8097b6d92c9bc4e3841d96bcb8cd553969f54a0 diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index 7c419be..11a2d92 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -3828,7 +3828,7 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT if ( aPathCoordinatesProp >>= aCoordinates ) { // creating the vertices - if ( (sal_uInt16)aCoordinates.getLength() ) + if (aCoordinates.getLength() > 0) { sal_uInt16 j, nElements = (sal_uInt16)aCoordinates.getLength(); sal_uInt16 nElementSize = 8; commit e73799f8a9310f04074bc0dd88d9092094338576 Author: Michael Stahl <mst...@redhat.com> Date: Thu Feb 5 15:19:33 2015 +0100 sw: fix ASAN detected error in RtfSdrExport::Commit() EscherPropertyContainer may allocate a 1-byte buffer if there are no vertices / segments. (happens in sw_filters_test) in EscherPropertyContainer::CreateCustomShapeProperties(MSO_SPT, com::sun::star::uno::Reference<com::sun::star::drawing::XShape> const&) filter/source/msfilter/escherex.cxx:3853:25 Change-Id: I56dedbd57d38cd017183060e924cb1340ea58ebf diff --git a/sw/source/filter/ww8/rtfsdrexport.cxx b/sw/source/filter/ww8/rtfsdrexport.cxx index 24acdcb..574215e 100644 --- a/sw/source/filter/ww8/rtfsdrexport.cxx +++ b/sw/source/filter/ww8/rtfsdrexport.cxx @@ -259,7 +259,8 @@ void RtfSdrExport::Commit(EscherPropertyContainer& rProps, const Rectangle& rRec EscherPropSortStruct aSegments; if (rProps.GetOpt(ESCHER_Prop_pVertices, aVertices) && - rProps.GetOpt(ESCHER_Prop_pSegmentInfo, aSegments)) + rProps.GetOpt(ESCHER_Prop_pSegmentInfo, aSegments) && + aVertices.nPropSize >= 6 && aSegments.nPropSize >= 6) { const sal_uInt8* pVerticesIt = aVertices.pBuf + 6; sal_Size nVerticesPos = 6; commit 893362bc396408faff0db19bca9a8de554bf5c68 Author: Michael Stahl <mst...@redhat.com> Date: Thu Feb 5 10:26:03 2015 +0100 comphelper: do not use "r" prefix for uno::Reference Change-Id: I5e92ca9dbb0c9f33c9511cc4b12db1433e40fa68 diff --git a/comphelper/source/compare/AnyCompareFactory.cxx b/comphelper/source/compare/AnyCompareFactory.cxx index 3de918e..5e9ba82 100644 --- a/comphelper/source/compare/AnyCompareFactory.cxx +++ b/comphelper/source/compare/AnyCompareFactory.cxx @@ -41,13 +41,13 @@ using namespace com::sun::star::i18n; class AnyCompare : public ::cppu::WeakImplHelper1< XAnyCompare > { - Reference< XCollator > m_rCollator; + Reference< XCollator > m_xCollator; public: AnyCompare( Reference< XComponentContext > xContext, const Locale& rLocale ) { - m_rCollator = Collator::create( xContext ); - m_rCollator->loadDefaultCollator( rLocale, + m_xCollator = Collator::create( xContext ); + m_xCollator->loadDefaultCollator( rLocale, 0 ); //??? } @@ -56,12 +56,12 @@ public: class AnyCompareFactory : public cppu::WeakImplHelper3< XAnyCompareFactory, XInitialization, XServiceInfo > { - Reference< XAnyCompare > m_rAnyCompare; - Reference< XComponentContext > m_rContext; + Reference< XAnyCompare > m_xAnyCompare; + Reference< XComponentContext > m_xContext; Locale m_Locale; public: - AnyCompareFactory( Reference< XComponentContext > xContext ) : m_rContext( xContext ) + AnyCompareFactory( Reference< XComponentContext > xContext ) : m_xContext( xContext ) {} // XAnyCompareFactory @@ -92,7 +92,7 @@ sal_Int16 SAL_CALL AnyCompare::compare( const Any& any1, const Any& any2 ) throw any1 >>= aStr1; any2 >>= aStr2; - aResult = ( sal_Int16 )m_rCollator->compareString( aStr1, aStr2 ); + aResult = static_cast<sal_Int16>(m_xCollator->compareString(aStr1, aStr2)); return aResult; } @@ -103,7 +103,7 @@ Reference< XAnyCompare > SAL_CALL AnyCompareFactory::createAnyCompareByName( con // so no check for the property name is done if( aPropertyName == "Title" ) - return m_rAnyCompare; + return m_xAnyCompare; return Reference< XAnyCompare >(); } @@ -114,7 +114,7 @@ void SAL_CALL AnyCompareFactory::initialize( const Sequence< Any >& aArguments ) { if( aArguments[0] >>= m_Locale ) { - m_rAnyCompare = new AnyCompare( m_rContext, m_Locale ); + m_xAnyCompare = new AnyCompare( m_xContext, m_Locale ); return; } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits