[Libreoffice-commits] core.git: accessibility/source basctl/source canvas/source chart2/source connectivity/source filter/source oox/source package/source scripting/source sc/source sfx2/source svtools/source sw/source ucb/source vcl/generic vcl/unx writerfilter/source xmloff/source

Noel Grandin noel at peralex.com
Thu Jun 11 01:07:47 PDT 2015


 accessibility/source/extended/AccessibleGridControlTable.cxx       |    4 -
 basctl/source/basicide/baside2b.cxx                                |    6 +-
 canvas/source/directx/dx_9rm.cxx                                   |    2 
 chart2/source/view/main/ChartView.cxx                              |    2 
 chart2/source/view/main/GL3DRenderer.cxx                           |    2 
 connectivity/source/drivers/ado/ADatabaseMetaDataImpl.cxx          |   22 +++++-----
 connectivity/source/drivers/mork/MNSProfileDiscover.cxx            |    2 
 connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx |    4 -
 filter/source/svg/svgreader.cxx                                    |    2 
 oox/source/ppt/presentationfragmenthandler.cxx                     |    4 -
 oox/source/shape/ShapeContextHandler.cxx                           |    2 
 package/source/xstor/ohierarchyholder.cxx                          |   10 ++--
 package/source/xstor/owriteablestream.cxx                          |    4 -
 sc/source/core/data/dociter.cxx                                    |    6 +-
 sc/source/core/tool/token.cxx                                      |    4 -
 sc/source/filter/excel/xestyle.cxx                                 |    4 -
 sc/source/filter/rtf/eeimpars.cxx                                  |    6 +-
 sc/source/ui/unoobj/viewuno.cxx                                    |    4 -
 scripting/source/provider/BrowseNodeFactoryImpl.cxx                |    2 
 sfx2/source/control/recentdocsview.cxx                             |    2 
 sfx2/source/doc/guisaveas.cxx                                      |   10 ++--
 svtools/source/misc/transfer.cxx                                   |    8 +--
 sw/source/core/doc/DocumentContentOperationsManager.cxx            |    4 -
 sw/source/core/doc/docbm.cxx                                       |    4 -
 sw/source/core/docnode/ndtbl.cxx                                   |    8 +--
 sw/source/core/text/SwGrammarMarkUp.cxx                            |   10 ++--
 sw/source/core/undo/untbl.cxx                                      |    2 
 sw/source/core/unocore/unoobj2.cxx                                 |    4 -
 sw/source/core/unocore/unoportenum.cxx                             |   20 ++++-----
 sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx               |   14 +++---
 ucb/source/ucp/file/shell.cxx                                      |    2 
 ucb/source/ucp/webdav/SerfGetReqProcImpl.cxx                       |    2 
 ucb/source/ucp/webdav/SerfHeadReqProcImpl.cxx                      |    2 
 ucb/source/ucp/webdav/SerfSession.cxx                              |    2 
 vcl/generic/fontmanager/fontmanager.cxx                            |    8 +--
 vcl/unx/generic/printer/ppdparser.cxx                              |    2 
 writerfilter/source/dmapper/DomainMapperTableHandler.cxx           |    2 
 writerfilter/source/dmapper/DomainMapper_Impl.cxx                  |    4 -
 writerfilter/source/dmapper/StyleSheetTable.cxx                    |    2 
 xmloff/source/core/RDFaImportHelper.cxx                            |    4 -
 40 files changed, 104 insertions(+), 104 deletions(-)

New commits:
commit 776a3f14f2d987312b926ebc1ad09321a3a87f0d
Author: Noel Grandin <noel at peralex.com>
Date:   Thu Jun 11 10:06:49 2015 +0200

    convert expressions like 'size() == 0' to 'empty()'
    
    Change-Id: Ia5c8c0f38a347f398d587970a22e03f29ffd37af

diff --git a/accessibility/source/extended/AccessibleGridControlTable.cxx b/accessibility/source/extended/AccessibleGridControlTable.cxx
index 1a67b3d..0e45999 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 cec923e..29630dc 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 dbd2601..63e12b7 100644
--- a/canvas/source/directx/dx_9rm.cxx
+++ b/canvas/source/directx/dx_9rm.cxx
@@ -1225,7 +1225,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 c8ca5c5..492f10c 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 ed87efd..ee3dbb5 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 100c1ae..42c28c6 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 6879b9d..ada471a 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 e61bdf2..df2012e 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 e9b16d1..aeb3793 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 84dabe5..d143891 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 5dbcdfc..8f38e2b 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 fd2b39f..cb827a1 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 e3cdbf2..59d8de6 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 575f13f..39ae93b 100644
--- a/sc/source/core/data/dociter.cxx
+++ b/sc/source/core/data/dociter.cxx
@@ -1998,7 +1998,7 @@ void ScHorizontalCellIterator::SetTab( SCTAB nTabP )
         }
     }
 
