summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-06-11 10:06:49 +0200
committerAshod Nakashian <ashod.nakashian@collabora.co.uk>2016-02-06 08:55:50 -0500
commitaaeead445c1c73de6f8f4c088ef87dd6fb24c661 (patch)
tree25339038b555394fd8b3e505803ce0f32a195f01
parent7a58bd20dce4119507344e9a0c5a8aa44662045d (diff)
convert expressions like 'size() == 0' to 'empty()'
(cherry picked from commit 776a3f14f2d987312b926ebc1ad09321a3a87f0d) Change-Id: Ia5c8c0f38a347f398d587970a22e03f29ffd37af
-rw-r--r--accessibility/source/extended/AccessibleGridControlTable.cxx4
-rw-r--r--basctl/source/basicide/baside2b.cxx6
-rw-r--r--canvas/source/directx/dx_9rm.cxx2
-rw-r--r--chart2/source/view/main/ChartView.cxx2
-rw-r--r--chart2/source/view/main/GL3DRenderer.cxx2
-rw-r--r--connectivity/source/drivers/ado/ADatabaseMetaDataImpl.cxx22
-rw-r--r--connectivity/source/drivers/mork/MNSProfileDiscover.cxx2
-rw-r--r--connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx4
-rw-r--r--filter/source/svg/svgreader.cxx2
-rw-r--r--oox/source/ppt/presentationfragmenthandler.cxx4
-rw-r--r--oox/source/shape/ShapeContextHandler.cxx2
-rw-r--r--package/source/xstor/ohierarchyholder.cxx10
-rw-r--r--package/source/xstor/owriteablestream.cxx4
-rw-r--r--sc/source/core/data/dociter.cxx6
-rw-r--r--sc/source/core/tool/token.cxx4
-rw-r--r--sc/source/filter/excel/xestyle.cxx4
-rw-r--r--sc/source/filter/rtf/eeimpars.cxx6
-rw-r--r--sc/source/ui/unoobj/viewuno.cxx4
-rw-r--r--scripting/source/provider/BrowseNodeFactoryImpl.cxx2
-rw-r--r--sfx2/source/control/recentdocsview.cxx2
-rw-r--r--sfx2/source/doc/guisaveas.cxx10
-rw-r--r--svtools/source/misc/transfer.cxx8
-rw-r--r--sw/source/core/doc/DocumentContentOperationsManager.cxx4
-rw-r--r--sw/source/core/doc/docbm.cxx4
-rw-r--r--sw/source/core/docnode/ndtbl.cxx8
-rw-r--r--sw/source/core/text/SwGrammarMarkUp.cxx10
-rw-r--r--sw/source/core/undo/untbl.cxx2
-rw-r--r--sw/source/core/unocore/unoportenum.cxx20
-rw-r--r--sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx14
-rw-r--r--ucb/source/ucp/file/shell.cxx2
-rw-r--r--ucb/source/ucp/webdav/SerfGetReqProcImpl.cxx2
-rw-r--r--ucb/source/ucp/webdav/SerfHeadReqProcImpl.cxx2
-rw-r--r--ucb/source/ucp/webdav/SerfSession.cxx2
-rw-r--r--vcl/generic/fontmanager/fontmanager.cxx8
-rw-r--r--vcl/unx/generic/printer/ppdparser.cxx2
-rw-r--r--writerfilter/source/dmapper/DomainMapperTableHandler.cxx2
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx4
-rw-r--r--writerfilter/source/dmapper/StyleSheetTable.cxx2
-rw-r--r--xmloff/source/core/RDFaImportHelper.cxx4
39 files changed, 102 insertions, 102 deletions
diff --git a/accessibility/source/extended/AccessibleGridControlTable.cxx b/accessibility/source/extended/AccessibleGridControlTable.cxx
index 5392c54af73b..238a2f18a34c 100644
--- a/accessibility/source/extended/AccessibleGridControlTable.cxx
+++ b/accessibility/source/extended/AccessibleGridControlTable.cxx
@@ -62,7 +62,7 @@ AccessibleGridControlTable::getAccessibleChild( sal_Int32 nChildIndex )
ensureIsAlive();
ensureIsValidIndex( nChildIndex );
sal_Int32 nCount = getAccessibleChildCount();
- if(m_pAccessCellVector.size() == 0 || m_pAccessCellVector.size() != (unsigned)nCount)
+ if(m_pAccessCellVector.empty() || m_pAccessCellVector.size() != (unsigned)nCount)
{
m_pAccessCellVector.resize(nCount);
m_pCellVector.resize(nCount);
@@ -215,7 +215,7 @@ Reference< XAccessible > SAL_CALL AccessibleGridControlTable::getAccessibleCellA
ensureIsValidAddress( nRow, nColumn );
sal_Int32 nCount = getAccessibleChildCount();
sal_Int32 nChildIndex = nRow*m_aTable.GetColumnCount() + nColumn;
- if(m_pAccessCellVector.size() == 0 || m_pAccessCellVector.size() != (unsigned)nCount)
+ if(m_pAccessCellVector.empty() || m_pAccessCellVector.size() != (unsigned)nCount)
{
m_pAccessCellVector.resize(nCount);
m_pCellVector.resize(nCount);
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index 830cb2ccae25..6cf9140e8dc6 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -694,7 +694,7 @@ TextSelection EditorWindow::GetLastHighlightPortionTextSelection()
}
}
- if( aPortions.size() == 0 )
+ if( aPortions.empty() )
return TextSelection();
OUString sStr = aLine.copy( r.nBegin, r.nEnd - r.nBegin );
@@ -860,7 +860,7 @@ void EditorWindow::HandleCodeCompletion()
aVect.insert( aVect.begin(), aLine.copy(i->nBegin, i->nEnd - i->nBegin) );
}
- if( aVect.size() == 0 )//nothing to do
+ if( aVect.empty() )//nothing to do
return;
OUString sBaseName = aVect[0];//variable name
OUString sVarType = aCodeCompleteCache.GetVarType( sBaseName );
@@ -2921,7 +2921,7 @@ void CodeCompleteWindow::ClearAndHide()
UnoTypeCodeCompletetor::UnoTypeCodeCompletetor( const std::vector< OUString >& aVect, const OUString& sVarType )
: bCanComplete( true )
{
- if( aVect.size() == 0 || sVarType.isEmpty() )
+ if( aVect.empty() || sVarType.isEmpty() )
{
bCanComplete = false;//invalid parameters, nothing to code complete
return;
diff --git a/canvas/source/directx/dx_9rm.cxx b/canvas/source/directx/dx_9rm.cxx
index 4c52eeeccbd3..5052b0b50719 100644
--- a/canvas/source/directx/dx_9rm.cxx
+++ b/canvas/source/directx/dx_9rm.cxx
@@ -1227,7 +1227,7 @@ namespace dxcanvas
void DXRenderModule::flushVertexCache()
{
- if(!(maVertexCache.size()))
+ if(maVertexCache.empty())
return;
mbError=true;
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx
index 3510549abcf9..ccd569a0d751 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -861,7 +861,7 @@ void SeriesPlotterContainer::AdaptScaleOfYAxisWithoutAttachedSeries( ChartModel&
{
AxisUsage& rAxisUsage = (*aAxisIter).second;
::std::vector< VCoordinateSystem* > aVCooSysList_Y = rAxisUsage.getCoordinateSystems( 1, nAxisIndex );
- if( !aVCooSysList_Y.size() )
+ if( aVCooSysList_Y.empty() )
continue;
uno::Reference< XDiagram > xDiagram( rModel.getFirstDiagram() );
diff --git a/chart2/source/view/main/GL3DRenderer.cxx b/chart2/source/view/main/GL3DRenderer.cxx
index 1b7f67acc2c1..4421a14cd25c 100644
--- a/chart2/source/view/main/GL3DRenderer.cxx
+++ b/chart2/source/view/main/GL3DRenderer.cxx
@@ -1840,7 +1840,7 @@ void OpenGL3DRenderer::CreateTextTextureBatch(const boost::shared_array<sal_uInt
index++;
}
//if the sub texture number of the last texture array reach the largest, create a new textur array
- if ((m_TextInfoBatch.texture.size() == 0) ||
+ if (m_TextInfoBatch.texture.empty() ||
(m_TextInfoBatch.texture[index].subTextureNum >= m_TextInfoBatch.batchNum))
{
TextureArrayInfo textureArray;
diff --git a/connectivity/source/drivers/ado/ADatabaseMetaDataImpl.cxx b/connectivity/source/drivers/ado/ADatabaseMetaDataImpl.cxx
index 100c1ae27e2e..42c28c6be72d 100644
--- a/connectivity/source/drivers/ado/ADatabaseMetaDataImpl.cxx
+++ b/connectivity/source/drivers/ado/ADatabaseMetaDataImpl.cxx
@@ -81,7 +81,7 @@ void ODatabaseMetaData::fillLiterals()
sal_Int32 ODatabaseMetaData::getMaxSize(sal_uInt32 _nId)
{
- if(!m_aLiteralInfo.size())
+ if(m_aLiteralInfo.empty())
fillLiterals();
sal_Int32 nSize = 0;
@@ -93,7 +93,7 @@ sal_Int32 ODatabaseMetaData::getMaxSize(sal_uInt32 _nId)
sal_Bool ODatabaseMetaData::isCapable(sal_uInt32 _nId)
{
- if(!m_aLiteralInfo.size())
+ if(m_aLiteralInfo.empty())
fillLiterals();
sal_Bool bSupported = sal_False;
::std::map<sal_uInt32,LiteralInfo>::const_iterator aIter = m_aLiteralInfo.find(_nId);
@@ -105,7 +105,7 @@ sal_Bool ODatabaseMetaData::isCapable(sal_uInt32 _nId)
OUString ODatabaseMetaData::getLiteral(sal_uInt32 _nId)
{
- if(!m_aLiteralInfo.size())
+ if(m_aLiteralInfo.empty())
fillLiterals();
OUString sStr;
::std::map<sal_uInt32,LiteralInfo>::const_iterator aIter = m_aLiteralInfo.find(_nId);
@@ -257,42 +257,42 @@ void ODatabaseMetaDataResultSetMetaData::setProceduresMap()
sal_Bool SAL_CALL ODatabaseMetaDataResultSetMetaData::isSearchable( sal_Int32 column ) throw(SQLException, RuntimeException)
{
- if(m_mColumns.size() && (m_mColumnsIter = m_mColumns.find(column)) != m_mColumns.end())
+ if(!m_mColumns.empty() && (m_mColumnsIter = m_mColumns.find(column)) != m_mColumns.end())
return (*m_mColumnsIter).second.isSearchable();
return sal_True;
}
sal_Bool SAL_CALL ODatabaseMetaDataResultSetMetaData::isAutoIncrement( sal_Int32 column ) throw(SQLException, RuntimeException)
{
- if(m_mColumns.size() && (m_mColumnsIter = m_mColumns.find(column)) != m_mColumns.end())
+ if(!m_mColumns.empty() && (m_mColumnsIter = m_mColumns.find(column)) != m_mColumns.end())
return (*m_mColumnsIter).second.isAutoIncrement();
return sal_False;
}
OUString SAL_CALL ODatabaseMetaDataResultSetMetaData::getColumnServiceName( sal_Int32 column ) throw(SQLException, RuntimeException)
{
- if(m_mColumns.size() && (m_mColumnsIter = m_mColumns.find(column)) != m_mColumns.end())
+ if(!m_mColumns.empty() && (m_mColumnsIter = m_mColumns.find(column)) != m_mColumns.end())
return (*m_mColumnsIter).second.getColumnServiceName();
return OUString();
}
OUString SAL_CALL ODatabaseMetaDataResultSetMetaData::getTableName( sal_Int32 column ) throw(SQLException, RuntimeException)
{
- if(m_mColumns.size() && (m_mColumnsIter = m_mColumns.find(column)) != m_mColumns.end())
+ if(!m_mColumns.empty() && (m_mColumnsIter = m_mColumns.find(column)) != m_mColumns.end())
return (*m_mColumnsIter).second.getTableName();
return OUString();
}
OUString SAL_CALL ODatabaseMetaDataResultSetMetaData::getCatalogName( sal_Int32 column ) throw(SQLException, RuntimeException)
{
- if(m_mColumns.size() && (m_mColumnsIter = m_mColumns.find(column)) != m_mColumns.end())
+ if(!m_mColumns.empty() && (m_mColumnsIter = m_mColumns.find(column)) != m_mColumns.end())
return (*m_mColumnsIter).second.getCatalogName();
return OUString();
}
OUString SAL_CALL ODatabaseMetaDataResultSetMetaData::getColumnTypeName( sal_Int32 column ) throw(SQLException, RuntimeException)
{
- if(m_mColumns.size() && (m_mColumnsIter = m_mColumns.find(column)) != m_mColumns.end())
+ if(!m_mColumns.empty() && (m_mColumnsIter = m_mColumns.find(column)) != m_mColumns.end())
return (*m_mColumnsIter).second.getColumnTypeName();
return OUString();
}
@@ -300,7 +300,7 @@ OUString SAL_CALL ODatabaseMetaDataResultSetMetaData::getColumnTypeName( sal_Int
sal_Bool SAL_CALL ODatabaseMetaDataResultSetMetaData::isCaseSensitive( sal_Int32 column ) throw(SQLException, RuntimeException)
{
- if(m_mColumns.size() && (m_mColumnsIter = m_mColumns.find(column)) != m_mColumns.end())
+ if(!m_mColumns.empty() && (m_mColumnsIter = m_mColumns.find(column)) != m_mColumns.end())
return (*m_mColumnsIter).second.isCaseSensitive();
return sal_True;
}
@@ -308,7 +308,7 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSetMetaData::isCaseSensitive( sal_Int32
OUString SAL_CALL ODatabaseMetaDataResultSetMetaData::getSchemaName( sal_Int32 column ) throw(SQLException, RuntimeException)
{
- if(m_mColumns.size() && (m_mColumnsIter = m_mColumns.find(column)) != m_mColumns.end())
+ if(!m_mColumns.empty() && (m_mColumnsIter = m_mColumns.find(column)) != m_mColumns.end())
return (*m_mColumnsIter).second.getSchemaName();
return OUString();
}
diff --git a/connectivity/source/drivers/mork/MNSProfileDiscover.cxx b/connectivity/source/drivers/mork/MNSProfileDiscover.cxx
index 6879b9d5a1e7..ada471aeb904 100644
--- a/connectivity/source/drivers/mork/MNSProfileDiscover.cxx
+++ b/connectivity/source/drivers/mork/MNSProfileDiscover.cxx
@@ -141,7 +141,7 @@ namespace connectivity
{
sal_Int32 index=product;
ProductStruct &m_Product = m_ProductProfileList[index];
- if (!m_Product.mProfileList.size() || m_Product.mProfileList.find(profileName) == m_Product.mProfileList.end())
+ if (m_Product.mProfileList.empty() || m_Product.mProfileList.find(profileName) == m_Product.mProfileList.end())
{
//Profile not found
return OUString();
diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx
index e61bdf2fe7fb..df2012e39c5a 100644
--- a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx
+++ b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx
@@ -251,7 +251,7 @@ namespace connectivity
{
sal_Int32 index=product;
ProductStruct &m_Product = m_ProductProfileList[index];
- if (!m_Product.mProfileList.size() || m_Product.mProfileList.find(profileName) == m_Product.mProfileList.end())
+ if (m_Product.mProfileList.empty() || m_Product.mProfileList.find(profileName) == m_Product.mProfileList.end())
{
//Profile not found
return OUString();
@@ -399,7 +399,7 @@ namespace connectivity
{
sal_Int32 index=product;
ProductStruct &m_Product = m_ProductProfileList[index];
- if (!m_Product.mProfileList.size() || m_Product.mProfileList.find(profileName) == m_Product.mProfileList.end())
+ if (m_Product.mProfileList.empty() || m_Product.mProfileList.find(profileName) == m_Product.mProfileList.end())
{
return false;
}
diff --git a/filter/source/svg/svgreader.cxx b/filter/source/svg/svgreader.cxx
index e92c99b884d3..446cf1aba7fc 100644
--- a/filter/source/svg/svgreader.cxx
+++ b/filter/source/svg/svgreader.cxx
@@ -1786,7 +1786,7 @@ struct OfficeStylesWritingVisitor
*dots2_length = 0;
*dash_distance = 0;
- if( maCurrState.maDashArray.size() == 0 ) {
+ if( maCurrState.maDashArray.empty() ) {
return;
}
diff --git a/oox/source/ppt/presentationfragmenthandler.cxx b/oox/source/ppt/presentationfragmenthandler.cxx
index 84dabe59600a..d1438918b14b 100644
--- a/oox/source/ppt/presentationfragmenthandler.cxx
+++ b/oox/source/ppt/presentationfragmenthandler.cxx
@@ -79,7 +79,7 @@ PresentationFragmentHandler::~PresentationFragmentHandler() throw()
void ResolveTextFields( XmlFilterBase& rFilter )
{
const oox::core::TextFieldStack& rTextFields = rFilter.getTextFieldStack();
- if ( rTextFields.size() )
+ if ( !rTextFields.empty() )
{
Reference< frame::XModel > xModel( rFilter.getModel() );
oox::core::TextFieldStack::const_iterator aIter( rTextFields.begin() );
@@ -192,7 +192,7 @@ void PresentationFragmentHandler::importSlide(sal_uInt32 nSlide, bool bFirstPage
Reference< drawing::XMasterPagesSupplier > xMPS( xModel, uno::UNO_QUERY_THROW );
Reference< drawing::XDrawPages > xMasterPages( xMPS->getMasterPages(), uno::UNO_QUERY_THROW );
- if( !(rFilter.getMasterPages().size() ))
+ if( rFilter.getMasterPages().empty() )
xMasterPages->getByIndex( 0 ) >>= xMasterPage;
else
xMasterPage = xMasterPages->insertNewByIndex( xMasterPages->getCount() );
diff --git a/oox/source/shape/ShapeContextHandler.cxx b/oox/source/shape/ShapeContextHandler.cxx
index b69fc8c851cd..68103f048cb5 100644
--- a/oox/source/shape/ShapeContextHandler.cxx
+++ b/oox/source/shape/ShapeContextHandler.cxx
@@ -437,7 +437,7 @@ ShapeContextHandler::getShape() throw (uno::RuntimeException, std::exception)
else if (mxDiagramShapeContext.is())
{
basegfx::B2DHomMatrix aMatrix;
- if (mpShape->getExtDrawings().size() == 0)
+ if (mpShape->getExtDrawings().empty())
{
mpShape->addShape( *mxFilterBase, mpThemePtr.get(), xShapes, aMatrix, mpShape->getFillProperties() );
xResult = mpShape->getXShape();
diff --git a/package/source/xstor/ohierarchyholder.cxx b/package/source/xstor/ohierarchyholder.cxx
index fd2b39f02159..cb827a137aa9 100644
--- a/package/source/xstor/ohierarchyholder.cxx
+++ b/package/source/xstor/ohierarchyholder.cxx
@@ -79,7 +79,7 @@ uno::Reference< embed::XExtendedStorageStream > OHierarchyElement_Impl::GetStrea
if ( !( nStorageMode & embed::ElementModes::WRITE ) && ( nStreamMode & embed::ElementModes::WRITE ) )
throw io::IOException();
- if ( !aListPath.size() )
+ if ( aListPath.empty() )
throw uno::RuntimeException();
OUString aNextName = *(aListPath.begin());
@@ -94,9 +94,9 @@ uno::Reference< embed::XExtendedStorageStream > OHierarchyElement_Impl::GetStrea
if ( !xOwnStor.is() )
throw uno::RuntimeException();
- if ( !aListPath.size() )
+ if ( aListPath.empty() )
{
- if ( !aEncryptionData.size() )
+ if ( aEncryptionData.empty() )
{
uno::Reference< embed::XHierarchicalStorageAccess > xHStorage( xOwnStor, uno::UNO_QUERY_THROW );
xResult = xHStorage->openStreamElementByHierarchicalName( aNextName, nStreamMode );
@@ -162,7 +162,7 @@ void OHierarchyElement_Impl::RemoveStreamHierarchically( OStringList_Impl& aList
{
::osl::MutexGuard aGuard( m_aMutex );
- if ( !aListPath.size() )
+ if ( aListPath.empty() )
throw uno::RuntimeException();
OUString aNextName = *(aListPath.begin());
@@ -177,7 +177,7 @@ void OHierarchyElement_Impl::RemoveStreamHierarchically( OStringList_Impl& aList
if ( !xOwnStor.is() )
throw uno::RuntimeException();
- if ( !aListPath.size() )
+ if ( aListPath.empty() )
{
xOwnStor->removeElement( aNextName );
}
diff --git a/package/source/xstor/owriteablestream.cxx b/package/source/xstor/owriteablestream.cxx
index b64e76f782d5..7b4a69edb3bd 100644
--- a/package/source/xstor/owriteablestream.cxx
+++ b/package/source/xstor/owriteablestream.cxx
@@ -76,7 +76,7 @@ namespace package
bool PackageEncryptionDatasEqual( const ::comphelper::SequenceAsHashMap& aHash1, const ::comphelper::SequenceAsHashMap& aHash2 )
{
- bool bResult = ( aHash1.size() && aHash1.size() == aHash2.size() );
+ bool bResult = !aHash1.empty() && aHash1.size() == aHash2.size();
for ( ::comphelper::SequenceAsHashMap::const_iterator aIter = aHash1.begin();
bResult && aIter != aHash1.end();
++aIter )
@@ -455,7 +455,7 @@ void OWriteStream_Impl::SetEncrypted( const ::comphelper::SequenceAsHashMap& aEn
if ( m_nStorageType != embed::StorageFormats::PACKAGE )
throw uno::RuntimeException();
- if ( !aEncryptionData.size() )
+ if ( aEncryptionData.empty() )
throw uno::RuntimeException();
GetStreamProperties();
diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx
index 8cf40b61a421..db353c2f7c0b 100644
--- a/sc/source/core/data/dociter.cxx
+++ b/sc/source/core/data/dociter.cxx
@@ -1946,7 +1946,7 @@ void ScHorizontalCellIterator::SetTab( SCTAB nTabP )
}
}
- if (maColPositions.size() == 0)
+ if (maColPositions.empty())
return;
maColPos = maColPositions.begin();
@@ -2028,7 +2028,7 @@ bool ScHorizontalCellIterator::SkipInvalidInRow()
debugiter("remove column %d at row %d\n",
(int)maColPos->mnCol, (int)nRow);
maColPos = maColPositions.erase(maColPos);
- if (maColPositions.size() == 0)
+ if (maColPositions.empty())
{
debugiter("no more columns\n");
mbMore = false;
@@ -2050,7 +2050,7 @@ bool ScHorizontalCellIterator::SkipInvalidInRow()
}
// No more columns with anything interesting in them ?
- if (maColPositions.size() == 0)
+ if (maColPositions.empty())
{
debugiter("no more live columns left - done\n");
mbMore = false;
diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index d8264545e918..dcf44a8c5a58 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -593,7 +593,7 @@ FormulaTokenRef extendRangeReference( FormulaToken & rTok1, FormulaToken & rTok2
pRefList = rTok2.GetRefList();
if (pRefList)
{
- if (!pRefList->size())
+ if (pRefList->empty())
return NULL;
if (bExternal)
return NULL; // external reference list not possible
@@ -617,7 +617,7 @@ FormulaTokenRef extendRangeReference( FormulaToken & rTok1, FormulaToken & rTok2
case svRefList:
{
const ScRefList* p = pt[i]->GetRefList();
- if (!p->size())
+ if (p->empty())
return NULL;
ScRefList::const_iterator it( p->begin());
ScRefList::const_iterator end( p->end());
diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx
index df5c75b2e822..c4e5c86f0f9c 100644
--- a/sc/source/filter/excel/xestyle.cxx
+++ b/sc/source/filter/excel/xestyle.cxx
@@ -487,7 +487,7 @@ void XclExpPaletteImpl::WriteBody( XclExpStream& rStrm )
void XclExpPaletteImpl::SaveXml( XclExpXmlStream& rStrm )
{
- if( !maPalette.size() )
+ if( maPalette.empty() )
return;
sax_fastparser::FSHelperPtr& rStyleSheet = rStrm.GetCurrentStream();
@@ -1411,7 +1411,7 @@ void XclExpNumFmtBuffer::Save( XclExpStream& rStrm )
void XclExpNumFmtBuffer::SaveXml( XclExpXmlStream& rStrm )
{
- if( !maFormatMap.size() )
+ if( maFormatMap.empty() )
return;
sax_fastparser::FSHelperPtr& rStyleSheet = rStrm.GetCurrentStream();
diff --git a/sc/source/filter/rtf/eeimpars.cxx b/sc/source/filter/rtf/eeimpars.cxx
index c72336d30938..c72a7d843d7b 100644
--- a/sc/source/filter/rtf/eeimpars.cxx
+++ b/sc/source/filter/rtf/eeimpars.cxx
@@ -394,7 +394,7 @@ void ScEEImport::WriteToDocument( bool bSizeColsRows, double nOutputFactor, SvNu
// The cell will own the text object instance.
mpDoc->SetEditText(ScAddress(nCol,nRow,nTab), mpEngine->CreateTextObject(pE->aSel));
}
- if ( pE->maImageList.size() )
+ if ( !pE->maImageList.empty() )
bHasGraphics |= GraphicSize( nCol, nRow, nTab, pE );
if ( pE->pName )
{ // Anchor Name => RangeName
@@ -470,7 +470,7 @@ void ScEEImport::WriteToDocument( bool bSizeColsRows, double nOutputFactor, SvNu
bool ScEEImport::GraphicSize( SCCOL nCol, SCROW nRow, SCTAB /*nTab*/, ScEEParseEntry* pE )
{
- if ( !pE->maImageList.size() )
+ if ( pE->maImageList.empty() )
return false;
bool bHasGraphics = false;
OutputDevice* pDefaultDev = Application::GetDefaultDevice();
@@ -534,7 +534,7 @@ bool ScEEImport::GraphicSize( SCCOL nCol, SCROW nRow, SCTAB /*nTab*/, ScEEParseE
void ScEEImport::InsertGraphic( SCCOL nCol, SCROW nRow, SCTAB nTab,
ScEEParseEntry* pE )
{
- if ( !pE->maImageList.size() )
+ if ( pE->maImageList.empty() )
return ;
ScDrawLayer* pModel = mpDoc->GetDrawLayer();
if (!pModel)
diff --git a/sc/source/ui/unoobj/viewuno.cxx b/sc/source/ui/unoobj/viewuno.cxx
index 45e062197488..e287e4abbfd8 100644
--- a/sc/source/ui/unoobj/viewuno.cxx
+++ b/sc/source/ui/unoobj/viewuno.cxx
@@ -1391,7 +1391,7 @@ void SAL_CALL ScTabViewObj::removeEnhancedMouseClickHandler( const uno::Referenc
else
++it;
}
- if ((aMouseClickHandlers.size() == 0) && (nCount > 0)) // only if last listener removed
+ if (aMouseClickHandlers.empty() && (nCount > 0)) // only if last listener removed
EndMouseListening();
}
@@ -1422,7 +1422,7 @@ void SAL_CALL ScTabViewObj::removeActivationEventListener( const uno::Reference<
else
++it;
}
- if ((aActivationListeners.size() == 0) && (nCount > 0)) // only if last listener removed
+ if (aActivationListeners.empty() && (nCount > 0)) // only if last listener removed
EndActivationListening();
}
diff --git a/scripting/source/provider/BrowseNodeFactoryImpl.cxx b/scripting/source/provider/BrowseNodeFactoryImpl.cxx
index 9407a1ca5b5c..5a63adca5d4d 100644
--- a/scripting/source/provider/BrowseNodeFactoryImpl.cxx
+++ b/scripting/source/provider/BrowseNodeFactoryImpl.cxx
@@ -586,7 +586,7 @@ public:
throw ( RuntimeException, std::exception ) SAL_OVERRIDE
{
bool result = true;
- if ( !m_vNodes.size() )
+ if ( m_vNodes.empty() )
{
result = false;
}
diff --git a/sfx2/source/control/recentdocsview.cxx b/sfx2/source/control/recentdocsview.cxx
index 43b8d55e1a85..7a76ea369ee9 100644
--- a/sfx2/source/control/recentdocsview.cxx
+++ b/sfx2/source/control/recentdocsview.cxx
@@ -265,7 +265,7 @@ void RecentDocsView::Paint(vcl::RenderContext& rRenderContext, const Rectangle &
set_width_request(mnTextHeight + mnItemMaxSize + 2 * mnItemPadding);
}
- if (mItemList.size() == 0)
+ if (mItemList.empty())
{
// No recent files to be shown yet. Show a welcome screen.
rRenderContext.Push(PushFlags::FONT | PushFlags::TEXTCOLOR);
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index e2ad5895b347..fc0228f86671 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -777,18 +777,18 @@ sal_Int8 ModelData_Impl::CheckFilter( const OUString& aFilterName )
// if the old filter is not acceptable
// and there is no default filter or it is not acceptable for requested parameters then proceed with saveAs
- if ( ( !aFiltPropsHM.size() || !( nFiltFlags & SfxFilterFlags::EXPORT ) )
- && ( !aDefFiltPropsHM.size() || !( nDefFiltFlags & SfxFilterFlags::EXPORT ) || nDefFiltFlags & SfxFilterFlags::INTERNAL ) )
+ if ( ( aFiltPropsHM.empty() || !( nFiltFlags & SfxFilterFlags::EXPORT ) )
+ && ( aDefFiltPropsHM.empty() || !( nDefFiltFlags & SfxFilterFlags::EXPORT ) || nDefFiltFlags & SfxFilterFlags::INTERNAL ) )
return STATUS_SAVEAS;
// so at this point there is either an acceptable old filter or default one
- if ( !aFiltPropsHM.size() || !( nFiltFlags & SfxFilterFlags::EXPORT ) )
+ if ( aFiltPropsHM.empty() || !( nFiltFlags & SfxFilterFlags::EXPORT ) )
{
// so the default filter must be acceptable
return STATUS_SAVEAS_STANDARDNAME;
}
else if ( ( !( nFiltFlags & SfxFilterFlags::OWN ) || ( nFiltFlags & SfxFilterFlags::ALIEN ) )
- && aDefFiltPropsHM.size()
+ && !aDefFiltPropsHM.empty()
&& ( nDefFiltFlags & SfxFilterFlags::EXPORT ) && !( nDefFiltFlags & SfxFilterFlags::INTERNAL ))
{
// the default filter is acceptable and the old filter is alien one
@@ -949,7 +949,7 @@ bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode,
if ( ( nStoreMode & EXPORT_REQUESTED ) && !( nStoreMode & WIDEEXPORT_REQUESTED ) )
{
- if ( ( nStoreMode & PDFEXPORT_REQUESTED ) && aPreselectedFilterPropsHM.size() )
+ if ( ( nStoreMode & PDFEXPORT_REQUESTED ) && !aPreselectedFilterPropsHM.empty() )
{
// this is a PDF export
// the filter options has been shown already
diff --git a/svtools/source/misc/transfer.cxx b/svtools/source/misc/transfer.cxx
index be19baa4a76c..b90fba1c1770 100644
--- a/svtools/source/misc/transfer.cxx
+++ b/svtools/source/misc/transfer.cxx
@@ -309,7 +309,7 @@ Any SAL_CALL TransferableHelper::getTransferData( const DataFlavor& rFlavor )
Any SAL_CALL TransferableHelper::getTransferData2( const DataFlavor& rFlavor, const OUString& rDestDoc )
throw (UnsupportedFlavorException, IOException, RuntimeException, std::exception)
{
- if( !maAny.hasValue() || !mpFormats->size() || ( maLastFormat != rFlavor.MimeType ) )
+ if( !maAny.hasValue() || mpFormats->empty() || ( maLastFormat != rFlavor.MimeType ) )
{
const SolarMutexGuard aGuard;
@@ -322,7 +322,7 @@ Any SAL_CALL TransferableHelper::getTransferData2( const DataFlavor& rFlavor, co
bool bDone = false;
// add formats if not already done
- if( !mpFormats->size() )
+ if( mpFormats->empty() )
AddSupportedFormats();
// check alien formats first and try to get a substitution format
@@ -432,7 +432,7 @@ Sequence< DataFlavor > SAL_CALL TransferableHelper::getTransferDataFlavors() thr
try
{
- if( !mpFormats->size() )
+ if( mpFormats->empty() )
AddSupportedFormats();
}
catch( const ::com::sun::star::uno::Exception& )
@@ -460,7 +460,7 @@ sal_Bool SAL_CALL TransferableHelper::isDataFlavorSupported( const DataFlavor& r
try
{
- if( !mpFormats->size() )
+ if( mpFormats->empty() )
AddSupportedFormats();
}
catch( const ::com::sun::star::uno::Exception& )
diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index ec56feef5731..6f76b41cdc7d 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -491,7 +491,7 @@ namespace
lcl_CalcBreaks(Breaks, rPam);
- if (!Breaks.size())
+ if (Breaks.empty())
{
return (rDocumentContentOperations.*pFunc)(rPam, bForceJoinNext);
}
@@ -3001,7 +3001,7 @@ bool DocumentContentOperationsManager::ReplaceRange( SwPaM& rPam, const OUString
}
*rPam.Start() = *aPam.GetMark(); // update start of original pam w/ prefix
- if (!Breaks.size())
+ if (Breaks.empty())
{
// park aPam somewhere so it does not point to node that is deleted
aPam.DeleteMark();
diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index 9b93a37ee1a4..a3ba73b46290 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -170,7 +170,7 @@ namespace
back_inserter(vCandidates),
boost::bind( ::std::logical_not<bool>(), boost::bind( &IMark::EndsBefore, _1, rPos ) ) );
// no candidate left => we are in front of the first mark or there are none
- if(!vCandidates.size()) return NULL;
+ if(vCandidates.empty()) return NULL;
// return the highest (last) candidate using mark end ordering
return max_element(vCandidates.begin(), vCandidates.end(), &lcl_MarkOrderingByEnd)->get();
}
@@ -810,7 +810,7 @@ namespace sw { namespace mark
// in order to assure sorting. The sorting is critical for the
// deletion of a mark as it is searched in these container for
// deletion.
- if ( vMarksToDelete.size() > 0 && bMarksMoved )
+ if ( !vMarksToDelete.empty() && bMarksMoved )
{
sortSubsetMarks();
}
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index 0b9b1dcfc76e..6fe5c9a9070d 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -263,7 +263,7 @@ bool SwNodes::InsBoxen( SwTableNode* pTableNd,
if( !pPrvBox && !pNxtBox )
{
bool bSetIdxPos = true;
- if( pTableNd->GetTable().GetTabLines().size() && !nInsPos )
+ if( !pTableNd->GetTable().GetTabLines().empty() && !nInsPos )
{
const SwTableLine* pTableLn = pLine;
while( pTableLn->GetUpper() )
@@ -272,7 +272,7 @@ bool SwNodes::InsBoxen( SwTableNode* pTableNd,
if( pTableNd->GetTable().GetTabLines()[ 0 ] == pTableLn )
{
// Before the Table's first Box
- while( ( pNxtBox = pLine->GetTabBoxes()[0])->GetTabLines().size() )
+ while( !( pNxtBox = pLine->GetTabBoxes()[0])->GetTabLines().empty() )
pLine = pNxtBox->GetTabLines()[0];
nIdxPos = pNxtBox->GetSttIdx();
bSetIdxPos = false;
@@ -1351,7 +1351,7 @@ SwTableNode* SwNodes::TextToTable( const SwNodes::TableRanges_t & rTableNodes,
SwTableBoxFormat* pBoxFormat,
SwTextFormatColl* /*pTextColl*/ /*, SwUndo... pUndo*/ )
{
- if( !rTableNodes.size() )
+ if( rTableNodes.empty() )
return 0;
SwTableNode * pTableNd = new SwTableNode( rTableNodes.begin()->begin()->aStart );
@@ -1846,7 +1846,7 @@ bool SwDoc::DeleteRow( const SwCursor& rCursor )
ForEach_FndLineCopyCol( pTableNd->GetTable().GetTabLines(), &aPara );
}
- if( !aFndBox.GetLines().size() )
+ if( aFndBox.GetLines().empty() )
return false;
SwEditShell* pESh = GetEditShell();
diff --git a/sw/source/core/text/SwGrammarMarkUp.cxx b/sw/source/core/text/SwGrammarMarkUp.cxx
index d25ac883ff88..c5d57d54ce67 100644
--- a/sw/source/core/text/SwGrammarMarkUp.cxx
+++ b/sw/source/core/text/SwGrammarMarkUp.cxx
@@ -39,7 +39,7 @@ void SwGrammarMarkUp::CopyFrom( const SwWrongList& rCopy )
void SwGrammarMarkUp::MoveGrammar( sal_Int32 nPos, sal_Int32 nDiff )
{
Move( nPos, nDiff );
- if( !maSentence.size() )
+ if( maSentence.empty() )
return;
std::vector< sal_Int32 >::iterator pIter = maSentence.begin();
while( pIter != maSentence.end() && *pIter < nPos )
@@ -58,7 +58,7 @@ void SwGrammarMarkUp::MoveGrammar( sal_Int32 nPos, sal_Int32 nDiff )
SwGrammarMarkUp* SwGrammarMarkUp::SplitGrammarList( sal_Int32 nSplitPos )
{
SwGrammarMarkUp* pNew = static_cast<SwGrammarMarkUp*>(SplitList( nSplitPos ));
- if( !maSentence.size() )
+ if( maSentence.empty() )
return pNew;
std::vector< sal_Int32 >::iterator pIter = maSentence.begin();
while( pIter != maSentence.end() && *pIter < nSplitPos )
@@ -80,7 +80,7 @@ void SwGrammarMarkUp::JoinGrammarList( SwGrammarMarkUp* pNext, sal_Int32 nInsert
JoinList( pNext, nInsertPos );
if (pNext)
{
- if( !pNext->maSentence.size() )
+ if( pNext->maSentence.empty() )
return;
std::vector< sal_Int32 >::iterator pIter = pNext->maSentence.begin();
while( pIter != pNext->maSentence.end() )
@@ -126,7 +126,7 @@ void SwGrammarMarkUp::setSentence( sal_Int32 nStart )
sal_Int32 SwGrammarMarkUp::getSentenceStart( sal_Int32 nPos )
{
- if( !maSentence.size() )
+ if( maSentence.empty() )
return 0;
std::vector< sal_Int32 >::iterator pIter = maSentence.begin();
while( pIter != maSentence.end() && *pIter < nPos )
@@ -140,7 +140,7 @@ sal_Int32 SwGrammarMarkUp::getSentenceStart( sal_Int32 nPos )
sal_Int32 SwGrammarMarkUp::getSentenceEnd( sal_Int32 nPos )
{
- if( !maSentence.size() )
+ if( maSentence.empty() )
return COMPLETE_STRING;
std::vector< sal_Int32 >::iterator pIter = maSentence.begin();
while( pIter != maSentence.end() && *pIter <= nPos )
diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx
index 9acedfe8bb57..bb39807f9727 100644
--- a/sw/source/core/undo/untbl.cxx
+++ b/sw/source/core/undo/untbl.cxx
@@ -1233,7 +1233,7 @@ void _SaveBox::RestoreAttr( SwTableBox& rBox, _SaveTable& rSTable )
if( ULONG_MAX == nSttNode ) // no EndBox
{
- if( !rBox.GetTabLines().size() )
+ if( rBox.GetTabLines().empty() )
{
OSL_ENSURE( false, "Number of lines changed" );
}
diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx
index 932ca27f6015..1c93800ca045 100644
--- a/sw/source/core/unocore/unoportenum.cxx
+++ b/sw/source/core/unocore/unoportenum.cxx
@@ -400,7 +400,7 @@ throw( uno::RuntimeException, std::exception )
{
SolarMutexGuard aGuard;
- return m_Portions.size() > 0;
+ return !m_Portions.empty();
}
uno::Any SwXTextPortionEnumeration::nextElement()
@@ -409,7 +409,7 @@ throw( container::NoSuchElementException, lang::WrappedTargetException,
{
SolarMutexGuard aGuard;
- if (!m_Portions.size())
+ if (m_Portions.empty())
throw container::NoSuchElementException();
Any any;
@@ -1161,7 +1161,7 @@ static void lcl_ExportAnnotationStarts(
SwAnnotationStartPortion_ImplList& rAnnotationStartArr,
const sal_Int32 nIndex)
{
- if ( rAnnotationStartArr.size() > 0 )
+ if ( !rAnnotationStartArr.empty() )
{
for ( SwAnnotationStartPortion_ImplList::iterator aIter = rAnnotationStartArr.begin(), aEnd = rAnnotationStartArr.end();
aIter != aEnd; )
@@ -1196,11 +1196,11 @@ static sal_Int32 lcl_ExportFrames(
{
// Ignore frames which are not exported, as we are exporting a selection
// and they are anchored before the start of the selection.
- while (i_rFrames.size() && i_rFrames.front().nIndex < i_nCurrentIndex)
+ while (!i_rFrames.empty() && i_rFrames.front().nIndex < i_nCurrentIndex)
i_rFrames.pop_front();
// find first Frame in (sorted) i_rFrames at current position
- while (i_rFrames.size() && (i_rFrames.front().nIndex == i_nCurrentIndex))
+ while (!i_rFrames.empty() && (i_rFrames.front().nIndex == i_nCurrentIndex))
// do not check for i_nEnd here; this is done implicity by lcl_MoveCursor
{
const SwModify * const pFrame =
@@ -1214,7 +1214,7 @@ static sal_Int32 lcl_ExportFrames(
i_rFrames.pop_front();
}
- return i_rFrames.size() ? i_rFrames.front().nIndex : -1;
+ return !i_rFrames.empty() ? i_rFrames.front().nIndex : -1;
}
static sal_Int32 lcl_GetNextIndex(
@@ -1350,7 +1350,7 @@ static void lcl_CreatePortions(
if (!xRef.is() && !bCursorMoved)
{
if (!bAtEnd &&
- FieldMarks.size() && (FieldMarks.front() == nCurrentIndex))
+ !FieldMarks.empty() && (FieldMarks.front() == nCurrentIndex))
{
// moves cursor
xRef = lcl_ExportFieldMark(i_xParentText, pUnoCrsr, pTextNode);
@@ -1359,7 +1359,7 @@ static void lcl_CreatePortions(
}
else
{
- OSL_ENSURE(!FieldMarks.size() ||
+ OSL_ENSURE(FieldMarks.empty() ||
(FieldMarks.front() != nCurrentIndex),
"fieldmark and hint with CH_TXTATR at same pos?");
}
@@ -1369,8 +1369,8 @@ static void lcl_CreatePortions(
const sal_Int32 nNextPortionIndex =
lcl_GetNextIndex(Bookmarks, Redlines, SoftPageBreaks);
- sal_Int32 nNextMarkIndex = ( FieldMarks.size() ? FieldMarks.front() : -1 );
- if ( AnnotationStarts.size() > 0
+ sal_Int32 nNextMarkIndex = ( !FieldMarks.empty() ? FieldMarks.front() : -1 );
+ if ( !AnnotationStarts.empty()
&& ( nNextMarkIndex == -1
|| (*AnnotationStarts.begin())->getIndex() < nNextMarkIndex ) )
{
diff --git a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
index 01dbd79bcc86..84f6fddc86bb 100644
--- a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
+++ b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
@@ -300,7 +300,7 @@ The code below would only be part of the solution.
else
m_pSpellState->m_bOtherSpelled = true;
// if no result has been found try at the body text - completely
- if(!m_pSpellState->m_bBodySpelled && !aRet.size())
+ if(!m_pSpellState->m_bBodySpelled && aRet.empty())
{
pWrtShell->SpellStart(DOCPOS_START, DOCPOS_END, DOCPOS_START );
if(!pWrtShell->SpellSentence(aRet, m_bIsGrammarCheckingOn))
@@ -334,7 +334,7 @@ The code below would only be part of the solution.
pWrtShell->SpellStart(DOCPOS_OTHERSTART, DOCPOS_CURR, DOCPOS_OTHERSTART );
(void)pWrtShell->SpellSentence(aRet, m_bIsGrammarCheckingOn);
}
- if(!aRet.size())
+ if(aRet.empty())
{
// end spelling
pWrtShell->SpellEnd();
@@ -370,7 +370,7 @@ The code below would only be part of the solution.
}
// search for a draw text object that contains error and spell it
- if(!aRet.size() &&
+ if(aRet.empty() &&
(m_pSpellState->m_bDrawingsSpelled ||
!FindNextDrawTextError_Impl(*pWrtShell) || !SpellDrawText_Impl(*pWrtShell, aRet)))
{
@@ -383,7 +383,7 @@ The code below would only be part of the solution.
// now only the rest of the body text can be spelled -
// if the spelling started inside of the body
bool bCloseMessage = true;
- if(!aRet.size() && !m_pSpellState->m_bStartedInSelection)
+ if(aRet.empty() && !m_pSpellState->m_bStartedInSelection)
{
OSL_ENSURE(m_pSpellState->m_bDrawingsSpelled &&
m_pSpellState->m_bOtherSpelled && m_pSpellState->m_bBodySpelled,
@@ -413,7 +413,7 @@ The code below would only be part of the solution.
bCloseMessage = false; // no closing message if a wrap around has been denied
}
}
- if(!aRet.size())
+ if(aRet.empty())
{
if(bCloseMessage)
{
@@ -755,10 +755,10 @@ bool SwSpellDialogChildWindow::FindNextDrawTextError_Impl(SwWrtShell& rSh)
m_pSpellState->m_aTextObjects.push_back(pCurrentTextObj);
}
}
- if(m_pSpellState->m_aTextObjects.size())
+ if(!m_pSpellState->m_aTextObjects.empty())
{
Reference< XSpellChecker1 > xSpell( GetSpellChecker() );
- while(!bNextDoc && m_pSpellState->m_aTextObjects.size())
+ while(!bNextDoc && !m_pSpellState->m_aTextObjects.empty())
{
std::list<SdrTextObj*>::iterator aStart = m_pSpellState->m_aTextObjects.begin();
SdrTextObj* pTextObj = *aStart;
diff --git a/ucb/source/ucp/file/shell.cxx b/ucb/source/ucp/file/shell.cxx
index 63c0f74d6343..658f861de701 100644
--- a/ucb/source/ucp/file/shell.cxx
+++ b/ucb/source/ucp/file/shell.cxx
@@ -446,7 +446,7 @@ shell::deregisterNotifier( const OUString& aUnqPath,Notifier* pNotifier )
it->second.notifier->remove( pNotifier );
- if( ! it->second.notifier->size() )
+ if( it->second.notifier->empty() )
m_aContent.erase( it );
}
diff --git a/ucb/source/ucp/webdav/SerfGetReqProcImpl.cxx b/ucb/source/ucp/webdav/SerfGetReqProcImpl.cxx
index 03c686fd725d..30b16283c32e 100644
--- a/ucb/source/ucp/webdav/SerfGetReqProcImpl.cxx
+++ b/ucb/source/ucp/webdav/SerfGetReqProcImpl.cxx
@@ -143,7 +143,7 @@ void SerfGetReqProcImpl::processSingleResponseHeader( const char* inHeaderName,
bool bStoreHeaderField = false;
- if ( mpHeaderNames->size() == 0 )
+ if ( mpHeaderNames->empty() )
{
// store all header fields
bStoreHeaderField = true;
diff --git a/ucb/source/ucp/webdav/SerfHeadReqProcImpl.cxx b/ucb/source/ucp/webdav/SerfHeadReqProcImpl.cxx
index 248a5c5d797f..9420a3968ed0 100644
--- a/ucb/source/ucp/webdav/SerfHeadReqProcImpl.cxx
+++ b/ucb/source/ucp/webdav/SerfHeadReqProcImpl.cxx
@@ -97,7 +97,7 @@ void SerfHeadReqProcImpl::processSingleResponseHeader( const char* inHeaderName,
bool bStoreHeaderField = false;
- if ( mpHeaderNames->size() == 0 )
+ if ( mpHeaderNames->empty() )
{
// store all header fields
bStoreHeaderField = true;
diff --git a/ucb/source/ucp/webdav/SerfSession.cxx b/ucb/source/ucp/webdav/SerfSession.cxx
index a4d3ed38e4d7..fa1a41e30309 100644
--- a/ucb/source/ucp/webdav/SerfSession.cxx
+++ b/ucb/source/ucp/webdav/SerfSession.cxx
@@ -1206,7 +1206,7 @@ bool SerfSession::removeExpiredLocktoken( const OUString & /*inURL*/,
PROPFIND( rEnv.m_aRequestURI, DAVZERO, aPropNames, aResources, rEnv );
- if ( aResources.size() == 0 )
+ if ( aResources.empty() )
return false;
std::vector< DAVPropertyValue >::const_iterator it
diff --git a/vcl/generic/fontmanager/fontmanager.cxx b/vcl/generic/fontmanager/fontmanager.cxx
index 9752e8677684..2fe3823ab0de 100644
--- a/vcl/generic/fontmanager/fontmanager.cxx
+++ b/vcl/generic/fontmanager/fontmanager.cxx
@@ -2136,7 +2136,7 @@ void PrintFontManager::getGlyphWidths( fontID nFont,
}
else if( pFont->m_eType == fonttype::Type1 )
{
- if( ! pFont->m_aEncodingVector.size() )
+ if( pFont->m_aEncodingVector.empty() )
pFont->readAfmMetrics( m_pAtoms, true, true );
if( pFont->m_pMetrics )
{
@@ -2163,18 +2163,18 @@ const std::map< sal_Unicode, sal_Int32 >* PrintFontManager::getEncodingMap( font
if( !pFont || pFont->m_eType != fonttype::Type1 )
return NULL;
- if( ! pFont->m_aEncodingVector.size() )
+ if( pFont->m_aEncodingVector.empty() )
pFont->readAfmMetrics( m_pAtoms, true, true );
if( pNonEncoded )
- *pNonEncoded = pFont->m_aNonEncoded.size() ? &pFont->m_aNonEncoded : NULL;
+ *pNonEncoded = !pFont->m_aNonEncoded.empty() ? &pFont->m_aNonEncoded : NULL;
if (ppPriority)
{
*ppPriority = &pFont->m_aEncodingVectorPriority;
}
- return pFont->m_aEncodingVector.size() ? &pFont->m_aEncodingVector : NULL;
+ return !pFont->m_aEncodingVector.empty() ? &pFont->m_aEncodingVector : NULL;
}
std::list< OString > PrintFontManager::getAdobeNameFromUnicode( sal_Unicode aChar ) const
diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx
index 2a5112e6e819..ffe6417ac7ae 100644
--- a/vcl/unx/generic/printer/ppdparser.cxx
+++ b/vcl/unx/generic/printer/ppdparser.cxx
@@ -1799,7 +1799,7 @@ bool PPDContext::checkConstraints( const PPDKey* pKey, const PPDValue* pNewValue
char* PPDContext::getStreamableBuffer( sal_uLong& rBytes ) const
{
rBytes = 0;
- if( ! m_aCurrentValues.size() )
+ if( m_aCurrentValues.empty() )
return NULL;
hash_type::const_iterator it;
for( it = m_aCurrentValues.begin(); it != m_aCurrentValues.end(); ++it )
diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
index 5dcae2b81843..e2c897f7dd3e 100644
--- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
@@ -615,7 +615,7 @@ CellPropertyValuesSeq_t DomainMapperTableHandler::endTableGetCellProperties(Tabl
CellPropertyValuesSeq_t aCellProperties( m_aCellProperties.size() );
- if ( !m_aCellProperties.size() )
+ if ( m_aCellProperties.empty() )
{
#ifdef DEBUG_WRITERFILTER
TagLogger::getInstance().endElement();
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 363d300fca2a..4a781f14a418 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -577,7 +577,7 @@ FieldContextPtr DomainMapper_Impl::GetTopFieldContext()
void DomainMapper_Impl::InitTabStopFromStyle( const uno::Sequence< style::TabStop >& rInitTabStops )
{
- OSL_ENSURE(!m_aCurrentTabStops.size(), "tab stops already initialized");
+ OSL_ENSURE(m_aCurrentTabStops.empty(), "tab stops already initialized");
for( sal_Int32 nTab = 0; nTab < rInitTabStops.getLength(); ++nTab)
{
m_aCurrentTabStops.push_back( DeletableTabStop(rInitTabStops[nTab]) );
@@ -1020,7 +1020,7 @@ void DomainMapper_Impl::finishParagraph( PropertyMapPtr pPropertyMap )
#endif
ParagraphPropertyMap* pParaContext = dynamic_cast< ParagraphPropertyMap* >( pPropertyMap.get() );
- if (!m_aTextAppendStack.size())
+ if (m_aTextAppendStack.empty())
return;
TextAppendContext& rAppendContext = m_aTextAppendStack.top();
uno::Reference< text::XTextAppend > xTextAppend;
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx
index f7e632d72490..91e3d985d0ad 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -1471,7 +1471,7 @@ OUString StyleSheetTable::ConvertStyleName( const OUString& rWWName, bool bExten
++aIt;
}
}
- if(!m_pImpl->m_aStyleNameMap.size())
+ if(m_pImpl->m_aStyleNameMap.empty())
{
for( sal_uInt32 nPair = 0; nPair < sizeof(aStyleNamePairs) / sizeof( sal_Char*) / 2; ++nPair)
{
diff --git a/xmloff/source/core/RDFaImportHelper.cxx b/xmloff/source/core/RDFaImportHelper.cxx
index 0cf3061586d0..be7c68f95f58 100644
--- a/xmloff/source/core/RDFaImportHelper.cxx
+++ b/xmloff/source/core/RDFaImportHelper.cxx
@@ -358,7 +358,7 @@ void RDFaInserter::InsertRDFaEntry(
// compiles on unxsoli4, unxlngi6, but not wntsci12
// ::std::not1( ::std::mem_fun_ref(&uno::Reference<rdf::XURI>::is)) );
- if (!predicates.size())
+ if (predicates.empty())
{
return; // invalid
}
@@ -413,7 +413,7 @@ RDFaImportHelper::ParseRDFa(
}
const ::std::vector< OUString > properties(
reader.ReadCURIEs(i_rProperty) );
- if (!properties.size()) {
+ if (properties.empty()) {
return std::shared_ptr<ParsedRDFaAttributes>();
}
const OUString datatype( !i_rDatatype.isEmpty()