summaryrefslogtreecommitdiff
path: root/vcl/source/gdi/print3.cxx
diff options
context:
space:
mode:
authorArkadiy Illarionov <qarkai@gmail.com>2019-05-01 00:53:03 +0300
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-05-02 09:53:48 +0200
commit855f52ead7fa361b6a73105d1f0086559a8ed5b6 (patch)
tree042fb792f2c64666ef5fa01436ccafd728860eca /vcl/source/gdi/print3.cxx
parent0c434b06a3792a6429fbe718a0231c48597c1ff5 (diff)
Use hasElements to check Sequence emptiness in [v-x]*
Similar to clang-tidy readability-container-size-empty Change-Id: I71e7af4ac3043d8d40922e99f8a4798f0993294c Reviewed-on: https://gerrit.libreoffice.org/71603 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/gdi/print3.cxx')
-rw-r--r--vcl/source/gdi/print3.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx
index 78715752b711..b60a2dddc6af 100644
--- a/vcl/source/gdi/print3.cxx
+++ b/vcl/source/gdi/print3.cxx
@@ -1508,7 +1508,7 @@ void PrinterController::setValue( const css::beans::PropertyValue& i_rPropertyVa
void PrinterController::setUIOptions( const css::uno::Sequence< css::beans::PropertyValue >& i_rOptions )
{
- SAL_WARN_IF( mpImplData->maUIOptions.getLength() != 0, "vcl.gdi", "setUIOptions called twice !" );
+ SAL_WARN_IF( mpImplData->maUIOptions.hasElements(), "vcl.gdi", "setUIOptions called twice !" );
mpImplData->maUIOptions = i_rOptions;
@@ -1564,7 +1564,7 @@ void PrinterController::setUIOptions( const css::uno::Sequence< css::beans::Prop
}
if( !aDep.maDependsOnName.isEmpty() )
mpImplData->maControlDependencies[ aPropName ] = aDep;
- if( aChoicesDisabled.getLength() > 0 )
+ if( aChoicesDisabled.hasElements() )
mpImplData->maChoiceDisableMap[ aPropName ] = aChoicesDisabled;
}
}
@@ -1874,7 +1874,7 @@ css::uno::Any PrinterOptionsHelper::setUIControlOpt(const css::uno::Sequence< OU
sal_Int32 nElements =
2 // ControlType + ID
+ (i_rTitle.isEmpty() ? 0 : 1) // Text
- + (i_rHelpIds.getLength() ? 1 : 0) // HelpId
+ + (i_rHelpIds.hasElements() ? 1 : 0) // HelpId
+ (i_pVal ? 1 : 0) // Property
+ i_rControlOptions.maAddProps.size() // additional props
+ (i_rControlOptions.maGroupHint.isEmpty() ? 0 : 1) // grouping
@@ -1897,7 +1897,7 @@ css::uno::Any PrinterOptionsHelper::setUIControlOpt(const css::uno::Sequence< OU
aCtrl[nUsed ].Name = "Text";
aCtrl[nUsed++].Value <<= i_rTitle;
}
- if( i_rHelpIds.getLength() )
+ if( i_rHelpIds.hasElements() )
{
aCtrl[nUsed ].Name = "HelpId";
aCtrl[nUsed++].Value <<= i_rHelpIds;
@@ -2011,10 +2011,10 @@ css::uno::Any PrinterOptionsHelper::setChoiceRadiosControlOpt(const css::uno::Se
{
UIControlOptions aOpt( i_rControlOptions );
sal_Int32 nUsed = aOpt.maAddProps.size();
- aOpt.maAddProps.resize( nUsed + 1 + (i_rDisabledChoices.getLength() ? 1 : 0) );
+ aOpt.maAddProps.resize( nUsed + 1 + (i_rDisabledChoices.hasElements() ? 1 : 0) );
aOpt.maAddProps[nUsed].Name = "Choices";
aOpt.maAddProps[nUsed].Value <<= i_rChoices;
- if( i_rDisabledChoices.getLength() )
+ if( i_rDisabledChoices.hasElements() )
{
aOpt.maAddProps[nUsed+1].Name = "ChoicesDisabled";
aOpt.maAddProps[nUsed+1].Value <<= i_rDisabledChoices;
@@ -2037,10 +2037,10 @@ css::uno::Any PrinterOptionsHelper::setChoiceListControlOpt(const OUString& i_rI
{
UIControlOptions aOpt( i_rControlOptions );
sal_Int32 nUsed = aOpt.maAddProps.size();
- aOpt.maAddProps.resize( nUsed + 1 + (i_rDisabledChoices.getLength() ? 1 : 0) );
+ aOpt.maAddProps.resize( nUsed + 1 + (i_rDisabledChoices.hasElements() ? 1 : 0) );
aOpt.maAddProps[nUsed].Name = "Choices";
aOpt.maAddProps[nUsed].Value <<= i_rChoices;
- if( i_rDisabledChoices.getLength() )
+ if( i_rDisabledChoices.hasElements() )
{
aOpt.maAddProps[nUsed+1].Name = "ChoicesDisabled";
aOpt.maAddProps[nUsed+1].Value <<= i_rDisabledChoices;