[Libreoffice-commits] core.git: 2 commits - oox/source xmloff/source
Julien Nabet
serval2412 at yahoo.fr
Sat Jan 4 03:47:24 PST 2014
oox/source/vml/vmlinputstream.cxx | 6 +++---
xmloff/source/style/PageMasterExportPropMapper.cxx | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 06824ff1dede6fb2a17417eb934a5d8fc515ee35
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Sat Jan 4 12:46:14 2014 +0100
cppcheck: const_cast instead of C cast
Change-Id: I9b4a01364ff8b8c82fec687ab0cbd73952b3e237
diff --git a/xmloff/source/style/PageMasterExportPropMapper.cxx b/xmloff/source/style/PageMasterExportPropMapper.cxx
index 04faafe..8abdc0a 100644
--- a/xmloff/source/style/PageMasterExportPropMapper.cxx
+++ b/xmloff/source/style/PageMasterExportPropMapper.cxx
@@ -231,7 +231,7 @@ void XMLPageMasterExportPropMapper::handleElementItem(
const ::std::vector< XMLPropertyState >* pProperties,
sal_uInt32 nIdx ) const
{
- XMLPageMasterExportPropMapper* pThis = (XMLPageMasterExportPropMapper*) this;
+ XMLPageMasterExportPropMapper* pThis = const_cast<XMLPageMasterExportPropMapper*>(this);
sal_uInt32 nContextId = getPropertySetMapper()->GetEntryContextId( rProperty.mnIndex );
switch( nContextId )
commit 980a6e552502f02f12c15bfb1c9f8e6269499f4b
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Sat Jan 4 12:21:09 2014 +0100
cppcheck: Clarify expression with parentheses
Change-Id: I71333af38adba1d916138835e28419bb62cd1db4
diff --git a/oox/source/vml/vmlinputstream.cxx b/oox/source/vml/vmlinputstream.cxx
index edd4cd4..b8d8612 100644
--- a/oox/source/vml/vmlinputstream.cxx
+++ b/oox/source/vml/vmlinputstream.cxx
@@ -98,11 +98,11 @@ void lclProcessAttribs( OStringBuffer& rBuffer, const sal_Char* pcBeg, const sal
{
// pcNameBeg points to begin of attribute name, find equality sign
const sal_Char* pcEqualSign = lclFindCharacter( pcNameBeg, pcEnd, '=' );
- if( (bOk = pcEqualSign < pcEnd) == true )
+ if ((bOk = (pcEqualSign < pcEnd)) == true)
{
// find end of attribute name (ignore whitespace between name and equality sign)
const sal_Char* pcNameEnd = lclTrimWhiteSpaceFromEnd( pcNameBeg, pcEqualSign );
- if( (bOk = pcNameBeg < pcNameEnd) == true )
+ if( (bOk = (pcNameBeg < pcNameEnd)) == true )
{
// find begin of attribute value (must be single or double quote)
const sal_Char* pcValueBeg = lclFindNonWhiteSpace( pcEqualSign + 1, pcEnd );
@@ -110,7 +110,7 @@ void lclProcessAttribs( OStringBuffer& rBuffer, const sal_Char* pcBeg, const sal
{
// find end of attribute value (matching quote character)
const sal_Char* pcValueEnd = lclFindCharacter( pcValueBeg + 1, pcEnd, *pcValueBeg );
- if( (bOk = pcValueEnd < pcEnd) == true )
+ if( (bOk = (pcValueEnd < pcEnd)) == true )
{
++pcValueEnd;
OString aAttribName( pcNameBeg, static_cast< sal_Int32 >( pcNameEnd - pcNameBeg ) );
More information about the Libreoffice-commits
mailing list