summaryrefslogtreecommitdiff
path: root/sd/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-10-19 08:12:17 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-10-19 10:02:39 +0200
commit2c1b7e8d6a7fa22cb91919238418816671c3a497 (patch)
tree6f356017d24dffcd25261295ab25a21b738dc835 /sd/source
parentad18bb24d51e4f735085d50c496d28bd637dbb0b (diff)
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@collabora.co.uk>
Diffstat (limited to 'sd/source')
-rw-r--r--sd/source/core/CustomAnimationPreset.cxx2
-rw-r--r--sd/source/filter/eppt/pptx-animations.cxx2
-rw-r--r--sd/source/ui/animations/CustomAnimationPane.cxx6
-rw-r--r--sd/source/ui/dlg/TemplateScanner.cxx2
-rw-r--r--sd/source/ui/remotecontrol/Receiver.cxx2
-rw-r--r--sd/source/ui/sidebar/MasterPageContainer.cxx2
-rw-r--r--sd/source/ui/sidebar/MasterPageContainerQueue.cxx4
-rw-r--r--sd/source/ui/slideshow/slideshowimpl.cxx2
-rw-r--r--sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx2
9 files changed, 12 insertions, 12 deletions
diff --git a/sd/source/core/CustomAnimationPreset.cxx b/sd/source/core/CustomAnimationPreset.cxx
index 22917ec40ee4..804ef7b9ddf2 100644
--- a/sd/source/core/CustomAnimationPreset.cxx
+++ b/sd/source/core/CustomAnimationPreset.cxx
@@ -563,7 +563,7 @@ Reference< XAnimationNode > CustomAnimationPresets::getRandomPreset( sal_Int16 n
pCategoryList = nullptr;
}
- if( pCategoryList && pCategoryList->size() )
+ if( pCategoryList && !pCategoryList->empty() )
{
sal_Int32 nCategory = comphelper::rng::uniform_size_distribution(0, pCategoryList->size()-1);
diff --git a/sd/source/filter/eppt/pptx-animations.cxx b/sd/source/filter/eppt/pptx-animations.cxx
index d4e34d18a03f..34e2aef03122 100644
--- a/sd/source/filter/eppt/pptx-animations.cxx
+++ b/sd/source/filter/eppt/pptx-animations.cxx
@@ -1256,7 +1256,7 @@ void NodeContext::initValid(bool bHasValidChild, bool bIsIterateChild)
{
Reference<XIterateContainer> xIterate(mxNode, UNO_QUERY);
mbValid = xIterate.is() && (bIsIterateChild || isValidTarget(xIterate->getTarget()))
- && maChildNodes.size();
+ && !maChildNodes.empty();
}
else if (nType == AnimationNodeType::COMMAND)
{
diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx
index 7a4013469ae3..8b3f3c76acaf 100644
--- a/sd/source/ui/animations/CustomAnimationPane.cxx
+++ b/sd/source/ui/animations/CustomAnimationPane.cxx
@@ -574,7 +574,7 @@ void CustomAnimationPane::updateControls()
Any aValue;
std::vector<OUString> aProperties( pDescriptor->getProperties() );
- if( aProperties.size() >= 1 )
+ if( !aProperties.empty() )
{
mnPropertyType = getPropertyType( aProperties.front() );
@@ -1209,7 +1209,7 @@ std::unique_ptr<STLPropertySet> CustomAnimationPane::createSelectionSet()
sal_Int32 nType = nPropertyTypeNone;
std::vector<OUString> aProperties( pDescriptor->getProperties() );
- if( aProperties.size() >= 1 )
+ if( !aProperties.empty() )
nType = getPropertyType( aProperties.front() );
if( nType != nPropertyTypeNone )
@@ -1614,7 +1614,7 @@ void CustomAnimationPane::changeSelection( STLPropertySet const * pResultSet, ST
// All the effects of the outline object is removed so we need to
// put it back. OTOH, the shape object that still has effects
// in the text group is fine.
- if (nTextGrouping == -1 && pTextGroup->getEffects().size() == 0)
+ if (nTextGrouping == -1 && pTextGroup->getEffects().empty())
{
pEffect->setTarget(makeAny(pEffect->getTargetShape()));
pEffect->setGroupId(-1);
diff --git a/sd/source/ui/dlg/TemplateScanner.cxx b/sd/source/ui/dlg/TemplateScanner.cxx
index 6ce40b056548..fae2557fd889 100644
--- a/sd/source/ui/dlg/TemplateScanner.cxx
+++ b/sd/source/ui/dlg/TemplateScanner.cxx
@@ -275,7 +275,7 @@ TemplateScanner::State TemplateScanner::ScanFolder()
{
State eNextState (ERROR);
- if (mpFolderDescriptors->size() > 0)
+ if (!mpFolderDescriptors->empty())
{
FolderDescriptor aDescriptor (*mpFolderDescriptors->begin());
mpFolderDescriptors->erase(mpFolderDescriptors->begin());
diff --git a/sd/source/ui/remotecontrol/Receiver.cxx b/sd/source/ui/remotecontrol/Receiver.cxx
index 4e810ab5bbd6..042a63006f78 100644
--- a/sd/source/ui/remotecontrol/Receiver.cxx
+++ b/sd/source/ui/remotecontrol/Receiver.cxx
@@ -52,7 +52,7 @@ void Receiver::pushCommand( const std::vector<OString> &rCommand )
void Receiver::Invoke()
{
- if( maExecQueue.size() )
+ if( !maExecQueue.empty() )
{
std::vector< OString > aCommands( maExecQueue.front() );
maExecQueue.pop_front();
diff --git a/sd/source/ui/sidebar/MasterPageContainer.cxx b/sd/source/ui/sidebar/MasterPageContainer.cxx
index 6f7cd12b64a8..c76105eae2eb 100644
--- a/sd/source/ui/sidebar/MasterPageContainer.cxx
+++ b/sd/source/ui/sidebar/MasterPageContainer.cxx
@@ -661,7 +661,7 @@ MasterPageContainer::Token MasterPageContainer::Implementation::PutMasterPage (
aResult = (*aEntry)->maToken;
std::unique_ptr<std::vector<MasterPageContainerChangeEvent::EventType> > pEventTypes(
(*aEntry)->Update(*rpDescriptor));
- if (pEventTypes != nullptr && pEventTypes->size() > 0)
+ if (pEventTypes != nullptr && !pEventTypes->empty())
{
// One or more aspects of the descriptor have changed. Send
// appropriate events to the listeners.
diff --git a/sd/source/ui/sidebar/MasterPageContainerQueue.cxx b/sd/source/ui/sidebar/MasterPageContainerQueue.cxx
index 4690ad283d7a..fce6798068d5 100644
--- a/sd/source/ui/sidebar/MasterPageContainerQueue.cxx
+++ b/sd/source/ui/sidebar/MasterPageContainerQueue.cxx
@@ -227,7 +227,7 @@ IMPL_LINK(MasterPageContainerQueue, DelayedPreviewCreation, Timer*, pTimer, void
}
while (false);
- if (mpRequestQueue->size() > 0 && ! bWaitForMoreRequests)
+ if (!mpRequestQueue->empty() && ! bWaitForMoreRequests)
{
int nTimeout (snDelayedCreationTimeout);
if (bIsShowingFullScreenShow)
@@ -253,7 +253,7 @@ bool MasterPageContainerQueue::IsEmpty() const
void MasterPageContainerQueue::ProcessAllRequests()
{
snWaitForMoreRequestsCount = 0;
- if (mpRequestQueue->size() > 0)
+ if (!mpRequestQueue->empty())
maDelayedPreviewCreationTimer.Start();
}
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index 32b271647157..7f100e66f1f6 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -2229,7 +2229,7 @@ void SlideshowImpl::createSlideList( bool bAll, const OUString& rPresSlide )
// create animation slide controller
AnimationSlideController::Mode eMode =
- ( pCustomShow && pCustomShow->PagesVector().size() ) ? AnimationSlideController::CUSTOM :
+ ( pCustomShow && !pCustomShow->PagesVector().empty() ) ? AnimationSlideController::CUSTOM :
(bAll ? AnimationSlideController::ALL : AnimationSlideController::FROM);
Reference< XDrawPagesSupplier > xDrawPages( mpDoc->getUnoModel(), UNO_QUERY_THROW );
diff --git a/sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx b/sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx
index 1ae2bd57e3b1..47099f1211e5 100644
--- a/sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx
+++ b/sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx
@@ -78,7 +78,7 @@ void ForAllRectangles (const vcl::Region& rRegion, const std::function<void (con
RectangleVector aRectangles;
rRegion.GetRegionRectangles(aRectangles);
- if(0 == aRectangles.size())
+ if(aRectangles.empty())
{
aFunction(::tools::Rectangle());
}