summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sfx2/source/dialog/mailmodel.cxx2
-rw-r--r--sfx2/source/dialog/securitypage.cxx2
-rw-r--r--sfx2/source/doc/docinf.cxx2
-rw-r--r--sfx2/source/doc/docinsert.cxx2
-rw-r--r--sfx2/source/doc/docmacromode.cxx2
-rw-r--r--sfx2/source/doc/doctemplates.cxx10
-rw-r--r--sfx2/source/doc/guisaveas.cxx14
-rw-r--r--sfx2/source/doc/iframe.cxx2
-rw-r--r--sfx2/source/doc/objmisc.cxx4
-rw-r--r--sfx2/source/doc/objserv.cxx2
-rw-r--r--sfx2/source/doc/objstor.cxx6
-rw-r--r--sfx2/source/doc/oleprops.cxx4
-rw-r--r--sfx2/source/doc/printhelper.cxx2
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx6
-rw-r--r--sfx2/source/doc/sfxmodelfactory.cxx2
-rw-r--r--sfx2/source/notify/eventsupplier.cxx5
-rw-r--r--sfx2/source/view/sfxbasecontroller.cxx2
-rw-r--r--sfx2/source/view/viewfrm.cxx8
-rw-r--r--sfx2/source/view/viewfrm2.cxx2
-rw-r--r--shell/source/cmdmail/cmdmailmsg.cxx20
-rw-r--r--starmath/source/view.cxx2
-rw-r--r--stoc/source/corereflection/crcomp.cxx2
-rw-r--r--stoc/source/corereflection/criface.cxx2
-rw-r--r--stoc/source/implementationregistration/implreg.cxx33
-rw-r--r--stoc/source/inspect/introspection.cxx2
-rw-r--r--stoc/source/invocation_adapterfactory/iafactory.cxx2
-rw-r--r--stoc/source/servicemanager/servicemanager.cxx8
-rw-r--r--svl/source/config/cjkoptions.cxx2
-rw-r--r--svl/source/config/ctloptions.cxx2
-rw-r--r--svl/source/config/languageoptions.cxx2
-rw-r--r--svl/source/fsstor/ostreamcontainer.cxx4
-rw-r--r--svl/source/items/lckbitem.cxx2
-rw-r--r--svl/source/numbers/zforfind.cxx8
-rw-r--r--svl/source/passwordcontainer/passwordcontainer.cxx4
-rw-r--r--svtools/source/config/extcolorcfg.cxx4
-rw-r--r--svtools/source/control/filectrl.cxx2
-rw-r--r--svtools/source/misc/embedtransfer.cxx2
-rw-r--r--svtools/source/misc/imagemgr.cxx2
-rw-r--r--svtools/source/uno/treecontrolpeer.cxx2
-rw-r--r--svtools/source/uno/wizard/unowizard.cxx6
-rw-r--r--svtools/source/uno/wizard/wizardshell.cxx2
-rw-r--r--svx/source/customshapes/EnhancedCustomShape2d.cxx13
-rw-r--r--svx/source/dialog/rubydialog.cxx4
-rw-r--r--svx/source/fmcomp/gridcell.cxx4
-rw-r--r--svx/source/form/databaselocationinput.cxx4
-rw-r--r--svx/source/form/fmexch.cxx8
-rw-r--r--svx/source/form/fmobj.cxx2
-rw-r--r--svx/source/form/fmscriptingenv.cxx2
-rw-r--r--svx/source/form/fmshimp.cxx4
-rw-r--r--svx/source/form/fmtextcontrolshell.cxx4
-rw-r--r--svx/source/form/fmvwimp.cxx6
-rw-r--r--svx/source/form/formcontroller.cxx2
-rw-r--r--svx/source/form/formfeaturedispatcher.cxx2
-rw-r--r--svx/source/form/navigatortree.cxx2
-rw-r--r--svx/source/gallery2/galbrws2.cxx2
-rw-r--r--svx/source/items/customshapeitem.cxx2
-rw-r--r--svx/source/mnuctrls/smarttagmenu.cxx2
-rw-r--r--svx/source/sidebar/line/LineWidthPopup.cxx2
-rw-r--r--svx/source/sidebar/text/TextCharacterSpacingControl.cxx2
-rw-r--r--svx/source/tbxctrls/tbunosearchcontrollers.cxx2
-rw-r--r--svx/source/unodraw/unomod.cxx2
-rw-r--r--svx/source/xml/xmlgrhlp.cxx2
62 files changed, 131 insertions, 136 deletions
diff --git a/sfx2/source/dialog/mailmodel.cxx b/sfx2/source/dialog/mailmodel.cxx
index 498433ad9f42..8450baad99b4 100644
--- a/sfx2/source/dialog/mailmodel.cxx
+++ b/sfx2/source/dialog/mailmodel.cxx
@@ -432,7 +432,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
uno::Sequence< OUString > aExtensions = aTypeNamePropsHM.getUnpackedValueOrDefault(
"Extensions",
::uno::Sequence< OUString >() );
- if ( aExtensions.getLength() )
+ if ( aExtensions.hasElements() )
aExtension = aExtensions[0];
}
catch ( css::container::NoSuchElementException& )
diff --git a/sfx2/source/dialog/securitypage.cxx b/sfx2/source/dialog/securitypage.cxx
index d6db1818e7c6..fcafc1638afc 100644
--- a/sfx2/source/dialog/securitypage.cxx
+++ b/sfx2/source/dialog/securitypage.cxx
@@ -292,7 +292,7 @@ void SfxSecurityPage_Impl::Reset_Impl()
uno::Sequence< sal_Int8 > aPasswordHash;
// check if password is available
if (pCurDocShell->GetProtectionHash( aPasswordHash ) &&
- aPasswordHash.getLength() > 0)
+ aPasswordHash.hasElements())
m_bOrigPasswordIsConfirmed = false; // password found, needs to be confirmed later on
}
else
diff --git a/sfx2/source/doc/docinf.cxx b/sfx2/source/doc/docinf.cxx
index 943b767151d1..6960064e147b 100644
--- a/sfx2/source/doc/docinf.cxx
+++ b/sfx2/source/doc/docinf.cxx
@@ -235,7 +235,7 @@ bool SaveOlePropertySet(
rGlobSect.SetStringValue( PROPID_REVNUMBER,
OUString::number( i_xDocProps->getEditingCycles() ) );
- if ( i_pThumb && i_pThumb->getLength() )
+ if ( i_pThumb && i_pThumb->hasElements() )
rGlobSect.SetThumbnailValue( PROPID_THUMBNAIL, *i_pThumb );
// save the property set
diff --git a/sfx2/source/doc/docinsert.cxx b/sfx2/source/doc/docinsert.cxx
index 7b64851e0071..aa9c4c6b3a33 100644
--- a/sfx2/source/doc/docinsert.cxx
+++ b/sfx2/source/doc/docinsert.cxx
@@ -171,7 +171,7 @@ static void impl_FillURLList( sfx2::FileDialogHelper const * _pFileDlg, std::vec
Sequence < OUString > aPathSeq = _pFileDlg->GetSelectedFiles();
- if ( aPathSeq.getLength() )
+ if ( aPathSeq.hasElements() )
{
_rpURLList.clear();
diff --git a/sfx2/source/doc/docmacromode.cxx b/sfx2/source/doc/docmacromode.cxx
index cc141f298264..41b25170b8a3 100644
--- a/sfx2/source/doc/docmacromode.cxx
+++ b/sfx2/source/doc/docmacromode.cxx
@@ -311,7 +311,7 @@ namespace sfx2
const OUString aStdLibName( "Standard" );
const OUString aVBAProject( "VBAProject" );
Sequence< OUString > aElements = xContainer->getElementNames();
- if ( aElements.getLength() )
+ if ( aElements.hasElements() )
{
sal_Int32 nElements = aElements.getLength();
for( sal_Int32 i = 0; i < nElements; ++i )
diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx
index 75dc7112002d..67702b9c0ef5 100644
--- a/sfx2/source/doc/doctemplates.cxx
+++ b/sfx2/source/doc/doctemplates.cxx
@@ -1352,7 +1352,7 @@ OUString SfxDocTplService_Impl::CreateNewGroupFsys( const OUString& rGroupName,
{
OUString aResultURL;
- if ( maTemplateDirs.getLength() )
+ if ( maTemplateDirs.hasElements() )
{
OUString aTargetPath = maTemplateDirs[ maTemplateDirs.getLength() - 1 ];
@@ -1509,7 +1509,7 @@ bool SfxDocTplService_Impl::removeGroup( const OUString& rGroupName )
if ( aGroupTargetURL.isEmpty() )
return false; // nothing is allowed to be removed
- if ( !maTemplateDirs.getLength() )
+ if ( !maTemplateDirs.hasElements() )
return false;
// check that the fs location is in writable folder and this is not a "My templates" folder
@@ -1622,7 +1622,7 @@ bool SfxDocTplService_Impl::renameGroup( const OUString& rOldName,
if ( aGroupTargetURL.isEmpty() )
return false;
- if ( !maTemplateDirs.getLength() )
+ if ( !maTemplateDirs.hasElements() )
return false;
// check that the fs location is in writable folder and this is not a "My templates" folder
@@ -1723,7 +1723,7 @@ bool SfxDocTplService_Impl::storeTemplate( const OUString& rGroupName,
if ( getProperty( aTemplateToRemove, TARGET_URL, aValue ) )
aValue >>= aTemplateToRemoveTargetURL;
- if ( aGroupTargetURL.isEmpty() || !maTemplateDirs.getLength()
+ if ( aGroupTargetURL.isEmpty() || !maTemplateDirs.hasElements()
|| (!aTemplateToRemoveTargetURL.isEmpty() && isInternalTemplateDir(aTemplateToRemoveTargetURL)) )
return false; // it is not allowed to remove the template
}
@@ -1788,7 +1788,7 @@ bool SfxDocTplService_Impl::storeTemplate( const OUString& rGroupName,
SequenceAsHashMap aTypeProps( xTypeDetection->getByName( aTypeName ) );
uno::Sequence< OUString > aAllExt =
aTypeProps.getUnpackedValueOrDefault("Extensions", Sequence< OUString >() );
- if ( !aAllExt.getLength() )
+ if ( !aAllExt.hasElements() )
throw uno::RuntimeException();
const OUString aMediaType {aTypeProps.getUnpackedValueOrDefault("MediaType", OUString() )};
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index 5c8b57234319..9be232c8d6f5 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -434,7 +434,7 @@ const ::comphelper::SequenceAsHashMap& ModelData_Impl::GetModuleProps()
{
uno::Sequence< beans::PropertyValue > aModuleProps;
m_pOwner->GetModuleManager()->getByName( GetModuleName() ) >>= aModuleProps;
- if ( !aModuleProps.getLength() )
+ if ( !aModuleProps.hasElements() )
throw uno::RuntimeException(); // TODO;
m_pModulePropsHM.reset( new ::comphelper::SequenceAsHashMap( aModuleProps ) );
}
@@ -490,7 +490,7 @@ uno::Sequence< beans::PropertyValue > ModelData_Impl::GetDocServiceDefaultFilter
{
uno::Sequence< beans::PropertyValue > aFilterProps;
uno::Sequence< beans::PropertyValue > aProps = GetDocServiceDefaultFilter();
- if ( aProps.getLength() )
+ if ( aProps.hasElements() )
{
::comphelper::SequenceAsHashMap aFiltHM( aProps );
SfxFilterFlags nFlags = static_cast<SfxFilterFlags>(aFiltHM.getUnpackedValueOrDefault("Flags",
@@ -547,7 +547,7 @@ uno::Sequence< beans::PropertyValue > ModelData_Impl::GetPreselectedFilter_Impl(
{
aFilterProps = GetDocServiceDefaultFilterCheckFlags( nMust, nDont );
- if ( !aFilterProps.getLength() )
+ if ( !aFilterProps.hasElements() )
{
// the default filter was not found, use just the first acceptable one
aFilterProps = GetDocServiceAnyFilter( nMust, nDont );
@@ -1136,13 +1136,13 @@ OUString ModelData_Impl::GetRecommendedExtension( const OUString& aTypeName )
if ( xTypeDetection.is() )
{
uno::Sequence< beans::PropertyValue > aTypeNameProps;
- if ( ( xTypeDetection->getByName( aTypeName ) >>= aTypeNameProps ) && aTypeNameProps.getLength() )
+ if ( ( xTypeDetection->getByName( aTypeName ) >>= aTypeNameProps ) && aTypeNameProps.hasElements() )
{
::comphelper::SequenceAsHashMap aTypeNamePropsHM( aTypeNameProps );
uno::Sequence< OUString > aExtensions = aTypeNamePropsHM.getUnpackedValueOrDefault(
"Extensions",
::uno::Sequence< OUString >() );
- if ( aExtensions.getLength() )
+ if ( aExtensions.hasElements() )
return aExtensions[0];
}
}
@@ -1422,8 +1422,8 @@ bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >& xMo
// preselect a filter for the storing process
uno::Sequence< beans::PropertyValue > aFilterProps = aModelData.GetPreselectedFilter_Impl( nStoreMode );
- DBG_ASSERT( aFilterProps.getLength(), "No filter for storing!\n" );
- if ( !aFilterProps.getLength() )
+ DBG_ASSERT( aFilterProps.hasElements(), "No filter for storing!\n" );
+ if ( !aFilterProps.hasElements() )
throw task::ErrorCodeIOException(
"SfxStoringHelper::GUIStoreModel: ERRCODE_IO_INVALIDPARAMETER",
uno::Reference< uno::XInterface >(), sal_uInt32(ERRCODE_IO_INVALIDPARAMETER));
diff --git a/sfx2/source/doc/iframe.cxx b/sfx2/source/doc/iframe.cxx
index b12b78d80678..e9bc3f0aabe9 100644
--- a/sfx2/source/doc/iframe.cxx
+++ b/sfx2/source/doc/iframe.cxx
@@ -149,7 +149,7 @@ IFrameObject::IFrameObject(const uno::Reference < uno::XComponentContext >& rxCo
: mxContext( rxContext )
, maPropMap( lcl_GetIFramePropertyMap_Impl() )
{
- if ( aArguments.getLength() )
+ if ( aArguments.hasElements() )
aArguments[0] >>= mxObj;
}
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index a176a82ddf37..e0ea4437af31 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -1060,7 +1060,7 @@ void SfxObjectShell::FinishedLoading( SfxLoadedFlags nFlags )
pImpl->nFlagsInProgress |= SfxLoadedFlags::MAINDOCUMENT;
static_cast<SfxHeaderAttributes_Impl*>(GetHeaderAttributes())->SetAttributes();
- if ( ( GetModifyPasswordHash() || GetModifyPasswordInfo().getLength() ) && !IsModifyPasswordEntered() )
+ if ( ( GetModifyPasswordHash() || GetModifyPasswordInfo().hasElements() ) && !IsModifyPasswordEntered() )
SetReadOnly();
// Salvage
@@ -1758,7 +1758,7 @@ bool SfxObjectShell_Impl::hasTrustedScriptingSignature( bool bAllowUIToAddAuthor
{
uno::Sequence< security::DocumentSignatureInformation > aInfo = rDocShell.GetDocumentSignatureInformation( true, xSigner );
- if ( aInfo.getLength() )
+ if ( aInfo.hasElements() )
{
if ( nScriptingSignatureState == SignatureState::UNKNOWN )
nScriptingSignatureState = SfxObjectShell::ImplCheckSignaturesInformation( aInfo );
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index 7d5fa32738e6..c93fdb26a8f9 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -516,7 +516,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
pDocInfoItem->UpdateDocumentInfo(getDocProperties());
const uno::Sequence< document::CmisProperty >& aNewCmisProperties =
pDocInfoItem->GetCmisProperties( );
- if ( aNewCmisProperties.getLength( ) > 0 )
+ if ( aNewCmisProperties.hasElements( ) )
xCmisDoc->updateCmisProperties( aNewCmisProperties );
SetUseUserData( pDocInfoItem->IsUseUserData() );
SetUseThumbnailSave( pDocInfoItem-> IsUseThumbnailSave() );
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 6ef63cdfbdac..e0feb44ccfae 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -679,7 +679,7 @@ bool SfxObjectShell::DoLoad( SfxMedium *pMed )
bWarnMediaTypeFallback = false;
}
- if ( bWarnMediaTypeFallback || !xStorage->getElementNames().getLength() )
+ if ( bWarnMediaTypeFallback || !xStorage->getElementNames().hasElements() )
SetError(ERRCODE_IO_BROKENPACKAGE);
}
catch( uno::Exception& )
@@ -1434,7 +1434,7 @@ bool SfxObjectShell::SaveTo_Impl
try
{
Sequence < util::RevisionTag > aVersions = rMedium.GetVersionList();
- if ( aVersions.getLength() )
+ if ( aVersions.hasElements() )
{
// copy the version streams
const OUString aVersionsName( "Versions" );
@@ -2908,7 +2908,7 @@ HiddenInformation SfxObjectShell::GetHiddenInformationState( HiddenInformation n
HiddenInformation nState = HiddenInformation::NONE;
if ( nStates & HiddenInformation::DOCUMENTVERSIONS )
{
- if ( GetMedium()->GetVersionList().getLength() )
+ if ( GetMedium()->GetVersionList().hasElements() )
nState |= HiddenInformation::DOCUMENTVERSIONS;
}
diff --git a/sfx2/source/doc/oleprops.cxx b/sfx2/source/doc/oleprops.cxx
index 474ba9976dd6..05f6c7721289 100644
--- a/sfx2/source/doc/oleprops.cxx
+++ b/sfx2/source/doc/oleprops.cxx
@@ -190,7 +190,7 @@ public:
explicit SfxOleThumbnailProperty( sal_Int32 nPropId,
const uno::Sequence<sal_Int8> & i_rData);
- bool IsValid() const { return mData.getLength() > 0; }
+ bool IsValid() const { return mData.hasElements(); }
private:
virtual void ImplLoad( SvStream& rStrm ) override;
@@ -211,7 +211,7 @@ class SfxOleBlobProperty : public SfxOlePropertyBase
public:
explicit SfxOleBlobProperty( sal_Int32 nPropId,
const uno::Sequence<sal_Int8> & i_rData);
- bool IsValid() const { return mData.getLength() > 0; }
+ bool IsValid() const { return mData.hasElements(); }
private:
virtual void ImplLoad( SvStream& rStrm ) override;
diff --git a/sfx2/source/doc/printhelper.cxx b/sfx2/source/doc/printhelper.cxx
index 5588fb983bf7..f485f5afae86 100644
--- a/sfx2/source/doc/printhelper.cxx
+++ b/sfx2/source/doc/printhelper.cxx
@@ -152,7 +152,7 @@ SfxPrintHelper::SfxPrintHelper()
void SAL_CALL SfxPrintHelper::initialize( const css::uno::Sequence< css::uno::Any >& aArguments )
{
- if ( !aArguments.getLength() )
+ if ( !aArguments.hasElements() )
return;
css::uno::Reference < css::frame::XModel > xModel;
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 4bd6ab5f83ed..2736a86f2d27 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -1979,7 +1979,7 @@ Any SAL_CALL SfxBaseModel::getTransferData( const datatransfer::DataFlavor& aFla
const sal_uInt32 nLen = pStream->TellEnd();
Sequence< sal_Int8 > aSeq( nLen );
pStream->ReadBytes(aSeq.getArray(), nLen);
- if( aSeq.getLength() )
+ if( aSeq.hasElements() )
aAny <<= aSeq;
}
catch ( Exception& )
@@ -2944,7 +2944,7 @@ void SfxBaseModel::impl_store( const OUString& sURL
if ( m_pData->m_pObjectShell->IsDocShared() )
{
uno::Sequence< beans::NamedValue > aNewEncryptionData = aArgHash.getUnpackedValueOrDefault("EncryptionData", uno::Sequence< beans::NamedValue >() );
- if ( !aNewEncryptionData.getLength() )
+ if ( !aNewEncryptionData.hasElements() )
{
aNewEncryptionData = ::comphelper::OStorageHelper::CreatePackageEncryptionData( aArgHash.getUnpackedValueOrDefault("Password", OUString()) );
}
@@ -2952,7 +2952,7 @@ void SfxBaseModel::impl_store( const OUString& sURL
uno::Sequence< beans::NamedValue > aOldEncryptionData;
(void)GetEncryptionData_Impl( pMedium->GetItemSet(), aOldEncryptionData );
- if ( !aOldEncryptionData.getLength() && !aNewEncryptionData.getLength() )
+ if ( !aOldEncryptionData.hasElements() && !aNewEncryptionData.hasElements() )
throw;
else
{
diff --git a/sfx2/source/doc/sfxmodelfactory.cxx b/sfx2/source/doc/sfxmodelfactory.cxx
index 292e2fd480a2..9b2403d00e46 100644
--- a/sfx2/source/doc/sfxmodelfactory.cxx
+++ b/sfx2/source/doc/sfxmodelfactory.cxx
@@ -166,7 +166,7 @@ namespace sfx2
);
aStrippedArguments.realloc( pStrippedArgsEnd - pStrippedArgs );
- if ( aStrippedArguments.getLength() )
+ if ( aStrippedArguments.hasElements() )
{
Reference< XInitialization > xModelInit( xInstance, UNO_QUERY );
OSL_ENSURE( xModelInit.is(), "SfxModelFactory::createInstanceWithArguments: no XInitialization!" );
diff --git a/sfx2/source/notify/eventsupplier.cxx b/sfx2/source/notify/eventsupplier.cxx
index 840dff455584..0be25c894451 100644
--- a/sfx2/source/notify/eventsupplier.cxx
+++ b/sfx2/source/notify/eventsupplier.cxx
@@ -162,10 +162,7 @@ sal_Bool SAL_CALL SfxEvents_Impl::hasElements()
{
::osl::MutexGuard aGuard( maMutex );
- if ( maEventNames.getLength() )
- return true;
- else
- return false;
+ return maEventNames.hasElements();
}
void SfxEvents_Impl::Execute( uno::Any const & aEventData, const document::DocumentEvent& aTrigger, SfxObjectShell* pDoc )
diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx
index 6f5671223e79..d143685d7c4b 100644
--- a/sfx2/source/view/sfxbasecontroller.cxx
+++ b/sfx2/source/view/sfxbasecontroller.cxx
@@ -1342,7 +1342,7 @@ void SfxBaseController::ConnectSfxFrame_Impl( const ConnectSfxFrame i_eConnect )
{
Sequence< PropertyValue > aViewData;
OSL_VERIFY( xViewData->getByIndex( nViewDataIndex ) >>= aViewData );
- if ( aViewData.getLength() > 0 )
+ if ( aViewData.hasElements() )
m_pData->m_pViewShell->ReadUserDataSequence( aViewData );
}
}
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 71573f3e6fe1..897bd9f5b180 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -216,7 +216,7 @@ bool IsSignPDF(const SfxObjectShellRef& xObjSh)
bool AskPasswordToModify_Impl( const uno::Reference< task::XInteractionHandler >& xHandler, const OUString& aPath, const std::shared_ptr<const SfxFilter>& pFilter, sal_uInt32 nPasswordHash, const uno::Sequence< beans::PropertyValue >& aInfo )
{
// TODO/LATER: In future the info should replace the direct hash completely
- bool bResult = ( !nPasswordHash && !aInfo.getLength() );
+ bool bResult = ( !nPasswordHash && !aInfo.hasElements() );
SAL_WARN_IF( !(pFilter && ( pFilter->GetFilterFlags() & SfxFilterFlags::PASSWORDTOMODIFY )), "sfx.view",
"PasswordToModify feature is active for a filter that does not support it!");
@@ -242,7 +242,7 @@ bool AskPasswordToModify_Impl( const uno::Reference< task::XInteractionHandler >
if ( pPasswordRequest->isPassword() )
{
- if ( aInfo.getLength() )
+ if ( aInfo.hasElements() )
{
bResult = ::comphelper::DocPasswordHelper::IsModifyPasswordCorrect( pPasswordRequest->getPasswordToModify(), aInfo );
}
@@ -358,7 +358,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
else
{
if ( pSh->IsReadOnlyMedium()
- && ( pSh->GetModifyPasswordHash() || pSh->GetModifyPasswordInfo().getLength() )
+ && ( pSh->GetModifyPasswordHash() || pSh->GetModifyPasswordInfo().hasElements() )
&& !pSh->IsModifyPasswordEntered() )
{
const OUString aDocumentName = INetURLObject( pMed->GetOrigURL() ).GetMainURL( INetURLObject::DecodeMechanism::WithCharset );
@@ -1896,7 +1896,7 @@ SfxViewShell* SfxViewFrame::LoadViewIntoFrame_Impl( const SfxObjectShell& i_rDoc
{
Reference< XModel > xDocument( i_rDoc.GetModel(), UNO_SET_THROW );
- ::comphelper::NamedValueCollection aTransformLoadArgs( i_rLoadArgs.getLength() ? i_rLoadArgs : xDocument->getArgs() );
+ ::comphelper::NamedValueCollection aTransformLoadArgs( i_rLoadArgs.hasElements() ? i_rLoadArgs : xDocument->getArgs() );
aTransformLoadArgs.put( "Model", xDocument );
if ( i_nViewId )
aTransformLoadArgs.put( "ViewId", sal_uInt16( i_nViewId ) );
diff --git a/sfx2/source/view/viewfrm2.cxx b/sfx2/source/view/viewfrm2.cxx
index eb226aff59bd..7d62ef08c087 100644
--- a/sfx2/source/view/viewfrm2.cxx
+++ b/sfx2/source/view/viewfrm2.cxx
@@ -305,7 +305,7 @@ void SfxViewFrame::GetState_Impl( SfxItemSet &rSet )
break;
case SID_OBJECT:
- if ( GetViewShell() && GetViewShell()->GetVerbs().getLength() && !GetObjectShell()->IsInPlaceActive() )
+ if ( GetViewShell() && GetViewShell()->GetVerbs().hasElements() && !GetObjectShell()->IsInPlaceActive() )
{
uno::Any aAny(GetViewShell()->GetVerbs());
rSet.Put( SfxUnoAnyItem( sal_uInt16( SID_OBJECT ), aAny ) );
diff --git a/shell/source/cmdmail/cmdmailmsg.cxx b/shell/source/cmdmail/cmdmailmsg.cxx
index 1127e8d47ebe..312d1ad8016c 100644
--- a/shell/source/cmdmail/cmdmailmsg.cxx
+++ b/shell/source/cmdmail/cmdmailmsg.cxx
@@ -126,16 +126,16 @@ Any SAL_CALL CmdMailMsg::getByName( const OUString& aName )
else if( aName == "to" && !m_aRecipient.isEmpty() )
return makeAny( m_aRecipient );
- else if( aName == "cc" && m_CcRecipients.getLength() )
+ else if( aName == "cc" && m_CcRecipients.hasElements() )
return makeAny( m_CcRecipients );
- else if( aName == "bcc" && m_BccRecipients.getLength() )
+ else if( aName == "bcc" && m_BccRecipients.hasElements() )
return makeAny( m_BccRecipients );
else if( aName == "subject" && !m_aSubject.isEmpty() )
return makeAny( m_aSubject );
- else if( aName == "attachment" && m_Attachments.getLength() )
+ else if( aName == "attachment" && m_Attachments.hasElements() )
return makeAny( m_Attachments );
throw NoSuchElementException("key not found: " + aName,
@@ -158,16 +158,16 @@ Sequence< OUString > SAL_CALL CmdMailMsg::getElementNames( )
if( !m_aRecipient.isEmpty() )
aRet[nItems++] = "to";
- if( m_CcRecipients.getLength() )
+ if( m_CcRecipients.hasElements() )
aRet[nItems++] = "cc";
- if( m_BccRecipients.getLength() )
+ if( m_BccRecipients.hasElements() )
aRet[nItems++] = "bcc";
if( !m_aSubject.isEmpty() )
aRet[nItems++] = "subject";
- if( m_Attachments.getLength() )
+ if( m_Attachments.hasElements() )
aRet[nItems++] = "attachment";
aRet.realloc( nItems );
@@ -187,16 +187,16 @@ Sequence< OUString > SAL_CALL CmdMailMsg::getElementNames( )
else if( aName == "to" && !m_aRecipient.isEmpty() )
return true;
- else if( aName == "cc" && m_CcRecipients.getLength() )
+ else if( aName == "cc" && m_CcRecipients.hasElements() )
return true;
- else if( aName == "bcc" && m_BccRecipients.getLength() )
+ else if( aName == "bcc" && m_BccRecipients.hasElements() )
return true;
else if( aName == "subject" && !m_aSubject.isEmpty() )
return true;
- else if( aName == "attachment" && m_Attachments.getLength() )
+ else if( aName == "attachment" && m_Attachments.hasElements() )
return true;
return false;
@@ -210,7 +210,7 @@ Type SAL_CALL CmdMailMsg::getElementType( )
sal_Bool SAL_CALL CmdMailMsg::hasElements( )
{
- return 0 != getElementNames().getLength();
+ return getElementNames().hasElements();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index ef44ac935a47..cdc8b0b78862 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -1337,7 +1337,7 @@ void SmViewShell::Insert( SfxMedium& rMedium )
uno::Reference <embed::XStorage> xStorage = rMedium.GetStorage();
uno::Reference <container::XNameAccess> xNameAccess(xStorage, uno::UNO_QUERY);
- if (xNameAccess.is() && xNameAccess->getElementNames().getLength())
+ if (xNameAccess.is() && xNameAccess->getElementNames().hasElements())
{
if (xNameAccess->hasByName("content.xml") || xNameAccess->hasByName("Content.xml"))
{
diff --git a/stoc/source/corereflection/crcomp.cxx b/stoc/source/corereflection/crcomp.cxx
index 26e0c8ecf8ad..de73774efef8 100644
--- a/stoc/source/corereflection/crcomp.cxx
+++ b/stoc/source/corereflection/crcomp.cxx
@@ -268,7 +268,7 @@ sal_Bool CompoundIdlClassImpl::isAssignableFrom( const Reference< XIdlClass > &
else
{
const Sequence< Reference< XIdlClass > > & rSeq = xType->getSuperclasses();
- if (rSeq.getLength())
+ if (rSeq.hasElements())
{
OSL_ENSURE( rSeq.getLength() == 1, "### unexpected len of super classes!" );
return isAssignableFrom( rSeq[0] );
diff --git a/stoc/source/corereflection/criface.cxx b/stoc/source/corereflection/criface.cxx
index c4f5feab38ed..fd0979a64e63 100644
--- a/stoc/source/corereflection/criface.cxx
+++ b/stoc/source/corereflection/criface.cxx
@@ -739,7 +739,7 @@ InterfaceIdlClassImpl::~InterfaceIdlClassImpl()
Sequence< Reference< XIdlClass > > InterfaceIdlClassImpl::getSuperclasses()
{
::osl::MutexGuard aGuard(getMutexAccess());
- if (_xSuperClasses.getLength() == 0) {
+ if (!_xSuperClasses.hasElements()) {
typelib_InterfaceTypeDescription * pType = getTypeDescr();
_xSuperClasses.realloc(pType->nBaseTypes);
for (sal_Int32 i = 0; i < pType->nBaseTypes; ++i) {
diff --git a/stoc/source/implementationregistration/implreg.cxx b/stoc/source/implementationregistration/implreg.cxx
index 0fb17520df9f..32c200a2385c 100644
--- a/stoc/source/implementationregistration/implreg.cxx
+++ b/stoc/source/implementationregistration/implreg.cxx
@@ -105,7 +105,7 @@ void deleteAllLinkReferences(const Reference < XSimpleRegistry >& xReg,
Sequence<OUString> linkNames = xKey->getAsciiListValue();
- if (!linkNames.getLength())
+ if (!linkNames.hasElements())
return;
const OUString* pLinkNames = linkNames.getConstArray();
@@ -156,7 +156,7 @@ void deleteAllLinkReferences(const Reference < XSimpleRegistry >& xReg,
{
xLinkParent = xReg->getRootKey()->openKey(aLinkParent);
- if (xLinkParent.is() && (xLinkParent->getKeyNames().getLength() == 0))
+ if (xLinkParent.is() && !xLinkParent->getKeyNames().hasElements())
{
aLinkName = aLinkParent;
@@ -165,7 +165,8 @@ void deleteAllLinkReferences(const Reference < XSimpleRegistry >& xReg,
sEnd = aLinkName.lastIndexOf( '/' );
aLinkParent = aLinkName.copy(0, sEnd);
- } else
+ }
+ else
{
break;
}
@@ -423,7 +424,7 @@ void deletePathIfPossible(const Reference < XRegistryKey >& xRootKey,
{
Sequence<OUString> keyNames(xRootKey->openKey(path)->getKeyNames());
- if (keyNames.getLength() == 0 &&
+ if (!keyNames.hasElements() &&
xRootKey->openKey(path)->getValueType() == RegistryValueType_NOT_DEFINED)
{
xRootKey->deleteKey(path);
@@ -555,7 +556,7 @@ void prepareUserKeys(const Reference < XSimpleRegistry >& xDest,
Sequence<OUString> keyNames = xKey->getKeyNames();
OUString relativKey;
- if (keyNames.getLength())
+ if (keyNames.hasElements())
relativKey = keyNames.getConstArray()[0].copy(xKey->getKeyName().getLength()+1);
if (keyNames.getLength() == 1 &&
@@ -579,7 +580,7 @@ void prepareUserKeys(const Reference < XSimpleRegistry >& xDest,
{
Sequence< Reference < XRegistryKey> > subKeys = xKey->openKeys();
- if (subKeys.getLength())
+ if (subKeys.hasElements())
{
hasSubKeys = true;
const Reference < XRegistryKey > * pSubKeys = subKeys.getConstArray();
@@ -629,7 +630,7 @@ void deleteAllImplementations( const Reference < XSimpleRegistry >& xReg,
{
Sequence < Reference < XRegistryKey > > subKeys = xSource->openKeys();
- if (subKeys.getLength() > 0)
+ if (subKeys.hasElements())
{
const Reference < XRegistryKey> * pSubKeys = subKeys.getConstArray();
Reference < XRegistryKey > xImplKey;
@@ -662,7 +663,7 @@ void deleteAllImplementations( const Reference < XSimpleRegistry >& xReg,
{
Sequence< Reference < XRegistryKey > > subKeys2 = xKey->openKeys();
- if (subKeys2.getLength())
+ if (subKeys2.hasElements())
{
const Reference < XRegistryKey > * pSubKeys2 = subKeys2.getConstArray();
@@ -692,7 +693,7 @@ void deleteAllImplementations( const Reference < XSimpleRegistry >& xReg,
}
subKeys = xSource->openKeys();
- if (subKeys.getLength() == 0)
+ if (!subKeys.hasElements())
{
OUString path(xSource->getKeyName());
xSource->closeKey();
@@ -777,7 +778,7 @@ void deleteAllServiceEntries( const Reference < XSimpleRegistry >& xReg,
{
Sequence< Reference < XRegistryKey > > subKeys = xSource->openKeys();
- if (subKeys.getLength() > 0)
+ if (subKeys.hasElements())
{
const Reference < XRegistryKey > * pSubKeys = subKeys.getConstArray();
Reference < XRegistryKey > xServiceKey;
@@ -832,7 +833,7 @@ void deleteAllServiceEntries( const Reference < XSimpleRegistry >& xReg,
}
subKeys = xSource->openKeys();
- if (subKeys.getLength() == 0)
+ if (!subKeys.hasElements())
{
OUString path(xSource->getKeyName());
xSource->closeKey();
@@ -992,7 +993,7 @@ void prepareRegistry(
{
Sequence< Reference < XRegistryKey > > subKeys = xSource->openKeys();
- if (!subKeys.getLength())
+ if (!subKeys.hasElements())
{
throw InvalidRegistryException(
"prepareRegistry(): source registry is empty" );
@@ -1037,7 +1038,7 @@ void prepareRegistry(
{
Sequence< Reference < XRegistryKey > > subKeys2 = xKey->openKeys();
- if (subKeys2.getLength())
+ if (subKeys2.hasElements())
{
const Reference < XRegistryKey > * pSubKeys2 = subKeys2.getConstArray();
@@ -1077,7 +1078,7 @@ void prepareRegistry(
// update link entries in REGISTRY_LINKS section
Sequence<OUString> linkNames = xKey->getAsciiListValue();
- if (linkNames.getLength())
+ if (linkNames.hasElements())
{
const OUString* pLinkNames = linkNames.getConstArray();
@@ -1103,7 +1104,7 @@ void findImplementations( const Reference < XRegistryKey > & xSource,
Reference < XRegistryKey > xKey = xSource->openKey(
slash_UNO_slash_SERVICES );
- if (xKey.is() && (xKey->getKeyNames().getLength() > 0))
+ if (xKey.is() && xKey->getKeyNames().hasElements())
{
isImplKey = true;
@@ -1126,7 +1127,7 @@ void findImplementations( const Reference < XRegistryKey > & xSource,
{
Sequence< Reference < XRegistryKey > > subKeys = xSource->openKeys();
- if (subKeys.getLength() > 0)
+ if (subKeys.hasElements())
{
const Reference < XRegistryKey >* pSubKeys = subKeys.getConstArray();
diff --git a/stoc/source/inspect/introspection.cxx b/stoc/source/inspect/introspection.cxx
index 8d7c6e1733b7..f8608db19f69 100644
--- a/stoc/source/inspect/introspection.cxx
+++ b/stoc/source/inspect/introspection.cxx
@@ -1978,7 +1978,7 @@ css::uno::Reference<css::beans::XIntrospectionAccess> Implementation::inspect(
{
// Get methods must not have any parameters
Sequence< Reference<XIdlClass> > getParams = rxMethod_i->getParameterTypes();
- if( getParams.getLength() > 0 )
+ if( getParams.hasElements() )
{
continue;
}
diff --git a/stoc/source/invocation_adapterfactory/iafactory.cxx b/stoc/source/invocation_adapterfactory/iafactory.cxx
index cca99f1ebf20..e74d27f756a4 100644
--- a/stoc/source/invocation_adapterfactory/iafactory.cxx
+++ b/stoc/source/invocation_adapterfactory/iafactory.cxx
@@ -802,7 +802,7 @@ Reference< XInterface > FactoryImpl::createAdapter(
const Sequence< Type > & rTypes )
{
Reference< XInterface > xRet;
- if (xReceiver.is() && rTypes.getLength())
+ if (xReceiver.is() && rTypes.hasElements())
{
t_ptr_set * adapter_set;
AdapterImpl * that;
diff --git a/stoc/source/servicemanager/servicemanager.cxx b/stoc/source/servicemanager/servicemanager.cxx
index 81435c183631..60b637cae609 100644
--- a/stoc/source/servicemanager/servicemanager.cxx
+++ b/stoc/source/servicemanager/servicemanager.cxx
@@ -90,7 +90,7 @@ Sequence< OUString > retrieveAsciiValueList(
{
Sequence< OUString > seq2 = retrieveAsciiValueList( xTempReg, keyName );
- if( seq2.getLength() )
+ if( seq2.hasElements() )
{
sal_Int32 n1Len = seq.getLength();
sal_Int32 n2Len = seq2.getLength();
@@ -978,7 +978,7 @@ Reference<XEnumeration > OServiceManager::createContentEnumeration(
check_undisposed();
Sequence< Reference< XInterface > > factories(
OServiceManager::queryServiceFactories( aServiceName, m_xContext ) );
- if (factories.getLength())
+ if (factories.hasElements())
return new ServiceEnumeration_Impl( factories );
else
return Reference< XEnumeration >();
@@ -1371,7 +1371,7 @@ void ORegistryServiceManager::initialize(const Sequence< Any >& Arguments)
{
check_undisposed();
MutexGuard aGuard( m_mutex );
- if (Arguments.getLength() > 0)
+ if (Arguments.hasElements())
{
m_xRootKey.clear();
Arguments[ 0 ] >>= m_xRegistry;
@@ -1413,7 +1413,7 @@ Sequence< Reference< XInterface > > ORegistryServiceManager::queryServiceFactori
{
Sequence< Reference< XInterface > > ret(
OServiceManager::queryServiceFactories( aServiceName, xContext ) );
- if (ret.getLength())
+ if (ret.hasElements())
{
return ret;
}
diff --git a/svl/source/config/cjkoptions.cxx b/svl/source/config/cjkoptions.cxx
index a0af655e8950..32cd9d5ce834 100644
--- a/svl/source/config/cjkoptions.cxx
+++ b/svl/source/config/cjkoptions.cxx
@@ -146,7 +146,7 @@ void SvtCJKOptions_Impl::SetAll(bool bSet)
void SvtCJKOptions_Impl::Load()
{
Sequence<OUString> &rPropertyNames = PropertyNames::get();
- if(!rPropertyNames.getLength())
+ if(!rPropertyNames.hasElements())
{
rPropertyNames.realloc(9);
OUString* pNames = rPropertyNames.getArray();
diff --git a/svl/source/config/ctloptions.cxx b/svl/source/config/ctloptions.cxx
index 801901d33b04..81bb44049a75 100644
--- a/svl/source/config/ctloptions.cxx
+++ b/svl/source/config/ctloptions.cxx
@@ -230,7 +230,7 @@ void SvtCTLOptions_Impl::ImplCommit()
void SvtCTLOptions_Impl::Load()
{
Sequence< OUString >& rPropertyNames = PropertyNames::get();
- if ( !rPropertyNames.getLength() )
+ if ( !rPropertyNames.hasElements() )
{
rPropertyNames.realloc(6);
OUString* pNames = rPropertyNames.getArray();
diff --git a/svl/source/config/languageoptions.cxx b/svl/source/config/languageoptions.cxx
index 23590b2e93bd..f00812b30b8d 100644
--- a/svl/source/config/languageoptions.cxx
+++ b/svl/source/config/languageoptions.cxx
@@ -199,7 +199,7 @@ SvtSystemLanguageOptions::SvtSystemLanguageOptions() :
uno::Sequence< OUString > aPropertyNames { "SystemLocale" };
uno::Sequence< uno::Any > aValues = GetProperties( aPropertyNames );
- if ( aValues.getLength() )
+ if ( aValues.hasElements() )
{
aValues[0]>>= m_sWin16SystemLocale;
}
diff --git a/svl/source/fsstor/ostreamcontainer.cxx b/svl/source/fsstor/ostreamcontainer.cxx
index d13beb4509d7..ef74bacbe7b0 100644
--- a/svl/source/fsstor/ostreamcontainer.cxx
+++ b/svl/source/fsstor/ostreamcontainer.cxx
@@ -135,11 +135,11 @@ void SAL_CALL OFSStreamContainer::release()
// XTypeProvider
uno::Sequence< uno::Type > SAL_CALL OFSStreamContainer::getTypes()
{
- if ( m_aTypes.getLength() == 0 )
+ if ( !m_aTypes.hasElements() )
{
::osl::MutexGuard aGuard( m_aMutex );
- if ( m_aTypes.getLength() == 0 )
+ if ( !m_aTypes.hasElements() )
{
std::vector<uno::Type> tmp;
tmp.push_back(cppu::UnoType<lang::XTypeProvider>::get());
diff --git a/svl/source/items/lckbitem.cxx b/svl/source/items/lckbitem.cxx
index a610380243cc..46e266d6204c 100644
--- a/svl/source/items/lckbitem.cxx
+++ b/svl/source/items/lckbitem.cxx
@@ -57,7 +57,7 @@ bool SfxLockBytesItem::PutValue( const css::uno::Any& rVal, sal_uInt8 )
css::uno::Sequence< sal_Int8 > aSeq;
if ( rVal >>= aSeq )
{
- if ( aSeq.getLength() )
+ if ( aSeq.hasElements() )
{
SvMemoryStream* pStream = new SvMemoryStream();
pStream->WriteBytes( aSeq.getConstArray(), aSeq.getLength() );
diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx
index bff0e3efa449..0635739de77e 100644
--- a/svl/source/numbers/zforfind.cxx
+++ b/svl/source/numbers/zforfind.cxx
@@ -1234,7 +1234,7 @@ bool ImpSvNumberInputScan::IsAcceptedDatePattern( sal_uInt16 nStartPatternAt )
{
nAcceptedDatePattern = -1;
}
- else if (!sDateAcceptancePatterns.getLength())
+ else if (!sDateAcceptancePatterns.hasElements())
{
// The current locale is the format's locale, if a format is present.
const NfEvalDateFormat eEDF = pFormatter->GetEvalDateFormat();
@@ -1276,8 +1276,8 @@ bool ImpSvNumberInputScan::IsAcceptedDatePattern( sal_uInt16 nStartPatternAt )
break;
}
}
- SAL_WARN_IF( !sDateAcceptancePatterns.getLength(), "svl.numbers", "ImpSvNumberInputScan::IsAcceptedDatePattern: no date acceptance patterns");
- nAcceptedDatePattern = (sDateAcceptancePatterns.getLength() ? -2 : -1);
+ SAL_WARN_IF( !sDateAcceptancePatterns.hasElements(), "svl.numbers", "ImpSvNumberInputScan::IsAcceptedDatePattern: no date acceptance patterns");
+ nAcceptedDatePattern = (sDateAcceptancePatterns.hasElements() ? -2 : -1);
}
if (nAcceptedDatePattern == -1)
@@ -3590,7 +3590,7 @@ void ImpSvNumberInputScan::ChangeIntl()
void ImpSvNumberInputScan::InvalidateDateAcceptancePatterns()
{
- if (sDateAcceptancePatterns.getLength())
+ if (sDateAcceptancePatterns.hasElements())
{
sDateAcceptancePatterns = css::uno::Sequence< OUString >();
}
diff --git a/svl/source/passwordcontainer/passwordcontainer.cxx b/svl/source/passwordcontainer/passwordcontainer.cxx
index 38a6bfd134dc..5c59f976d8ec 100644
--- a/svl/source/passwordcontainer/passwordcontainer.cxx
+++ b/svl/source/passwordcontainer/passwordcontainer.cxx
@@ -703,7 +703,7 @@ bool PasswordContainer::createUrlRecord(
{
Sequence< UserRecord > aUsrRec
= FindUsr( rIter->second, aName, aHandler );
- if( aUsrRec.getLength() )
+ if( aUsrRec.hasElements() )
{
rRec = UrlRecord( rIter->first, aUsrRec );
return true;
@@ -1001,7 +1001,7 @@ Sequence< UrlRecord > SAL_CALL PasswordContainer::getAllPersistent( const Refere
aUsers[ oldLen ] = UserRecord( aNP.GetUserName(), comphelper::containerToSequence( DecodePasswords( aNP.GetPersPasswords(), GetMasterPassword( xHandler ), css::task::PasswordRequestMode_PASSWORD_ENTER ) ) );
}
- if( aUsers.getLength() )
+ if( aUsers.hasElements() )
{
sal_Int32 oldLen = aResult.getLength();
aResult.realloc( oldLen + 1 );
diff --git a/svtools/source/config/extcolorcfg.cxx b/svtools/source/config/extcolorcfg.cxx
index 6f195039d4a1..6fdcf0ead67c 100644
--- a/svtools/source/config/extcolorcfg.cxx
+++ b/svtools/source/config/extcolorcfg.cxx
@@ -241,7 +241,7 @@ void ExtendedColorConfig_Impl::Load(const OUString& rScheme)
aComponentDisplayNames[0] = componentName + sDisplayName;
uno::Sequence< uno::Any > aComponentDisplayNamesValue = GetProperties( aComponentDisplayNames );
OUString sComponentDisplayName;
- if ( aComponentDisplayNamesValue.getLength() && (aComponentDisplayNamesValue[0] >>= sComponentDisplayName) )
+ if ( aComponentDisplayNamesValue.hasElements() && (aComponentDisplayNamesValue[0] >>= sComponentDisplayName) )
{
m_aComponentDisplayNames.emplace(componentName.getToken(1, '/'),sComponentDisplayName);
}
@@ -327,7 +327,7 @@ void ExtendedColorConfig_Impl::FillComponentColors(uno::Sequence < OUString >& _
const uno::Any* pColors = aColors.getConstArray();
uno::Sequence< uno::Any > aDefaultColors = GetProperties( aDefaultColorNames );
- bool bDefaultColorFound = aDefaultColors.getLength() != 0;
+ bool bDefaultColorFound = aDefaultColors.hasElements();
const uno::Any* pDefaultColors = aDefaultColors.getConstArray();
OUString* pColorIter = aColorNames.getArray();
diff --git a/svtools/source/control/filectrl.cxx b/svtools/source/control/filectrl.cxx
index a2665e420126..e83b9146de6f 100644
--- a/svtools/source/control/filectrl.cxx
+++ b/svtools/source/control/filectrl.cxx
@@ -222,7 +222,7 @@ IMPL_LINK_NOARG(FileControl, ButtonHdl, Button*, void)
{
Sequence < OUString > aPathSeq = xFilePicker->getSelectedFiles();
- if ( aPathSeq.getLength() )
+ if ( aPathSeq.hasElements() )
{
OUString aNewText = aPathSeq[0];
INetURLObject aObj( aNewText );
diff --git a/svtools/source/misc/embedtransfer.cxx b/svtools/source/misc/embedtransfer.cxx
index cf242c0efbe5..61ad948ea8da 100644
--- a/svtools/source/misc/embedtransfer.cxx
+++ b/svtools/source/misc/embedtransfer.cxx
@@ -138,7 +138,7 @@ bool SvEmbedTransferHelper::GetData( const css::datatransfer::DataFlavor& rFlavo
if ( bDeleteStream )
delete pStream;
- bRet = ( aSeq.getLength() > 0 );
+ bRet = aSeq.hasElements();
if( bRet )
{
SetAny( uno::Any(aSeq) );
diff --git a/svtools/source/misc/imagemgr.cxx b/svtools/source/misc/imagemgr.cxx
index 5e688394e4dd..e38760f829b0 100644
--- a/svtools/source/misc/imagemgr.cxx
+++ b/svtools/source/misc/imagemgr.cxx
@@ -238,7 +238,7 @@ static OUString GetImageExtensionByFactory_Impl( const OUString& rURL )
if (rProp.Name == "Extensions")
{
css::uno::Sequence < OUString > aExtensions;
- if ( ( rProp.Value >>= aExtensions ) && aExtensions.getLength() > 0 )
+ if ( ( rProp.Value >>= aExtensions ) && aExtensions.hasElements() )
{
const OUString* pExtensions = aExtensions.getConstArray();
aExtension = pExtensions[0];
diff --git a/svtools/source/uno/treecontrolpeer.cxx b/svtools/source/uno/treecontrolpeer.cxx
index 8462d912535b..5620686ac60c 100644
--- a/svtools/source/uno/treecontrolpeer.cxx
+++ b/svtools/source/uno/treecontrolpeer.cxx
@@ -987,7 +987,7 @@ void TreeControlPeer::updateTree( const css::awt::tree::TreeDataModelEvent& rEve
Sequence< Reference< XTreeNode > > Nodes;
Reference< XTreeNode > xNode( rEvent.ParentNode );
- if( !xNode.is() && Nodes.getLength() )
+ if( !xNode.is() && Nodes.hasElements() )
{
xNode = Nodes[0];
}
diff --git a/svtools/source/uno/wizard/unowizard.cxx b/svtools/source/uno/wizard/unowizard.cxx
index d230dc3c5825..300fa62ae594 100644
--- a/svtools/source/uno/wizard/unowizard.cxx
+++ b/svtools/source/uno/wizard/unowizard.cxx
@@ -173,13 +173,13 @@ namespace {
void lcl_checkPaths( const Sequence< Sequence< sal_Int16 > >& i_rPaths, const Reference< XInterface >& i_rContext )
{
// need at least one path
- if ( i_rPaths.getLength() == 0 )
+ if ( !i_rPaths.hasElements() )
throw IllegalArgumentException( OUString(), i_rContext, 2 );
// each path must be of length 1, at least
for ( sal_Int32 i = 0; i < i_rPaths.getLength(); ++i )
{
- if ( i_rPaths[i].getLength() == 0 )
+ if ( !i_rPaths[i].hasElements() )
throw IllegalArgumentException( OUString(), i_rContext, 2 );
// page IDs must be in ascending order
@@ -232,7 +232,7 @@ namespace {
Sequence< Sequence< sal_Int16 > > aMultiplePaths;
i_Arguments[0] >>= aMultiplePaths;
- if ( !aMultiplePaths.getLength() )
+ if ( !aMultiplePaths.hasElements() )
{
aMultiplePaths.realloc(1);
aMultiplePaths[0] = aSinglePath;
diff --git a/svtools/source/uno/wizard/wizardshell.cxx b/svtools/source/uno/wizard/wizardshell.cxx
index 5e6916d78287..a7386fc16f3a 100644
--- a/svtools/source/uno/wizard/wizardshell.cxx
+++ b/svtools/source/uno/wizard/wizardshell.cxx
@@ -43,7 +43,7 @@ namespace svt { namespace uno
sal_Int16 lcl_determineFirstPageID( const Sequence< Sequence< sal_Int16 > >& i_rPaths )
{
- ENSURE_OR_THROW( ( i_rPaths.getLength() > 0 ) && ( i_rPaths[0].getLength() > 0 ), "illegal paths" );
+ ENSURE_OR_THROW( i_rPaths.hasElements() && i_rPaths[0].hasElements(), "illegal paths" );
return i_rPaths[0][0];
}
}
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx
index 5ea15a0c73da..61a02c5044cd 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
@@ -631,7 +631,7 @@ void EnhancedCustomShape2d::SetPathSize( sal_Int32 nIndex )
sal_Int32 nWidth = 0;
sal_Int32 nHeight = 0;
- if ( seqSubViewSize.getLength() && nIndex < seqSubViewSize.getLength() ) {
+ if ( seqSubViewSize.hasElements() && nIndex < seqSubViewSize.getLength() ) {
nWidth = seqSubViewSize[ nIndex ].Width;
nHeight = seqSubViewSize[ nIndex ].Height;
SAL_INFO(
@@ -1094,10 +1094,9 @@ Color EnhancedCustomShape2d::GetColorData( const Color& rFillColor, sal_uInt32 n
tools::Rectangle EnhancedCustomShape2d::GetTextRect() const
{
- sal_Int32 nIndex, nSize = seqTextFrames.getLength();
- if ( !nSize )
+ if ( !seqTextFrames.hasElements() )
return aLogicRect;
- nIndex = 0;
+ sal_Int32 nIndex = 0;
Point aTopLeft( GetPoint( seqTextFrames[ nIndex ].TopLeft, !bOOXMLShape, true ) );
Point aBottomRight( GetPoint( seqTextFrames[ nIndex ].BottomRight, !bOOXMLShape, true ) );
if ( bFlipH )
@@ -2561,9 +2560,7 @@ void EnhancedCustomShape2d::AdaptObjColor(
SdrObject* EnhancedCustomShape2d::CreatePathObj( bool bLineGeometryNeededOnly )
{
- const sal_Int32 nCoordSize(seqCoordinates.getLength());
-
- if ( !nCoordSize )
+ if ( !seqCoordinates.hasElements() )
{
return nullptr;
}
@@ -2748,7 +2745,7 @@ SdrObject* EnhancedCustomShape2d::CreateObject( bool bLineGeometryNeededOnly )
void EnhancedCustomShape2d::ApplyGluePoints( SdrObject* pObj )
{
- if ( pObj && seqGluePoints.getLength() )
+ if ( pObj && seqGluePoints.hasElements() )
{
sal_uInt32 i, nCount = seqGluePoints.getLength();
for ( i = 0; i < nCount; i++ )
diff --git a/svx/source/dialog/rubydialog.cxx b/svx/source/dialog/rubydialog.cxx
index 1e24f853b039..7856b12e8687 100644
--- a/svx/source/dialog/rubydialog.cxx
+++ b/svx/source/dialog/rubydialog.cxx
@@ -183,7 +183,7 @@ void SvxRubyData_Impl::disposing(const EventObject&)
void SvxRubyData_Impl::AssertOneEntry()
{
//create one entry
- if (!aRubyValues.getLength())
+ if (!aRubyValues.hasElements())
{
aRubyValues.realloc(1);
Sequence<PropertyValue>& rValues = aRubyValues.getArray()[0];
@@ -521,7 +521,7 @@ IMPL_LINK(SvxRubyDialog, ScrollHdl_Impl, weld::ScrolledWindow&, rScroll, void)
IMPL_LINK_NOARG(SvxRubyDialog, ApplyHdl_Impl, weld::Button&, void)
{
const Sequence<PropertyValues>& aRubyValues = m_pImpl->GetRubyValues();
- if (!aRubyValues.getLength())
+ if (!aRubyValues.hasElements())
{
AssertOneEntry();
PositionHdl_Impl(*m_xPositionLB);
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx
index 85e26dbfe79e..b6dd17200d63 100644
--- a/svx/source/fmcomp/gridcell.cxx
+++ b/svx/source/fmcomp/gridcell.cxx
@@ -2550,7 +2550,7 @@ void DbListBox::SetList(const Any& rItems)
pField->InsertEntry(*pStrings);
m_rColumn.getModel()->getPropertyValue(FM_PROP_VALUE_SEQ) >>= m_aValueList;
- m_bBound = m_aValueList.getLength() > 0;
+ m_bBound = m_aValueList.hasElements();
// tell the grid control that this controller is invalid and has to be re-initialized
invalidatedController();
@@ -2636,7 +2636,7 @@ void DbListBox::updateFromModel( Reference< XPropertySet > _rxModel )
_rxModel->getPropertyValue( FM_PROP_SELECT_SEQ ) >>= aSelection;
sal_Int16 nSelection = -1;
- if ( aSelection.getLength() > 0 )
+ if ( aSelection.hasElements() )
nSelection = aSelection[ 0 ];
ListBox* pListBox = static_cast< ListBox* >( m_pWindow.get() );
diff --git a/svx/source/form/databaselocationinput.cxx b/svx/source/form/databaselocationinput.cxx
index 40332f8b6053..96093e8134ca 100644
--- a/svx/source/form/databaselocationinput.cxx
+++ b/svx/source/form/databaselocationinput.cxx
@@ -184,9 +184,9 @@ namespace svx
}
// ensure we have at least one extension
- OSL_ENSURE( m_aFilterExtensions.getLength(),
+ OSL_ENSURE( m_aFilterExtensions.hasElements(),
"DatabaseLocationInputController_Impl::impl_initFilterProperties_nothrow: unable to determine the file extension(s)!" );
- if ( m_aFilterExtensions.getLength() == 0 )
+ if ( !m_aFilterExtensions.hasElements() )
{
m_aFilterExtensions.realloc(1);
m_aFilterExtensions[0] = "*.odb";
diff --git a/svx/source/form/fmexch.cxx b/svx/source/form/fmexch.cxx
index fd9c1ee677b2..ad3c2e8427f7 100644
--- a/svx/source/form/fmexch.cxx
+++ b/svx/source/form/fmexch.cxx
@@ -161,13 +161,13 @@ namespace svxform
DataFlavorEx aFlavor;
- if ( m_aHiddenControlModels.getLength() )
+ if ( m_aHiddenControlModels.hasElements() )
{
if ( lcl_fillDataFlavorEx( OControlExchange::getHiddenControlModelsFormatId(), aFlavor ) )
m_aCurrentFormats.push_back( aFlavor );
}
- if ( m_xFormsRoot.is() && m_aControlPaths.getLength() )
+ if ( m_xFormsRoot.is() && m_aControlPaths.hasElements() )
{
if ( lcl_fillDataFlavorEx( OControlExchange::getControlPathFormatId(), aFlavor ) )
m_aCurrentFormats.push_back( aFlavor );
@@ -300,10 +300,10 @@ namespace svxform
if (m_pFocusEntry && !m_aSelectedEntries.empty())
AddFormat(getFieldExchangeFormatId());
- if (m_aControlPaths.getLength())
+ if (m_aControlPaths.hasElements())
AddFormat(getControlPathFormatId());
- if (m_aHiddenControlModels.getLength())
+ if (m_aHiddenControlModels.hasElements())
AddFormat(getHiddenControlModelsFormatId());
}
diff --git a/svx/source/form/fmobj.cxx b/svx/source/form/fmobj.cxx
index 4ee984b79b9c..22e77a5f28fa 100644
--- a/svx/source/form/fmobj.cxx
+++ b/svx/source/form/fmobj.cxx
@@ -284,7 +284,7 @@ void FmFormObj::handlePageChange(SdrPage* pOldPage, SdrPage* pNewPage)
xNewParent->insertByIndex(xNewParent->getCount(), makeAny(xMeAsFormComp));
// transfer the events
- if (aNewEvents.getLength())
+ if (aNewEvents.hasElements())
{
try
{
diff --git a/svx/source/form/fmscriptingenv.cxx b/svx/source/form/fmscriptingenv.cxx
index 00b0d6ec95ac..27260c0381ea 100644
--- a/svx/source/form/fmscriptingenv.cxx
+++ b/svx/source/form/fmscriptingenv.cxx
@@ -965,7 +965,7 @@ namespace svxform
Sequence< Any > aOutArgs;
EventObject aEvent;
Any aCaller;
- if ( ( _rArguments.getLength() > 0 ) && ( _rArguments[ 0 ] >>= aEvent ) )
+ if ( _rArguments.hasElements() && ( _rArguments[ 0 ] >>= aEvent ) )
{
try
{
diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx
index 9398f1dca662..2c64c1442e57 100644
--- a/svx/source/form/fmshimp.cxx
+++ b/svx/source/form/fmshimp.cxx
@@ -358,7 +358,7 @@ namespace
if (!xEventManager.is())
return; // nothing to do
- if (!rTransferIfAvailable.getLength())
+ if (!rTransferIfAvailable.hasElements())
return; // nothing to do
// check for the index of the model within its parent
@@ -1203,7 +1203,7 @@ bool FmXFormShell::executeControlConversionSlot_Lock(const Reference<XFormCompon
// transfer script events
// (do this _after_ SetUnoControlModel as we need the new (implicitly created) control)
- if (aOldScripts.getLength())
+ if (aOldScripts.hasElements())
{
// find the control for the model
Reference<XControlContainer> xControlContainer(getControlContainerForView_Lock());
diff --git a/svx/source/form/fmtextcontrolshell.cxx b/svx/source/form/fmtextcontrolshell.cxx
index 5e0addf5542a..0076a59b36e5 100644
--- a/svx/source/form/fmtextcontrolshell.cxx
+++ b/svx/source/form/fmtextcontrolshell.cxx
@@ -384,7 +384,7 @@ namespace svx
Sequence< PropertyValue > aComplexState;
if ( _rUnoState >>= aComplexState )
{
- if ( !aComplexState.getLength() )
+ if ( !aComplexState.hasElements() )
_rSet.InvalidateItem( nWhich );
else
{
@@ -692,7 +692,7 @@ namespace svx
{
// these are no UNO slots, they need special handling since TransformItems cannot
// handle them
- DBG_ASSERT( aArgs.getLength() == 0, "FmTextControlShell::executeAttributeDialog: these are no UNO slots - are they?" );
+ DBG_ASSERT( !aArgs.hasElements(), "FmTextControlShell::executeAttributeDialog: these are no UNO slots - are they?" );
const SfxBoolItem* pBoolItem = dynamic_cast<const SfxBoolItem*>( pModifiedItem );
DBG_ASSERT( pBoolItem, "FmTextControlShell::executeAttributeDialog: no bool item?!" );
diff --git a/svx/source/form/fmvwimp.cxx b/svx/source/form/fmvwimp.cxx
index 505efe757f13..bcb52c652096 100644
--- a/svx/source/form/fmvwimp.cxx
+++ b/svx/source/form/fmvwimp.cxx
@@ -843,7 +843,7 @@ static Reference< XControl > lcl_firstFocussableControl( const Sequence< Referen
}
}
- if ( !xReturn.is() && _rControls.getLength() )
+ if ( !xReturn.is() && _rControls.hasElements() )
xReturn = _rControls[0];
return xReturn;
@@ -935,7 +935,7 @@ IMPL_LINK_NOARG(FmXFormView, OnAutoFocus, void*, void)
// go for the first control of the controller
Sequence< Reference< XControl > > aControls( xTabController->getControls() );
- if ( aControls.getLength() == 0 )
+ if ( !aControls.hasElements() )
{
Reference< XElementAccess > xFormElementAccess( xForm, UNO_QUERY_THROW );
if (xFormElementAccess->hasElements() && pPage && m_pView)
@@ -947,7 +947,7 @@ IMPL_LINK_NOARG(FmXFormView, OnAutoFocus, void*, void)
// trigger the creation itself, so we must hack this ...
lcl_ensureControlsOfFormExist_nothrow( *pPage, *m_pView, *pWindow, xForm );
aControls = xTabController->getControls();
- OSL_ENSURE( aControls.getLength(), "FmXFormView::OnAutoFocus: no controls at all!" );
+ OSL_ENSURE( aControls.hasElements(), "FmXFormView::OnAutoFocus: no controls at all!" );
}
}
diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx
index a5dc8c9073f1..d94ab3f765f1 100644
--- a/svx/source/form/formcontroller.cxx
+++ b/svx/source/form/formcontroller.cxx
@@ -4031,7 +4031,7 @@ void SAL_CALL FormController::invalidateAllFeatures( )
Sequence< sal_Int16 > aInterceptedFeatures( comphelper::mapKeysToSequence(m_aFeatureDispatchers) );
aGuard.clear();
- if ( aInterceptedFeatures.getLength() )
+ if ( aInterceptedFeatures.hasElements() )
invalidateFeatures( aInterceptedFeatures );
}
diff --git a/svx/source/form/formfeaturedispatcher.cxx b/svx/source/form/formfeaturedispatcher.cxx
index 62b1d4635dbc..50faf597c463 100644
--- a/svx/source/form/formfeaturedispatcher.cxx
+++ b/svx/source/form/formfeaturedispatcher.cxx
@@ -135,7 +135,7 @@ namespace svx
try
{
- if ( !_rArguments.getLength() )
+ if ( !_rArguments.hasElements() )
{
xFormOperations->execute( nFormFeature );
}
diff --git a/svx/source/form/navigatortree.cxx b/svx/source/form/navigatortree.cxx
index cd641a0bd9de..1884b7a03f09 100644
--- a/svx/source/form/navigatortree.cxx
+++ b/svx/source/form/navigatortree.cxx
@@ -1104,7 +1104,7 @@ namespace svxform
makeAny( Reference< XForm >( xCurrentChild, UNO_QUERY ) ) );
}
- if (aEvts.getLength())
+ if (aEvts.hasElements())
{
xManager.set(xContainer, UNO_QUERY);
if (xManager.is())
diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx
index 8aa991a74084..e3f80b010d25 100644
--- a/svx/source/gallery2/galbrws2.cxx
+++ b/svx/source/gallery2/galbrws2.cxx
@@ -191,7 +191,7 @@ void SAL_CALL GalleryThemePopup::statusChanged(
{
mpBackgroundPopup->InsertItem( 1, sItem );
}
- else if ( ( rEvent.State >>= sItems ) && sItems.getLength() )
+ else if ( ( rEvent.State >>= sItems ) && sItems.hasElements() )
{
const OUString *pStr = sItems.getConstArray();
const OUString *pEnd = pStr + sItems.getLength();
diff --git a/svx/source/items/customshapeitem.cxx b/svx/source/items/customshapeitem.cxx
index 329c2f09b7e0..61814a2cd586 100644
--- a/svx/source/items/customshapeitem.cxx
+++ b/svx/source/items/customshapeitem.cxx
@@ -201,7 +201,7 @@ void SdrCustomShapeGeometryItem::SetPropertyValue( const OUString& rSequenceName
void SdrCustomShapeGeometryItem::ClearPropertyValue( const OUString& rPropName )
{
- if ( aPropSeq.getLength() )
+ if ( aPropSeq.hasElements() )
{
PropertyHashMap::iterator aHashIter( aPropHashMap.find( rPropName ) );
if ( aHashIter != aPropHashMap.end() )
diff --git a/svx/source/mnuctrls/smarttagmenu.cxx b/svx/source/mnuctrls/smarttagmenu.cxx
index 9a912c49912a..72187d9273ec 100644
--- a/svx/source/mnuctrls/smarttagmenu.cxx
+++ b/svx/source/mnuctrls/smarttagmenu.cxx
@@ -127,7 +127,7 @@ void SmartTagMenuController::FillMenu()
const css::uno::Sequence< css::uno::Reference< css::smarttags::XSmartTagAction > >& rActionComponents = rActionComponentsSequence[i];
const css::uno::Sequence< sal_Int32 >& rActionIndices = rActionIndicesSequence[i];
- if ( 0 == rActionComponents.getLength() || 0 == rActionIndices.getLength() )
+ if ( !rActionComponents.hasElements() || !rActionIndices.hasElements() )
continue;
// Ask first entry for the smart tag type caption
diff --git a/svx/source/sidebar/line/LineWidthPopup.cxx b/svx/source/sidebar/line/LineWidthPopup.cxx
index d8cc86bf57e7..abcefb0fe231 100644
--- a/svx/source/sidebar/line/LineWidthPopup.cxx
+++ b/svx/source/sidebar/line/LineWidthPopup.cxx
@@ -174,7 +174,7 @@ void LineWidthPopup::SetWidthSelect(long lValue, bool bValuable, MapUnit eMapUni
{
css::uno::Sequence <css::beans::NamedValue> aSeq = aWinOpt.GetUserData();
OUString aTmp;
- if ( aSeq.getLength())
+ if ( aSeq.hasElements())
aSeq[0].Value >>= aTmp;
OUString aWinData( aTmp );
diff --git a/svx/source/sidebar/text/TextCharacterSpacingControl.cxx b/svx/source/sidebar/text/TextCharacterSpacingControl.cxx
index fbfc077c32ae..e4a75085bce8 100644
--- a/svx/source/sidebar/text/TextCharacterSpacingControl.cxx
+++ b/svx/source/sidebar/text/TextCharacterSpacingControl.cxx
@@ -113,7 +113,7 @@ void TextCharacterSpacingControl::Initialize()
{
css::uno::Sequence<css::beans::NamedValue> aSeq = aWinOpt.GetUserData();
OUString aTmp;
- if(aSeq.getLength())
+ if(aSeq.hasElements())
aSeq[0].Value >>= aTmp;
OUString aWinData(aTmp);
diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
index 8d21bbb518ee..a8457ef07700 100644
--- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx
+++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
@@ -1381,7 +1381,7 @@ css::uno::Sequence< OUString > SAL_CALL FindbarDispatcher::getSupportedServiceNa
// XInitialization
void SAL_CALL FindbarDispatcher::initialize( const css::uno::Sequence< css::uno::Any >& aArguments )
{
- if ( aArguments.getLength() )
+ if ( aArguments.hasElements() )
aArguments[0] >>= m_xFrame;
}
diff --git a/svx/source/unodraw/unomod.cxx b/svx/source/unodraw/unomod.cxx
index 30b545846808..ebfde724a6b7 100644
--- a/svx/source/unodraw/unomod.cxx
+++ b/svx/source/unodraw/unomod.cxx
@@ -299,7 +299,7 @@ void SAL_CALL SvxUnoDrawingModel::release() throw ( )
// XTypeProvider
uno::Sequence< uno::Type > SAL_CALL SvxUnoDrawingModel::getTypes( )
{
- if( maTypeSequence.getLength() == 0 )
+ if( !maTypeSequence.hasElements() )
{
maTypeSequence = comphelper::concatSequences( SfxBaseModel::getTypes(),
uno::Sequence {
diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx
index b1a2a4b699fa..202d9ff8135c 100644
--- a/svx/source/xml/xmlgrhlp.cxx
+++ b/svx/source/xml/xmlgrhlp.cxx
@@ -1030,7 +1030,7 @@ void SAL_CALL SvXMLGraphicImportExportHelper::initialize(
const Sequence< Any >& aArguments )
{
Reference< embed::XStorage > xStorage;
- if( aArguments.getLength() > 0 )
+ if( aArguments.hasElements() )
aArguments[0] >>= xStorage;
rtl::Reference<SvXMLGraphicHelper> pHelper( SvXMLGraphicHelper::Create( xStorage, m_eGraphicHelperMode ));