[Libreoffice-commits] core.git: 5 commits - cppuhelper/source extensions/source sd/source svx/source sw/source
Julien Nabet
serval2412 at yahoo.fr
Fri Dec 13 14:30:59 PST 2013
cppuhelper/source/unourl.cxx | 2 +-
extensions/source/abpilot/fieldmappingpage.cxx | 2 +-
sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx | 2 +-
svx/source/accessibility/AccessibleShape.cxx | 2 +-
svx/source/fmcomp/gridctrl.cxx | 2 +-
svx/source/table/accessibletableshape.cxx | 2 +-
svx/source/table/svdotable.cxx | 2 +-
sw/source/core/access/accdoc.cxx | 2 +-
sw/source/filter/ww8/docxattributeoutput.cxx | 4 ++--
sw/source/filter/ww8/ww8par3.cxx | 2 +-
10 files changed, 11 insertions(+), 11 deletions(-)
New commits:
commit b4a4e51641273c6bd3dd271389e9dd31f7dacac0
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Fri Dec 13 23:28:31 2013 +0100
cppcheck: fix rTwo.GetPoolHlpFileId() == rTwo.GetPoolHlpFileId()
Change-Id: I2af19d62bb14af52ce8c2fc6b5d65ad97d910a6d
diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index 0cdc6bd..82962db 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -1501,7 +1501,7 @@ bool IsEqualFormatting(const SwNumRule &rOne, const SwNumRule &rTwo)
rOne.IsAbsSpaces() == rTwo.IsAbsSpaces() &&
rOne.GetPoolFmtId() == rTwo.GetPoolFmtId() &&
rOne.GetPoolHelpId() == rTwo.GetPoolHelpId() &&
- rTwo.GetPoolHlpFileId() == rTwo.GetPoolHlpFileId()
+ rOne.GetPoolHlpFileId() == rTwo.GetPoolHlpFileId()
);
if (bRet)
commit 4bb39ccf53be222190c4a52e2db05526b847b16f
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Fri Dec 13 23:22:52 2013 +0100
cppcheck: fix same expression, check once !mxTable.is()
Change-Id: Ie12146f3c2f18c5ec9a49a666f327772493fcf03
diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx
index 9009aa6..068a655 100644
--- a/svx/source/table/svdotable.cxx
+++ b/svx/source/table/svdotable.cxx
@@ -355,7 +355,7 @@ void SdrTableObjImpl::SetModel(SdrModel* /*pOldModel*/, SdrModel* pNewModel)
bool SdrTableObjImpl::ApplyCellStyles()
{
- if( !mxTable.is() || !mxTable.is() || !mxTableStyle.is() )
+ if( !mxTable.is() || !mxTableStyle.is() )
return false;
bool bChanges = false;
commit 332a317ea5d1f5a36a74c83fb4b0bc1632f8c252
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Fri Dec 13 23:10:39 2013 +0100
cppcheck: fix same expression, ')' = 29 not 28 in ascii'
Change-Id: I90e22a5532f59b190c59d267256b5e889e82da74
diff --git a/cppuhelper/source/unourl.cxx b/cppuhelper/source/unourl.cxx
index a9aa133..9561aeba 100644
--- a/cppuhelper/source/unourl.cxx
+++ b/cppuhelper/source/unourl.cxx
@@ -239,7 +239,7 @@ inline UnoUrl::Impl * UnoUrl::Impl::create(rtl::OUString const & rUrl)
sal_Unicode c = rUrl[j];
if (!isAlphanum(c) && c != 0x21 && c != 0x24 // '!', '$'
&& c != 0x26 && c != 0x27 && c != 0x28 // '&', ''', '('
- && c != 0x28 && c != 0x2A && c != 0x2B // ')', '*', '+'
+ && c != 0x29 && c != 0x2A && c != 0x2B // ')', '*', '+'
&& c != 0x2C && c != 0x2D && c != 0x2E // ',', '-', '.'
&& c != 0x2F && c != 0x3A && c != 0x3D // '/', ':', '='
&& c != 0x3F && c != 0x40 && c != 0x5F // '?', '@', '_'
commit 9b9c5a318abeaeeafb76ba7fcd09f350740f8ef3
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Fri Dec 13 22:46:44 2013 +0100
cppcheck: Possible inefficient checking
Change-Id: I0d9f1eadb6dc863f1e5606ef2d166881e6cf6c0a
diff --git a/extensions/source/abpilot/fieldmappingpage.cxx b/extensions/source/abpilot/fieldmappingpage.cxx
index 8776d5d..b33c15f 100644
--- a/extensions/source/abpilot/fieldmappingpage.cxx
+++ b/extensions/source/abpilot/fieldmappingpage.cxx
@@ -81,7 +81,7 @@ namespace abp
{
const AddressSettings& rSettings = getSettings();
OUString sHint;
- if ( 0 == rSettings.aFieldMapping.size() )
+ if ( rSettings.aFieldMapping.empty() )
sHint = ModuleRes(RID_STR_NOFIELDSASSIGNED).toString();
m_aHint.SetText( sHint );
}
diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
index 957d7b4..789dc5f 100644
--- a/svx/source/fmcomp/gridctrl.cxx
+++ b/svx/source/fmcomp/gridctrl.cxx
@@ -3532,7 +3532,7 @@ void DbGridControl::DisconnectFromFields()
return;
ColumnFieldValueListeners* pListeners = (ColumnFieldValueListeners*)m_pFieldListeners;
- while (pListeners->size())
+ while (!pListeners->empty())
{
#ifdef DBG_UTIL
sal_Int32 nOldSize = pListeners->size();
commit 55edb3faf6212739d583889b692f802c4bf29467
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Fri Dec 13 22:37:06 2013 +0100
cppcheck: Prefer prefix ++/-- operators for non-primitive types
Change-Id: Ibc34750a0f9b5a36c8fa0743e9ac88482ccfecc4
diff --git a/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx b/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx
index 2c4558a..25fd564 100644
--- a/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx
+++ b/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx
@@ -531,7 +531,7 @@ uno::Sequence< sal_Int32 > SAL_CALL
std::vector< uno::Reference<drawing::XShape> >::iterator aIter;
//we start counting position from 1
sal_Int32 nPos = 1;
- for ( aIter = vXShapes.begin(); aIter != vXShapes.end(); aIter++, nPos++ )
+ for ( aIter = vXShapes.begin(); aIter != vXShapes.end(); ++aIter, nPos++ )
{
if ( (*aIter).get() == xCurShape.get() )
{
diff --git a/svx/source/accessibility/AccessibleShape.cxx b/svx/source/accessibility/AccessibleShape.cxx
index d75864f..d38dda6 100644
--- a/svx/source/accessibility/AccessibleShape.cxx
+++ b/svx/source/accessibility/AccessibleShape.cxx
@@ -1552,7 +1552,7 @@ throw (uno::RuntimeException)
std::vector< uno::Reference<drawing::XShape> >::iterator aIter;
//we start counting position from 1
sal_Int32 nPos = 1;
- for ( aIter = vXShapes.begin(); aIter != vXShapes.end(); aIter++, nPos++ )
+ for ( aIter = vXShapes.begin(); aIter != vXShapes.end(); ++aIter, nPos++ )
{
if ( (*aIter).get() == mxShape.get() )
{
diff --git a/svx/source/table/accessibletableshape.cxx b/svx/source/table/accessibletableshape.cxx
index cfeb62f..fa6d20a 100644
--- a/svx/source/table/accessibletableshape.cxx
+++ b/svx/source/table/accessibletableshape.cxx
@@ -128,7 +128,7 @@ void AccessibleTableShapeImpl::dispose()
if( mxTable.is() )
{
//remove all the cell's acc object in table's dispose.
- for( AccessibleCellMap::iterator iter( maChildMap.begin() ); iter != maChildMap.end(); iter++ )
+ for( AccessibleCellMap::iterator iter( maChildMap.begin() ); iter != maChildMap.end(); ++iter )
{
(*iter).second->dispose();
}
diff --git a/sw/source/core/access/accdoc.cxx b/sw/source/core/access/accdoc.cxx
index 04eaaaf..bcfe144 100644
--- a/sw/source/core/access/accdoc.cxx
+++ b/sw/source/core/access/accdoc.cxx
@@ -954,7 +954,7 @@ sal_Int32 SAL_CALL SwAccessibleDocument::getBackground()
{
uno::Sequence< uno::Any > aRet(vFrmList.size());
std::vector<SwFrm*>::iterator aIter = vFrmList.begin();
- for ( sal_Int32 nIndex = 0; aIter != vFrmList.end(); aIter++, nIndex++ )
+ for ( sal_Int32 nIndex = 0; aIter != vFrmList.end(); ++aIter, nIndex++ )
{
uno::Reference< XAccessible > xAcc = pAccMap->GetContext(*aIter, sal_False);
if ( xAcc.is() )
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index a486305..41aa1a8 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -6013,7 +6013,7 @@ void DocxAttributeOutput::CharGrabBag( const SfxGrabBagItem& rItem )
if ( m_pFontsAttrList )
{
OUString sFontName;
- for ( std::map< OUString, com::sun::star::uno::Any >::const_iterator i = rMap.begin(); i != rMap.end(); i++ )
+ for ( std::map< OUString, com::sun::star::uno::Any >::const_iterator i = rMap.begin(); i != rMap.end(); ++i )
{
if ( i->first == "CharThemeFontNameCs" )
{
@@ -6038,7 +6038,7 @@ void DocxAttributeOutput::CharGrabBag( const SfxGrabBagItem& rItem )
// save theme attributes back to the run properties
OUString str;
- for ( std::map< OUString, com::sun::star::uno::Any >::const_iterator i = rMap.begin(); i != rMap.end(); i++ )
+ for ( std::map< OUString, com::sun::star::uno::Any >::const_iterator i = rMap.begin(); i != rMap.end(); ++i )
{
if ( i->first == "CharThemeNameAscii" && bWriteAsciiTheme )
{
More information about the Libreoffice-commits
mailing list