diff options
22 files changed, 41 insertions, 41 deletions
diff --git a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx index f7f5fcc9ecb9..a039467d1ddb 100644 --- a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx +++ b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx @@ -241,7 +241,7 @@ void ChartTypeDialogController::adjustParameterToMainType( ChartTypeParameter& r } if(!bFoundSomeMatch) { - if(rMap.begin()!=rMap.end()) + if(!rMap.empty()) rParameter = (*rMap.begin()).second; else rParameter = ChartTypeParameter(); diff --git a/chart2/source/view/charttypes/AreaChart.cxx b/chart2/source/view/charttypes/AreaChart.cxx index 7763f2cfe9e9..0a9e7e7673fe 100644 --- a/chart2/source/view/charttypes/AreaChart.cxx +++ b/chart2/source/view/charttypes/AreaChart.cxx @@ -644,7 +644,7 @@ struct FormerPoint void AreaChart::createShapes() { - if( m_aZSlots.begin() == m_aZSlots.end() ) //no series + if( m_aZSlots.empty() ) //no series return; if( m_nDimension == 2 && ( m_bArea || !m_bCategoryXAxis ) ) diff --git a/chart2/source/view/charttypes/BarChart.cxx b/chart2/source/view/charttypes/BarChart.cxx index 6184d01e2470..9ad2ee4fb971 100644 --- a/chart2/source/view/charttypes/BarChart.cxx +++ b/chart2/source/view/charttypes/BarChart.cxx @@ -413,7 +413,7 @@ void BarChart::adaptOverlapAndGapwidthForGroupBarsPerAxis() void BarChart::createShapes() { - if( m_aZSlots.begin() == m_aZSlots.end() ) //no series + if( m_aZSlots.empty() ) //no series return; OSL_ENSURE(m_pShapeFactory&&m_xLogicTarget.is()&&m_xFinalTarget.is(),"BarChart is not proper initialized"); diff --git a/chart2/source/view/charttypes/CandleStickChart.cxx b/chart2/source/view/charttypes/CandleStickChart.cxx index c3621ceaf1cf..8c974fbfc901 100644 --- a/chart2/source/view/charttypes/CandleStickChart.cxx +++ b/chart2/source/view/charttypes/CandleStickChart.cxx @@ -77,7 +77,7 @@ void CandleStickChart::addSeries( VDataSeries* pSeries, sal_Int32 /* zSlot */, s void CandleStickChart::createShapes() { - if( m_aZSlots.begin() == m_aZSlots.end() ) //no series + if( m_aZSlots.empty() ) //no series return; if( m_nDimension!=2 ) diff --git a/chart2/source/view/charttypes/NetChart.cxx b/chart2/source/view/charttypes/NetChart.cxx index 5bd26237adb4..2cc8d1eae59c 100644 --- a/chart2/source/view/charttypes/NetChart.cxx +++ b/chart2/source/view/charttypes/NetChart.cxx @@ -344,7 +344,7 @@ struct FormerPoint void NetChart::createShapes() { - if( m_aZSlots.begin() == m_aZSlots.end() ) //no series + if( m_aZSlots.empty() ) //no series return; if( m_bArea ) diff --git a/connectivity/source/drivers/file/FResultSet.cxx b/connectivity/source/drivers/file/FResultSet.cxx index ce34129bacdd..e59c6d244228 100644 --- a/connectivity/source/drivers/file/FResultSet.cxx +++ b/connectivity/source/drivers/file/FResultSet.cxx @@ -1262,7 +1262,7 @@ bool OResultSet::OpenImpl() if(!m_pTable) { const OSQLTables& xTabs = m_aSQLIterator.getTables(); - if ((xTabs.begin() == xTabs.end()) || !xTabs.begin()->second.is()) + if (xTabs.empty() || !xTabs.begin()->second.is()) lcl_throwError(STR_QUERY_TOO_COMPLEX,*this); if ( xTabs.size() > 1 || m_aSQLIterator.hasErrors() ) diff --git a/connectivity/source/drivers/mork/MResultSet.cxx b/connectivity/source/drivers/mork/MResultSet.cxx index bea2b0f295ae..369b85114e11 100644 --- a/connectivity/source/drivers/mork/MResultSet.cxx +++ b/connectivity/source/drivers/mork/MResultSet.cxx @@ -1147,7 +1147,7 @@ void SAL_CALL OResultSet::executeQuery() throw( ::com::sun::star::sdbc::SQLExcep if(!m_pTable) { const OSQLTables& xTabs = m_pSQLIterator->getTables(); - if ((xTabs.begin() == xTabs.end()) || !xTabs.begin()->second.is()) + if (xTabs.empty() || !xTabs.begin()->second.is()) m_pStatement->getOwnConnection()->throwSQLException( STR_QUERY_TOO_COMPLEX, *this ); m_pTable = static_cast< OTable* > ((xTabs.begin()->second).get()); diff --git a/oox/source/drawingml/textparagraph.cxx b/oox/source/drawingml/textparagraph.cxx index ce6109983895..76d299a39d44 100644 --- a/oox/source/drawingml/textparagraph.cxx +++ b/oox/source/drawingml/textparagraph.cxx @@ -76,7 +76,7 @@ void TextParagraph::insertAt( } sal_Int32 nCharHeight = 0; - if ( maRuns.begin() == maRuns.end() ) + if ( maRuns.empty() ) { PropertySet aPropSet( xAt ); diff --git a/package/source/zippackage/ZipPackageFolder.cxx b/package/source/zippackage/ZipPackageFolder.cxx index cb72ed180f4a..d52b4bdf21f2 100644 --- a/package/source/zippackage/ZipPackageFolder.cxx +++ b/package/source/zippackage/ZipPackageFolder.cxx @@ -326,7 +326,7 @@ void ZipPackageFolder::saveContents( { bool bWritingFailed = false; - if ( maContents.begin() == maContents.end() && !rPath.isEmpty() && m_nFormat != embed::StorageFormats::OFOPXML ) + if ( maContents.empty() && !rPath.isEmpty() && m_nFormat != embed::StorageFormats::OFOPXML ) { // it is an empty subfolder, use workaround to store it ZipEntry* pTempEntry = new ZipEntry(); diff --git a/sc/source/filter/xml/XMLExportDataPilot.cxx b/sc/source/filter/xml/XMLExportDataPilot.cxx index e887f7a7f86f..6ca6cf06699a 100644 --- a/sc/source/filter/xml/XMLExportDataPilot.cxx +++ b/sc/source/filter/xml/XMLExportDataPilot.cxx @@ -458,7 +458,7 @@ void ScXMLExportDataPilot::WriteSubTotals(ScDPSaveDimension* pDim) void ScXMLExportDataPilot::WriteMembers(ScDPSaveDimension* pDim) { const ScDPSaveDimension::MemberList &rMembers = pDim->GetMembers(); - if (rMembers.begin() != rMembers.end()) + if (!rMembers.empty()) { SvXMLElementExport aElemDPMs(rExport, XML_NAMESPACE_TABLE, XML_DATA_PILOT_MEMBERS, true, true); rExport.CheckAttrList(); diff --git a/svl/source/passwordcontainer/passwordcontainer.cxx b/svl/source/passwordcontainer/passwordcontainer.cxx index a216b1e87af6..31175d156b3d 100644 --- a/svl/source/passwordcontainer/passwordcontainer.cxx +++ b/svl/source/passwordcontainer/passwordcontainer.cxx @@ -927,7 +927,7 @@ void SAL_CALL PasswordContainer::remove( const OUString& aURL, const OUString& a // the iterator will not be used any more so it can be removed directly aIter->second.erase( aNPIter ); - if( aIter->second.begin() == aIter->second.end() ) + if( aIter->second.empty() ) m_aContainer.erase( aIter ); return; @@ -973,7 +973,7 @@ void SAL_CALL PasswordContainer::removePersistent( const OUString& aURL, const O if( !aNPIter->HasPasswords( MEMORY_RECORD ) ) aIter->second.erase( aNPIter ); - if( aIter->second.begin() == aIter->second.end() ) + if( aIter->second.empty() ) m_aContainer.erase( aIter ); return; @@ -1012,7 +1012,7 @@ void SAL_CALL PasswordContainer::removeAllPersistent() throw(RuntimeException, s ++aNPIter; } - if( aIter->second.begin() == aIter->second.end() ) + if( aIter->second.empty() ) { PassMap::iterator aIterToDelete( aIter ); ++aIter; diff --git a/vcl/generic/app/gendisp.cxx b/vcl/generic/app/gendisp.cxx index 1275465c4fb1..06473a95f080 100644 --- a/vcl/generic/app/gendisp.cxx +++ b/vcl/generic/app/gendisp.cxx @@ -73,7 +73,7 @@ bool SalGenericDisplay::DispatchInternalEvent() if( osl_acquireMutex( m_aEventGuard ) ) { - if( m_aUserEvents.begin() != m_aUserEvents.end() ) + if( !m_aUserEvents.empty() ) { pFrame = m_aUserEvents.front().m_pFrame; pData = m_aUserEvents.front().m_pData; @@ -137,7 +137,7 @@ bool SalGenericDisplay::HasUserEvents() const bool bRet = false; if( osl_acquireMutex( m_aEventGuard ) ) { - if( m_aUserEvents.begin() != m_aUserEvents.end() ) + if( !m_aUserEvents.empty() ) bRet = true; osl_releaseMutex( m_aEventGuard ); } diff --git a/vcl/generic/fontmanager/fontcache.cxx b/vcl/generic/fontmanager/fontcache.cxx index 7448570c8ada..f7735d1e4264 100644 --- a/vcl/generic/fontmanager/fontcache.cxx +++ b/vcl/generic/fontmanager/fontcache.cxx @@ -125,7 +125,7 @@ void FontCache::flush() { // insert cache entries const FontCacheEntry& rEntry( entry_it->second.m_aEntry ); - if( rEntry.begin() == rEntry.end() ) + if( rEntry.empty() ) continue; aLine.append("File:"); diff --git a/vcl/generic/fontmanager/fontmanager.cxx b/vcl/generic/fontmanager/fontmanager.cxx index 2f4b49a09f3e..9752e8677684 100644 --- a/vcl/generic/fontmanager/fontmanager.cxx +++ b/vcl/generic/fontmanager/fontmanager.cxx @@ -1208,7 +1208,7 @@ bool PrintFontManager::analyzeTrueTypeFile( PrintFont* pFont ) const // set family name from XLFD if possible if( ! pFont->m_nFamilyName ) { - if( aNames.begin() != aNames.end() ) + if( !aNames.empty() ) { pFont->m_nFamilyName = m_pAtoms->getAtom( ATOM_FAMILYNAME, aNames.front(), true ); aNames.pop_front(); @@ -2187,7 +2187,7 @@ std::list< OString > PrintFontManager::getAdobeNameFromUnicode( sal_Unicode aCha for( ; range.first != range.second; ++range.first ) aRet.push_back( range.first->second ); - if( aRet.begin() == aRet.end() && aChar != 0 ) + if( aRet.empty() && aChar != 0 ) { sal_Char aBuf[8]; sal_Int32 nChars = snprintf( aBuf, sizeof( aBuf ), "uni%.4hX", aChar ); @@ -2207,7 +2207,7 @@ std::list< sal_Unicode > PrintFontManager::getUnicodeFromAdobeName( const OStri for( ; range.first != range.second; ++range.first ) aRet.push_back( range.first->second ); - if( aRet.begin() == aRet.end() ) + if( aRet.empty() ) { if( rName.getLength() == 7 && rName.startsWith( "uni" ) ) { diff --git a/vcl/generic/print/common_gfx.cxx b/vcl/generic/print/common_gfx.cxx index b02c57706c27..14574edc1878 100644 --- a/vcl/generic/print/common_gfx.cxx +++ b/vcl/generic/print/common_gfx.cxx @@ -228,12 +228,12 @@ PrinterGfx::JoinVerticalClipRectangles( std::list< Rectangle >::iterator& it, Point aLastPoint = leftside.front(); PSBinMoveTo (aLastPoint, rOldPoint, rColumn); leftside.pop_front(); - while( leftside.begin() != leftside.end() ) + while( !leftside.empty() ) { Point aPoint (leftside.front()); leftside.pop_front(); // may have been the last one - if( leftside.begin() != leftside.end() ) + if( !leftside.empty() ) { nNewDX = aPoint.X() - aLastPoint.X(); nNewDY = aPoint.Y() - aLastPoint.Y(); @@ -248,11 +248,11 @@ PrinterGfx::JoinVerticalClipRectangles( std::list< Rectangle >::iterator& it, aLastPoint = rightside.back(); PSBinLineTo (aLastPoint, rOldPoint, rColumn); rightside.pop_back(); - while( rightside.begin() != rightside.end() ) + while( !rightside.empty() ) { Point aPoint (rightside.back()); rightside.pop_back(); - if( rightside.begin() != rightside.end() ) + if( !rightside.empty() ) { nNewDX = aPoint.X() - aLastPoint.X(); nNewDY = aPoint.Y() - aLastPoint.Y(); @@ -663,7 +663,7 @@ PrinterGfx::PSGSave () { WritePS (mpPageBody, "gsave\n" ); GraphicsStatus aNewState; - if( maGraphicsStack.begin() != maGraphicsStack.end() ) + if( !maGraphicsStack.empty() ) aNewState = maGraphicsStack.front(); maGraphicsStack.push_front( aNewState ); } @@ -672,7 +672,7 @@ void PrinterGfx::PSGRestore () { WritePS (mpPageBody, "grestore\n" ); - if( maGraphicsStack.begin() == maGraphicsStack.end() ) + if( maGraphicsStack.empty() ) WritePS (mpPageBody, "Error: too many grestores\n" ); else maGraphicsStack.pop_front(); diff --git a/vcl/generic/print/glyphset.cxx b/vcl/generic/print/glyphset.cxx index 37bd752525f8..f0c4e301ec65 100644 --- a/vcl/generic/print/glyphset.cxx +++ b/vcl/generic/print/glyphset.cxx @@ -657,7 +657,7 @@ GlyphSet::PSUploadEncoding(osl::File* pOutFile, PrinterGfx &rGfx) std::list< OString > aName( rMgr.getAdobeNameFromUnicode((*aSortedGlyph).second) ); - if( aName.begin() != aName.end() ) + if( !aName.empty() ) nSize += psp::appendStr ( aName.front().getStr(), pEncodingVector + nSize); else nSize += psp::appendStr (".notdef", pEncodingVector + nSize ); diff --git a/vcl/osx/clipboard.cxx b/vcl/osx/clipboard.cxx index 1f444ca7c0c7..008ec32ade5e 100644 --- a/vcl/osx/clipboard.cxx +++ b/vcl/osx/clipboard.cxx @@ -259,14 +259,14 @@ void AquaClipboard::fireClipboardChangedEvent() list<Reference< XClipboardListener > > listeners(mClipboardListeners); ClipboardEvent aEvent; - if (listeners.begin() != listeners.end()) + if (!listeners.empty()) { aEvent = ClipboardEvent(static_cast<OWeakObject*>(this), getContents()); } aGuard.clear(); - while (listeners.begin() != listeners.end()) + while (!listeners.empty()) { if (listeners.front().is()) { diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index fc13cbb5d765..7b733eac5ad2 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -2174,7 +2174,7 @@ bool PDFWriterImpl::writeBuffer( const void* pBuffer, sal_uInt64 nBytes ) if( ! nBytes ) // huh ? return true; - if( m_aOutputStreams.begin() != m_aOutputStreams.end() ) + if( !m_aOutputStreams.empty() ) { m_aOutputStreams.front().m_pStream->Seek( STREAM_SEEK_TO_END ); m_aOutputStreams.front().m_pStream->Write( pBuffer, sal::static_int_cast<sal_Size>(nBytes) ); @@ -2314,13 +2314,13 @@ sal_Int32 PDFWriterImpl::newPage( sal_Int32 nPageWidth, sal_Int32 nPageHeight, P void PDFWriterImpl::endPage() { - if( m_aPages.begin() != m_aPages.end() ) + if( !m_aPages.empty() ) { // close eventual MC sequence endStructureElementMCSeq(); // sanity check - if( m_aOutputStreams.begin() != m_aOutputStreams.end() ) + if( !m_aOutputStreams.empty() ) { OSL_FAIL( "redirection across pages !!!" ); m_aOutputStreams.clear(); // leak ! diff --git a/vcl/unx/generic/app/sm.cxx b/vcl/unx/generic/app/sm.cxx index 97a472473c4a..8627fdeab94b 100644 --- a/vcl/unx/generic/app/sm.cxx +++ b/vcl/unx/generic/app/sm.cxx @@ -352,8 +352,8 @@ IMPL_STATIC_LINK_NOARG( SessionManagerClient, ShutDownHdl ) } const std::list< SalFrame* >& rFrames = vcl_sal::getSalDisplay(GetGenericData())->getFrames(); - SAL_INFO("vcl.sm", (rFrames.begin() != rFrames.end() ? "shutdown on first frame" : "shutdown event but no frame")); - if( rFrames.begin() != rFrames.end() ) + SAL_INFO("vcl.sm", (!rFrames.empty() ? "shutdown on first frame" : "shutdown event but no frame")); + if( !rFrames.empty() ) rFrames.front()->CallCallback( SALEVENT_SHUTDOWN, 0 ); return 0; } diff --git a/vcl/unx/generic/dtrans/X11_selection.cxx b/vcl/unx/generic/dtrans/X11_selection.cxx index 720b8c6e41bf..c8263b6e2356 100644 --- a/vcl/unx/generic/dtrans/X11_selection.cxx +++ b/vcl/unx/generic/dtrans/X11_selection.cxx @@ -1929,7 +1929,7 @@ bool SelectionManager::handleSendPropertyNotify( XPropertyEvent& rNotify ) } } - while( aTimeouts.begin() != aTimeouts.end() ) + while( !aTimeouts.empty() ) { // transfer broken, might even be a new client with the // same window id @@ -1979,7 +1979,7 @@ bool SelectionManager::handleSendPropertyNotify( XPropertyEvent& rNotify ) } // eventually clean up the hash map - if( it->second.begin() == it->second.end() ) + if( it->second.empty() ) m_aIncrementals.erase( it ); } } @@ -3694,7 +3694,7 @@ void SelectionManager::run( void* pThis ) } } aGuard.clear(); - while( aChangeList.begin() != aChangeList.end() ) + while( !aChangeList.empty() ) { aChangeList.front().first->fireContentsChanged(); aChangeList.pop_front(); diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx index d2511917ee85..fa733cfd5870 100644 --- a/vcl/unx/generic/window/salframe.cxx +++ b/vcl/unx/generic/window/salframe.cxx @@ -103,7 +103,7 @@ static int nVisibleFloats = 0; static void doReparentPresentationDialogues( SalDisplay* pDisplay ) { GetGenericData()->ErrorTrapPush(); - while( aPresentationReparentList.begin() != aPresentationReparentList.end() ) + while( !aPresentationReparentList.empty() ) { int x, y; ::Window aRoot, aChild; @@ -3539,7 +3539,7 @@ long X11SalFrame::HandleExposeEvent( XEvent *pEvent ) } if( IsOverrideRedirect() && mbFullScreen && - aPresentationReparentList.begin() == aPresentationReparentList.end() ) + aPresentationReparentList.empty() ) // we are in fullscreen mode -> override redirect // focus is possibly lost, so reget it XSetInputFocus( GetXDisplay(), GetShellWindow(), RevertToNone, CurrentTime ); @@ -3562,7 +3562,7 @@ long X11SalFrame::HandleExposeEvent( XEvent *pEvent ) void X11SalFrame::RestackChildren( ::Window* pTopLevelWindows, int nTopLevelWindows ) { - if( maChildren.begin() != maChildren.end() ) + if( !maChildren.empty() ) { int nWindow = nTopLevelWindows; while( nWindow-- ) @@ -3604,7 +3604,7 @@ void X11SalFrame::RestackChildren( ::Window* pTopLevelWindows, int nTopLevelWind void X11SalFrame::RestackChildren() { if( ! GetDisplay()->getWMAdaptor()->isTransientBehaviourAsExpected() - && maChildren.begin() != maChildren.end() ) + && !maChildren.empty() ) { ::Window aRoot, aParent, *pChildren = NULL; unsigned int nChildren; diff --git a/xmloff/source/chart/SchXMLTableContext.cxx b/xmloff/source/chart/SchXMLTableContext.cxx index 4f460f9c71e8..85ba4ca108b8 100644 --- a/xmloff/source/chart/SchXMLTableContext.cxx +++ b/xmloff/source/chart/SchXMLTableContext.cxx @@ -770,7 +770,7 @@ void SchXMLTableHelper::applyTableToInternalDataProvider( for( sal_Int32 i=0; i<nNumRows; ++i ) aDataInRows[i].realloc( nNumColumns ); - if( rTable.aData.begin() != rTable.aData.end()) + if( !rTable.aData.empty() ) { //apply column labels if( rTable.bHasHeaderRow ) |