[Libreoffice-commits] core.git: basctl/source basegfx/source basegfx/test basic/source canvas/source chart2/source comphelper/source connectivity/source cui/source dbaccess/source desktop/qa desktop/source drawinglayer/source editeng/source extensions/source filter/source forms/source formula/source fpicker/source framework/source hwpfilter/source jvmfwk/source l10ntools/source lingucomponent/source linguistic/source oox/source package/source sc/source sdext/source sd/source sfx2/source slideshow/source sot/source svgio/source svl/source svtools/source svx/source sw/source test/source ucb/source unotools/source uui/source vcl/opengl vcl/source vcl/unx vcl/workben writerfilter/source xmloff/source xmlsecurity/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Oct 19 08:04:15 UTC 2018
basctl/source/basicide/baside2b.cxx | 2
basegfx/source/polygon/b2dpolypolygontools.cxx | 2
basegfx/source/polygon/b2dtrapezoid.cxx | 2
basegfx/source/raster/rasterconvert3d.cxx | 2
basegfx/test/basegfx2d.cxx | 2
basic/source/classes/sb.cxx | 2
canvas/source/cairo/cairo_textlayout.cxx | 2
chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx | 2
chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx | 4 -
chart2/source/model/main/Diagram.cxx | 2
chart2/source/view/charttypes/BarChart.cxx | 2
chart2/source/view/charttypes/CandleStickChart.cxx | 2
chart2/source/view/charttypes/VSeriesPlotter.cxx | 2
comphelper/source/container/container.cxx | 2
comphelper/source/container/embeddedobjectcontainer.cxx | 2
comphelper/source/misc/numberedcollection.cxx | 2
comphelper/source/xml/ofopxmlhelper.cxx | 2
connectivity/source/commontools/FDatabaseMetaDataResultSetMetaData.cxx | 26 +++++-----
connectivity/source/commontools/RowFunctionParser.cxx | 2
connectivity/source/commontools/TTableHelper.cxx | 2
connectivity/source/commontools/parameters.cxx | 2
connectivity/source/drivers/mork/MPreparedStatement.cxx | 2
connectivity/source/drivers/mork/MorkParser.cxx | 4 -
connectivity/source/drivers/odbc/OResultSet.cxx | 2
connectivity/source/drivers/postgresql/pq_statement.cxx | 6 +-
connectivity/source/drivers/postgresql/pq_updateableresultset.cxx | 2
connectivity/source/sdbcx/VCollection.cxx | 2
cui/source/customize/cfg.cxx | 4 -
cui/source/options/cfgchart.cxx | 2
cui/source/options/optsave.cxx | 2
cui/source/options/treeopt.cxx | 10 +--
cui/source/tabpages/autocdlg.cxx | 2
dbaccess/source/filter/hsqldb/fbcreateparser.cxx | 2
dbaccess/source/filter/hsqldb/hsqlimport.cxx | 4 -
dbaccess/source/ui/browser/formadapter.cxx | 2
dbaccess/source/ui/dlg/indexdialog.cxx | 2
dbaccess/source/ui/misc/WColumnSelect.cxx | 2
dbaccess/source/ui/misc/WCopyTable.cxx | 2
dbaccess/source/ui/querydesign/QueryTableView.cxx | 2
desktop/qa/desktop_lib/test_desktop_lib.cxx | 18 +++---
desktop/source/deployment/registry/package/dp_package.cxx | 2
desktop/source/lib/init.cxx | 2
desktop/source/pkgchk/unopkg/unopkg_app.cxx | 2
drawinglayer/source/attribute/strokeattribute.cxx | 2
drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx | 4 -
drawinglayer/source/primitive2d/graphicprimitive2d.cxx | 4 -
drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx | 6 +-
drawinglayer/source/primitive2d/markerarrayprimitive2d.cxx | 2
drawinglayer/source/primitive2d/sceneprimitive2d.cxx | 2
drawinglayer/source/primitive2d/textprimitive2d.cxx | 2
drawinglayer/source/primitive3d/sdrdecompositiontools3d.cxx | 2
drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx | 2
drawinglayer/source/primitive3d/sdrlatheprimitive3d.cxx | 2
drawinglayer/source/processor2d/hittestprocessor2d.cxx | 2
drawinglayer/source/processor2d/vclprocessor2d.cxx | 4 -
drawinglayer/source/processor3d/cutfindprocessor3d.cxx | 4 -
drawinglayer/source/processor3d/shadow3dextractor.cxx | 2
editeng/source/editeng/impedit2.cxx | 4 -
editeng/source/editeng/impedit3.cxx | 4 -
editeng/source/editeng/impedit4.cxx | 4 -
extensions/source/abpilot/fieldmappingpage.cxx | 2
extensions/source/propctrlr/browserlistbox.cxx | 2
filter/source/config/cache/cacheitem.cxx | 2
filter/source/config/cache/filtercache.cxx | 6 +-
filter/source/config/cache/typedetection.cxx | 6 +-
filter/source/flash/swfwriter1.cxx | 2
filter/source/graphicfilter/eps/eps.cxx | 2
filter/source/graphicfilter/idxf/dxfentrd.cxx | 2
filter/source/svg/svgwriter.cxx | 2
forms/source/component/EventThread.cxx | 4 -
formula/source/ui/dlg/parawin.cxx | 2
fpicker/source/office/RemoteFilesDialog.cxx | 2
framework/source/dispatch/dispatchdisabler.cxx | 2
framework/source/dispatch/interceptionhelper.cxx | 2
framework/source/jobs/jobresult.cxx | 2
framework/source/layoutmanager/toolbarlayoutmanager.cxx | 2
framework/source/services/autorecovery.cxx | 2
framework/source/uielement/thesaurusmenucontroller.cxx | 2
hwpfilter/source/hwpreader.cxx | 12 ++--
jvmfwk/source/elements.cxx | 4 -
l10ntools/source/propmerge.cxx | 2
l10ntools/source/treemerge.cxx | 2
lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx | 2
lingucomponent/source/languageguessing/guess.cxx | 2
lingucomponent/source/thesaurus/libnth/nthesimp.cxx | 2
linguistic/source/misc2.cxx | 2
oox/source/drawingml/chart/plotareaconverter.cxx | 2
oox/source/drawingml/chart/seriesconverter.cxx | 2
oox/source/drawingml/chart/typegroupconverter.cxx | 2
oox/source/drawingml/customshapeproperties.cxx | 6 +-
oox/source/drawingml/shape.cxx | 6 +-
oox/source/drawingml/textbody.cxx | 2
oox/source/drawingml/textparagraph.cxx | 6 +-
oox/source/vml/vmlformatting.cxx | 4 -
package/source/xstor/xstorage.cxx | 4 -
package/source/zippackage/ZipPackageFolder.cxx | 2
package/source/zippackage/zipfileaccess.cxx | 2
sc/source/core/data/dpoutput.cxx | 2
sc/source/core/data/dptabres.cxx | 2
sc/source/core/data/markdata.cxx | 4 -
sc/source/core/data/table3.cxx | 2
sc/source/core/opencl/op_statistical.cxx | 2
sc/source/filter/excel/excimp8.cxx | 2
sc/source/filter/excel/xepivotxml.cxx | 2
sc/source/filter/excel/xistyle.cxx | 2
sc/source/filter/html/htmlpars.cxx | 4 -
sc/source/filter/oox/formulabuffer.cxx | 10 +--
sc/source/filter/oox/formulaparser.cxx | 8 +--
sc/source/filter/xml/XMLExportIterator.cxx | 4 -
sc/source/filter/xml/xmlcelli.cxx | 2
sc/source/filter/xml/xmlexprt.cxx | 2
sc/source/ui/cctrl/checklistmenu.cxx | 4 -
sc/source/ui/docshell/docsh.cxx | 2
sc/source/ui/miscdlgs/conflictsdlg.cxx | 2
sc/source/ui/miscdlgs/datafdlg.cxx | 2
sc/source/ui/unoobj/cellsuno.cxx | 4 -
sc/source/ui/vba/vbaaxes.cxx | 2
sc/source/ui/view/cellsh.cxx | 2
sd/source/core/CustomAnimationPreset.cxx | 2
sd/source/filter/eppt/pptx-animations.cxx | 2
sd/source/ui/animations/CustomAnimationPane.cxx | 6 +-
sd/source/ui/dlg/TemplateScanner.cxx | 2
sd/source/ui/remotecontrol/Receiver.cxx | 2
sd/source/ui/sidebar/MasterPageContainer.cxx | 2
sd/source/ui/sidebar/MasterPageContainerQueue.cxx | 4 -
sd/source/ui/slideshow/slideshowimpl.cxx | 2
sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx | 2
sdext/source/minimizer/impoptimizer.cxx | 2
sdext/source/pdfimport/pdfparse/pdfentries.cxx | 2
sdext/source/presenter/PresenterTextView.cxx | 2
sdext/source/presenter/PresenterTimer.cxx | 2
sfx2/source/control/dispatch.cxx | 2
sfx2/source/control/thumbnailview.cxx | 2
sfx2/source/dialog/filedlghelper.cxx | 4 -
sfx2/source/dialog/filtergrouping.cxx | 2
sfx2/source/doc/doctemplateslocal.cxx | 2
sfx2/source/notebookbar/PriorityHBox.cxx | 2
sfx2/source/notify/globalevents.cxx | 2
slideshow/source/engine/smilfunctionparser.cxx | 2
sot/source/base/formats.cxx | 2
sot/source/unoolestorage/xolesimplestorage.cxx | 2
svgio/source/svgreader/svgdocumenthandler.cxx | 12 ++--
svgio/source/svgreader/svgstylenode.cxx | 2
svl/source/items/itempool.cxx | 2
svtools/source/brwbox/brwbox2.cxx | 2
svtools/source/contnr/svimpbox.cxx | 2
svtools/source/control/autocmpledit.cxx | 4 -
svtools/source/control/tabbar.cxx | 2
svtools/source/control/valueset.cxx | 4 -
svtools/source/dialogs/wizardmachine.cxx | 2
svtools/source/misc/templatefoldercache.cxx | 2
svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx | 2
svx/source/form/fmshimp.cxx | 4 -
svx/source/form/navigatortree.cxx | 6 +-
svx/source/sdr/attribute/sdrallfillattributeshelper.cxx | 4 -
svx/source/sdr/contact/viewcontactofe3d.cxx | 2
svx/source/sdr/overlay/overlaymanager.cxx | 2
svx/source/svdraw/svddrgmt.cxx | 2
svx/source/svdraw/svdedtv.cxx | 2
svx/source/svdraw/svdfmtf.cxx | 4 -
svx/source/svdraw/svdotextpathdecomposition.cxx | 2
svx/source/svdraw/svdpdf.cxx | 2
svx/source/svdraw/svdxcgv.cxx | 2
svx/source/table/tablertfimporter.cxx | 2
sw/source/core/access/accdoc.cxx | 2
sw/source/core/access/accportions.cxx | 2
sw/source/core/crsr/crstrvl.cxx | 8 +--
sw/source/core/crsr/trvlfnfl.cxx | 4 -
sw/source/core/crsr/viscrs.cxx | 2
sw/source/core/doc/DocumentContentOperationsManager.cxx | 2
sw/source/core/doc/DocumentRedlineManager.cxx | 2
sw/source/core/doc/docdraw.cxx | 2
sw/source/core/doc/docnum.cxx | 2
sw/source/core/doc/docsort.cxx | 2
sw/source/core/doc/htmltbl.cxx | 4 -
sw/source/core/doc/tblrwcl.cxx | 8 +--
sw/source/core/docnode/ndsect.cxx | 4 -
sw/source/core/docnode/node.cxx | 2
sw/source/core/edit/edlingu.cxx | 4 -
sw/source/core/frmedt/fecopy.cxx | 4 -
sw/source/core/frmedt/fefly1.cxx | 2
sw/source/core/frmedt/fetab.cxx | 2
sw/source/core/frmedt/tblsel.cxx | 6 +-
sw/source/core/layout/objstmpconsiderwrapinfl.cxx | 2
sw/source/core/layout/paintfrm.cxx | 2
sw/source/core/text/pormulti.cxx | 2
sw/source/core/undo/untblk.cxx | 2
sw/source/core/unocore/unocrsrhelper.cxx | 4 -
sw/source/core/unocore/unoredlines.cxx | 2
sw/source/core/view/pagepreviewlayout.cxx | 4 -
sw/source/filter/ascii/wrtasc.cxx | 2
sw/source/filter/html/htmlatr.cxx | 4 -
sw/source/filter/ww8/docxattributeoutput.cxx | 2
sw/source/filter/ww8/wrtw8nds.cxx | 4 -
sw/source/filter/ww8/wrtw8sty.cxx | 2
sw/source/filter/ww8/ww8par.cxx | 2
sw/source/filter/ww8/ww8par2.cxx | 2
sw/source/ui/dbui/createaddresslistdialog.cxx | 6 +-
sw/source/ui/dbui/mmoutputtypepage.cxx | 2
sw/source/uibase/app/docsh.cxx | 2
sw/source/uibase/dbui/dbmgr.cxx | 2
sw/source/uibase/dbui/maildispatcher.cxx | 2
sw/source/uibase/docvw/PostItMgr.cxx | 2
sw/source/uibase/misc/glosdoc.cxx | 2
sw/source/uibase/uiview/viewtab.cxx | 2
sw/source/uibase/uno/unotxvw.cxx | 2
test/source/screenshot_test.cxx | 4 -
ucb/source/ucp/ftp/ftpurl.cxx | 6 +-
unotools/source/config/dynamicmenuoptions.cxx | 2
unotools/source/misc/fontdefs.cxx | 6 +-
uui/source/iahndl-filter.cxx | 2
uui/source/iahndl.cxx | 2
vcl/opengl/gdiimpl.cxx | 2
vcl/source/bitmap/bitmappaint.cxx | 4 -
vcl/source/control/notebookbar.cxx | 2
vcl/source/control/tabctrl.cxx | 4 -
vcl/source/control/throbber.cxx | 2
vcl/source/edit/textdata.cxx | 2
vcl/source/edit/texteng.cxx | 2
vcl/source/gdi/gdimetafiletools.cxx | 10 +--
vcl/source/gdi/pdfextoutdevdata.cxx | 2
vcl/source/gdi/pdfwriter_impl.cxx | 14 ++---
vcl/source/gdi/pdfwriter_impl2.cxx | 2
vcl/source/gdi/print.cxx | 2
vcl/source/window/builder.cxx | 4 -
vcl/unx/generic/app/saldata.cxx | 2
vcl/unx/generic/printer/printerinfomanager.cxx | 2
vcl/workben/vcldemo.cxx | 2
writerfilter/source/dmapper/DomainMapperTableManager.cxx | 4 -
writerfilter/source/dmapper/DomainMapper_Impl.cxx | 4 -
writerfilter/source/dmapper/PropertyMap.cxx | 2
writerfilter/source/dmapper/TDefTableHandler.cxx | 12 ++--
xmloff/source/core/xmlictxt.cxx | 2
xmloff/source/script/XMLEventImportHelper.cxx | 2
xmloff/source/style/PageMasterImportContext.cxx | 2
xmloff/source/style/prstylei.cxx | 6 +-
xmloff/source/text/XMLRedlineExport.cxx | 2
xmloff/source/text/txtlists.cxx | 2
xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx | 2
239 files changed, 371 insertions(+), 371 deletions(-)
New commits:
commit 2c1b7e8d6a7fa22cb91919238418816671c3a497
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Fri Oct 19 08:12:17 2018 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri Oct 19 10:02:39 2018 +0200
clang-tidy readability-container-size-empty
Change-Id: I1df70b7dff5ebb6048f7fc618789faa15ca5d422
Reviewed-on: https://gerrit.libreoffice.org/61967
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index 4cbd2fe8c6b0..627c62eb0ec9 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -877,7 +877,7 @@ void EditorWindow::HandleCodeCompletion()
std::vector< OUString > aMethVect = aTypeCompletor.GetXIdlClassMethods();//methods
aEntryVect.insert(aEntryVect.end(), aMethVect.begin(), aMethVect.end() );
}
- if( aEntryVect.size() > 0 )
+ if( !aEntryVect.empty() )
SetupAndShowCodeCompleteWnd( aEntryVect, aSel );
}
}
diff --git a/basegfx/source/polygon/b2dpolypolygontools.cxx b/basegfx/source/polygon/b2dpolypolygontools.cxx
index 067c70ff3eb1..20c92eef08bc 100644
--- a/basegfx/source/polygon/b2dpolypolygontools.cxx
+++ b/basegfx/source/polygon/b2dpolypolygontools.cxx
@@ -219,7 +219,7 @@ namespace basegfx
void applyLineDashing(const B2DPolyPolygon& rCandidate, const std::vector<double>& rDotDashArray, B2DPolyPolygon* pLineTarget, double fFullDashDotLen)
{
- if(fFullDashDotLen == 0.0 && rDotDashArray.size())
+ if(fFullDashDotLen == 0.0 && !rDotDashArray.empty())
{
// calculate fFullDashDotLen from rDotDashArray
fFullDashDotLen = std::accumulate(rDotDashArray.begin(), rDotDashArray.end(), 0.0);
diff --git a/basegfx/source/polygon/b2dtrapezoid.cxx b/basegfx/source/polygon/b2dtrapezoid.cxx
index f59d1f16bb21..9bff42a0d0a6 100644
--- a/basegfx/source/polygon/b2dtrapezoid.cxx
+++ b/basegfx/source/polygon/b2dtrapezoid.cxx
@@ -210,7 +210,7 @@ namespace basegfx
~PointBlockAllocator()
{
- while(maBlocks.size() > 0)
+ while(!maBlocks.empty())
{
delete [] maBlocks.back();
maBlocks.pop_back();
diff --git a/basegfx/source/raster/rasterconvert3d.cxx b/basegfx/source/raster/rasterconvert3d.cxx
index ef9ba7dd8bbe..d6169b7ad9fe 100644
--- a/basegfx/source/raster/rasterconvert3d.cxx
+++ b/basegfx/source/raster/rasterconvert3d.cxx
@@ -74,7 +74,7 @@ namespace basegfx
// get scanlines first LineNumber as start
sal_Int32 nLineNumber(std::max(aCurrentEntry->getY(), nStartLine));
- while((aCurrentLine.size() || aCurrentEntry != maLineEntries.end()) && (nLineNumber < nStopLine))
+ while((!aCurrentLine.empty() || aCurrentEntry != maLineEntries.end()) && (nLineNumber < nStopLine))
{
// add all entries which start at current line to current scanline
while(aCurrentEntry != maLineEntries.end())
diff --git a/basegfx/test/basegfx2d.cxx b/basegfx/test/basegfx2d.cxx
index acc28f91014b..9af87302847a 100644
--- a/basegfx/test/basegfx2d.cxx
+++ b/basegfx/test/basegfx2d.cxx
@@ -700,7 +700,7 @@ public:
B2DTrapezoidVector aVector;
basegfx::utils::trapezoidSubdivide(aVector, aPolyPolygon);
CPPUNIT_ASSERT_MESSAGE("more than zero sub-divided trapezoids",
- aVector.size() > 0);
+ !aVector.empty());
}
// Change the following lines only, if you add, remove or rename
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx
index 434b5ffd36ae..944836865545 100644
--- a/basic/source/classes/sb.cxx
+++ b/basic/source/classes/sb.cxx
@@ -1149,7 +1149,7 @@ void SbModule::implProcessModuleRunInit( ModuleInitDependencyMap& rMap, ClassMod
if( pModule->pClassData != nullptr )
{
std::vector< OUString >& rReqTypes = pModule->pClassData->maRequiredTypes;
- if( rReqTypes.size() > 0 )
+ if( !rReqTypes.empty() )
{
for( const auto& rStr : rReqTypes )
{
diff --git a/canvas/source/cairo/cairo_textlayout.cxx b/canvas/source/cairo/cairo_textlayout.cxx
index 49cf24da5214..bce2469d6b9d 100644
--- a/canvas/source/cairo/cairo_textlayout.cxx
+++ b/canvas/source/cairo/cairo_textlayout.cxx
@@ -460,7 +460,7 @@ namespace cairocanvas
"Size:(" << aFont.GetAverageFontWidth() << "," << aFont.GetFontHeight()
<< "), Pos (" << rOutpos.X() << "," << rOutpos.Y()
<< "), G("
- << (cairo_glyphs.size() > 0 ? cairo_glyphs[0].index : -1)
+ << (!cairo_glyphs.empty() ? cairo_glyphs[0].index : -1)
<< ","
<< (cairo_glyphs.size() > 1 ? cairo_glyphs[1].index : -1)
<< ","
diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
index 2a05b9303f5f..c554cf3f7f30 100644
--- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
@@ -1453,7 +1453,7 @@ bool WrappedNumberOfLinesProperty::detectInnerValue( uno::Any& rInnerValue ) con
{
std::vector< uno::Reference< chart2::XDataSeries > > aSeriesVector(
DiagramHelper::getDataSeriesFromDiagram( xDiagram ) );
- if( aSeriesVector.size() > 0 )
+ if( !aSeriesVector.empty() )
{
Reference< lang::XMultiServiceFactory > xFact( xChartDoc->getChartTypeManager(), uno::UNO_QUERY );
DiagramHelper::tTemplateWithServiceName aTemplateAndService =
diff --git a/chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx
index 4ede52c2bec9..ce856e20b60a 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx
@@ -131,7 +131,7 @@ css::uno::Any WrappedVolumeProperty::getPropertyValue( const css::uno::Reference
{
std::vector< uno::Reference< chart2::XDataSeries > > aSeriesVector(
DiagramHelper::getDataSeriesFromDiagram( xDiagram ) );
- if( aSeriesVector.size() > 0 )
+ if( !aSeriesVector.empty() )
{
Reference< lang::XMultiServiceFactory > xFact( xChartDoc->getChartTypeManager(), uno::UNO_QUERY );
DiagramHelper::tTemplateWithServiceName aTemplateAndService =
@@ -196,7 +196,7 @@ css::uno::Any WrappedUpDownProperty::getPropertyValue( const css::uno::Reference
{
std::vector< uno::Reference< chart2::XDataSeries > > aSeriesVector(
DiagramHelper::getDataSeriesFromDiagram( xDiagram ) );
- if( aSeriesVector.size() > 0 )
+ if( !aSeriesVector.empty() )
{
Reference< lang::XMultiServiceFactory > xFact( xChartDoc->getChartTypeManager(), uno::UNO_QUERY );
DiagramHelper::tTemplateWithServiceName aTemplateAndService =
diff --git a/chart2/source/model/main/Diagram.cxx b/chart2/source/model/main/Diagram.cxx
index 0e627e6787e6..61b531cfc419 100644
--- a/chart2/source/model/main/Diagram.cxx
+++ b/chart2/source/model/main/Diagram.cxx
@@ -482,7 +482,7 @@ void SAL_CALL Diagram::addCoordinateSystem(
!= m_aCoordSystems.end())
throw lang::IllegalArgumentException();
- if( m_aCoordSystems.size()>=1 )
+ if( !m_aCoordSystems.empty() )
{
OSL_FAIL( "more than one coordinatesystem is not supported yet by the fileformat" );
return;
diff --git a/chart2/source/view/charttypes/BarChart.cxx b/chart2/source/view/charttypes/BarChart.cxx
index 70e8e62f5824..6c50ba35aeea 100644
--- a/chart2/source/view/charttypes/BarChart.cxx
+++ b/chart2/source/view/charttypes/BarChart.cxx
@@ -924,7 +924,7 @@ void BarChart::createShapes()
for( auto const& rZSlot : m_aZSlots )
{
BarPositionHelper* pPosHelper = m_pMainPosHelper.get();
- if( rZSlot.size() )
+ if( !rZSlot.empty() )
{
sal_Int32 nAttachedAxisIndex = rZSlot.front().getAttachedAxisIndexForFirstSeries();
//2ND_AXIS_IN_BARS so far one can assume to have the same plotter for each z slot
diff --git a/chart2/source/view/charttypes/CandleStickChart.cxx b/chart2/source/view/charttypes/CandleStickChart.cxx
index cff376eac322..e3ed188f4ea7 100644
--- a/chart2/source/view/charttypes/CandleStickChart.cxx
+++ b/chart2/source/view/charttypes/CandleStickChart.cxx
@@ -145,7 +145,7 @@ void CandleStickChart::createShapes()
{
sal_Int32 nAttachedAxisIndex = 0;
BarPositionHelper* pPosHelper = m_pMainPosHelper.get();
- if( rZSlot.size() )
+ if( !rZSlot.empty() )
{
nAttachedAxisIndex = rZSlot.front().getAttachedAxisIndexForFirstSeries();
//2ND_AXIS_IN_BARS so far one can assume to have the same plotter for each z slot
diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx
index 0a3716df0f98..47fe81a1ab98 100644
--- a/chart2/source/view/charttypes/VSeriesPlotter.cxx
+++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx
@@ -1573,7 +1573,7 @@ double VSeriesPlotter::getMinimumZ()
}
double VSeriesPlotter::getMaximumZ()
{
- if( m_nDimension!=3 || !m_aZSlots.size() )
+ if( m_nDimension!=3 || m_aZSlots.empty() )
return getMinimumZ()+1;
return m_aZSlots.size();
}
diff --git a/comphelper/source/container/container.cxx b/comphelper/source/container/container.cxx
index a9edef8a458f..1a6132e0d65a 100644
--- a/comphelper/source/container/container.cxx
+++ b/comphelper/source/container/container.cxx
@@ -72,7 +72,7 @@ css::uno::Reference< css::uno::XInterface> const & IndexAccessIterator::Next()
}
else
{ // otherwise, look above and to the right, if possible
- while (m_arrChildIndizies.size() > 0)
+ while (!m_arrChildIndizies.empty())
{ // If the list isn't empty and there's nothing above
css::uno::Reference< css::container::XChild> xChild(xSearchLoop, css::uno::UNO_QUERY);
OSL_ENSURE(xChild.is(), "IndexAccessIterator::Next : a content has no appropriate interface !");
diff --git a/comphelper/source/container/embeddedobjectcontainer.cxx b/comphelper/source/container/embeddedobjectcontainer.cxx
index 456c1f605bdc..cd927faa2bb8 100644
--- a/comphelper/source/container/embeddedobjectcontainer.cxx
+++ b/comphelper/source/container/embeddedobjectcontainer.cxx
@@ -234,7 +234,7 @@ uno::Sequence < OUString > EmbeddedObjectContainer::GetObjectNames() const
bool EmbeddedObjectContainer::HasEmbeddedObjects() const
{
- return pImpl->maObjectContainer.size() != 0;
+ return !pImpl->maObjectContainer.empty();
}
bool EmbeddedObjectContainer::HasEmbeddedObject( const OUString& rName )
diff --git a/comphelper/source/misc/numberedcollection.cxx b/comphelper/source/misc/numberedcollection.cxx
index 8b742d295cf9..8f5f2061fc1c 100644
--- a/comphelper/source/misc/numberedcollection.cxx
+++ b/comphelper/source/misc/numberedcollection.cxx
@@ -221,7 +221,7 @@ OUString SAL_CALL NumberedCollection::getUntitledPrefix()
impl_cleanUpDeadItems(m_lComponents, lDeadItems);
// a) non free numbers ... return INVALID_NUMBER
- if (lPossibleNumbers.size () < 1)
+ if (lPossibleNumbers.empty())
return css::frame::UntitledNumbersConst::INVALID_NUMBER;
// b) return first free number
diff --git a/comphelper/source/xml/ofopxmlhelper.cxx b/comphelper/source/xml/ofopxmlhelper.cxx
index 4a2bf122b39e..99ccf04f7ae2 100644
--- a/comphelper/source/xml/ofopxmlhelper.cxx
+++ b/comphelper/source/xml/ofopxmlhelper.cxx
@@ -291,7 +291,7 @@ OFOPXMLHelper_Impl::OFOPXMLHelper_Impl( sal_uInt16 nFormat )
uno::Sequence< uno::Sequence< beans::StringPair > > const & OFOPXMLHelper_Impl::GetParsingResult() const
{
- if ( m_aElementsSeq.size() )
+ if ( !m_aElementsSeq.empty() )
throw uno::RuntimeException(); // the parsing has still not finished!
return m_aResultSeq;
diff --git a/connectivity/source/commontools/FDatabaseMetaDataResultSetMetaData.cxx b/connectivity/source/commontools/FDatabaseMetaDataResultSetMetaData.cxx
index 3a034b45d9a3..3b17ce8f54c9 100644
--- a/connectivity/source/commontools/FDatabaseMetaDataResultSetMetaData.cxx
+++ b/connectivity/source/commontools/FDatabaseMetaDataResultSetMetaData.cxx
@@ -36,7 +36,7 @@ ODatabaseMetaDataResultSetMetaData::~ODatabaseMetaDataResultSetMetaData()
sal_Int32 SAL_CALL ODatabaseMetaDataResultSetMetaData::getColumnDisplaySize( sal_Int32 column )
{
- 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.getColumnDisplaySize();
return 0;
@@ -44,7 +44,7 @@ sal_Int32 SAL_CALL ODatabaseMetaDataResultSetMetaData::getColumnDisplaySize( sal
sal_Int32 SAL_CALL ODatabaseMetaDataResultSetMetaData::getColumnType( sal_Int32 column )
{
- 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.getColumnType();
return 1;
}
@@ -56,7 +56,7 @@ sal_Int32 SAL_CALL ODatabaseMetaDataResultSetMetaData::getColumnCount( )
sal_Bool SAL_CALL ODatabaseMetaDataResultSetMetaData::isCaseSensitive( sal_Int32 column )
{
- 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 true;
}
@@ -68,14 +68,14 @@ OUString SAL_CALL ODatabaseMetaDataResultSetMetaData::getSchemaName( sal_Int32 /
OUString SAL_CALL ODatabaseMetaDataResultSetMetaData::getColumnName( sal_Int32 column )
{
- 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.getColumnName();
return OUString();
}
OUString SAL_CALL ODatabaseMetaDataResultSetMetaData::getTableName( sal_Int32 column )
{
- 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();
}
@@ -92,7 +92,7 @@ OUString SAL_CALL ODatabaseMetaDataResultSetMetaData::getColumnTypeName( sal_Int
OUString SAL_CALL ODatabaseMetaDataResultSetMetaData::getColumnLabel( sal_Int32 column )
{
- 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.getColumnLabel();
return getColumnName(column);
}
@@ -104,35 +104,35 @@ OUString SAL_CALL ODatabaseMetaDataResultSetMetaData::getColumnServiceName( sal_
sal_Bool SAL_CALL ODatabaseMetaDataResultSetMetaData::isCurrency( sal_Int32 column )
{
- 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.isCurrency();
return false;
}
sal_Bool SAL_CALL ODatabaseMetaDataResultSetMetaData::isAutoIncrement( sal_Int32 column )
{
- 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 false;
}
sal_Bool SAL_CALL ODatabaseMetaDataResultSetMetaData::isSigned( sal_Int32 column )
{
- 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.isSigned();
return false;
}
sal_Int32 SAL_CALL ODatabaseMetaDataResultSetMetaData::getPrecision( sal_Int32 column )
{
- 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.getPrecision();
return 0;
}
sal_Int32 SAL_CALL ODatabaseMetaDataResultSetMetaData::getScale( sal_Int32 column )
{
- 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.getScale();
return 0;
@@ -140,7 +140,7 @@ sal_Int32 SAL_CALL ODatabaseMetaDataResultSetMetaData::getScale( sal_Int32 colum
sal_Int32 SAL_CALL ODatabaseMetaDataResultSetMetaData::isNullable( sal_Int32 column )
{
- 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.isNullable();
return sal_Int32(false);
@@ -148,7 +148,7 @@ sal_Int32 SAL_CALL ODatabaseMetaDataResultSetMetaData::isNullable( sal_Int32 col
sal_Bool SAL_CALL ODatabaseMetaDataResultSetMetaData::isSearchable( sal_Int32 column )
{
- 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 true;
}
diff --git a/connectivity/source/commontools/RowFunctionParser.cxx b/connectivity/source/commontools/RowFunctionParser.cxx
index f5942c8f7b0f..0bf991deabd1 100644
--- a/connectivity/source/commontools/RowFunctionParser.cxx
+++ b/connectivity/source/commontools/RowFunctionParser.cxx
@@ -253,7 +253,7 @@ public:
ParserContext::OperandStack& rNodeStack( mpContext->maOperandStack );
- if( rNodeStack.size() < 1 )
+ if( rNodeStack.empty() )
throw ParseError( "Not enough arguments for unary operator" );
// retrieve arguments
diff --git a/connectivity/source/commontools/TTableHelper.cxx b/connectivity/source/commontools/TTableHelper.cxx
index 7b9bb2e52984..a52bb4e97642 100644
--- a/connectivity/source/commontools/TTableHelper.cxx
+++ b/connectivity/source/commontools/TTableHelper.cxx
@@ -348,7 +348,7 @@ void OTableHelper::refreshPrimaryKeys(::std::vector< OUString>& _rNames)
if(bAlreadyFetched)
{
SAL_WARN_IF(aPkName.isEmpty(),"connectivity.commontools", "empty Primary Key name");
- SAL_WARN_IF(pKeyProps->m_aKeyColumnNames.size() == 0,"connectivity.commontools", "Primary Key has no columns");
+ SAL_WARN_IF(pKeyProps->m_aKeyColumnNames.empty(),"connectivity.commontools", "Primary Key has no columns");
m_pImpl->m_aKeys.emplace(aPkName,pKeyProps);
_rNames.push_back(aPkName);
}
diff --git a/connectivity/source/commontools/parameters.cxx b/connectivity/source/commontools/parameters.cxx
index e1184f3d69ee..ffa43f04644a 100644
--- a/connectivity/source/commontools/parameters.cxx
+++ b/connectivity/source/commontools/parameters.cxx
@@ -735,7 +735,7 @@ namespace dbtools
// fill the parameters from the master-detail relationship
Reference< XNameAccess > xParentColumns;
- if ( getParentColumns( xParentColumns, false ) && xParentColumns->hasElements() && m_aMasterFields.size() )
+ if ( getParentColumns( xParentColumns, false ) && xParentColumns->hasElements() && !m_aMasterFields.empty() )
fillLinkedParameters( xParentColumns );
// let the user (via the interaction handler) fill all remaining parameters
diff --git a/connectivity/source/drivers/mork/MPreparedStatement.cxx b/connectivity/source/drivers/mork/MPreparedStatement.cxx
index 442dc9060822..b252a02b070b 100644
--- a/connectivity/source/drivers/mork/MPreparedStatement.cxx
+++ b/connectivity/source/drivers/mork/MPreparedStatement.cxx
@@ -436,7 +436,7 @@ void OPreparedStatement::describeParameter()
{
m_xParamColumns = new OSQLColumns();
const OSQLTables& rTabs = m_pSQLIterator->getTables();
- if(rTabs.size())
+ if(!rTabs.empty())
{
OSQLTable xTable = rTabs.begin()->second;
for (auto const& parseNode : aParseNodes)
diff --git a/connectivity/source/drivers/mork/MorkParser.cxx b/connectivity/source/drivers/mork/MorkParser.cxx
index 0b31c3e0e4cc..989455c37593 100644
--- a/connectivity/source/drivers/mork/MorkParser.cxx
+++ b/connectivity/source/drivers/mork/MorkParser.cxx
@@ -324,7 +324,7 @@ bool MorkParser::parseCell()
if ( NP::Rows != nowParsing_ )
{
// Dicts
- if ( "" != Text )
+ if ( !Text.empty() )
{
if ( nowParsing_ == NP::Columns )
{
@@ -338,7 +338,7 @@ bool MorkParser::parseCell()
}
else
{
- if ( "" != Text )
+ if ( !Text.empty() )
{
// Rows
//int ValueId = string( Text.c_str() ).toInt( 0, 16 );
diff --git a/connectivity/source/drivers/odbc/OResultSet.cxx b/connectivity/source/drivers/odbc/OResultSet.cxx
index a35a52182760..ec48bf8db798 100644
--- a/connectivity/source/drivers/odbc/OResultSet.cxx
+++ b/connectivity/source/drivers/odbc/OResultSet.cxx
@@ -190,7 +190,7 @@ SQLRETURN OResultSet::unbind(bool _bUnbindHandle)
if ( _bUnbindHandle )
nRet = N3SQLFreeStmt(m_aStatementHandle,SQL_UNBIND);
- if ( m_aBindVector.size() > 0 )
+ if ( !m_aBindVector.empty() )
{
TVoidVector::iterator pValue = m_aBindVector.begin();
TVoidVector::const_iterator pEnd = m_aBindVector.end();
diff --git a/connectivity/source/drivers/postgresql/pq_statement.cxx b/connectivity/source/drivers/postgresql/pq_statement.cxx
index d22e2b7a0433..17276c94925f 100644
--- a/connectivity/source/drivers/postgresql/pq_statement.cxx
+++ b/connectivity/source/drivers/postgresql/pq_statement.cxx
@@ -389,7 +389,7 @@ static std::vector< OUString > lookupKeys(
// printf( "\n" );
}
}
- if( ! ret.size() )
+ if( ret.empty() )
{
if (isLog(pSettings, LogLevel::Info))
{
@@ -498,7 +498,7 @@ bool executePostgresCommand( const OString & cmd, struct CommandData *data )
}
}
- if( sourceTableKeys.size() && i == static_cast<int>(sourceTableKeys.size()) )
+ if( !sourceTableKeys.empty() && i == static_cast<int>(sourceTableKeys.size()) )
{
*(data->pLastResultset) =
UpdateableResultSet::createFromPGResultSet(
@@ -514,7 +514,7 @@ bool executePostgresCommand( const OString & cmd, struct CommandData *data )
buf.append( "." );
aReason = buf.makeStringAndClear();
}
- else if( sourceTableKeys.size() )
+ else if( !sourceTableKeys.empty() )
{
OStringBuffer buf( 128 );
buf.append( "can't support updateable resultset for table " );
diff --git a/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx b/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx
index 0d503693f5b3..fa4b8b5c1de8 100644
--- a/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx
+++ b/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx
@@ -164,7 +164,7 @@ css::uno::Sequence< sal_Int8> UpdateableResultSet::getImplementationId()
OUString UpdateableResultSet::buildWhereClause()
{
OUString ret;
- if( m_primaryKey.size() )
+ if( !m_primaryKey.empty() )
{
OUStringBuffer buf( 128 );
buf.append( " WHERE " );
diff --git a/connectivity/source/sdbcx/VCollection.cxx b/connectivity/source/sdbcx/VCollection.cxx
index 70f15dc4bd9d..f620f5ebdf50 100644
--- a/connectivity/source/sdbcx/VCollection.cxx
+++ b/connectivity/source/sdbcx/VCollection.cxx
@@ -104,7 +104,7 @@ namespace
virtual void reFill(const ::std::vector< OUString> &_rVector) override
{
- OSL_ENSURE(!m_aNameMap.size(),"OCollection::reFill: collection isn't empty");
+ OSL_ENSURE(m_aNameMap.empty(),"OCollection::reFill: collection isn't empty");
m_aElements.reserve(_rVector.size());
for (auto const& elem : _rVector)
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 3d48ae269a56..70644c7ed9d3 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -864,7 +864,7 @@ bool ContextMenuSaveInData::HasURL( const OUString& rURL )
bool ContextMenuSaveInData::HasSettings()
{
- return m_pRootEntry && m_pRootEntry->GetEntries()->size();
+ return m_pRootEntry && !m_pRootEntry->GetEntries()->empty();
}
bool ContextMenuSaveInData::Apply()
@@ -2473,7 +2473,7 @@ ToolbarSaveInData::HasURL( const OUString& rURL )
bool ToolbarSaveInData::HasSettings()
{
// return true if there is at least one toolbar entry
- return GetEntries()->size() > 0;
+ return !GetEntries()->empty();
}
void ToolbarSaveInData::Reset()
diff --git a/cui/source/options/cfgchart.cxx b/cui/source/options/cfgchart.cxx
index 5d97a788fa2f..474cb0e9c4dd 100644
--- a/cui/source/options/cfgchart.cxx
+++ b/cui/source/options/cfgchart.cxx
@@ -69,7 +69,7 @@ void SvxChartColorTable::append( const XColorEntry & _rEntry )
void SvxChartColorTable::remove( size_t _nIndex )
{
- if (m_aColorEntries.size() > 0)
+ if (!m_aColorEntries.empty())
m_aColorEntries.erase( m_aColorEntries.begin() + _nIndex);
for (size_t i=0 ; i<m_aColorEntries.size(); i++)
diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx
index 1a80a97b1438..49ea86844901 100644
--- a/cui/source/options/optsave.cxx
+++ b/cui/source/options/optsave.cxx
@@ -565,7 +565,7 @@ IMPL_LINK( SvxSaveTabPage, FilterHdl_Impl, ListBox&, rBox, void )
{
aSaveAsLB->Clear();
auto & rFilters = pImpl->aFilterArr[nData];
- if(!pImpl->aUIFilterArr[nData].size())
+ if(pImpl->aUIFilterArr[nData].empty())
{
pImpl->aUIFilterArr[nData].resize(pImpl->aFilterArr[nData].size());
auto & rUIFilters = pImpl->aUIFilterArr[nData];
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 7002296cf0da..47d3a7ffcaa7 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -1946,11 +1946,11 @@ VectorOfNodes OfaTreeOptionsDialog::LoadNodes(
if ( !sLeafGrpId.isEmpty() )
{
bool bAlreadyOpened = false;
- if ( pNode->m_aGroupedLeaves.size() > 0 )
+ if ( !pNode->m_aGroupedLeaves.empty() )
{
for (auto & rGroup : pNode->m_aGroupedLeaves)
{
- if ( rGroup.size() > 0 &&
+ if ( !rGroup.empty() &&
rGroup[0]->m_sGroupId == sLeafGrpId )
{
std::vector<std::unique_ptr<OptionsLeaf>>::size_type l = 0;
@@ -1980,14 +1980,14 @@ VectorOfNodes OfaTreeOptionsDialog::LoadNodes(
}
// do not insert nodes without leaves
- if ( pNode->m_aLeaves.size() > 0 || pNode->m_aGroupedLeaves.size() > 0 )
+ if ( !pNode->m_aLeaves.empty() || !pNode->m_aGroupedLeaves.empty() )
{
pModule ? aNodeList.push_back( std::move(pNode) ) : aOutNodeList.push_back( std::move(pNode) );
}
}
}
- if ( pModule && aNodeList.size() > 0 )
+ if ( pModule && !aNodeList.empty() )
{
for ( auto const & i: pModule->m_aNodeList )
{
@@ -2057,7 +2057,7 @@ void OfaTreeOptionsDialog::InsertNodes( const VectorOfNodes& rNodeList )
{
for (auto const& node : rNodeList)
{
- if ( node->m_aLeaves.size() > 0 || node->m_aGroupedLeaves.size() > 0 )
+ if ( !node->m_aLeaves.empty() || !node->m_aGroupedLeaves.empty() )
{
for ( auto const & j: node->m_aGroupedLeaves )
{
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index 2fdb140df21c..20e8429ba0ec 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -2308,7 +2308,7 @@ void OfaAutoCompleteTabPage::Reset( const SfxItemSet* )
}
}
- if (pOpt->m_pAutoCompleteList && pOpt->m_pAutoCompleteList->size())
+ if (pOpt->m_pAutoCompleteList && !pOpt->m_pAutoCompleteList->empty())
{
m_pAutoCompleteList = const_cast<editeng::SortedAutoCompleteStrings*>(
pOpt->m_pAutoCompleteList);
diff --git a/dbaccess/source/filter/hsqldb/fbcreateparser.cxx b/dbaccess/source/filter/hsqldb/fbcreateparser.cxx
index aed3552536e3..ad5fa6e65aa4 100644
--- a/dbaccess/source/filter/hsqldb/fbcreateparser.cxx
+++ b/dbaccess/source/filter/hsqldb/fbcreateparser.cxx
@@ -138,7 +138,7 @@ OUString FbCreateStmtParser::compose() const
}
// Firebird SQL dialect does not like parameters for TIMESTAMP
- if (params.size() > 0 && columnIter->getDataType() != DataType::TIMESTAMP)
+ if (!params.empty() && columnIter->getDataType() != DataType::TIMESTAMP)
{
sSql.append("(");
auto it = params.cbegin();
diff --git a/dbaccess/source/filter/hsqldb/hsqlimport.cxx b/dbaccess/source/filter/hsqldb/hsqlimport.cxx
index 54fdb7411f4d..2a098476b62e 100644
--- a/dbaccess/source/filter/hsqldb/hsqlimport.cxx
+++ b/dbaccess/source/filter/hsqldb/hsqlimport.cxx
@@ -284,7 +284,7 @@ void HsqlImporter::parseTableRows(const IndexVector& rIndexes,
Reference<XInputStream> xInput = xStream->getInputStream();
rowInput.setInputStream(xInput);
- if (rIndexes.size() > 0)
+ if (!rIndexes.empty())
{
HsqlBinaryNode aPrimaryNode{ rIndexes.at(0) };
processTree(aPrimaryNode, rowInput, rColTypes, sTableName, rIndexes.size());
@@ -313,7 +313,7 @@ void HsqlImporter::importHsqlDatabase()
auto statements = parser.getCreateStatements();
- if (statements.size() < 1 && !pException)
+ if (statements.empty() && !pException)
{
SAL_WARN("dbaccess", "dbashql: there is nothing to import");
return; // there is nothing to import
diff --git a/dbaccess/source/ui/browser/formadapter.cxx b/dbaccess/source/ui/browser/formadapter.cxx
index cc6b13e6e2f8..d2a0baaafa5c 100644
--- a/dbaccess/source/ui/browser/formadapter.cxx
+++ b/dbaccess/source/ui/browser/formadapter.cxx
@@ -1484,7 +1484,7 @@ Type SAL_CALL SbaXFormAdapter::getElementType()
sal_Bool SAL_CALL SbaXFormAdapter::hasElements()
{
- return m_aChildren.size() > 0;
+ return !m_aChildren.empty();
}
// css::container::XIndexContainer
diff --git a/dbaccess/source/ui/dlg/indexdialog.cxx b/dbaccess/source/ui/dlg/indexdialog.cxx
index 4934f79d886a..30f94d19f973 100644
--- a/dbaccess/source/ui/dlg/indexdialog.cxx
+++ b/dbaccess/source/ui/dlg/indexdialog.cxx
@@ -677,7 +677,7 @@ namespace dbaui
bool DbaIndexDialog::implCheckPlausibility(const Indexes::const_iterator& _rPos)
{
// need at least one field
- if (0 == _rPos->aFields.size())
+ if (_rPos->aFields.empty())
{
std::unique_ptr<weld::MessageDialog> xError(Application::CreateMessageDialog(GetFrameWeld(),
VclMessageType::Warning, VclButtonsType::Ok,
diff --git a/dbaccess/source/ui/misc/WColumnSelect.cxx b/dbaccess/source/ui/misc/WColumnSelect.cxx
index b790b651bbcc..b5842210655e 100644
--- a/dbaccess/source/ui/misc/WColumnSelect.cxx
+++ b/dbaccess/source/ui/misc/WColumnSelect.cxx
@@ -184,7 +184,7 @@ bool OWizColumnSelect::LeavePage()
if ( m_pParent->GetPressedButton() == OCopyTableWizard::WIZARD_NEXT
|| m_pParent->GetPressedButton() == OCopyTableWizard::WIZARD_FINISH
)
- return m_pParent->getDestColumns().size() != 0;
+ return !m_pParent->getDestColumns().empty();
else
return true;
}
diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx b/dbaccess/source/ui/misc/WCopyTable.cxx
index 7d49411122a5..0660be262c9b 100644
--- a/dbaccess/source/ui/misc/WCopyTable.cxx
+++ b/dbaccess/source/ui/misc/WCopyTable.cxx
@@ -661,7 +661,7 @@ void OCopyTableWizard::construct()
m_pbNext->GrabFocus();
- if (m_vDestColumns.size())
+ if (!m_vDestColumns.empty())
// source is a html or rtf table
m_pbNext->SetStyle(m_pbFinish->GetStyle() | WB_DEFBUTTON);
else
diff --git a/dbaccess/source/ui/querydesign/QueryTableView.cxx b/dbaccess/source/ui/querydesign/QueryTableView.cxx
index 2e462c444dac..4ac149299450 100644
--- a/dbaccess/source/ui/querydesign/QueryTableView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryTableView.cxx
@@ -209,7 +209,7 @@ sal_Int32 OQueryTableView::CountTableAlias(const OUString& rName, sal_Int32& rMa
void OQueryTableView::ReSync()
{
TTableWindowData& rTabWinDataList = m_pView->getController().getTableWindowData();
- OSL_ENSURE((getTableConnections().size()==0) && (GetTabWinMap().size()==0),
+ OSL_ENSURE((getTableConnections().empty()) && (GetTabWinMap().empty()),
"before calling OQueryTableView::ReSync() please call ClearAll !");
// I need a collection of all window names that cannot be created so that I do not initialize connections for them.
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index 1d41456adda8..69f2b3ac2bfb 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -290,16 +290,16 @@ void DesktopLOKTest::testGetStyles()
char* pJSON = pDocument->m_pDocumentClass->getCommandValues(pDocument, ".uno:StyleApply");
std::stringstream aStream(pJSON);
boost::property_tree::read_json(aStream, aTree);
- CPPUNIT_ASSERT( aTree.size() > 0 );
+ CPPUNIT_ASSERT( !aTree.empty() );
CPPUNIT_ASSERT_EQUAL( std::string(".uno:StyleApply"), aTree.get_child("commandName").get_value<std::string>() );
boost::property_tree::ptree aValues = aTree.get_child("commandValues");
- CPPUNIT_ASSERT( aValues.size() > 0 );
+ CPPUNIT_ASSERT( !aValues.empty() );
for (const auto& rPair : aValues)
{
if( rPair.first != "ClearStyle")
{
- CPPUNIT_ASSERT( rPair.second.size() > 0);
+ CPPUNIT_ASSERT( !rPair.second.empty());
}
if (rPair.first != "CharacterStyles" &&
rPair.first != "ParagraphStyles" &&
@@ -326,15 +326,15 @@ void DesktopLOKTest::testGetFonts()
char* pJSON = pDocument->m_pDocumentClass->getCommandValues(pDocument, ".uno:CharFontName");
std::stringstream aStream(pJSON);
boost::property_tree::read_json(aStream, aTree);
- CPPUNIT_ASSERT( aTree.size() > 0 );
+ CPPUNIT_ASSERT( !aTree.empty() );
CPPUNIT_ASSERT_EQUAL( std::string(".uno:CharFontName"), aTree.get_child("commandName").get_value<std::string>() );
boost::property_tree::ptree aValues = aTree.get_child("commandValues");
- CPPUNIT_ASSERT( aValues.size() > 0 );
+ CPPUNIT_ASSERT( !aValues.empty() );
for (const auto& rPair : aValues)
{
// check that we have font sizes available for each font
- CPPUNIT_ASSERT( rPair.second.size() > 0);
+ CPPUNIT_ASSERT( !rPair.second.empty());
}
free(pJSON);
comphelper::LibreOfficeKit::setActive(false);
@@ -401,7 +401,7 @@ void DesktopLOKTest::testGetFilterTypes()
boost::property_tree::ptree aTree;
boost::property_tree::read_json(aStream, aTree);
- CPPUNIT_ASSERT(aTree.size() > 0);
+ CPPUNIT_ASSERT(!aTree.empty());
CPPUNIT_ASSERT_EQUAL(std::string("application/vnd.oasis.opendocument.text"), aTree.get_child("writer8").get_child("MediaType").get_value<std::string>());
free(pJSON);
comphelper::LibreOfficeKit::setActive(false);
@@ -1930,10 +1930,10 @@ void DesktopLOKTest::testGetFontSubset()
char* pJSON = pDocument->m_pDocumentClass->getCommandValues(pDocument, aCommand.getStr());
std::stringstream aStream(pJSON);
boost::property_tree::read_json(aStream, aTree);
- CPPUNIT_ASSERT( aTree.size() > 0 );
+ CPPUNIT_ASSERT( !aTree.empty() );
CPPUNIT_ASSERT_EQUAL( std::string(".uno:FontSubset"), aTree.get_child("commandName").get_value<std::string>() );
boost::property_tree::ptree aValues = aTree.get_child("commandValues");
- CPPUNIT_ASSERT( aValues.size() > 0 );
+ CPPUNIT_ASSERT( !aValues.empty() );
free(pJSON);
comphelper::LibreOfficeKit::setActive(false);
diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx
index fb6ce8668582..f76a8df08a47 100644
--- a/desktop/source/deployment/registry/package/dp_package.cxx
+++ b/desktop/source/deployment/registry/package/dp_package.cxx
@@ -1470,7 +1470,7 @@ void BackendImpl::PackageImpl::scanBundle(
// patch description:
std::vector<sal_Int8> bytes( readFile( descrFileContent ) );
OUStringBuffer buf;
- if ( bytes.size() )
+ if ( !bytes.empty() )
{
buf.append( OUString( reinterpret_cast<sal_Char const *>(
bytes.data() ),
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 6dfa7cc28825..6f080c5e0316 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -340,7 +340,7 @@ std::vector<beans::PropertyValue> desktop::jsonToPropertyValuesVector(const char
else if (rType == "[]any")
{
aNodeValue = rPair.second.get_child("value", aNodeNull);
- if (aNodeValue != aNodeNull && aNodeValue.size() > 0)
+ if (aNodeValue != aNodeNull && !aNodeValue.empty())
{
sal_Int32 itSeq = 0;
uno::Sequence< uno::Any > aSeq(aNodeValue.size());
diff --git a/desktop/source/pkgchk/unopkg/unopkg_app.cxx b/desktop/source/pkgchk/unopkg/unopkg_app.cxx
index 33a8af6f8e55..fea990384e9c 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_app.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_app.cxx
@@ -530,7 +530,7 @@ extern "C" int unopkg_main()
Reference<ui::dialogs::XAsynchronousExecutableDialog> xDialog(
deployment::ui::PackageManagerDialog::createAndInstall(
xComponentContext,
- cmdPackages.size() > 0 ? cmdPackages[0] : OUString() ));
+ !cmdPackages.empty() ? cmdPackages[0] : OUString() ));
osl::Condition dialogEnded;
dialogEnded.reset();
diff --git a/drawinglayer/source/attribute/strokeattribute.cxx b/drawinglayer/source/attribute/strokeattribute.cxx
index 547f4dd97ebe..34324b6e0fda 100644
--- a/drawinglayer/source/attribute/strokeattribute.cxx
+++ b/drawinglayer/source/attribute/strokeattribute.cxx
@@ -51,7 +51,7 @@ namespace drawinglayer
const std::vector< double >& getDotDashArray() const { return maDotDashArray; }
double getFullDotDashLen() const
{
- if(0.0 == mfFullDotDashLen && maDotDashArray.size())
+ if(0.0 == mfFullDotDashLen && !maDotDashArray.empty())
{
// calculate length on demand
const double fAccumulated(std::accumulate(maDotDashArray.begin(), maDotDashArray.end(), 0.0));
diff --git a/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx b/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx
index a890288e5e30..1e890358c25b 100644
--- a/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx
@@ -187,7 +187,7 @@ namespace drawinglayer
basegfx::B2DRange aOutmostRange(getOutputRange());
basegfx::B2DPolyPolygon aCombinedPolyPoly;
- if(rEntries.size())
+ if(!rEntries.empty())
{
// extend aOutmostRange with first polygon
basegfx::B2DPolygon aFirstPoly(rUnitPolygon);
@@ -204,7 +204,7 @@ namespace drawinglayer
aCombinedPolyPoly,
rOuterColor));
- if(rEntries.size())
+ if(!rEntries.empty())
{
// reuse first polygon, it's the second one
aCombinedPolyPoly.remove(0);
diff --git a/drawinglayer/source/primitive2d/graphicprimitive2d.cxx b/drawinglayer/source/primitive2d/graphicprimitive2d.cxx
index 35ac0366a0fa..50aa48efe333 100644
--- a/drawinglayer/source/primitive2d/graphicprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/graphicprimitive2d.cxx
@@ -110,7 +110,7 @@ namespace drawinglayer
aTransformedGraphic,
aTransform);
- if(!aRetval.size())
+ if(aRetval.empty())
{
// content is invisible, done
return;
@@ -131,7 +131,7 @@ namespace drawinglayer
o3tl::clamp(aSuppressGraphicAttr.GetGamma(), 0.0, 10.0),
aSuppressGraphicAttr.IsInvert());
- if(!aRetval.size())
+ if(aRetval.empty())
{
// content is invisible, done
return;
diff --git a/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx b/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx
index bb0430d3fa68..9487ddbad0b7 100644
--- a/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx
+++ b/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx
@@ -177,7 +177,7 @@ namespace drawinglayer
if (mbBufferingAllowed)
{
// all frames buffered
- if (mbBufferingAllowed && maBufferedPrimitives.size() && nIndex < maBufferedPrimitives.size())
+ if (mbBufferingAllowed && !maBufferedPrimitives.empty() && nIndex < maBufferedPrimitives.size())
{
if (!maBufferedPrimitives[nIndex].is())
{
@@ -300,7 +300,7 @@ namespace drawinglayer
if (mbBufferingAllowed)
{
// all frames buffered, check if available
- if (maBufferedPrimitives.size() && nIndex < maBufferedPrimitives.size())
+ if (!maBufferedPrimitives.empty() && nIndex < maBufferedPrimitives.size())
{
if (maBufferedPrimitives[nIndex].is())
{
@@ -574,7 +574,7 @@ namespace drawinglayer
{
Primitive2DContainer aRetval;
- if(!rChildren.size())
+ if(rChildren.empty())
{
// no child content, done
return aRetval;
diff --git a/drawinglayer/source/primitive2d/markerarrayprimitive2d.cxx b/drawinglayer/source/primitive2d/markerarrayprimitive2d.cxx
index d9865d100e4a..9b6b9774ba82 100644
--- a/drawinglayer/source/primitive2d/markerarrayprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/markerarrayprimitive2d.cxx
@@ -96,7 +96,7 @@ namespace drawinglayer
{
basegfx::B2DRange aRetval;
- if(getPositions().size())
+ if(!getPositions().empty())
{
// get the basic range from the position vector
for (auto const& pos : getPositions())
diff --git a/drawinglayer/source/primitive2d/sceneprimitive2d.cxx b/drawinglayer/source/primitive2d/sceneprimitive2d.cxx
index 52f5137824dc..1b1052fd649c 100644
--- a/drawinglayer/source/primitive2d/sceneprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/sceneprimitive2d.cxx
@@ -140,7 +140,7 @@ namespace drawinglayer
const double fShadowSlant(getSdrSceneAttribute().getShadowSlant());
const basegfx::B3DRange aScene3DRange(getChildren3D().getB3DRange(getViewInformation3D()));
- if(maSdrLightingAttribute.getLightVector().size())
+ if(!maSdrLightingAttribute.getLightVector().empty())
{
// get light normal from first light and normalize
aLightNormal = maSdrLightingAttribute.getLightVector()[0].getDirection();
diff --git a/drawinglayer/source/primitive2d/textprimitive2d.cxx b/drawinglayer/source/primitive2d/textprimitive2d.cxx
index d155e75c46cc..d5e8a23ddd47 100644
--- a/drawinglayer/source/primitive2d/textprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/textprimitive2d.cxx
@@ -122,7 +122,7 @@ namespace drawinglayer
// When getting outlines from stretched text (aScale.getX() != 1.0) it
// is necessary to inverse-scale the DXArray (if used) to not get the
// outlines already aligned to given, but wrong DXArray
- if(getDXArray().size() && !basegfx::fTools::equal(aScale.getX(), 1.0))
+ if(!getDXArray().empty() && !basegfx::fTools::equal(aScale.getX(), 1.0))
{
std::vector< double > aScaledDXArray = getDXArray();
const double fDXArrayScale(1.0 / aScale.getX());
diff --git a/drawinglayer/source/primitive3d/sdrdecompositiontools3d.cxx b/drawinglayer/source/primitive3d/sdrdecompositiontools3d.cxx
index dcea2f877543..cbcbfda8b649 100644
--- a/drawinglayer/source/primitive3d/sdrdecompositiontools3d.cxx
+++ b/drawinglayer/source/primitive3d/sdrdecompositiontools3d.cxx
@@ -172,7 +172,7 @@ namespace drawinglayer
{
Primitive3DContainer aRetval;
- if(r3DPolyPolygonVector.size())
+ if(!r3DPolyPolygonVector.empty())
{
// create list of simple fill primitives
aRetval.resize(r3DPolyPolygonVector.size());
diff --git a/drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx b/drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx
index 057dbe127fdb..4a22113bb8cd 100644
--- a/drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx
+++ b/drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx
@@ -377,7 +377,7 @@ namespace drawinglayer
{
// This can be made dependent of getSdrLFSAttribute().getFill() and getSdrLFSAttribute().getLine()
// again when no longer geometry is needed for non-visible 3D objects as it is now for chart
- if(getPolyPolygon().count() && !maSlices.size())
+ if(getPolyPolygon().count() && maSlices.empty())
{
::osl::MutexGuard aGuard( m_aMutex );
diff --git a/drawinglayer/source/primitive3d/sdrlatheprimitive3d.cxx b/drawinglayer/source/primitive3d/sdrlatheprimitive3d.cxx
index e0a9bc3adc80..363f174b3494 100644
--- a/drawinglayer/source/primitive3d/sdrlatheprimitive3d.cxx
+++ b/drawinglayer/source/primitive3d/sdrlatheprimitive3d.cxx
@@ -229,7 +229,7 @@ namespace drawinglayer
{
// This can be made dependent of getSdrLFSAttribute().getFill() and getSdrLFSAttribute().getLine()
// again when no longer geometry is needed for non-visible 3D objects as it is now for chart
- if(getPolyPolygon().count() && !maSlices.size())
+ if(getPolyPolygon().count() && maSlices.empty())
{
::osl::MutexGuard aGuard( m_aMutex );
diff --git a/drawinglayer/source/processor2d/hittestprocessor2d.cxx b/drawinglayer/source/processor2d/hittestprocessor2d.cxx
index d0d428370d41..17f740587931 100644
--- a/drawinglayer/source/processor2d/hittestprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/hittestprocessor2d.cxx
@@ -199,7 +199,7 @@ namespace drawinglayer
true);
aCutFindProcessor.process(rPrimitives);
- mbHit = (0 != aCutFindProcessor.getCutPoints().size());
+ mbHit = (!aCutFindProcessor.getCutPoints().empty());
}
}
}
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx
index 206ff787b40a..de94ac307120 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx
@@ -230,7 +230,7 @@ namespace drawinglayer
// create transformed integer DXArray in view coordinate system
std::vector< long > aTransformedDXArray;
- if(rTextCandidate.getDXArray().size())
+ if(!rTextCandidate.getDXArray().empty())
{
aTransformedDXArray.reserve(rTextCandidate.getDXArray().size());
const basegfx::B2DVector aPixelVector(maCurrentTransformation * basegfx::B2DVector(1.0, 0.0));
@@ -262,7 +262,7 @@ namespace drawinglayer
sal_Int32 nPos = rTextCandidate.getTextPosition();
sal_Int32 nLen = rTextCandidate.getTextLength();
- long* pDXArray = aTransformedDXArray.size() ? &(aTransformedDXArray[0]) : nullptr ;
+ long* pDXArray = !aTransformedDXArray.empty() ? &(aTransformedDXArray[0]) : nullptr ;
if ( rTextCandidate.isFilled() )
{
diff --git a/drawinglayer/source/processor3d/cutfindprocessor3d.cxx b/drawinglayer/source/processor3d/cutfindprocessor3d.cxx
index 04a37a73c2ad..aa8479527bb6 100644
--- a/drawinglayer/source/processor3d/cutfindprocessor3d.cxx
+++ b/drawinglayer/source/processor3d/cutfindprocessor3d.cxx
@@ -47,7 +47,7 @@ namespace drawinglayer
void CutFindProcessor::processBasePrimitive3D(const primitive3d::BasePrimitive3D& rCandidate)
{
- if(mbAnyHit && maResult.size())
+ if(mbAnyHit && !maResult.empty())
{
// stop processing as soon as a hit was recognized
return;
@@ -132,7 +132,7 @@ namespace drawinglayer
const primitive3d::UnifiedTransparenceTexturePrimitive3D& rPrimitive = static_cast< const primitive3d::UnifiedTransparenceTexturePrimitive3D& >(rCandidate);
const primitive3d::Primitive3DContainer& rChildren = rPrimitive.getChildren();
- if(rChildren.size())
+ if(!rChildren.empty())
{
process(rChildren);
}
diff --git a/drawinglayer/source/processor3d/shadow3dextractor.cxx b/drawinglayer/source/processor3d/shadow3dextractor.cxx
index 35032588c766..10e9143f2f40 100644
--- a/drawinglayer/source/processor3d/shadow3dextractor.cxx
+++ b/drawinglayer/source/processor3d/shadow3dextractor.cxx
@@ -248,7 +248,7 @@ namespace drawinglayer
Shadow3DExtractingProcessor::~Shadow3DExtractingProcessor()
{
- OSL_ENSURE(0 == maPrimitive2DSequence.size(),
+ OSL_ENSURE(maPrimitive2DSequence.empty(),
"OOps, someone used Shadow3DExtractingProcessor, but did not fetch the results (!)");
}
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index 6637796ea687..06a18b7f7403 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -4017,9 +4017,9 @@ long ImpEditEngine::GetXPos(
else if ( rPortion.GetKind() == PortionKind::TEXT )
{
OSL_ENSURE( nIndex != pLine->GetStart(), "Strange behavior in new GetXPos()" );
- OSL_ENSURE( pLine && pLine->GetCharPosArray().size(), "svx::ImpEditEngine::GetXPos(), portion in an empty line?" );
+ OSL_ENSURE( pLine && !pLine->GetCharPosArray().empty(), "svx::ImpEditEngine::GetXPos(), portion in an empty line?" );
- if( pLine->GetCharPosArray().size() )
+ if( !pLine->GetCharPosArray().empty() )
{
sal_Int32 nPos = nIndex - 1 - pLine->GetStart();
if (nPos < 0 || nPos >= static_cast<sal_Int32>(pLine->GetCharPosArray().size()))
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index 631893e8326c..fadb8db0c56f 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -3311,7 +3311,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, tools::Rectangle aClipRect, Po
// longer done in Overlay mode and allows to *read* the URL).
// It would be difficult to change this due to needed adaptions in
// EditEngine (look for lineBreaksList creation)
- if( nullptr == pActiveView && bStripOnly && !bParsingFields && pExtraInfo && pExtraInfo->lineBreaksList.size() )
+ if( nullptr == pActiveView && bStripOnly && !bParsingFields && pExtraInfo && !pExtraInfo->lineBreaksList.empty() )
{
bParsingFields = true;
itSubLines = pExtraInfo->lineBreaksList.begin();
@@ -3494,7 +3494,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, tools::Rectangle aClipRect, Po
// StripPortions() data callback
GetEditEnginePtr()->DrawingText( aOutPos, aText, nTextStart, nTextLen, pDXArray,
aTmpFont, n, rTextPortion.GetRightToLeftLevel(),
- aWrongSpellVector.size() ? &aWrongSpellVector : nullptr,
+ !aWrongSpellVector.empty() ? &aWrongSpellVector : nullptr,
pFieldData,
bEndOfLine, bEndOfParagraph, // support for EOL/EOP TEXT comments
&aLocale,
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index 66cd22344d0c..64bc7443014e 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -2067,7 +2067,7 @@ void ImpEditEngine::ApplyChangedSentence(EditView const & rEditView,
DBG_ASSERT(pSpellInfo, "pSpellInfo not initialized");
if (pSpellInfo &&
- pSpellInfo->aLastSpellPortions.size() > 0) // no portions -> no text to be changed
+ !pSpellInfo->aLastSpellPortions.empty()) // no portions -> no text to be changed
{
// get current paragraph length to calculate later on how the sentence length changed,
// in order to place the cursor at the end of the sentence again
@@ -2077,7 +2077,7 @@ void ImpEditEngine::ApplyChangedSentence(EditView const & rEditView,
UndoActionStart( EDITUNDO_INSERT );
if(pSpellInfo->aLastSpellPortions.size() == rNewPortions.size())
{
- DBG_ASSERT( rNewPortions.size() > 0, "rNewPortions should not be empty here" );
+ DBG_ASSERT( !rNewPortions.empty(), "rNewPortions should not be empty here" );
DBG_ASSERT( pSpellInfo->aLastSpellPortions.size() == pSpellInfo->aLastSpellContentSelections.size(),
"aLastSpellPortions and aLastSpellContentSelections size mismatch" );
diff --git a/extensions/source/abpilot/fieldmappingpage.cxx b/extensions/source/abpilot/fieldmappingpage.cxx
index a5ce91af2c09..d0962e8f85c0 100644
--- a/extensions/source/abpilot/fieldmappingpage.cxx
+++ b/extensions/source/abpilot/fieldmappingpage.cxx
@@ -78,7 +78,7 @@ namespace abp
// invoke the dialog doing the mapping
if ( fieldmapping::invokeDialog( getORB(), this, getDialog()->getDataSource().getDataSource(), rSettings ) )
{
- if ( rSettings.aFieldMapping.size() )
+ if ( !rSettings.aFieldMapping.empty() )
getDialog()->travelNext();
else
implUpdateHint();
diff --git a/extensions/source/propctrlr/browserlistbox.cxx b/extensions/source/propctrlr/browserlistbox.cxx
index be7e94dbdc89..3aca9d72da53 100644
--- a/extensions/source/propctrlr/browserlistbox.cxx
+++ b/extensions/source/propctrlr/browserlistbox.cxx
@@ -977,7 +977,7 @@ namespace pcr
}
// wrap around?
- if ( ( static_cast< size_t >( nLine ) >= m_aLines.size() ) && ( m_aLines.size() > 0 ) )
+ if ( ( static_cast< size_t >( nLine ) >= m_aLines.size() ) && ( !m_aLines.empty() ) )
m_aLines[0].pLine->GrabFocus();
}
diff --git a/filter/source/config/cache/cacheitem.cxx b/filter/source/config/cache/cacheitem.cxx
index a8ac838dee1e..d494725eb9dd 100644
--- a/filter/source/config/cache/cacheitem.cxx
+++ b/filter/source/config/cache/cacheitem.cxx
@@ -73,7 +73,7 @@ void CacheItem::validateUINames(const OUString& sActLocale)
// 1a) set UIName inside list of UINames for current locale
lUINames[sActLocale] <<= sUIName;
}
- else if (lUINames.size()>0)
+ else if (!lUINames.empty())
{
// 1b) or get it from this list, if it not exist!
lUINames[sActLocale] >>= sUIName;
diff --git a/filter/source/config/cache/filtercache.cxx b/filter/source/config/cache/filtercache.cxx
index d3cf357f165d..0e2f60dddf6b 100644
--- a/filter/source/config/cache/filtercache.cxx
+++ b/filter/source/config/cache/filtercache.cxx
@@ -569,7 +569,7 @@ void FilterCache::flush()
// renew all dependencies and optimizations
impl_validateAndOptimize();
- if (m_lChangedTypes.size() > 0)
+ if (!m_lChangedTypes.empty())
{
css::uno::Reference< css::container::XNameAccess > xConfig(impl_openConfig(E_PROVIDER_TYPES), css::uno::UNO_QUERY_THROW);
css::uno::Reference< css::container::XNameAccess > xSet ;
@@ -581,7 +581,7 @@ void FilterCache::flush()
xFlush->commitChanges();
}
- if (m_lChangedFilters.size() > 0)
+ if (!m_lChangedFilters.empty())
{
css::uno::Reference< css::container::XNameAccess > xConfig(impl_openConfig(E_PROVIDER_FILTERS), css::uno::UNO_QUERY_THROW);
css::uno::Reference< css::container::XNameAccess > xSet ;
@@ -2122,7 +2122,7 @@ CacheItem FilterCache::impl_readOldItem(const css::uno::Reference< css::containe
lData = impl_tokenizeString(sData, ',');
if (
(sData.isEmpty()) ||
- (lData.size()<1 )
+ (lData.empty() )
)
{
throw css::uno::Exception( "Can not read old item property DATA.", css::uno::Reference< css::uno::XInterface >());
diff --git a/filter/source/config/cache/typedetection.cxx b/filter/source/config/cache/typedetection.cxx
index fa23e96ba126..b5268857ca9b 100644
--- a/filter/source/config/cache/typedetection.cxx
+++ b/filter/source/config/cache/typedetection.cxx
@@ -89,7 +89,7 @@ OUString SAL_CALL TypeDetection::queryTypeByURL(const OUString& sURL)
cache.detectFlatForURL(aURL, lFlatTypes);
if (
- (lFlatTypes.size() < 1 ) &&
+ (lFlatTypes.empty() ) &&
(!cache.isFillState(FilterCache::E_CONTAINS_TYPES))
)
{
@@ -98,7 +98,7 @@ OUString SAL_CALL TypeDetection::queryTypeByURL(const OUString& sURL)
}
// first item is guaranteed as "preferred" one!
- if (lFlatTypes.size() > 0)
+ if (!lFlatTypes.empty())
{
const FlatDetectionInfo& aMatch = *(lFlatTypes.begin());
sType = aMatch.sType;
@@ -426,7 +426,7 @@ OUString SAL_CALL TypeDetection::queryTypeByDescriptor(css::uno::Sequence< css::
// throwing an exception if creation of the might needed input
// stream failed by e.g. an IO exception ...
std::vector<OUString> lUsedDetectors;
- if (lFlatTypes.size()>0)
+ if (!lFlatTypes.empty())
sType = impl_detectTypeFlatAndDeep(stlDescriptor, lFlatTypes, bAllowDeep, lUsedDetectors, sLastChance);
// flat detection failed
diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx
index 03042a9c86a2..f32eb9538f53 100644
--- a/filter/source/flash/swfwriter1.cxx
+++ b/filter/source/flash/swfwriter1.cxx
@@ -1099,7 +1099,7 @@ bool Writer::Impl_writeStroke( SvtGraphicStroke const & rStroke )
SvtGraphicStroke::DashArray aDashArray;
rStroke.getDashArray( aDashArray );
- if( 0 != aDashArray.size() )
+ if( !aDashArray.empty() )
return false; // todo: implement dashes
Color aColor( mpVDev->GetLineColor() );
diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx
index f20e899c0cc6..28e0f59b40b2 100644
--- a/filter/source/graphicfilter/eps/eps.cxx
+++ b/filter/source/graphicfilter/eps/eps.cxx
@@ -1260,7 +1260,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
bSkipSequence = false;
if ( static_cast<sal_uInt32>(eJT) > 2 )
bSkipSequence = false;
- if ( l_aDashArray.size() && ( fStrokeWidth != 0.0 ) )
+ if ( !l_aDashArray.empty() && ( fStrokeWidth != 0.0 ) )
bSkipSequence = false;
if ( bSkipSequence )
{
diff --git a/filter/source/graphicfilter/idxf/dxfentrd.cxx b/filter/source/graphicfilter/idxf/dxfentrd.cxx
index a2949dd6578a..0f30ba60f1bc 100644
--- a/filter/source/graphicfilter/idxf/dxfentrd.cxx
+++ b/filter/source/graphicfilter/idxf/dxfentrd.cxx
@@ -633,7 +633,7 @@ bool DXFBoundaryPathData::EvaluateGroup( DXFGroupReader & rDGR )
case 4 : aEdges.emplace_back( new DXFEdgeTypeSpline() ); break;
}
}
- else if ( aEdges.size() )
+ else if ( !aEdges.empty() )
aEdges[ aEdges.size() - 1 ]->EvaluateGroup( rDGR );
else
bExecutingGroupCode = false;
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index 6fff0b0cb99d..eff3d607fa77 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -2050,7 +2050,7 @@ void SVGActionWriter::ImplWriteShape( const SVGShapeDescriptor& rShape )
}
}
- if( rShape.maDashArray.size() )
+ if( !rShape.maDashArray.empty() )
{
OUStringBuffer aDashArrayStr;
diff --git a/forms/source/component/EventThread.cxx b/forms/source/component/EventThread.cxx
index 821f2b63e77e..76022a84f62d 100644
--- a/forms/source/component/EventThread.cxx
+++ b/forms/source/component/EventThread.cxx
@@ -71,7 +71,7 @@ Any SAL_CALL OComponentEventThread::queryInterface(const Type& _rType)
void OComponentEventThread::impl_clearEventQueue()
{
- while ( m_aEvents.size() )
+ while ( !m_aEvents.empty() )
{
delete *m_aEvents.begin();
m_aEvents.erase( m_aEvents.begin() );
@@ -148,7 +148,7 @@ void OComponentEventThread::run()
{
::osl::MutexGuard aGuard(m_aMutex);
- while( m_aEvents.size() > 0 )
+ while( !m_aEvents.empty() )
{
// Get the Control and hold on to it so that it cannot be deleted during actionPerformed
rtl::Reference<::cppu::OComponentHelper> xComp = m_xComp;
diff --git a/formula/source/ui/dlg/parawin.cxx b/formula/source/ui/dlg/parawin.cxx
index e8a86ada7214..6ffd0c6e7684 100644
--- a/formula/source/ui/dlg/parawin.cxx
+++ b/formula/source/ui/dlg/parawin.cxx
@@ -396,7 +396,7 @@ void ParaWin::SetArgNameFont(sal_uInt16 no,const vcl::Font& aFont)
void ParaWin::SetEdFocus()
{
UpdateArgDesc(0);
- if(0<aParaArray.size())
+ if(!aParaArray.empty())
aArgInput[0].GetArgEdPtr()->GrabFocus();
}
diff --git a/fpicker/source/office/RemoteFilesDialog.cxx b/fpicker/source/office/RemoteFilesDialog.cxx
index 5242ce8b6fed..34729dfb2005 100644
--- a/fpicker/source/office/RemoteFilesDialog.cxx
+++ b/fpicker/source/office/RemoteFilesDialog.cxx
@@ -1417,7 +1417,7 @@ std::vector<OUString> RemoteFilesDialog::GetPathList() const
pEntry = m_pFileView->NextSelected( pEntry );
}
- if( aList.size() == 0 && !m_sPath.isEmpty() )
+ if( aList.empty() && !m_sPath.isEmpty() )
aList.push_back( m_sPath );
return aList;
diff --git a/framework/source/dispatch/dispatchdisabler.cxx b/framework/source/dispatch/dispatchdisabler.cxx
index b847031bf742..0ad5932c0251 100644
--- a/framework/source/dispatch/dispatchdisabler.cxx
+++ b/framework/source/dispatch/dispatchdisabler.cxx
@@ -101,7 +101,7 @@ uno::Type SAL_CALL DispatchDisabler::getElementType()
::sal_Bool SAL_CALL DispatchDisabler::hasElements()
{
- return maDisabledURLs.size() > 0;
+ return !maDisabledURLs.empty();
}
// XNameAccess
diff --git a/framework/source/dispatch/interceptionhelper.cxx b/framework/source/dispatch/interceptionhelper.cxx
index 819e96475393..27fb2a14b538 100644
--- a/framework/source/dispatch/interceptionhelper.cxx
+++ b/framework/source/dispatch/interceptionhelper.cxx
@@ -52,7 +52,7 @@ css::uno::Reference< css::frame::XDispatch > SAL_CALL InterceptionHelper::queryD
// b) No match by registration - but a valid interceptor list.
// Find first interceptor w/o pattern, so we need to query it
- if (!xInterceptor.is() && m_lInterceptionRegs.size()>0)
+ if (!xInterceptor.is() && !m_lInterceptionRegs.empty())
{
for (auto const& lInterceptionReg : m_lInterceptionRegs)
{
diff --git a/framework/source/jobs/jobresult.cxx b/framework/source/jobs/jobresult.cxx
index fe79bf68cdb8..86ae9b5f0dea 100644
--- a/framework/source/jobs/jobresult.cxx
+++ b/framework/source/jobs/jobresult.cxx
@@ -117,7 +117,7 @@ JobResult::JobResult( /*IN*/ const css::uno::Any& aResult )
css::uno::Sequence<css::beans::NamedValue> aTmp;
pIt->second >>= aTmp;
comphelper::sequenceToContainer(m_lArguments, aTmp);
- if (!m_lArguments.size())
+ if (m_lArguments.empty())
m_eParts |= E_ARGUMENTS;
}
diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
index 96e96ba143e6..e374da107921 100644
--- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx
+++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
@@ -3917,7 +3917,7 @@ uno::Sequence< uno::Reference< ui::XUIElement > > ToolbarLayoutManager::getToolb
uno::Sequence< uno::Reference< ui::XUIElement > > aSeq;
SolarMutexGuard g;
- if ( m_aUIElements.size() > 0 )
+ if ( !m_aUIElements.empty() )
{
sal_uInt32 nCount(0);
for (auto const& elem : m_aUIElements)
diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx
index 14c9148fd92c..844591d56a20 100644
--- a/framework/source/services/autorecovery.cxx
+++ b/framework/source/services/autorecovery.cxx
@@ -3896,7 +3896,7 @@ void SAL_CALL AutoRecovery::getFastPropertyValue(css::uno::Any& aValue ,
case AUTORECOVERY_PROPHANDLE_EXISTS_RECOVERYDATA :
{
bool bSessionData = officecfg::Office::Recovery::RecoveryInfo::SessionData::get(m_xContext);
- bool bRecoveryData = m_lDocCache.size() > 0;
+ bool bRecoveryData = !m_lDocCache.empty();
// exists session data ... => then we can't say, that these
// data are valid for recovery. So we have to return sal_False then!
diff --git a/framework/source/uielement/thesaurusmenucontroller.cxx b/framework/source/uielement/thesaurusmenucontroller.cxx
index de0845440825..a7237ad9c3ec 100644
--- a/framework/source/uielement/thesaurusmenucontroller.cxx
+++ b/framework/source/uielement/thesaurusmenucontroller.cxx
@@ -77,7 +77,7 @@ void ThesaurusMenuController::fillPopupMenu()
VCLXMenu* pAwtMenu = VCLXMenu::GetImplementation( m_xPopupMenu );
Menu* pVCLMenu = pAwtMenu->GetMenu();
pVCLMenu->SetMenuFlags( MenuFlags::NoAutoMnemonics );
- if ( aSynonyms.size() > 0 )
+ if ( !aSynonyms.empty() )
{
SvtLinguConfig aCfg;
Image aImage;
diff --git a/hwpfilter/source/hwpreader.cxx b/hwpfilter/source/hwpreader.cxx
index 9e427591cd3c..3b3ecefa90cd 100644
--- a/hwpfilter/source/hwpreader.cxx
+++ b/hwpfilter/source/hwpreader.cxx
@@ -2908,7 +2908,7 @@ void HwpReader::make_text_p3(HWPPara * para,bool bParaStart)
{
if( para->hhstr[n]->hh == CH_END_PARA )
{
- if (str.size() > 0)
+ if (!str.empty())
{
if( !pstart ){ STARTP;}
if( !tstart ){ STARTT;}
@@ -2998,7 +2998,7 @@ void HwpReader::make_text_p3(HWPPara * para,bool bParaStart)
break;
case CH_TAB: // 9
if( !pstart ) {STARTP;}
- if (str.size() > 0)
+ if (!str.empty())
{
if( !tstart ) {STARTT;}
makeChars(str);
@@ -3019,7 +3019,7 @@ void HwpReader::make_text_p3(HWPPara * para,bool bParaStart)
else
{
if( !pstart ) {STARTP;}
- if (str.size() > 0)
+ if (!str.empty())
{
if( !tstart ) {STARTT;}
makeChars(str);
@@ -3052,7 +3052,7 @@ void HwpReader::make_text_p3(HWPPara * para,bool bParaStart)
else
{
if( !pstart ) {STARTP;}
- if (str.size() > 0)
+ if (!str.empty())
{
if( !tstart ) {STARTT;}
makeChars(str);
@@ -3064,7 +3064,7 @@ void HwpReader::make_text_p3(HWPPara * para,bool bParaStart)
}
case CH_LINE: // 14
{
- if (str.size() > 0)
+ if (!str.empty())
{
if( !pstart ) {STARTP;}
if( !tstart ) {STARTT;}
@@ -3731,7 +3731,7 @@ void HwpReader::makeHyperText(TxtBox * hbox)
reinterpret_cast<uchar const *>(urltounix(reinterpret_cast<char *>(hypert->filename)).c_str())).c_str());
#endif
padd("xlink:type", sXML_CDATA, "simple");
- if (tmp.size() > 0 && strcmp(tmp.c_str(), "[HTML]")) {
+ if (!tmp.empty() && strcmp(tmp.c_str(), "[HTML]")) {
::std::string tmp3(tmp2);
tmp3.push_back('#');
tmp3.append(tmp);
diff --git a/jvmfwk/source/elements.cxx b/jvmfwk/source/elements.cxx
index b4eb74e03a03..ebd395b466fc 100644
--- a/jvmfwk/source/elements.cxx
+++ b/jvmfwk/source/elements.cxx
@@ -484,7 +484,7 @@ void NodeJava::write() const
xmlFreeNode(lastNode);
}
//add a new line after <vmParameters>
- if (m_vmParameters->size() > 0)
+ if (!m_vmParameters->empty())
{
xmlNode * nodeCrLf = xmlNewText(reinterpret_cast<xmlChar const *>("\n"));
xmlAddChild(vmParameters, nodeCrLf);
@@ -524,7 +524,7 @@ void NodeJava::write() const
xmlFreeNode(lastNode);
}
//add a new line after <vmParameters>
- if (m_JRELocations->size() > 0)
+ if (!m_JRELocations->empty())
{
xmlNode * nodeCrLf = xmlNewText(reinterpret_cast<xmlChar const *>("\n"));
xmlAddChild(jreLocationsNode, nodeCrLf);
diff --git a/l10ntools/source/propmerge.cxx b/l10ntools/source/propmerge.cxx
index 1f57f03c2ff0..b87c64c994f7 100644
--- a/l10ntools/source/propmerge.cxx
+++ b/l10ntools/source/propmerge.cxx
@@ -173,7 +173,7 @@ void PropParser::Merge( const OString &rMergeSrc, const OString &rDestinationFil
pMergeDataFile.reset( new MergeDataFile( rMergeSrc, m_sSource, false, false ) );
const std::vector<OString> vLanguages = pMergeDataFile->GetLanguages();
- if( vLanguages.size()>=1 && vLanguages[0] != m_sLang )
+ if( !vLanguages.empty() && vLanguages[0] != m_sLang )
{
std::cerr
<< ("Propex error: given language conflicts with language of"
diff --git a/l10ntools/source/treemerge.cxx b/l10ntools/source/treemerge.cxx
index c874603edfa2..65916d12d3e2 100644
--- a/l10ntools/source/treemerge.cxx
+++ b/l10ntools/source/treemerge.cxx
@@ -259,7 +259,7 @@ void TreeParser::Merge(
pMergeDataFile.reset(new MergeDataFile(
rMergeSrc, static_cast<OString>( m_pSource->name ), false, false ));
const std::vector<OString> vLanguages = pMergeDataFile->GetLanguages();
- if( vLanguages.size()>=1 && vLanguages[0] != m_sLang )
+ if( !vLanguages.empty() && vLanguages[0] != m_sLang )
{
std::cerr
<< ("Treex error: given language conflicts with language of"
diff --git a/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx b/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx
index 307a1b61f3ea..01c587c60ec4 100644
--- a/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx
+++ b/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx
@@ -100,7 +100,7 @@ Sequence< Locale > SAL_CALL Hyphenator::getLocales()
// this routine should return the locales supported by the installed
// dictionaries.
- if (!mvDicts.size())
+ if (mvDicts.empty())
{
SvtLinguConfig aLinguCfg;
diff --git a/lingucomponent/source/languageguessing/guess.cxx b/lingucomponent/source/languageguessing/guess.cxx
index 545912dbb032..eefa7ab6c0f0 100644
--- a/lingucomponent/source/languageguessing/guess.cxx
+++ b/lingucomponent/source/languageguessing/guess.cxx
@@ -97,7 +97,7 @@ Guess::Guess(const char * guess_str)
current_pointer++;
}
- if(lang!=""){//if not we use the default value
+ if(!lang.empty()){//if not we use the default value
language_str=lang;
}
country_str=country;
diff --git a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
index 7936d1f4d642..e2331c2e20ce 100644
--- a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
+++ b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
@@ -102,7 +102,7 @@ Sequence< Locale > SAL_CALL Thesaurus::getLocales()
// this routine should return the locales supported by the installed
// dictionaries.
- if (!mvThesInfo.size())
+ if (mvThesInfo.empty())
{
SvtLinguConfig aLinguCfg;
diff --git a/linguistic/source/misc2.cxx b/linguistic/source/misc2.cxx
index 782d190e7a1f..f416a1739fd1 100644
--- a/linguistic/source/misc2.cxx
+++ b/linguistic/source/misc2.cxx
@@ -137,7 +137,7 @@ OUString GetDictionaryWriteablePath()
std::vector< OUString > aPaths( GetMultiPaths_Impl( "Dictionary", DictionaryPathFlags::NONE ) );
DBG_ASSERT( aPaths.size() == 1, "Dictionary_writable path corrupted?" );
OUString aRes;
- if (aPaths.size() > 0)
+ if (!aPaths.empty())
aRes = aPaths[0];
return aRes;
}
diff --git a/oox/source/drawingml/chart/plotareaconverter.cxx b/oox/source/drawingml/chart/plotareaconverter.cxx
index c562ea82837a..f3a4b8ebe493 100644
--- a/oox/source/drawingml/chart/plotareaconverter.cxx
+++ b/oox/source/drawingml/chart/plotareaconverter.cxx
@@ -369,7 +369,7 @@ void PlotAreaConverter::convertFromModel( View3DModel& rView3DModel )
pAxesSet = &aAxesSets.create();
// find axis models used by the type group
const std::vector<sal_Int32>& rAxisIds = typeGroup->maAxisIds;
- if( rAxisIds.size() >= 1 )
+ if( !rAxisIds.empty() )
pAxesSet->maAxes[ API_X_AXIS ] = aAxisMap.get( rAxisIds[ 0 ] );
if( rAxisIds.size() >= 2 )
pAxesSet->maAxes[ API_Y_AXIS ] = aAxisMap.get( rAxisIds[ 1 ] );
diff --git a/oox/source/drawingml/chart/seriesconverter.cxx b/oox/source/drawingml/chart/seriesconverter.cxx
index 7e35fc6f2628..811ee06497b2 100644
--- a/oox/source/drawingml/chart/seriesconverter.cxx
+++ b/oox/source/drawingml/chart/seriesconverter.cxx
@@ -285,7 +285,7 @@ void DataLabelConverter::convertFromModel( const Reference< XDataSeries >& rxDat
if (mrModel.mxShapeProp)
importBorderProperties(aPropSet, *mrModel.mxShapeProp, getFilter().getGraphicHelper());
- if( mrModel.mxText && mrModel.mxText->mxTextBody && mrModel.mxText->mxTextBody->getParagraphs().size() )
+ if( mrModel.mxText && mrModel.mxText->mxTextBody && !mrModel.mxText->mxTextBody->getParagraphs().empty() )
{
css::uno::Reference< XComponentContext > xContext = getComponentContext();
uno::Sequence< css::uno::Reference< XDataPointCustomLabelField > > aSequence;
diff --git a/oox/source/drawingml/chart/typegroupconverter.cxx b/oox/source/drawingml/chart/typegroupconverter.cxx
index 17e470fa812f..98623f750aca 100644
--- a/oox/source/drawingml/chart/typegroupconverter.cxx
+++ b/oox/source/drawingml/chart/typegroupconverter.cxx
@@ -287,7 +287,7 @@ Reference< XLabeledDataSequence > TypeGroupConverter::createCategorySequence()
}
}
/* n#839727 Create Category Sequence when none are found */
- if( !xLabeledSeq.is() && mrModel.maSeries.size() > 0 ) {
+ if( !xLabeledSeq.is() && !mrModel.maSeries.empty() ) {
if( nMaxValues < 0 )
nMaxValues = 2;
SeriesModel &aModel = *mrModel.maSeries.get(0);
diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx
index 80a3c2a3e036..323831166f59 100644
--- a/oox/source/drawingml/customshapeproperties.cxx
+++ b/oox/source/drawingml/customshapeproperties.cxx
@@ -175,7 +175,7 @@ void CustomShapeProperties::pushToPropSet(
}
}
- if ( maAdjustmentGuideList.size() )
+ if ( !maAdjustmentGuideList.empty() )
{
const OUString sType = "Type";
if ( aGeoPropSet >>= aGeoPropSeq )
@@ -237,7 +237,7 @@ void CustomShapeProperties::pushToPropSet(
// This size specifically affects scaling.
// Note 2: Width and Height are set to 0 to force scaling to 1.
awt::Rectangle aViewBox( 0, 0, aSize.Width, aSize.Height );
- if( maGuideList.size() )
+ if( !maGuideList.empty() )
aViewBox = awt::Rectangle( 0, 0, 0, 0 );
aPropertyMap.setProperty( PROP_ViewBox, aViewBox);
@@ -276,7 +276,7 @@ void CustomShapeProperties::pushToPropSet(
aParameterPairs[ k++ ] = j;
aPath.setProperty( PROP_Coordinates, aParameterPairs);
- if ( maPath2DList.size() )
+ if ( !maPath2DList.empty() )
{
bool bAllZero = true;
for ( auto const & i: maPath2DList )
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 2676d43060fb..0872a8b0cf56 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -450,7 +450,7 @@ static void lcl_createPresetShape(uno::Reference<drawing::XShape>& xShape,
auto aGdList = pCustomShapePropertiesPtr->getAdjustmentGuideList();
Sequence<drawing::EnhancedCustomShapeAdjustmentValue> aAdjustment(
- aGdList.size() ? aGdList.size() : 1 );
+ !aGdList.empty() ? aGdList.size() : 1 );
int nIndex = 0;
for (auto& aEntry : aGdList)
@@ -462,7 +462,7 @@ static void lcl_createPresetShape(uno::Reference<drawing::XShape>& xShape,
aAdjustment[nIndex++].State = css::beans::PropertyState_DIRECT_VALUE;
}
- if (!aGdList.size())
+ if (aGdList.empty())
{
// Default angle
double fAngle = 0;
@@ -479,7 +479,7 @@ static void lcl_createPresetShape(uno::Reference<drawing::XShape>& xShape,
xSet->setPropertyValue( UNO_NAME_FILLSTYLE, uno::makeAny( drawing::FillStyle_SOLID ) );
const TextParagraphVector& rParagraphs = pTextBody->getParagraphs();
- if (rParagraphs.size() && rParagraphs[0]->getRuns().size())
+ if (!rParagraphs.empty() && !rParagraphs[0]->getRuns().empty())
{
std::shared_ptr<TextParagraph> pParagraph = rParagraphs[0];
std::shared_ptr<TextRun> pRun = pParagraph->getRuns()[0];
diff --git a/oox/source/drawingml/textbody.cxx b/oox/source/drawingml/textbody.cxx
index 7730ef03dcd9..55989a470a3f 100644
--- a/oox/source/drawingml/textbody.cxx
+++ b/oox/source/drawingml/textbody.cxx
@@ -88,7 +88,7 @@ bool TextBody::isEmpty() const
return false;
const TextRunVector aRuns = maParagraphs[0]->getRuns();
- if ( aRuns.size() <= 0 )
+ if ( aRuns.empty() )
return true;
if ( aRuns.size() > 1 )
return false;
diff --git a/oox/source/drawingml/textparagraph.cxx b/oox/source/drawingml/textparagraph.cxx
index 5c8143dbd673..39d298612882 100644
--- a/oox/source/drawingml/textparagraph.cxx
+++ b/oox/source/drawingml/textparagraph.cxx
@@ -70,7 +70,7 @@ TextParagraphPropertiesPtr TextParagraph::getParagraphStyle(
if (nLevel >= static_cast< sal_Int16 >(rListStyle.size()))
nLevel = 0;
TextParagraphPropertiesPtr pTextParagraphStyle;
- if (rListStyle.size())
+ if (!rListStyle.empty())
pTextParagraphStyle = rListStyle[nLevel];
return pTextParagraphStyle;
@@ -134,12 +134,12 @@ void TextParagraph::insertAt(
aParaProp.apply( maProperties );
// bullets have same color as following texts by default
- if( !aioBulletList.hasProperty( PROP_BulletColor ) && maRuns.size() > 0
+ if( !aioBulletList.hasProperty( PROP_BulletColor ) && !maRuns.empty()
&& (*maRuns.begin())->getTextCharacterProperties().maFillProperties.moFillType.has() )
aioBulletList.setProperty( PROP_BulletColor, (*maRuns.begin())->getTextCharacterProperties().maFillProperties.getBestSolidColor().getColor( rFilterBase.getGraphicHelper() ));
if( !aioBulletList.hasProperty( PROP_BulletColor ) && aTextCharacterStyle.maFillProperties.moFillType.has() )
aioBulletList.setProperty( PROP_BulletColor, aTextCharacterStyle.maFillProperties.getBestSolidColor().getColor( rFilterBase.getGraphicHelper() ));
- if( !aioBulletList.hasProperty( PROP_GraphicSize ) && maRuns.size() > 0
+ if( !aioBulletList.hasProperty( PROP_GraphicSize ) && !maRuns.empty()
&& aParaProp.getBulletList().maGraphic.hasValue())
{
long nFirstCharHeightMm = TransformMetric(nCharHeightFirst > 0 ? nCharHeightFirst : 1200, FUNIT_POINT, FUNIT_MM);
diff --git a/oox/source/vml/vmlformatting.cxx b/oox/source/vml/vmlformatting.cxx
index cbd40329ffe8..0dc6a766fee9 100644
--- a/oox/source/vml/vmlformatting.cxx
+++ b/oox/source/vml/vmlformatting.cxx
@@ -342,7 +342,7 @@ void ConversionHelper::decodeVmlPath( ::std::vector< ::std::vector< Point > >& r
{
case MOVE_REL:
aCoordList.resize(2, 0); // 2* params -> param count reset
- if ( rPointLists.size() > 0 && rPointLists.back().size() > 0 )
+ if ( !rPointLists.empty() && !rPointLists.back().empty() )
{
rPointLists.emplace_back( );
rFlagLists.emplace_back( );
@@ -355,7 +355,7 @@ void ConversionHelper::decodeVmlPath( ::std::vector< ::std::vector< Point > >& r
case MOVE_ABS:
aCoordList.resize(2, 0); // 2 params -> no param count reset
- if ( rPointLists.size() > 0 && rPointLists.back().size() > 0 )
+ if ( !rPointLists.empty() && !rPointLists.back().empty() )
{
rPointLists.emplace_back( );
rFlagLists.emplace_back( );
diff --git a/package/source/xstor/xstorage.cxx b/package/source/xstor/xstorage.cxx
index c3c9a0ae7022..f29ecfd3ea0a 100644
--- a/package/source/xstor/xstorage.cxx
+++ b/package/source/xstor/xstorage.cxx
@@ -1842,7 +1842,7 @@ void OStorage::InternalDispose( bool bNotifyImpl )
if ( m_pData->m_bReadOnlyWrap )
{
- OSL_ENSURE( !m_pData->m_aOpenSubComponentsVector.size() || m_pData->m_pSubElDispListener.get(),
+ OSL_ENSURE( m_pData->m_aOpenSubComponentsVector.empty() || m_pData->m_pSubElDispListener.get(),
"If any subelements are open the listener must exist!" );
if (m_pData->m_pSubElDispListener)
@@ -3930,7 +3930,7 @@ sal_Bool SAL_CALL OStorage::hasElements()
try
{
- return ( m_pImpl->GetChildrenVector().size() != 0 );
+ return ( !m_pImpl->GetChildrenVector().empty() );
}
catch( const uno::RuntimeException& rRuntimeException )
{
diff --git a/package/source/zippackage/ZipPackageFolder.cxx b/package/source/zippackage/ZipPackageFolder.cxx
index 443eaf8dce96..8026ffc5cbf9 100644
--- a/package/source/zippackage/ZipPackageFolder.cxx
+++ b/package/source/zippackage/ZipPackageFolder.cxx
@@ -214,7 +214,7 @@ uno::Type SAL_CALL ZipPackageFolder::getElementType( )
}
sal_Bool SAL_CALL ZipPackageFolder::hasElements( )
{
- return maContents.size() > 0;
+ return !maContents.empty();
}
// XNameAccess
ZipContentInfo& ZipPackageFolder::doGetByName( const OUString& aName )
diff --git a/package/source/zippackage/zipfileaccess.cxx b/package/source/zippackage/zipfileaccess.cxx
index fb6007d8e203..9d7e3d355a19 100644
--- a/package/source/zippackage/zipfileaccess.cxx
+++ b/package/source/zippackage/zipfileaccess.cxx
@@ -368,7 +368,7 @@ sal_Bool SAL_CALL OZipFileAccess::hasElements()
if ( !m_pZipFile )
throw uno::RuntimeException(THROW_WHERE);
- return ( m_pZipFile->GetEntryHash().size() != 0 );
+ return ( !m_pZipFile->GetEntryHash().empty() );
}
// XZipFileAccess
diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx
index 3449e6bf2eab..5d7a7a4aebfb 100644
--- a/sc/source/core/data/dpoutput.cxx
+++ b/sc/source/core/data/dpoutput.cxx
@@ -858,7 +858,7 @@ void ScDPOutput::CalcSizes()
// calculate output positions and sizes
long nPageSize = 0; // use page fields!
- if ( bDoFilter || pPageFields.size() )
+ if ( bDoFilter || !pPageFields.empty() )
{
nPageSize += pPageFields.size() + 1; // plus one empty row
if ( bDoFilter )
diff --git a/sc/source/core/data/dptabres.cxx b/sc/source/core/data/dptabres.cxx
index 4ad5530a21b9..d6b8a49f0c60 100644
--- a/sc/source/core/data/dptabres.cxx
+++ b/sc/source/core/data/dptabres.cxx
@@ -3501,7 +3501,7 @@ ScDPResultMember* ScDPResultDimension::GetMember(long n)
ScDPResultDimension* ScDPResultDimension::GetFirstChildDimension() const
{
- if ( maMemberArray.size() > 0 )
+ if ( !maMemberArray.empty() )
return maMemberArray[0]->GetChildDimension();
else
return nullptr;
diff --git a/sc/source/core/data/markdata.cxx b/sc/source/core/data/markdata.cxx
index 0fe000d9a50c..10e7fdc48d34 100644
--- a/sc/source/core/data/markdata.cxx
+++ b/sc/source/core/data/markdata.cxx
@@ -198,7 +198,7 @@ SCTAB ScMarkData::GetSelectCount() const
SCTAB ScMarkData::GetFirstSelected() const
{
- if (maTabMarked.size() > 0)
+ if (!maTabMarked.empty())
return (*maTabMarked.begin());
OSL_FAIL("GetFirstSelected: nothing selected");
@@ -207,7 +207,7 @@ SCTAB ScMarkData::GetFirstSelected() const
SCTAB ScMarkData::GetLastSelected() const
{
- if (maTabMarked.size() > 0)
+ if (!maTabMarked.empty())
return (*maTabMarked.rbegin());
OSL_FAIL("GetLastSelected: nothing selected");
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index f65787120aaf..55751228d691 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -2138,7 +2138,7 @@ bool ScTable::DoSubTotals( ScSubTotalParam& rParam )
}
}
- if (aRowVector.size() > 0)
+ if (!aRowVector.empty())
{
// generate global total
SCROW nGlobalStartRow = aRowVector[0].nSubStartRow;
diff --git a/sc/source/core/opencl/op_statistical.cxx b/sc/source/core/opencl/op_statistical.cxx
index 79d27e5ef5e7..62f35865c7c7 100644
--- a/sc/source/core/opencl/op_statistical.cxx
+++ b/sc/source/core/opencl/op_statistical.cxx
@@ -223,7 +223,7 @@ void OpZTest::GenSlidingWindowFunction(std::stringstream &ss,
ss << " double arg = 0.0;\n";
ss << " double sigma = 0.0;\n";
ss << " double mu = 0.0;\n";
- if(vSubArguments.size() == 1 || vSubArguments.size() == 0)
+ if(vSubArguments.size() == 1 || vSubArguments.empty())
{
ss << " return DBL_MAX;\n";
ss << "}\n";
diff --git a/sc/source/filter/excel/excimp8.cxx b/sc/source/filter/excel/excimp8.cxx
index b09e5f7f3977..89250fa68ed2 100644
--- a/sc/source/filter/excel/excimp8.cxx
+++ b/sc/source/filter/excel/excimp8.cxx
@@ -438,7 +438,7 @@ void ImportExcel8::PostDocLoad()
ImportExcel::PostDocLoad();
// check scenarios; Attention: This increases the table count of the document!!
- if( !pD->IsClipboard() && maScenList.aEntries.size() )
+ if( !pD->IsClipboard() && !maScenList.aEntries.empty() )
{
pD->UpdateChartListenerCollection(); // references in charts must be updated
diff --git a/sc/source/filter/excel/xepivotxml.cxx b/sc/source/filter/excel/xepivotxml.cxx
index 431074fbce50..bb2dc847d75f 100644
--- a/sc/source/filter/excel/xepivotxml.cxx
+++ b/sc/source/filter/excel/xepivotxml.cxx
@@ -303,7 +303,7 @@ void XclExpXmlPivotCaches::SavePivotCacheXml( XclExpXmlStream& rStrm, const Entr
// 1 - (Default) at least one text value, or can also contain a mix of other data types and blank values,
// or blank values only
// 0 - the field does not have a mix of text and other values
- if (!(isContainsString || (aDPTypes.size() > 1) || (isContainsBlank && aDPTypesWithoutBlank.size() == 0)))
+ if (!(isContainsString || (aDPTypes.size() > 1) || (isContainsBlank && aDPTypesWithoutBlank.empty())))
pAttList->add(XML_containsSemiMixedTypes, ToPsz10(false));
if (!isContainsNonDate)
diff --git a/sc/source/filter/excel/xistyle.cxx b/sc/source/filter/excel/xistyle.cxx
index 14fa8478d0f5..174ed4bf298b 100644
--- a/sc/source/filter/excel/xistyle.cxx
+++ b/sc/source/filter/excel/xistyle.cxx
@@ -106,7 +106,7 @@ public:
}
virtual sal_Bool SAL_CALL hasElements() override
{
- return (maColor.size() > 0);
+ return (!maColor.empty());
}
private:
diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx
index 7eda5c9dae14..9ea3af92cb3b 100644
--- a/sc/source/filter/html/htmlpars.cxx
+++ b/sc/source/filter/html/htmlpars.cxx
@@ -1355,7 +1355,7 @@ void ScHTMLLayoutParser::Image( HtmlImportInfo* pInfo )
pImage->aSize = pDefaultDev->LogicToPixel( pGraphic->GetPrefSize(),
pGraphic->GetPrefMapMode() );
}
- if (mxActEntry->maImageList.size() > 0)
+ if (!mxActEntry->maImageList.empty())
{
long nWidth = 0;
for (std::unique_ptr<ScHTMLImage> & pI : mxActEntry->maImageList)
@@ -1564,7 +1564,7 @@ void ScHTMLLayoutParser::ProcToken( HtmlImportInfo* pInfo )
break;
case HtmlTokenId::PARABREAK_OFF:
{ // We continue vertically after an image
- if (mxActEntry->maImageList.size() > 0)
+ if (!mxActEntry->maImageList.empty())
mxActEntry->maImageList.back()->nDir = nVertical;
}
break;
diff --git a/sc/source/filter/oox/formulabuffer.cxx b/sc/source/filter/oox/formulabuffer.cxx
index babfb61395b8..91bddc80ec76 100644
--- a/sc/source/filter/oox/formulabuffer.cxx
+++ b/sc/source/filter/oox/formulabuffer.cxx
@@ -394,15 +394,15 @@ FormulaBuffer::SheetItem FormulaBuffer::getSheetItem( SCTAB nTab )
return aItem;
}
- if( maCellFormulas[ nTab ].size() > 0 )
+ if( !maCellFormulas[ nTab ].empty() )
aItem.mpCellFormulas = &maCellFormulas[ nTab ];
- if( maCellArrayFormulas[ nTab ].size() > 0 )
+ if( !maCellArrayFormulas[ nTab ].empty() )
aItem.mpArrayFormulas = &maCellArrayFormulas[ nTab ];
- if( maCellFormulaValues[ nTab ].size() > 0 )
+ if( !maCellFormulaValues[ nTab ].empty() )
aItem.mpCellFormulaValues = &maCellFormulaValues[ nTab ];
- if( maSharedFormulas[ nTab ].size() > 0 )
+ if( !maSharedFormulas[ nTab ].empty() )
aItem.mpSharedFormulaEntries = &maSharedFormulas[ nTab ];
- if( maSharedFormulaIds[ nTab ].size() > 0 )
+ if( !maSharedFormulaIds[ nTab ].empty() )
aItem.mpSharedFormulaIDs = &maSharedFormulaIds[ nTab ];
return aItem;
diff --git a/sc/source/filter/oox/formulaparser.cxx b/sc/source/filter/oox/formulaparser.cxx
index 888f0465a53d..765881c3ec7b 100644
--- a/sc/source/filter/oox/formulaparser.cxx
+++ b/sc/source/filter/oox/formulaparser.cxx
@@ -696,7 +696,7 @@ size_t FormulaParserImpl::insertWhiteSpaceTokens( const WhiteSpaceVec* pSpaces,
size_t FormulaParserImpl::getOperandSize( size_t nOpIndex ) const
{
- OSL_ENSURE( (nOpIndex < 1) && (1 <= maOperandSizeStack.size()),
+ OSL_ENSURE( (nOpIndex < 1) && (!maOperandSizeStack.empty()),
"FormulaParserImpl::getOperandSize - invalid parameters" );
return maOperandSizeStack[ maOperandSizeStack.size() - 1 + nOpIndex ];
}
@@ -753,7 +753,7 @@ bool FormulaParserImpl::pushParenthesesOperandToken( const WhiteSpaceVec* pClosi
bool FormulaParserImpl::pushUnaryPreOperatorToken( sal_Int32 nOpCode, const WhiteSpaceVec* pSpaces )
{
- bool bOk = maOperandSizeStack.size() >= 1;
+ bool bOk = !maOperandSizeStack.empty();
if( bOk )
{
size_t nOpSize = popOperandSize();
@@ -766,7 +766,7 @@ bool FormulaParserImpl::pushUnaryPreOperatorToken( sal_Int32 nOpCode, const Whit
bool FormulaParserImpl::pushUnaryPostOperatorToken( sal_Int32 nOpCode, const WhiteSpaceVec* pSpaces )
{
- bool bOk = maOperandSizeStack.size() >= 1;
+ bool bOk = !maOperandSizeStack.empty();
if( bOk )
{
size_t nOpSize = popOperandSize();
@@ -793,7 +793,7 @@ bool FormulaParserImpl::pushBinaryOperatorToken( sal_Int32 nOpCode, const WhiteS
bool FormulaParserImpl::pushParenthesesOperatorToken( const WhiteSpaceVec* pOpeningSpaces, const WhiteSpaceVec* pClosingSpaces )
{
- bool bOk = maOperandSizeStack.size() >= 1;
+ bool bOk = !maOperandSizeStack.empty();
if( bOk )
{
size_t nOpSize = popOperandSize();
diff --git a/sc/source/filter/xml/XMLExportIterator.cxx b/sc/source/filter/xml/XMLExportIterator.cxx
index 58f1b693a804..71940997d613 100644
--- a/sc/source/filter/xml/XMLExportIterator.cxx
+++ b/sc/source/filter/xml/XMLExportIterator.cxx
@@ -444,7 +444,7 @@ void ScMyDetectiveObjContainer::SetCellData( ScMyCell& rMyCell )
rMyCell.aDetectiveObjVec.push_back( *aItr );
aItr = aDetectiveObjList.erase( aItr );
}
- rMyCell.bHasDetectiveObj = (rMyCell.aDetectiveObjVec.size() != 0);
+ rMyCell.bHasDetectiveObj = (!rMyCell.aDetectiveObjVec.empty());
}
void ScMyDetectiveObjContainer::SkipTable(SCTAB nSkip)
@@ -503,7 +503,7 @@ void ScMyDetectiveOpContainer::SetCellData( ScMyCell& rMyCell )
rMyCell.aDetectiveOpVec.push_back( *aItr );
aItr = aDetectiveOpList.erase( aItr );
}
- rMyCell.bHasDetectiveOp = (rMyCell.aDetectiveOpVec.size() != 0);
+ rMyCell.bHasDetectiveOp = (!rMyCell.aDetectiveOpVec.empty());
}
void ScMyDetectiveOpContainer::SkipTable(SCTAB nSkip)
diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx
index bf68d4a48b59..a8b61cdfd93f 100644
--- a/sc/source/filter/xml/xmlcelli.cxx
+++ b/sc/source/filter/xml/xmlcelli.cxx
@@ -964,7 +964,7 @@ void ScXMLTableRowCellContext::SetAnnotation(const ScAddress& rPos)
// core implementation
void ScXMLTableRowCellContext::SetDetectiveObj( const ScAddress& rPosition )
{
- if( cellExists(rPosition) && pDetectiveObjVec && pDetectiveObjVec->size() )
+ if( cellExists(rPosition) && pDetectiveObjVec && !pDetectiveObjVec->empty() )
{
LockSolarMutex();
ScDetectiveFunc aDetFunc( rXMLImport.GetDocument(), rPosition.Tab() );
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index 0112c308d71d..7d143a7faec0 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -4562,7 +4562,7 @@ void ScXMLExport::ExportConditionalFormat(SCTAB nTab)
ScConditionalFormatList* pCondFormatList = pDoc->GetCondFormList(nTab);
if(pCondFormatList)
{
- if(pCondFormatList && !pCondFormatList->size())
+ if(pCondFormatList && pCondFormatList->empty())
return;
SvXMLElementExport aElementCondFormats(*this, XML_NAMESPACE_CALC_EXT, XML_CONDITIONAL_FORMATS, true, true);
diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx
index 6a2a8b436674..bcccb1af82bb 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -1535,7 +1535,7 @@ void ScTabStops::AddTabStop( vcl::Window* pWin )
void ScTabStops::SetTabStop( vcl::Window* pWin )
{
- if ( !maControls.size() )
+ if ( maControls.empty() )
return;
ControlToPosMap::const_iterator aIter = maControlToPos.find( pWin );
if ( aIter == maControlToPos.end() )
@@ -1554,7 +1554,7 @@ void ScTabStops::SetTabStop( vcl::Window* pWin )
void ScTabStops::CycleFocus( bool bReverse )
{
- if (!maControls.size())
+ if (maControls.empty())
return;
if ( mnCurTabStop < maControls.size() )
{
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 6cdc2c35dc4e..2968ea7f53c0 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -1167,7 +1167,7 @@ static void lcl_parseHtmlFilterOption(const OUString& rOption, LanguageType& rLa
rLang = LanguageType( 0 );
rDateConvert = false;
- if (aTokens.size() > 0)
+ if (!aTokens.empty())
rLang = static_cast<LanguageType>(aTokens[0].toInt32());
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list