-    if (maColPositions.size() == 0)
+    if (maColPositions.empty())
         return;
 
     maColPos = maColPositions.begin();
@@ -2080,7 +2080,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;
@@ -2102,7 +2102,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 4e20d93..457f1bd 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -545,7 +545,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
@@ -569,7 +569,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 df5c75b..c4e5c86 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 080a134..001286c 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 6edee14..9254cc9 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 9407a1c..5a63adc 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 0c0dad6..ad45119 100644
--- a/sfx2/source/control/recentdocsview.cxx
+++ b/sfx2/source/control/recentdocsview.cxx
@@ -257,7 +257,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);
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index 3357995..3ca399f 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -769,18 +769,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
@@ -938,7 +938,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 acdc429..0de880d 100644
--- a/svtools/source/misc/transfer.cxx
+++ b/svtools/source/misc/transfer.cxx
@@ -308,7 +308,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;
 
@@ -321,7 +321,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
@@ -431,7 +431,7 @@ Sequence< DataFlavor > SAL_CALL TransferableHelper::getTransferDataFlavors() thr
 
     try
     {
-        if( !mpFormats->size() )
+        if( mpFormats->empty() )
             AddSupportedFormats();
     }
     catch( const ::com::sun::star::uno::Exception& )
@@ -459,7 +459,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 bdf56b5..4f7b0bd 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -483,7 +483,7 @@ namespace
 
         lcl_CalcBreaks(Breaks, rPam);
 
-        if (!Breaks.size())
+        if (Breaks.empty())
         {
             return (rDocumentContentOperations.*pFunc)(rPam, bForceJoinNext);
         }
@@ -2968,7 +2968,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 b88bd17..2cf2caf 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();
     }
@@ -809,7 +809,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 5fc6f39..8632954 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 d25ac88..c5d57d5 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 f4e21ef..83bbe44 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/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx
index a279fb6..0c23824 100644
--- a/sw/source/core/unocore/unoobj2.cxx
+++ b/sw/source/core/unocore/unoobj2.cxx
@@ -1679,7 +1679,7 @@ void SwXParaFrameEnumerationImpl::FillFrame()
 
 bool SwXParaFrameEnumerationImpl::CreateNextObject()
 {
-    if (!m_vFrames.size())
+    if (m_vFrames.empty())
         return false;
 
     SwFrameFormat* const pFormat = static_cast<SwFrameFormat*>(
@@ -1740,7 +1740,7 @@ throw (container::NoSuchElementException,
     if (!GetCursor())
         throw uno::RuntimeException();
     PurgeFrameClients();
-    if (!m_xNextObject.is() && m_vFrames.size())
+    if (!m_xNextObject.is() && !m_vFrames.empty())
         CreateNextObject();
     if (!m_xNextObject.is())
         throw container::NoSuchElementException();
diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx
index d95fd8b..c3cc878 100644
--- a/sw/source/core/unocore/unoportenum.cxx
+++ b/sw/source/core/unocore/unoportenum.cxx
@@ -391,7 +391,7 @@ throw( uno::RuntimeException, std::exception )
 {
     SolarMutexGuard aGuard;
 
-    return m_Portions.size() > 0;
+    return !m_Portions.empty();
 }
 
 uno::Any SwXTextPortionEnumeration::nextElement()
@@ -400,7 +400,7 @@ throw( container::NoSuchElementException, lang::WrappedTargetException,
 {
     SolarMutexGuard aGuard;
 
-    if (!m_Portions.size())
+    if (m_Portions.empty())
         throw container::NoSuchElementException();
 
     Any any;
@@ -1152,7 +1152,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; )
@@ -1187,11 +1187,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 =
@@ -1205,7 +1205,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(
@@ -1341,7 +1341,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);
@@ -1350,7 +1350,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?");
         }
@@ -1360,8 +1360,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 01dbd79..84f6fdd 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 300922e..1f352d5 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 03c686f..30b1628 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 248a5c5..9420a39 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 a4d3ed3..fa1a41e 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 9752e86..2fe3823 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 65022bf..d3eb8a9 100644
--- a/vcl/unx/generic/printer/ppdparser.cxx
+++ b/vcl/unx/generic/printer/ppdparser.cxx
@@ -1767,7 +1767,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 b08e52a..9e13489 100644
--- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
@@ -614,7 +614,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 d106b4a..01bbb77 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -582,7 +582,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]) );
@@ -1025,7 +1025,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 bb24e75..713c107 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 fe4a435..ac2738a 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()


More information about the Libreoffice-commits mailing list