summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cppcanvas/source/mtfrenderer/implrenderer.cxx18
-rw-r--r--cppcanvas/source/mtfrenderer/polypolyaction.cxx4
-rw-r--r--cppcanvas/source/mtfrenderer/textaction.cxx4
-rw-r--r--cppuhelper/source/component_context.cxx6
-rw-r--r--cppuhelper/source/factory.cxx4
-rw-r--r--cppuhelper/source/shlib.cxx2
-rw-r--r--cppuhelper/source/tdmgr.cxx4
-rw-r--r--cppuhelper/source/typemanager.cxx2
-rw-r--r--cui/source/customize/SvxConfigPageHelper.cxx2
-rw-r--r--cui/source/customize/cfg.cxx4
-rw-r--r--cui/source/dialogs/SignSignatureLineDialog.cxx2
-rw-r--r--cui/source/dialogs/SpellDialog.cxx2
-rw-r--r--cui/source/dialogs/hangulhanjadlg.cxx2
-rw-r--r--cui/source/dialogs/insdlg.cxx2
-rw-r--r--cui/source/dialogs/screenshotannotationdlg.cxx2
-rw-r--r--cui/source/dialogs/scriptdlg.cxx2
-rw-r--r--cui/source/dialogs/thesdlg.cxx4
-rw-r--r--cui/source/options/cfgchart.cxx2
-rw-r--r--cui/source/options/optlingu.cxx16
-rw-r--r--cui/source/options/treeopt.cxx2
-rw-r--r--dbaccess/source/core/api/FilteredContainer.cxx4
-rw-r--r--dbaccess/source/core/api/RowSetCache.cxx2
-rw-r--r--dbaccess/source/core/api/SingleSelectQueryComposer.cxx2
-rw-r--r--dbaccess/source/core/dataaccess/ContentHelper.cxx2
-rw-r--r--dbaccess/source/core/dataaccess/databasecontext.cxx2
-rw-r--r--dbaccess/source/core/dataaccess/documentcontainer.cxx6
-rw-r--r--dbaccess/source/core/dataaccess/documentdefinition.cxx14
-rw-r--r--dbaccess/source/core/dataaccess/documentevents.cxx2
-rw-r--r--dbaccess/source/core/misc/DatabaseDataProvider.cxx6
-rw-r--r--dbaccess/source/filter/xml/xmlDataSourceSetting.cxx2
-rw-r--r--dbaccess/source/filter/xml/xmlExport.cxx10
-rw-r--r--dbaccess/source/filter/xml/xmlfilter.cxx2
-rw-r--r--dbaccess/source/ui/app/AppController.cxx6
-rw-r--r--dbaccess/source/ui/browser/exsrcbrw.cxx2
-rw-r--r--dbaccess/source/ui/browser/unodatbr.cxx2
-rw-r--r--dbaccess/source/ui/dlg/DbAdminImpl.cxx2
-rw-r--r--dbaccess/source/ui/dlg/tablespage.cxx2
-rw-r--r--dbaccess/source/ui/misc/DExport.cxx2
-rw-r--r--dbaccess/source/ui/misc/RowSetDrop.cxx2
-rw-r--r--dbaccess/source/ui/misc/TokenWriter.cxx8
-rw-r--r--dbaccess/source/ui/misc/WCopyTable.cxx4
-rw-r--r--dbaccess/source/ui/misc/linkeddocuments.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/querycontroller.cxx6
-rw-r--r--dbaccess/source/ui/relationdesign/RTableConnectionData.cxx2
-rw-r--r--dbaccess/source/ui/tabledesign/TableController.cxx2
-rw-r--r--dbaccess/source/ui/uno/copytablewizard.cxx6
-rw-r--r--desktop/source/deployment/gui/dp_gui_dialog2.cxx4
-rw-r--r--desktop/source/deployment/gui/dp_gui_updatedialog.cxx6
-rw-r--r--desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx2
-rw-r--r--desktop/source/deployment/manager/dp_informationprovider.cxx2
-rw-r--r--desktop/source/deployment/misc/dp_update.cxx4
-rw-r--r--desktop/source/deployment/registry/package/dp_package.cxx2
-rw-r--r--desktop/source/lib/init.cxx2
-rw-r--r--desktop/source/migration/migration.cxx2
-rw-r--r--desktop/source/migration/services/oo3extensionmigration.cxx2
-rw-r--r--desktop/source/splash/splash.cxx2
56 files changed, 108 insertions, 108 deletions
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index 241443aa39a9..5de65e350bc7 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -392,8 +392,8 @@ namespace cppcanvas
const OutDevState& rState( rParms.mrStates.getState() );
if( (!rState.isLineColorSet &&
!rState.isFillColorSet) ||
- (rState.lineColor.getLength() == 0 &&
- rState.fillColor.getLength() == 0) )
+ (!rState.lineColor.hasElements() &&
+ !rState.fillColor.hasElements()) )
{
return false;
}
@@ -1813,7 +1813,7 @@ namespace cppcanvas
case MetaActionType::POINT:
{
const OutDevState& rState( rStates.getState() );
- if( rState.lineColor.getLength() )
+ if( rState.lineColor.hasElements() )
{
std::shared_ptr<Action> pPointAction(
internal::PointActionFactory::createPointAction(
@@ -1837,7 +1837,7 @@ namespace cppcanvas
case MetaActionType::PIXEL:
{
const OutDevState& rState( rStates.getState() );
- if( rState.lineColor.getLength() )
+ if( rState.lineColor.hasElements() )
{
std::shared_ptr<Action> pPointAction(
internal::PointActionFactory::createPointAction(
@@ -1862,7 +1862,7 @@ namespace cppcanvas
case MetaActionType::LINE:
{
const OutDevState& rState( rStates.getState() );
- if( rState.lineColor.getLength() )
+ if( rState.lineColor.hasElements() )
{
MetaLineAction* pLineAct = static_cast<MetaLineAction*>(pCurrAct);
@@ -2048,8 +2048,8 @@ namespace cppcanvas
case MetaActionType::POLYLINE:
{
const OutDevState& rState( rStates.getState() );
- if( rState.lineColor.getLength() ||
- rState.fillColor.getLength() )
+ if( rState.lineColor.hasElements() ||
+ rState.fillColor.hasElements() )
{
MetaPolyLineAction* pPolyLineAct = static_cast<MetaPolyLineAction*>(pCurrAct);
@@ -2395,8 +2395,8 @@ namespace cppcanvas
case MetaActionType::Transparent:
{
const OutDevState& rState( rStates.getState() );
- if( rState.lineColor.getLength() ||
- rState.fillColor.getLength() )
+ if( rState.lineColor.hasElements() ||
+ rState.fillColor.hasElements() )
{
MetaTransparentAction* pAct = static_cast<MetaTransparentAction*>(pCurrAct);
::basegfx::B2DPolyPolygon aPoly( pAct->GetPolyPolygon().getB2DPolyPolygon() );
diff --git a/cppcanvas/source/mtfrenderer/polypolyaction.cxx b/cppcanvas/source/mtfrenderer/polypolyaction.cxx
index b2bf7e5ab816..19c75104f5fb 100644
--- a/cppcanvas/source/mtfrenderer/polypolyaction.cxx
+++ b/cppcanvas/source/mtfrenderer/polypolyaction.cxx
@@ -155,7 +155,7 @@ namespace cppcanvas
rendering::RenderState aLocalState( maState );
::canvas::tools::prependToRenderState(aLocalState, rTransformation);
- if( maFillColor.getLength() )
+ if( maFillColor.hasElements() )
{
// TODO(E3): Use DBO's finalizer here,
// fillPolyPolygon() might throw
@@ -169,7 +169,7 @@ namespace cppcanvas
aLocalState.DeviceColor = aTmpColor;
}
- if( aLocalState.DeviceColor.getLength() )
+ if( aLocalState.DeviceColor.hasElements() )
{
rCachedPrimitive = mpCanvas->getUNOCanvas()->drawPolyPolygon( mxPolyPoly,
mpCanvas->getViewState(),
diff --git a/cppcanvas/source/mtfrenderer/textaction.cxx b/cppcanvas/source/mtfrenderer/textaction.cxx
index d6e2cedd4e8e..04f37560bfad 100644
--- a/cppcanvas/source/mtfrenderer/textaction.cxx
+++ b/cppcanvas/source/mtfrenderer/textaction.cxx
@@ -155,7 +155,7 @@ namespace cppcanvas
void initLayoutWidth(double& rLayoutWidth, const uno::Sequence<double>& rOffsets)
{
- ENSURE_OR_THROW(rOffsets.getLength(),
+ ENSURE_OR_THROW(rOffsets.hasElements(),
"::cppcanvas::internal::initLayoutWidth(): zero-length array" );
rLayoutWidth = *(std::max_element(rOffsets.begin(), rOffsets.end()));
}
@@ -236,7 +236,7 @@ namespace cppcanvas
const OutDevState& rState,
const ::basegfx::B2DHomMatrix* pTextTransform )
{
- ENSURE_OR_THROW( rOffsets.getLength(),
+ ENSURE_OR_THROW( rOffsets.hasElements(),
"::cppcanvas::internal::initArrayAction(): zero-length DX array" );
const ::basegfx::B2DPoint aLocalStartPoint(
diff --git a/cppuhelper/source/component_context.cxx b/cppuhelper/source/component_context.cxx
index ba0c0635dc89..5d6294704f7f 100644
--- a/cppuhelper/source/component_context.cxx
+++ b/cppuhelper/source/component_context.cxx
@@ -288,7 +288,7 @@ Any ComponentContext::lookupMap( OUString const & rName )
Reference< lang::XSingleComponentFactory > xFac;
if (usesService >>= xFac) // try via factory
{
- xInstance = args.getLength()
+ xInstance = args.hasElements()
? xFac->createInstanceWithArgumentsAndContext( args, this )
: xFac->createInstanceWithContext( this );
}
@@ -298,7 +298,7 @@ Any ComponentContext::lookupMap( OUString const & rName )
if (usesService >>= xFac2)
{
// try via old XSingleServiceFactory
- xInstance = args.getLength()
+ xInstance = args.hasElements()
? xFac2->createInstanceWithArguments( args )
: xFac2->createInstance();
}
@@ -308,7 +308,7 @@ Any ComponentContext::lookupMap( OUString const & rName )
if ((usesService >>= serviceName) &&
!serviceName.isEmpty())
{
- xInstance = args.getLength()
+ xInstance = args.hasElements()
? m_xSMgr->createInstanceWithArgumentsAndContext(
serviceName, args, this )
: m_xSMgr->createInstanceWithContext(
diff --git a/cppuhelper/source/factory.cxx b/cppuhelper/source/factory.cxx
index 43e469d57121..d61639566110 100644
--- a/cppuhelper/source/factory.cxx
+++ b/cppuhelper/source/factory.cxx
@@ -186,7 +186,7 @@ Reference< XInterface > OSingleFactoryHelper::createInstanceWithArgumentsAndCont
}
else
{
- if ( rArguments.getLength() )
+ if ( rArguments.hasElements() )
{
// dispose the here created UNO object before throwing out exception
// to avoid risk of memory leaks #i113722#
@@ -747,7 +747,7 @@ Reference< XInterface > ORegistryFactoryHelper::createModuleFactory()
Sequence< OUString > ORegistryFactoryHelper::getSupportedServiceNames()
{
MutexGuard aGuard( aMutex );
- if( aServiceNames.getLength() == 0 )
+ if( !aServiceNames.hasElements() )
{
// not yet loaded
try
diff --git a/cppuhelper/source/shlib.cxx b/cppuhelper/source/shlib.cxx
index 9f23f1160c03..c5979e642393 100644
--- a/cppuhelper/source/shlib.cxx
+++ b/cppuhelper/source/shlib.cxx
@@ -203,7 +203,7 @@ cppuhelper::WrapperConstructorFn mapConstructorFn(
void *const ctxt = mapTo.mapInterface(
context,
cppu::UnoType<css::uno::XComponentContext>::get());
- if (args.getLength() > 0) {
+ if (args.hasElements()) {
std::abort(); // TODO map args
}
void * instance = nullptr;
diff --git a/cppuhelper/source/tdmgr.cxx b/cppuhelper/source/tdmgr.cxx
index 288ac9bb6653..8666fadc6554 100644
--- a/cppuhelper/source/tdmgr.cxx
+++ b/cppuhelper/source/tdmgr.cxx
@@ -122,7 +122,7 @@ static typelib_TypeDescription * createCTD(
const Reference< XStructTypeDescription > & xType )
{
typelib_TypeDescription * pRet = nullptr;
- if (xType.is() && xType->getTypeParameters().getLength() == 0)
+ if (xType.is() && !xType->getTypeParameters().hasElements())
{
typelib_TypeDescription * pBaseType = createCTD(
access, xType->getBaseType() );
@@ -171,7 +171,7 @@ static typelib_TypeDescription * createCTD(
// string is held by rMemberNames
rInit.aBase.pMemberName = pMemberNames[nPos].pData;
- rInit.bParameterizedType = templateMemberTypes.getLength() != 0
+ rInit.bParameterizedType = templateMemberTypes.hasElements()
&& (templateMemberTypes[nPos]->getTypeClass()
== TypeClass_UNKNOWN);
}
diff --git a/cppuhelper/source/typemanager.cxx b/cppuhelper/source/typemanager.cxx
index 3d4f474f89f0..24fa88db309b 100644
--- a/cppuhelper/source/typemanager.cxx
+++ b/cppuhelper/source/typemanager.cxx
@@ -1690,7 +1690,7 @@ Enumeration::nextTypeDescription()
}
bool Enumeration::matches(css::uno::TypeClass tc) const {
- if (types_.getLength() == 0) {
+ if (!types_.hasElements()) {
return true;
}
for (sal_Int32 i = 0; i != types_.getLength(); ++i) {
diff --git a/cui/source/customize/SvxConfigPageHelper.cxx b/cui/source/customize/SvxConfigPageHelper.cxx
index e57858d0048a..2a707b3f5c74 100644
--- a/cui/source/customize/SvxConfigPageHelper.cxx
+++ b/cui/source/customize/SvxConfigPageHelper.cxx
@@ -101,7 +101,7 @@ css::uno::Reference< css::graphic::XGraphic > SvxConfigPageHelper::GetGraphic(
aGraphicSeq =
xImageManager->getImages( GetImageType(), aImageCmdSeq );
- if ( aGraphicSeq.getLength() > 0 )
+ if ( aGraphicSeq.hasElements() )
{
result = aGraphicSeq[0];
}
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index bf583d4d37a4..f3c2c1dce224 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -2725,7 +2725,7 @@ SvxIconSelectorDialog::SvxIconSelectorDialog(weld::Window *pWindow,
{
name[ 0 ] = elem.first;
uno::Sequence< uno::Reference< graphic::XGraphic> > graphics = m_xImportedImageManager->getImages( SvxConfigPageHelper::GetImageType(), name );
- if ( graphics.getLength() > 0 )
+ if ( graphics.hasElements() )
{
m_aGraphics.push_back(graphics[0]);
Image img(graphics[0]);
@@ -2771,7 +2771,7 @@ SvxIconSelectorDialog::SvxIconSelectorDialog(weld::Window *pWindow,
// added to the list
}
- if ( graphics.getLength() > 0 )
+ if ( graphics.hasElements() )
{
Image img(graphics[0]);
if (!img.GetBitmapEx().IsEmpty())
diff --git a/cui/source/dialogs/SignSignatureLineDialog.cxx b/cui/source/dialogs/SignSignatureLineDialog.cxx
index 12c6590934fb..ecdacc4a0e0e 100644
--- a/cui/source/dialogs/SignSignatureLineDialog.cxx
+++ b/cui/source/dialogs/SignSignatureLineDialog.cxx
@@ -142,7 +142,7 @@ IMPL_LINK_NOARG(SignSignatureLineDialog, loadImage, weld::Button&, void)
if (xFilePicker->execute())
{
Sequence<OUString> aSelectedFiles = xFilePicker->getSelectedFiles();
- if (aSelectedFiles.getLength() < 1)
+ if (!aSelectedFiles.hasElements())
return;
Reference<XGraphicProvider> xProvider = GraphicProvider::create(xContext);
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx
index 89474b59222f..8c6773efb98c 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -1612,7 +1612,7 @@ bool SentenceEditWindow_Impl::MarkNextError( bool bIgnoreCurrentError, const css
pAction->SetErrorMove(nOldErrorStart, nOldErrorEnd);
const SpellErrorAttrib* pOldAttrib = static_cast<const SpellErrorAttrib*>(
pTextEngine->FindAttrib( TextPaM(0, nOldErrorStart), TEXTATTR_SPELL_ERROR ));
- pAction->SetErrorLanguageSelected(pOldAttrib && pOldAttrib->GetErrorDescription().aSuggestions.getLength() &&
+ pAction->SetErrorLanguageSelected(pOldAttrib && pOldAttrib->GetErrorDescription().aSuggestions.hasElements() &&
LanguageTag( pOldAttrib->GetErrorDescription().aLocale).getLanguageType() ==
GetSpellDialog()->m_pLanguageLB->GetSelectedLanguage());
AddUndoAction(std::move(pAction));
diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx
index 342b35352782..65633ab79461 100644
--- a/cui/source/dialogs/hangulhanjadlg.cxx
+++ b/cui/source/dialogs/hangulhanjadlg.cxx
@@ -1192,7 +1192,7 @@ namespace svx
_rOrg.getLength(),
ConversionDirection_FROM_LEFT,
css::i18n::TextConversionOption::NONE );
- bRet = _rEntries.getLength() > 0;
+ bRet = _rEntries.hasElements();
}
catch( const IllegalArgumentException& )
{
diff --git a/cui/source/dialogs/insdlg.cxx b/cui/source/dialogs/insdlg.cxx
index 474bd7af4d95..2d9b5b8b9756 100644
--- a/cui/source/dialogs/insdlg.cxx
+++ b/cui/source/dialogs/insdlg.cxx
@@ -320,7 +320,7 @@ short SvInsertOleDlg::run()
uno::Reference< io::XInputStream > SvInsertOleDlg::GetIconIfIconified( OUString* pGraphicMediaType )
{
- if ( m_aIconMetaFile.getLength() )
+ if ( m_aIconMetaFile.hasElements() )
{
if ( pGraphicMediaType )
*pGraphicMediaType = m_aIconMediaType;
diff --git a/cui/source/dialogs/screenshotannotationdlg.cxx b/cui/source/dialogs/screenshotannotationdlg.cxx
index e567944d226c..1536c19d4cfa 100644
--- a/cui/source/dialogs/screenshotannotationdlg.cxx
+++ b/cui/source/dialogs/screenshotannotationdlg.cxx
@@ -357,7 +357,7 @@ IMPL_LINK_NOARG(ScreenshotAnnotationDlg_Impl, saveButtonHandler, Button*, void)
maLastFolderURL = xFilePicker->getDisplayDirectory();
const uno::Sequence< OUString > files(xFilePicker->getSelectedFiles());
- if (files.getLength())
+ if (files.hasElements())
{
OUString aConfirmedName = files[0];
diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx
index 11ef3a8820e2..75e89daf48ec 100644
--- a/cui/source/dialogs/scriptdlg.cxx
+++ b/cui/source/dialogs/scriptdlg.cxx
@@ -752,7 +752,7 @@ void SvxScriptOrgDialog::createEntry(weld::TreeIter& rEntry)
{
aNewName = aNewStdName + OUString::number(i);
bool bFound = false;
- if(childNodes.getLength() > 0 )
+ if(childNodes.hasElements() )
{
OUString nodeName = childNodes[0]->getName();
sal_Int32 extnPos = nodeName.lastIndexOf( '.' );
diff --git a/cui/source/dialogs/thesdlg.cxx b/cui/source/dialogs/thesdlg.cxx
index 0a9e237e5c9c..f4cc269c0255 100644
--- a/cui/source/dialogs/thesdlg.cxx
+++ b/cui/source/dialogs/thesdlg.cxx
@@ -79,13 +79,13 @@ uno::Sequence< uno::Reference< linguistic2::XMeaning > > SvxThesaurusDialog::que
xThesaurus->queryMeanings( rTerm, rLocale, rProperties ) );
// text with '.' at the end?
- if ( 0 == aMeanings.getLength() && rTerm.endsWith(".") )
+ if ( !aMeanings.hasElements() && rTerm.endsWith(".") )
{
// try again without trailing '.' chars. It may be a word at the
// end of a sentence and not an abbreviation...
OUString aTxt(comphelper::string::stripEnd(rTerm, '.'));
aMeanings = xThesaurus->queryMeanings( aTxt, rLocale, rProperties );
- if (aMeanings.getLength())
+ if (aMeanings.hasElements())
{
rTerm = aTxt;
}
diff --git a/cui/source/options/cfgchart.cxx b/cui/source/options/cfgchart.cxx
index 52ddde097f4c..0427e734ddc7 100644
--- a/cui/source/options/cfgchart.cxx
+++ b/cui/source/options/cfgchart.cxx
@@ -235,7 +235,7 @@ void SvxChartOptions::ImplCommit()
uno::Sequence< OUString > aNames = GetPropertyNames();
uno::Sequence< uno::Any > aValues( aNames.getLength());
- if( aValues.getLength() >= 1 )
+ if( aValues.hasElements() )
{
// 1. default colors for series
// convert list to sequence
diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx
index ed8b59ed5644..3280514c63d7 100644
--- a/cui/source/options/optlingu.cxx
+++ b/cui/source/options/optlingu.cxx
@@ -580,7 +580,7 @@ SvxLinguData_Impl::SvxLinguData_Impl() :
const Sequence< Locale > aLocales( aInfo.xSpell->getLocales() );
//! suppress display of entries with no supported languages (see feature 110994)
- if (aLocales.getLength())
+ if (aLocales.hasElements())
{
lcl_MergeLocales( aAllServiceLocales, aLocales );
lcl_MergeDisplayArray( *this, aInfo );
@@ -604,7 +604,7 @@ SvxLinguData_Impl::SvxLinguData_Impl() :
const Sequence< Locale > aLocales( aInfo.xGrammar->getLocales() );
//! suppress display of entries with no supported languages (see feature 110994)
- if (aLocales.getLength())
+ if (aLocales.hasElements())
{
lcl_MergeLocales( aAllServiceLocales, aLocales );
lcl_MergeDisplayArray( *this, aInfo );
@@ -627,7 +627,7 @@ SvxLinguData_Impl::SvxLinguData_Impl() :
const Sequence< Locale > aLocales( aInfo.xHyph->getLocales() );
//! suppress display of entries with no supported languages (see feature 110994)
- if (aLocales.getLength())
+ if (aLocales.hasElements())
{
lcl_MergeLocales( aAllServiceLocales, aLocales );
lcl_MergeDisplayArray( *this, aInfo );
@@ -650,7 +650,7 @@ SvxLinguData_Impl::SvxLinguData_Impl() :
const Sequence< Locale > aLocales( aInfo.xThes->getLocales() );
//! suppress display of entries with no supported languages (see feature 110994)
- if (aLocales.getLength())
+ if (aLocales.hasElements())
{
lcl_MergeLocales( aAllServiceLocales, aLocales );
lcl_MergeDisplayArray( *this, aInfo );
@@ -665,22 +665,22 @@ SvxLinguData_Impl::SvxLinguData_Impl() :
aCfgSvcs = xLinguSrvcMgr->getConfiguredServices(cSpell, pAllLocales[nLocale]);
SetChecked( aCfgSvcs );
- if (aCfgSvcs.getLength())
+ if (aCfgSvcs.hasElements())
aCfgSpellTable[ nLang ] = aCfgSvcs;
aCfgSvcs = xLinguSrvcMgr->getConfiguredServices(cGrammar, pAllLocales[nLocale]);
SetChecked( aCfgSvcs );
- if (aCfgSvcs.getLength())
+ if (aCfgSvcs.hasElements())
aCfgGrammarTable[ nLang ] = aCfgSvcs;
aCfgSvcs = xLinguSrvcMgr->getConfiguredServices(cHyph, pAllLocales[nLocale]);
SetChecked( aCfgSvcs );
- if (aCfgSvcs.getLength())
+ if (aCfgSvcs.hasElements())
aCfgHyphTable[ nLang ] = aCfgSvcs;
aCfgSvcs = xLinguSrvcMgr->getConfiguredServices(cThes, pAllLocales[nLocale]);
SetChecked( aCfgSvcs );
- if (aCfgSvcs.getLength())
+ if (aCfgSvcs.hasElements())
aCfgThesTable[ nLang ] = aCfgSvcs;
}
}
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index ef6f45014818..93b53e01005c 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -270,7 +270,7 @@ MailMergeCfg_Impl::MailMergeCfg_Impl() :
Sequence<OUString> aNames { "EMailSupported" };
const Sequence< Any > aValues = GetProperties(aNames);
const Any* pValues = aValues.getConstArray();
- if(aValues.getLength() && pValues[0].hasValue())
+ if(aValues.hasElements() && pValues[0].hasValue())
pValues[0] >>= bIsEmailSupported;
}
diff --git a/dbaccess/source/core/api/FilteredContainer.cxx b/dbaccess/source/core/api/FilteredContainer.cxx
index a24cbc0c740a..c69cc4158a14 100644
--- a/dbaccess/source/core/api/FilteredContainer.cxx
+++ b/dbaccess/source/core/api/FilteredContainer.cxx
@@ -306,7 +306,7 @@ static sal_Int32 createWildCardVector(Sequence< OUString >& _rTableFilter, std::
OUString sInherentTableTypeRestriction( getTableTypeRestriction() );
if ( !sInherentTableTypeRestriction.isEmpty() )
{
- if ( _rTableTypeFilter.getLength() != 0 )
+ if ( _rTableTypeFilter.hasElements() )
{
const OUString* tableType = _rTableTypeFilter.getConstArray();
const OUString* tableTypeEnd = tableType + _rTableTypeFilter.getLength();
@@ -328,7 +328,7 @@ static sal_Int32 createWildCardVector(Sequence< OUString >& _rTableFilter, std::
else
{
// no container-inherent restriction for the table types
- if ( _rTableTypeFilter.getLength() == 0 )
+ if ( !_rTableTypeFilter.hasElements() )
{ // no externally-provided table type filter => use the default filter
getAllTableTypeFilter( aTableTypeFilter );
}
diff --git a/dbaccess/source/core/api/RowSetCache.cxx b/dbaccess/source/core/api/RowSetCache.cxx
index 544d9269bcd8..ee4491d52606 100644
--- a/dbaccess/source/core/api/RowSetCache.cxx
+++ b/dbaccess/source/core/api/RowSetCache.cxx
@@ -191,7 +191,7 @@ ORowSetCache::ORowSetCache(const Reference< XResultSet >& _xRs,
{
if(!_rUpdateTableName.isEmpty() && xTables->hasByName(_rUpdateTableName))
xTables->getByName(_rUpdateTableName) >>= m_aUpdateTable;
- else if(xTables->getElementNames().getLength())
+ else if(xTables->getElementNames().hasElements())
{
aUpdateTableName = xTables->getElementNames()[0];
xTables->getByName(aUpdateTableName) >>= m_aUpdateTable;
diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
index c5cd28e606e4..319b95b982b3 100644
--- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
+++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
@@ -1531,7 +1531,7 @@ namespace
const Sequence< PropertyValue >* pOrEnd = pOrIter + filter.getLength();
while ( pOrIter != pOrEnd )
{
- if ( pOrIter->getLength() )
+ if ( pOrIter->hasElements() )
{
sRet.append(L_BRACKET);
const PropertyValue* pAndIter = pOrIter->getConstArray();
diff --git a/dbaccess/source/core/dataaccess/ContentHelper.cxx b/dbaccess/source/core/dataaccess/ContentHelper.cxx
index 9e462e97116f..479bcddaa38c 100644
--- a/dbaccess/source/core/dataaccess/ContentHelper.cxx
+++ b/dbaccess/source/core/dataaccess/ContentHelper.cxx
@@ -198,7 +198,7 @@ Any SAL_CALL OContentHelper::execute( const Command& aCommand, sal_Int32 /*Comma
// Unreachable
}
- if ( !aProperties.getLength() )
+ if ( !aProperties.hasElements() )
{
OSL_FAIL( "No properties!" );
ucbhelper::cancelCommandExecution(
diff --git a/dbaccess/source/core/dataaccess/databasecontext.cxx b/dbaccess/source/core/dataaccess/databasecontext.cxx
index 0e1e4bfa9285..6931feb3123d 100644
--- a/dbaccess/source/core/dataaccess/databasecontext.cxx
+++ b/dbaccess/source/core/dataaccess/databasecontext.cxx
@@ -611,7 +611,7 @@ sal_Bool ODatabaseContext::hasElements()
MutexGuard aGuard(m_aMutex);
::connectivity::checkDisposed(DatabaseAccessContext_Base::rBHelper.bDisposed);
- return 0 != getElementNames().getLength();
+ return getElementNames().hasElements();
}
// css::container::XEnumerationAccess
diff --git a/dbaccess/source/core/dataaccess/documentcontainer.cxx b/dbaccess/source/core/dataaccess/documentcontainer.cxx
index 992eb24e5759..9e9a1f8918ea 100644
--- a/dbaccess/source/core/dataaccess/documentcontainer.cxx
+++ b/dbaccess/source/core/dataaccess/documentcontainer.cxx
@@ -213,7 +213,7 @@ Reference< XInterface > SAL_CALL ODocumentContainer::createInstanceWithArguments
if ( xElements.is() )
sPersistentName = ::dbtools::createUniqueName(xElements,sPersistentName);
- const bool bNeedClassID = (0 == aClassID.getLength()) && sURL.isEmpty() ;
+ const bool bNeedClassID = !aClassID.hasElements() && sURL.isEmpty() ;
if ( xCopyFrom.is() )
{
Sequence<Any> aIni(2);
@@ -265,13 +265,13 @@ Reference< XInterface > SAL_CALL ODocumentContainer::createInstanceWithArguments
pElementImpl = aFind->second;
::rtl::Reference< ODocumentDefinition > pDocDef = new ODocumentDefinition( *this, m_aContext, pElementImpl, m_bFormsContainer );
- if ( aClassID.getLength() )
+ if ( aClassID.hasElements() )
{
pDocDef->initialLoad( aClassID, aCreationArgs, xConnection );
}
else
{
- OSL_ENSURE( aCreationArgs.getLength() == 0, "ODocumentContainer::createInstance: additional creation args are lost, if you do not provide a class ID." );
+ OSL_ENSURE( !aCreationArgs.hasElements(), "ODocumentContainer::createInstance: additional creation args are lost, if you do not provide a class ID." );
}
xContent = pDocDef.get();
diff --git a/dbaccess/source/core/dataaccess/documentdefinition.cxx b/dbaccess/source/core/dataaccess/documentdefinition.cxx
index abe4570fd719..1d68932a42b1 100644
--- a/dbaccess/source/core/dataaccess/documentdefinition.cxx
+++ b/dbaccess/source/core/dataaccess/documentdefinition.cxx
@@ -354,7 +354,7 @@ OUString ODocumentDefinition::GetDocumentServiceFromMediaType( const OUString& _
::comphelper::MimeConfigurationHelper aConfigHelper( _rContext );
sResult = aConfigHelper.GetDocServiceNameFromMediaType( _rMediaType );
_rClassId = comphelper::MimeConfigurationHelper::GetSequenceClassIDRepresentation(aConfigHelper.GetExplicitlyRegisteredObjClassID( _rMediaType ));
- if ( !_rClassId.getLength() && !sResult.isEmpty() )
+ if ( !_rClassId.hasElements() && !sResult.isEmpty() )
{
Reference< XNameAccess > xObjConfig = aConfigHelper.GetObjConfiguration();
if ( xObjConfig.is() )
@@ -409,8 +409,8 @@ ODocumentDefinition::ODocumentDefinition( const Reference< XInterface >& _rxCont
void ODocumentDefinition::initialLoad( const Sequence< sal_Int8 >& i_rClassID, const Sequence< PropertyValue >& i_rCreationArgs,
const Reference< XConnection >& i_rConnection )
{
- OSL_ENSURE( i_rClassID.getLength(), "ODocumentDefinition::initialLoad: illegal class ID!" );
- if ( !i_rClassID.getLength() )
+ OSL_ENSURE( i_rClassID.hasElements(), "ODocumentDefinition::initialLoad: illegal class ID!" );
+ if ( !i_rClassID.hasElements() )
return;
loadEmbeddedObject( i_rConnection, i_rClassID, i_rCreationArgs, false, false );
@@ -1028,7 +1028,7 @@ Any SAL_CALL ODocumentDefinition::execute( const Command& aCommand, sal_Int32 Co
{
Sequence<Any> aIni;
aCommand.Argument >>= aIni;
- if ( !aIni.getLength() )
+ if ( !aIni.hasElements() )
{
OSL_FAIL( "Wrong argument count!" );
ucbhelper::cancelCommandExecution(
@@ -1543,7 +1543,7 @@ void ODocumentDefinition::loadEmbeddedObject( const Reference< XConnection >& i_
bool bSetSize = false;
sal_Int32 nEntryConnectionMode = EntryInitModes::DEFAULT_INIT;
Sequence< sal_Int8 > aClassID = _aClassID;
- if ( aClassID.getLength() )
+ if ( aClassID.hasElements() )
{
nEntryConnectionMode = EntryInitModes::TRUNCATE_INIT;
bSetSize = true;
@@ -1566,7 +1566,7 @@ void ODocumentDefinition::loadEmbeddedObject( const Reference< XConnection >& i_
throw aWFE;
}
}
- if ( !aClassID.getLength() )
+ if ( !aClassID.hasElements() )
{
if ( m_bForm )
aClassID = MimeConfigurationHelper::GetSequenceClassID(SO3_SW_CLASSID);
@@ -1577,7 +1577,7 @@ void ODocumentDefinition::loadEmbeddedObject( const Reference< XConnection >& i_
}
}
- OSL_ENSURE( aClassID.getLength(),"No Class ID" );
+ OSL_ENSURE( aClassID.hasElements(),"No Class ID" );
Sequence< PropertyValue > aEmbeddedObjectDescriptor;
Sequence< PropertyValue > aLoadArgs( fillLoadArgs(
diff --git a/dbaccess/source/core/dataaccess/documentevents.cxx b/dbaccess/source/core/dataaccess/documentevents.cxx
index d2c87a414a87..418d466ad816 100644
--- a/dbaccess/source/core/dataaccess/documentevents.cxx
+++ b/dbaccess/source/core/dataaccess/documentevents.cxx
@@ -184,7 +184,7 @@ namespace dbaccess
Any aReturn;
const Sequence< PropertyValue >& rEventDesc( elementPos->second );
- if ( rEventDesc.getLength() > 0 )
+ if ( rEventDesc.hasElements() )
aReturn <<= rEventDesc;
return aReturn;
}
diff --git a/dbaccess/source/core/misc/DatabaseDataProvider.cxx b/dbaccess/source/core/misc/DatabaseDataProvider.cxx
index 9f4517bb066b..0cddb3301714 100644
--- a/dbaccess/source/core/misc/DatabaseDataProvider.cxx
+++ b/dbaccess/source/core/misc/DatabaseDataProvider.cxx
@@ -662,7 +662,7 @@ void DatabaseDataProvider::impl_fillInternalDataProvider_throw(bool _bHasCategor
typedef std::vector< ColumnDescription > ColumnDescriptions;
ColumnDescriptions aColumns;
bool bFirstColumnIsCategory = _bHasCategories;
- if ( i_aColumnNames.getLength() )
+ if ( i_aColumnNames.hasElements() )
{
// some normalizations ...
uno::Sequence< OUString > aImposedColumnNames( i_aColumnNames );
@@ -683,7 +683,7 @@ void DatabaseDataProvider::impl_fillInternalDataProvider_throw(bool _bHasCategor
// column. This, this results in a ColumnDescriptions array like <"", "col2", "col3">, where you'd expect
// <"col1", "col2", "col3">.
// Fix this with some heuristics:
- if ( ( aImposedColumnNames.getLength() > 0 ) && ( !aImposedColumnNames[0].isEmpty() ) )
+ if ( aImposedColumnNames.hasElements() && ( !aImposedColumnNames[0].isEmpty() ) )
{
const sal_Int32 nAssumedRowSetColumnIndex = _bHasCategories ? 1 : 0;
if ( nAssumedRowSetColumnIndex < aRowSetColumnNames.getLength() )
@@ -699,7 +699,7 @@ void DatabaseDataProvider::impl_fillInternalDataProvider_throw(bool _bHasCategor
if ( _bHasCategories && aColumns.empty() )
{
- if ( aRowSetColumnNames.getLength() )
+ if ( aRowSetColumnNames.hasElements() )
aColumns.emplace_back( aRowSetColumnNames[0] );
else
aColumns.emplace_back( sColumnName );
diff --git a/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx b/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx
index 7d928d140949..74d0e9b992b9 100644
--- a/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx
+++ b/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx
@@ -133,7 +133,7 @@ void OXMLDataSourceSetting::EndElement()
{
if ( !m_aSetting.Name.isEmpty() )
{
- if ( m_bIsList && m_aInfoSequence.getLength() )
+ if ( m_bIsList && m_aInfoSequence.hasElements() )
m_aSetting.Value <<= m_aInfoSequence;
// if our property is of type string, but was empty, ensure that
diff --git a/dbaccess/source/filter/xml/xmlExport.cxx b/dbaccess/source/filter/xml/xmlExport.cxx
index fafb22960aee..3d54d0a57b27 100644
--- a/dbaccess/source/filter/xml/xmlExport.cxx
+++ b/dbaccess/source/filter/xml/xmlExport.cxx
@@ -517,14 +517,14 @@ void ODBExport::exportApplicationConnectionSettings(const TSettingsMap& _aSettin
Reference<XPropertySet> xProp(getDataSource());
Sequence< OUString> aValue;
xProp->getPropertyValue(PROPERTY_TABLEFILTER) >>= aValue;
- if ( aValue.getLength() )
+ if ( aValue.hasElements() )
{
SvXMLElementExport aElem2(*this,XML_NAMESPACE_DB, XML_TABLE_FILTER, true, true);
exportSequence(aValue,XML_TABLE_INCLUDE_FILTER,XML_TABLE_FILTER_PATTERN);
}
xProp->getPropertyValue(PROPERTY_TABLETYPEFILTER) >>= aValue;
- if ( aValue.getLength() )
+ if ( aValue.hasElements() )
exportSequence(aValue,XML_TABLE_TYPE_FILTER,XML_TABLE_TYPE);
exportDataSourceSettings();
@@ -687,7 +687,7 @@ void ODBExport::exportDataSourceSettings()
{
Sequence<Any> aSeq;
aIter->Value >>= aSeq;
- if ( aSeq.getLength() )
+ if ( aSeq.hasElements() )
sTypeName = lcl_implGetPropertyXMLType(aSeq[0].getValueType());
}
@@ -773,7 +773,7 @@ void ODBExport::exportSequence(const Sequence< OUString>& _aValue
,::xmloff::token::XMLTokenEnum _eTokenType)
{
Reference<XPropertySet> xProp(getDataSource());
- if ( _aValue.getLength() )
+ if ( _aValue.hasElements() )
{
SvXMLElementExport aElem(*this,XML_NAMESPACE_DB, _eTokenFilter, true, true);
@@ -1295,7 +1295,7 @@ void ODBExport::GetConfigurationSettings(Sequence<PropertyValue>& aProps)
Any aValue = xProp->getPropertyValue(PROPERTY_LAYOUTINFORMATION);
Sequence< PropertyValue > aPropValues;
aValue >>= aPropValues;
- if ( aPropValues.getLength() )
+ if ( aPropValues.hasElements() )
{
aProps.realloc(nLength + 1);
aProps[nLength].Name = "layout-settings";
diff --git a/dbaccess/source/filter/xml/xmlfilter.cxx b/dbaccess/source/filter/xml/xmlfilter.cxx
index 9dbb729f7d47..27bc17bd762d 100644
--- a/dbaccess/source/filter/xml/xmlfilter.cxx
+++ b/dbaccess/source/filter/xml/xmlfilter.cxx
@@ -946,7 +946,7 @@ void ODBFilter::setPropertyInfo()
aDataSourceSettings.merge( ::comphelper::NamedValueCollection( aInfo ), true );
aDataSourceSettings >>= aInfo;
- if ( aInfo.getLength() )
+ if ( aInfo.hasElements() )
{
try
{
diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx
index f36f9b2e860d..dde699a8cfc0 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -1038,7 +1038,7 @@ void OApplicationController::Execute(sal_uInt16 _nId, const Sequence< PropertyVa
break;
case SID_DB_APP_PASTE_SPECIAL:
{
- if ( !aArgs.getLength() )
+ if ( !aArgs.hasElements() )
{
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
ScopedVclPtr<SfxAbstractPasteDialog> pDlg(pFact->CreatePasteDialog(getFrameWeld()));
@@ -2690,7 +2690,7 @@ sal_Bool SAL_CALL OApplicationController::select( const Any& _aSelection )
// BEGIN compatibility
Sequence< NamedValue > aCurrentSelection;
- if ( (_aSelection >>= aCurrentSelection) && aCurrentSelection.getLength() )
+ if ( (_aSelection >>= aCurrentSelection) && aCurrentSelection.hasElements() )
{
ElementType eType = E_NONE;
const NamedValue* pIter = aCurrentSelection.getConstArray();
@@ -2803,7 +2803,7 @@ Any SAL_CALL OApplicationController::getSelection( )
if ( eType != E_NONE )
{
getContainer()->describeCurrentSelectionForType( eType, aCurrentSelection );
- if ( aCurrentSelection.getLength() == 0 )
+ if ( !aCurrentSelection.hasElements() )
{ // if no objects are selected, add an entry to the sequence which describes the overall category
// which is selected currently
aCurrentSelection.realloc(1);
diff --git a/dbaccess/source/ui/browser/exsrcbrw.cxx b/dbaccess/source/ui/browser/exsrcbrw.cxx
index 64758528784b..3dba644889f9 100644
--- a/dbaccess/source/ui/browser/exsrcbrw.cxx
+++ b/dbaccess/source/ui/browser/exsrcbrw.cxx
@@ -171,7 +171,7 @@ void SAL_CALL SbaExternalSourceBrowser::dispatch(const css::util::URL& aURL, con
SAL_WARN("dbaccess.ui", "SbaExternalSourceBrowser::dispatch(AddGridColumn) : missing argument (ColumnType) !");
sControlType = "TextField";
}
- OSL_ENSURE(aControlProps.getLength(), "SbaExternalSourceBrowser::dispatch(AddGridColumn) : missing argument (ColumnProperties) !");
+ OSL_ENSURE(aControlProps.hasElements(), "SbaExternalSourceBrowser::dispatch(AddGridColumn) : missing argument (ColumnProperties) !");
// create the col
Reference< css::form::XGridColumnFactory > xColFactory(getControlModel(), UNO_QUERY);
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index ec92901a2ab7..6bdb682f32d7 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -1951,7 +1951,7 @@ void SbaTableQueryBrowser::Execute(sal_uInt16 nId, const Sequence< PropertyValue
aDescriptor[DataAccessDescriptorProperty::CommandType] = xProp->getPropertyValue(PROPERTY_COMMAND_TYPE);
aDescriptor[DataAccessDescriptorProperty::Connection] = xProp->getPropertyValue(PROPERTY_ACTIVE_CONNECTION);
aDescriptor[DataAccessDescriptorProperty::Cursor] <<= xCursorClone;
- if ( aSelection.getLength() )
+ if ( aSelection.hasElements() )
{
aDescriptor[DataAccessDescriptorProperty::Selection] <<= aSelection;
aDescriptor[DataAccessDescriptorProperty::BookmarkSelection] <<= false;
diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
index d80dbbd344b6..1f86ff57d645 100644
--- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx
+++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
@@ -772,7 +772,7 @@ void ODbDataSourceAdministrationHelper::fillDatasourceInfo(const SfxItemSet& _rS
Sequence< Any> aTypeSettings;
aTypeSettings = aProperties.getOrDefault("TypeInfoSettings",aTypeSettings);
// here we have a special entry for types from oracle
- if ( aTypeSettings.getLength() )
+ if ( aTypeSettings.hasElements() )
{
aRelevantSettings.insert(PropertyValue("TypeInfoSettings", 0, makeAny(aTypeSettings), PropertyState_DIRECT_VALUE));
}
diff --git a/dbaccess/source/ui/dlg/tablespage.cxx b/dbaccess/source/ui/dlg/tablespage.cxx
index 7c13312c963e..0e6c78bf1e1a 100644
--- a/dbaccess/source/ui/dlg/tablespage.cxx
+++ b/dbaccess/source/ui/dlg/tablespage.cxx
@@ -167,7 +167,7 @@ namespace dbaui
void OTableSubscriptionPage::implCompleteTablesCheck( const css::uno::Sequence< OUString >& _rTableFilter )
{
- if (!_rTableFilter.getLength())
+ if (!_rTableFilter.hasElements())
{ // no tables visible
CheckAll(false);
}
diff --git a/dbaccess/source/ui/misc/DExport.cxx b/dbaccess/source/ui/misc/DExport.cxx
index 1d34c41f0ddb..eea6882135ef 100644
--- a/dbaccess/source/ui/misc/DExport.cxx
+++ b/dbaccess/source/ui/misc/DExport.cxx
@@ -815,7 +815,7 @@ Reference< XPreparedStatement > ODatabaseExport::createPreparedStatment( const R
// create sql string and set column types
Sequence< OUString> aDestColumnNames = xDestColsSup->getColumns()->getElementNames();
- if ( aDestColumnNames.getLength() == 0 )
+ if ( !aDestColumnNames.hasElements() )
{
return Reference< XPreparedStatement > ();
}
diff --git a/dbaccess/source/ui/misc/RowSetDrop.cxx b/dbaccess/source/ui/misc/RowSetDrop.cxx
index 99d0d7a622b4..c402ff3e9f4a 100644
--- a/dbaccess/source/ui/misc/RowSetDrop.cxx
+++ b/dbaccess/source/ui/misc/RowSetDrop.cxx
@@ -105,7 +105,7 @@ bool ORowSetImportExport::Read()
[](sal_Int32 n) { return n > 0; }))
return false;
bool bContinue = true;
- if(m_aSelection.getLength())
+ if(m_aSelection.hasElements())
{
const Any* pBegin = m_aSelection.getConstArray();
const Any* pEnd = pBegin + m_aSelection.getLength();
diff --git a/dbaccess/source/ui/misc/TokenWriter.cxx b/dbaccess/source/ui/misc/TokenWriter.cxx
index c862af65969a..935e18bfd3fd 100644
--- a/dbaccess/source/ui/misc/TokenWriter.cxx
+++ b/dbaccess/source/ui/misc/TokenWriter.cxx
@@ -183,7 +183,7 @@ void ODatabaseImportExport::impl_initFromDescriptor( const ODataAccessDescriptor
m_xRowLocate.set( m_xResultSet, UNO_QUERY );
}
- if ( m_aSelection.getLength() != 0 )
+ if ( m_aSelection.hasElements() )
{
if ( !m_xResultSet.is() )
{
@@ -192,7 +192,7 @@ void ODatabaseImportExport::impl_initFromDescriptor( const ODataAccessDescriptor
}
}
- if ( m_aSelection.getLength() != 0 )
+ if ( m_aSelection.hasElements() )
{
if ( m_bBookmarkSelection && !m_xRowLocate.is() )
{
@@ -451,7 +451,7 @@ bool ORTFImportExport::Write()
sal_Int32 k=1;
sal_Int32 kk=0;
- if ( m_aSelection.getLength() )
+ if ( m_aSelection.hasElements() )
{
const Any* pSelIter = m_aSelection.getConstArray();
const Any* pEnd = pSelIter + m_aSelection.getLength();
@@ -699,7 +699,7 @@ void OHTMLImportExport::WriteTables()
Reference<XColumnsSupplier> xColSup(m_xObject,UNO_QUERY);
xColumns = xColSup->getColumns();
aNames = xColumns->getElementNames();
- if ( !aNames.getLength() )
+ if ( !aNames.hasElements() )
{
sal_Int32 nCount = m_xResultSetMetaData->getColumnCount();
aNames.realloc(nCount);
diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx b/dbaccess/source/ui/misc/WCopyTable.cxx
index ca8dac4694f4..821349e13aa2 100644
--- a/dbaccess/source/ui/misc/WCopyTable.cxx
+++ b/dbaccess/source/ui/misc/WCopyTable.cxx
@@ -1153,7 +1153,7 @@ void OCopyTableWizard::appendKey( Reference<XKeysSupplier> const & _rxSup, const
{
appendColumns(xColSup,_pVec,true);
Reference<XNameAccess> xColumns = xColSup->getColumns();
- if(xColumns.is() && xColumns->getElementNames().getLength())
+ if(xColumns.is() && xColumns->getElementNames().hasElements())
xAppend->appendByDescriptor(xKey);
}
@@ -1514,7 +1514,7 @@ OUString OCopyTableWizard::createUniqueName(const OUString& _sName)
{
OUString sName = _sName;
Sequence< OUString > aColumnNames( m_rSourceObject.getColumnNames() );
- if ( aColumnNames.getLength() )
+ if ( aColumnNames.hasElements() )
sName = ::dbtools::createUniqueName( aColumnNames, sName, false );
else
{
diff --git a/dbaccess/source/ui/misc/linkeddocuments.cxx b/dbaccess/source/ui/misc/linkeddocuments.cxx
index e315c8b81b35..6c0ba95365e1 100644
--- a/dbaccess/source/ui/misc/linkeddocuments.cxx
+++ b/dbaccess/source/ui/misc/linkeddocuments.cxx
@@ -263,7 +263,7 @@ namespace dbaui
if ( xORB.is() )
{
::comphelper::NamedValueCollection aCreationArgs( i_rCreationArgs );
- if ( aClassId.getLength() )
+ if ( aClassId.hasElements() )
aCreationArgs.put( "ClassID", aClassId );
aCreationArgs.put( OUString(PROPERTY_ACTIVE_CONNECTION), m_xConnection );
diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx
index 9ed4334768e8..3b4840492269 100644
--- a/dbaccess/source/ui/querydesign/querycontroller.cxx
+++ b/dbaccess/source/ui/querydesign/querycontroller.cxx
@@ -600,7 +600,7 @@ void OQueryController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >&
setModified(true);
break;
case SID_QUERY_LIMIT:
- if ( aArgs.getLength() >= 1 && aArgs[0].Name == "DBLimit.Value" )
+ if ( aArgs.hasElements() && aArgs[0].Name == "DBLimit.Value" )
{
aArgs[0].Value >>= m_nLimit;
setModified(true);
@@ -767,7 +767,7 @@ void OQueryController::impl_initialize()
Sequence< PropertyValue > aCurrentQueryDesignProps;
aCurrentQueryDesignProps = rArguments.getOrDefault( "CurrentQueryDesign", aCurrentQueryDesignProps );
- if ( aCurrentQueryDesignProps.getLength() )
+ if ( aCurrentQueryDesignProps.hasElements() )
{
::comphelper::NamedValueCollection aCurrentQueryDesign( aCurrentQueryDesignProps );
if ( aCurrentQueryDesign.has( OUString(PROPERTY_GRAPHICAL_DESIGN) ) )
@@ -1678,7 +1678,7 @@ void OQueryController::impl_reset( const bool i_bForceCurrentControllerSettings
if ( bValid )
{
// load the layoutInformation
- if ( aLayoutInformation.getLength() )
+ if ( aLayoutInformation.hasElements() )
{
try
{
diff --git a/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx b/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx
index 423928905075..397af96134a4 100644
--- a/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx
+++ b/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx
@@ -348,7 +348,7 @@ bool ORelationTableConnectionData::Update()
{
xKey->getPropertyValue(PROPERTY_NAME) >>= sName;
m_aConnName = sName;
- bDropRelation = aNames.getLength() == 0; // the key contains no column, so it isn't valid and we have to drop it
+ bDropRelation = !aNames.hasElements(); // the key contains no column, so it isn't valid and we have to drop it
//here we already know our column structure so we don't have to recreate the table connection data
xColSup.clear();
break;
diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx
index 89d07d037729..6da6bd154816 100644
--- a/dbaccess/source/ui/tabledesign/TableController.cxx
+++ b/dbaccess/source/ui/tabledesign/TableController.cxx
@@ -1264,7 +1264,7 @@ void OTableController::alterColumns()
bNeedAppendKey = true;
}
- if ( bNeedDropKey && xKeyColumns.is() && xKeyColumns->getElementNames().getLength() )
+ if ( bNeedDropKey && xKeyColumns.is() && xKeyColumns->getElementNames().hasElements() )
dropPrimaryKey();
if ( bNeedAppendKey )
diff --git a/dbaccess/source/ui/uno/copytablewizard.cxx b/dbaccess/source/ui/uno/copytablewizard.cxx
index 295575187044..ee886b365b1b 100644
--- a/dbaccess/source/ui/uno/copytablewizard.cxx
+++ b/dbaccess/source/ui/uno/copytablewizard.cxx
@@ -795,7 +795,7 @@ void CopyTableWizard::impl_extractSourceResultSet_throw( const Reference< XPrope
// sanity checks
const bool bHasResultSet = m_xSourceResultSet.is();
- const bool bHasSelection = ( m_aSourceSelection.getLength() != 0 );
+ const bool bHasSelection = m_aSourceSelection.hasElements();
if ( bHasSelection && !bHasResultSet )
throw IllegalArgumentException("A result set is needed when specifying a selection to copy.",
// TODO: resource
@@ -896,7 +896,7 @@ SharedConnection CopyTableWizard::impl_extractConnection_throw( const Reference<
// no connection pool installed
xDriverManager.set( DriverManager::create( m_xContext ), UNO_QUERY_THROW );
- if ( aConnectionInfo.getLength() )
+ if ( aConnectionInfo.hasElements() )
xConnection.set( xDriverManager->getConnectionWithInfo( sConnectionResource, aConnectionInfo ), UNO_SET_THROW );
else
xConnection.set( xDriverManager->getConnection( sConnectionResource ), UNO_SET_THROW );
@@ -1124,7 +1124,7 @@ void CopyTableWizard::impl_copyRows_throw( const Reference< XResultSet >& _rxSou
Reference< XPreparedStatement > xStatement( ODatabaseExport::createPreparedStatment( xDestMetaData, _rxDestTable, aColumnPositions ), UNO_SET_THROW );
Reference< XParameters > xStatementParams( xStatement, UNO_QUERY_THROW );
- const bool bSelectedRecordsOnly = m_aSourceSelection.getLength() != 0;
+ const bool bSelectedRecordsOnly = m_aSourceSelection.hasElements();
const Any* pSelectedRow = m_aSourceSelection.getConstArray();
const Any* pSelEnd = pSelectedRow + m_aSourceSelection.getLength();
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index eaab2ff54e72..f2b54ffb7bab 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -752,7 +752,7 @@ uno::Sequence< OUString > ExtMgrDialog::raiseAddPicker()
m_sLastFolderURL = xFilePicker->getDisplayDirectory();
uno::Sequence< OUString > files( xFilePicker->getSelectedFiles() );
- OSL_ASSERT( files.getLength() > 0 );
+ OSL_ASSERT( files.hasElements() );
return files;
}
@@ -928,7 +928,7 @@ IMPL_LINK_NOARG(ExtMgrDialog, HandleAddBtn, Button*, void)
uno::Sequence< OUString > aFileList = raiseAddPicker();
- if ( aFileList.getLength() )
+ if ( aFileList.hasElements() )
{
m_pManager->installPackage( aFileList[0] );
}
diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
index cfcf3e300106..f0e4c5115714 100644
--- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
+++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
@@ -425,7 +425,7 @@ void UpdateDialog::Thread::prepareUpdateData(
out_du.name = getUpdateDisplayString(out_data, infoset.getVersion());
- if (out_du.unsatisfiedDependencies.getLength() == 0)
+ if (!out_du.unsatisfiedDependencies.hasElements())
{
out_data.aUpdateInfo = updateInfo;
out_data.updateVersion = infoset.getVersion();
@@ -439,7 +439,7 @@ bool UpdateDialog::Thread::update(
dp_gui::UpdateData const & data) const
{
bool ret = false;
- if (du.unsatisfiedDependencies.getLength() == 0)
+ if (!du.unsatisfiedDependencies.hasElements())
{
SolarMutexGuard g;
if (!m_stop) {
@@ -933,7 +933,7 @@ IMPL_LINK_NOARG(UpdateDialog, selectionHandler, weld::TreeView&, void)
break;
UpdateDialog::DisabledUpdate & data = m_disabledUpdates[ pos ];
- if (data.unsatisfiedDependencies.getLength() != 0)
+ if (data.unsatisfiedDependencies.hasElements())
{
// create error string for version mismatch
OUString sVersion( "%VERSION" );
diff --git a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx
index 78ba7942833d..6240cf3566ec 100644
--- a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx
+++ b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx
@@ -355,7 +355,7 @@ void UpdateInstallDialog::Thread::downloadExtensions()
//remember occurring exceptions in case we need to print out error information
std::vector< std::pair<OUString, cssu::Exception> > vecExceptions;
cssu::Sequence<OUString> seqDownloadURLs = info.getUpdateDownloadUrls();
- OSL_ENSURE(seqDownloadURLs.getLength() > 0, "No download URL provided!");
+ OSL_ENSURE(seqDownloadURLs.hasElements(), "No download URL provided!");
for (sal_Int32 j = 0; j < seqDownloadURLs.getLength(); j++)
{
try
diff --git a/desktop/source/deployment/manager/dp_informationprovider.cxx b/desktop/source/deployment/manager/dp_informationprovider.cxx
index 93329cc07c29..caa1d2b7d8bb 100644
--- a/desktop/source/deployment/manager/dp_informationprovider.cxx
+++ b/desktop/source/deployment/manager/dp_informationprovider.cxx
@@ -203,7 +203,7 @@ PackageInformationProvider::isUpdateAvailable( const OUString& _sExtensionId )
dp_misc::DescriptionInfoset infoset(mxContext, info.info);
uno::Sequence< uno::Reference< xml::dom::XElement > >
ds( dp_misc::Dependencies::check( infoset ) );
- if ( ! ds.getLength() )
+ if ( ! ds.hasElements() )
sOnlineVersion = info.version;
}
diff --git a/desktop/source/deployment/misc/dp_update.cxx b/desktop/source/deployment/misc/dp_update.cxx
index 05f1f0e6b991..38b37d1da873 100644
--- a/desktop/source/deployment/misc/dp_update.cxx
+++ b/desktop/source/deployment/misc/dp_update.cxx
@@ -93,7 +93,7 @@ void getOwnUpdateInfos(
{
OSL_ASSERT(inout.second.extension.is());
Sequence<OUString> urls(inout.second.extension->getUpdateInformationURLs());
- if (urls.getLength())
+ if (urls.hasElements())
{
const OUString search_id = dp_misc::getIdentifier(inout.second.extension);
SAL_INFO( "extensions.update", "Searching update for " << search_id );
@@ -307,7 +307,7 @@ Reference<deployment::XPackage>
getExtensionWithHighestVersion(
Sequence<Reference<deployment::XPackage> > const & seqExt)
{
- if (seqExt.getLength() == 0)
+ if (!seqExt.hasElements())
return Reference<deployment::XPackage>();
Reference<deployment::XPackage> greatest;
diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx
index e5167eaf6631..6357eef886ef 100644
--- a/desktop/source/deployment/registry/package/dp_package.cxx
+++ b/desktop/source/deployment/registry/package/dp_package.cxx
@@ -603,7 +603,7 @@ bool BackendImpl::PackageImpl::checkDependencies(
css::uno::Sequence< css::uno::Reference< css::xml::dom::XElement > >
unsatisfied(dp_misc::Dependencies::check(description));
- if (unsatisfied.getLength() == 0) {
+ if (!unsatisfied.hasElements()) {
return true;
} else {
OUString msg(
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 2a19ef820c1a..c1a24ce6c3e0 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -4251,7 +4251,7 @@ static void doc_postWindow(LibreOfficeKitDocument* /*pThis*/, unsigned nLOKWindo
aArgs[1].Name == "Data" && (aArgs[1].Value >>= aData);
}
- if (!aMimeType.isEmpty() && aData.getLength() > 0)
+ if (!aMimeType.isEmpty() && aData.hasElements())
{
uno::Reference<datatransfer::XTransferable> xTransferable(new LOKTransferable(aMimeType, aData));
uno::Reference<datatransfer::clipboard::XClipboard> xClipboard(new LOKClipboard);
diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx
index 599db808cd41..1716a9f54325 100644
--- a/desktop/source/migration/migration.cxx
+++ b/desktop/source/migration/migration.cxx
@@ -876,7 +876,7 @@ std::vector< MigrationModuleInfo > MigrationImpl::dectectUIChangesForAllModules(
uno::Reference< embed::XStorage > xMenubar = xModule->openStorageElement(MENUBAR, embed::ElementModes::READ);
if (xMenubar.is()) {
uno::Reference< container::XNameAccess > xNameAccess(xMenubar, uno::UNO_QUERY);
- if (xNameAccess->getElementNames().getLength() > 0) {
+ if (xNameAccess->getElementNames().hasElements()) {
aModuleInfo.sModuleShortName = sModuleShortName;
aModuleInfo.bHasMenubar = true;
}
diff --git a/desktop/source/migration/services/oo3extensionmigration.cxx b/desktop/source/migration/services/oo3extensionmigration.cxx
index 01f9c2e93355..ae46322a9092 100644
--- a/desktop/source/migration/services/oo3extensionmigration.cxx
+++ b/desktop/source/migration/services/oo3extensionmigration.cxx
@@ -323,7 +323,7 @@ void OO3ExtensionMigration::initialize( const Sequence< Any >& aArguments )
else if ( aValue.Name == "ExtensionBlackList" )
{
Sequence< OUString > aBlackList;
- if ( (aValue.Value >>= aBlackList ) && ( aBlackList.getLength() > 0 ))
+ if ( (aValue.Value >>= aBlackList ) && aBlackList.hasElements())
{
m_aBlackList.resize( aBlackList.getLength() );
::comphelper::sequenceToArray< OUString >( m_aBlackList.data(), aBlackList );
diff --git a/desktop/source/splash/splash.cxx b/desktop/source/splash/splash.cxx
index 64af4ce7fd6a..1076e739a1c0 100644
--- a/desktop/source/splash/splash.cxx
+++ b/desktop/source/splash/splash.cxx
@@ -251,7 +251,7 @@ void SAL_CALL
SplashScreen::initialize( const css::uno::Sequence< css::uno::Any>& aArguments )
{
osl::MutexGuard aGuard( _aMutex );
- if (aArguments.getLength() > 0)
+ if (aArguments.hasElements())
{
aArguments[0] >>= _bVisible;
if (aArguments.getLength() > 1 )