diff options
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/filter/FilterConfigCache.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/print3.cxx | 16 | ||||
-rw-r--r-- | vcl/source/graphic/UnoGraphicProvider.cxx | 4 | ||||
-rw-r--r-- | vcl/source/treelist/transfer.cxx | 6 | ||||
-rw-r--r-- | vcl/source/window/printdlg.cxx | 4 | ||||
-rw-r--r-- | vcl/unx/generic/dtrans/X11_selection.cxx | 6 | ||||
-rw-r--r-- | vcl/unx/generic/dtrans/X11_service.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/gtk/a11y/atktable.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx | 6 | ||||
-rw-r--r-- | vcl/unx/gtk/salprn-gtk.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/gtk3/gtk3gtkinst.cxx | 2 |
12 files changed, 27 insertions, 27 deletions
diff --git a/vcl/source/filter/FilterConfigCache.cxx b/vcl/source/filter/FilterConfigCache.cxx index 864be3324c07..4e18ac06a8a1 100644 --- a/vcl/source/filter/FilterConfigCache.cxx +++ b/vcl/source/filter/FilterConfigCache.cxx @@ -87,7 +87,7 @@ void FilterConfigCache::FilterConfigCacheEntry::CreateFilterName( const OUString OUString FilterConfigCache::FilterConfigCacheEntry::GetShortName() { OUString aShortName; - if ( lExtensionList.getLength() ) + if ( lExtensionList.hasElements() ) { aShortName = lExtensionList[ 0 ]; if ( aShortName.startsWith( "*." ) ) diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 54c891ca6448..218b65a908b9 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -5639,7 +5639,7 @@ class PDFStreamIf : void SAL_CALL PDFStreamIf::writeBytes( const css::uno::Sequence< sal_Int8 >& aData ) { - if( m_bWrite && aData.getLength() ) + if( m_bWrite && aData.hasElements() ) { sal_Int32 nBytes = aData.getLength(); m_pWriter->writeBuffer( aData.getConstArray(), nBytes ); diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx index 78715752b711..b60a2dddc6af 100644 --- a/vcl/source/gdi/print3.cxx +++ b/vcl/source/gdi/print3.cxx @@ -1508,7 +1508,7 @@ void PrinterController::setValue( const css::beans::PropertyValue& i_rPropertyVa void PrinterController::setUIOptions( const css::uno::Sequence< css::beans::PropertyValue >& i_rOptions ) { - SAL_WARN_IF( mpImplData->maUIOptions.getLength() != 0, "vcl.gdi", "setUIOptions called twice !" ); + SAL_WARN_IF( mpImplData->maUIOptions.hasElements(), "vcl.gdi", "setUIOptions called twice !" ); mpImplData->maUIOptions = i_rOptions; @@ -1564,7 +1564,7 @@ void PrinterController::setUIOptions( const css::uno::Sequence< css::beans::Prop } if( !aDep.maDependsOnName.isEmpty() ) mpImplData->maControlDependencies[ aPropName ] = aDep; - if( aChoicesDisabled.getLength() > 0 ) + if( aChoicesDisabled.hasElements() ) mpImplData->maChoiceDisableMap[ aPropName ] = aChoicesDisabled; } } @@ -1874,7 +1874,7 @@ css::uno::Any PrinterOptionsHelper::setUIControlOpt(const css::uno::Sequence< OU sal_Int32 nElements = 2 // ControlType + ID + (i_rTitle.isEmpty() ? 0 : 1) // Text - + (i_rHelpIds.getLength() ? 1 : 0) // HelpId + + (i_rHelpIds.hasElements() ? 1 : 0) // HelpId + (i_pVal ? 1 : 0) // Property + i_rControlOptions.maAddProps.size() // additional props + (i_rControlOptions.maGroupHint.isEmpty() ? 0 : 1) // grouping @@ -1897,7 +1897,7 @@ css::uno::Any PrinterOptionsHelper::setUIControlOpt(const css::uno::Sequence< OU aCtrl[nUsed ].Name = "Text"; aCtrl[nUsed++].Value <<= i_rTitle; } - if( i_rHelpIds.getLength() ) + if( i_rHelpIds.hasElements() ) { aCtrl[nUsed ].Name = "HelpId"; aCtrl[nUsed++].Value <<= i_rHelpIds; @@ -2011,10 +2011,10 @@ css::uno::Any PrinterOptionsHelper::setChoiceRadiosControlOpt(const css::uno::Se { UIControlOptions aOpt( i_rControlOptions ); sal_Int32 nUsed = aOpt.maAddProps.size(); - aOpt.maAddProps.resize( nUsed + 1 + (i_rDisabledChoices.getLength() ? 1 : 0) ); + aOpt.maAddProps.resize( nUsed + 1 + (i_rDisabledChoices.hasElements() ? 1 : 0) ); aOpt.maAddProps[nUsed].Name = "Choices"; aOpt.maAddProps[nUsed].Value <<= i_rChoices; - if( i_rDisabledChoices.getLength() ) + if( i_rDisabledChoices.hasElements() ) { aOpt.maAddProps[nUsed+1].Name = "ChoicesDisabled"; aOpt.maAddProps[nUsed+1].Value <<= i_rDisabledChoices; @@ -2037,10 +2037,10 @@ css::uno::Any PrinterOptionsHelper::setChoiceListControlOpt(const OUString& i_rI { UIControlOptions aOpt( i_rControlOptions ); sal_Int32 nUsed = aOpt.maAddProps.size(); - aOpt.maAddProps.resize( nUsed + 1 + (i_rDisabledChoices.getLength() ? 1 : 0) ); + aOpt.maAddProps.resize( nUsed + 1 + (i_rDisabledChoices.hasElements() ? 1 : 0) ); aOpt.maAddProps[nUsed].Name = "Choices"; aOpt.maAddProps[nUsed].Value <<= i_rChoices; - if( i_rDisabledChoices.getLength() ) + if( i_rDisabledChoices.hasElements() ) { aOpt.maAddProps[nUsed+1].Name = "ChoicesDisabled"; aOpt.maAddProps[nUsed+1].Value <<= i_rDisabledChoices; diff --git a/vcl/source/graphic/UnoGraphicProvider.cxx b/vcl/source/graphic/UnoGraphicProvider.cxx index 450fd2b26f4b..95292ee13186 100644 --- a/vcl/source/graphic/UnoGraphicProvider.cxx +++ b/vcl/source/graphic/UnoGraphicProvider.cxx @@ -202,7 +202,7 @@ uno::Reference< ::graphic::XGraphic > GraphicProvider::implLoadBitmap( const uno ReadDIB(aBmp, aBmpStream, true); - if( aMaskSeq.getLength() ) + if( aMaskSeq.hasElements() ) { SvMemoryStream aMaskStream( aMaskSeq.getArray(), aMaskSeq.getLength(), StreamMode::READ ); Bitmap aMask; @@ -816,7 +816,7 @@ void SAL_CALL GraphicProvider::storeGraphic( const uno::Reference< ::graphic::XG { rFilter.ExportGraphic( aGraphic, aPath, aMemStrm, rFilter.GetExportFormatNumberForShortName( OUString::createFromAscii( pFilterShortName ) ), - ( aFilterDataSeq.getLength() ? &aFilterDataSeq : nullptr ) ); + ( aFilterDataSeq.hasElements() ? &aFilterDataSeq : nullptr ) ); } pOStm->WriteBytes( aMemStrm.GetData(), aMemStrm.TellEnd() ); } diff --git a/vcl/source/treelist/transfer.cxx b/vcl/source/treelist/transfer.cxx index 9f538cfef5b9..c9cf060a4fc7 100644 --- a/vcl/source/treelist/transfer.cxx +++ b/vcl/source/treelist/transfer.cxx @@ -2011,14 +2011,14 @@ bool TransferableDataHelper::GetSotStorageStream( const DataFlavor& rFlavor, too { Sequence<sal_Int8> aSeq = GetSequence(rFlavor, OUString()); - if (aSeq.getLength()) + if (aSeq.hasElements()) { rxStream = new SotStorageStream( "" ); rxStream->WriteBytes( aSeq.getConstArray(), aSeq.getLength() ); rxStream->Seek( 0 ); } - return aSeq.getLength(); + return aSeq.hasElements(); } Reference<XInputStream> TransferableDataHelper::GetInputStream( SotClipboardFormatId nFormat, const OUString& rDestDoc ) @@ -2034,7 +2034,7 @@ Reference<XInputStream> TransferableDataHelper::GetInputStream( const DataFlavor { Sequence<sal_Int8> aSeq = GetSequence(rFlavor, rDestDoc); - if (!aSeq.getLength()) + if (!aSeq.hasElements()) return Reference<XInputStream>(); Reference<XInputStream> xStream(new comphelper::SequenceInputStream(aSeq)); diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index e34633ebc1c4..9ece9c929ffd 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -1461,11 +1461,11 @@ void PrintDialog::setupOptionalUI() mpTabCtrl->SetPageText(nPageId, aText); // set help id - if (aHelpIds.getLength() > 0) + if (aHelpIds.hasElements()) mpTabCtrl->SetHelpId(nPageId, OUStringToOString(aHelpIds.getConstArray()[0], RTL_TEXTENCODING_UTF8)); // set help text - if (aHelpTexts.getLength() > 0) + if (aHelpTexts.hasElements()) mpTabCtrl->SetHelpText(nPageId, aHelpTexts.getConstArray()[0]); pPage->Show(); diff --git a/vcl/unx/generic/dtrans/X11_selection.cxx b/vcl/unx/generic/dtrans/X11_selection.cxx index 0efa066ebd97..bb396a4b10b6 100644 --- a/vcl/unx/generic/dtrans/X11_selection.cxx +++ b/vcl/unx/generic/dtrans/X11_selection.cxx @@ -330,7 +330,7 @@ void SelectionManager::initialize( const Sequence< Any >& arguments ) * needs to be added. The display used whould be that of the normal event loop * and synchronization should be done via the SolarMutex. */ - if( arguments.getLength() > 0 ) + if( arguments.hasElements() ) arguments.getConstArray()[0] >>= m_xDisplayConnection; if( ! m_xDisplayConnection.is() ) { @@ -1281,7 +1281,7 @@ bool SelectionManager::getPasteDataTypes( Atom selection, Sequence< DataFlavor > aAtoms = Sequence< sal_Int8 >(); std::vector< Atom > aNativeTypes; - if( aAtoms.getLength() ) + if( aAtoms.hasElements() ) { sal_Int32 nAtoms = aAtoms.getLength() / sizeof(Atom); Atom* pAtoms = reinterpret_cast<Atom*>(aAtoms.getArray()); @@ -3960,7 +3960,7 @@ void SelectionManagerHolder::initialize( const Sequence< Any >& arguments ) { OUString aDisplayName; - if( arguments.getLength() > 0 ) + if( arguments.hasElements() ) { css::uno::Reference< XDisplayConnection > xConn; arguments.getConstArray()[0] >>= xConn; diff --git a/vcl/unx/generic/dtrans/X11_service.cxx b/vcl/unx/generic/dtrans/X11_service.cxx index 5c1f451f8d49..8020b677017f 100644 --- a/vcl/unx/generic/dtrans/X11_service.cxx +++ b/vcl/unx/generic/dtrans/X11_service.cxx @@ -61,7 +61,7 @@ css::uno::Reference< XInterface > X11SalInstance::CreateClipboard( const Sequenc rManager.initialize(mgrArgs); OUString sel; - if (arguments.getLength() == 0) { + if (!arguments.hasElements()) { sel = "CLIPBOARD"; } else if (arguments.getLength() != 1 || !(arguments[0] >>= sel)) { throw css::lang::IllegalArgumentException( diff --git a/vcl/unx/gtk/a11y/atktable.cxx b/vcl/unx/gtk/a11y/atktable.cxx index 91e526e0d3b8..016d697dce59 100644 --- a/vcl/unx/gtk/a11y/atktable.cxx +++ b/vcl/unx/gtk/a11y/atktable.cxx @@ -350,7 +350,7 @@ table_wrapper_get_summary( AtkTable *table ) static gint convertToGIntArray( const uno::Sequence< ::sal_Int32 >& aSequence, gint **pSelected ) { - if( aSequence.getLength() ) + if( aSequence.hasElements() ) { *pSelected = g_new( gint, aSequence.getLength() ); diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx index 0ed5b6fe7d71..e82674af9040 100644 --- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx +++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx @@ -351,7 +351,7 @@ public: bool FilterEntry::hasSubFilters() const { - return( 0 < m_aSubFilters.getLength() ); + return m_aSubFilters.hasElements(); } void FilterEntry::getSubFilters( css::uno::Sequence< css::beans::StringPair >& _rSubFilterList ) @@ -633,7 +633,7 @@ void SAL_CALL SalGtkFilePicker::appendFilterGroup( const OUString& /*sGroupTitle // ensure that we have a filter list OUString sInitialCurrentFilter; - if( aFilters.getLength() ) + if( aFilters.hasElements() ) sInitialCurrentFilter = aFilters[0].First; ensureFilterVector( sInitialCurrentFilter ); @@ -1580,7 +1580,7 @@ void SAL_CALL SalGtkFilePicker::initialize( const uno::Sequence<uno::Any>& aArgu { // parameter checking uno::Any aAny; - if( 0 == aArguments.getLength() ) + if( !aArguments.hasElements() ) throw lang::IllegalArgumentException( "no arguments", static_cast<XFilePicker2*>( this ), 1 ); diff --git a/vcl/unx/gtk/salprn-gtk.cxx b/vcl/unx/gtk/salprn-gtk.cxx index c3be7e405451..feec41bb5b4d 100644 --- a/vcl/unx/gtk/salprn-gtk.cxx +++ b/vcl/unx/gtk/salprn-gtk.cxx @@ -429,7 +429,7 @@ GtkPrintDialog::impl_initCustomTab() //Fix fdo#69381 //Next options if this one is empty - if ( aOptProp.getLength() == 0) + if (!aOptProp.hasElements()) continue; for (int n = 0; n != aOptProp.getLength(); n++) diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index 585061667c0a..e72d659536bd 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -699,7 +699,7 @@ void VclGtkClipboard::removeClipboardListener( const Reference< datatransfer::cl Reference< XInterface > GtkInstance::CreateClipboard(const Sequence< Any >& arguments) { OUString sel; - if (arguments.getLength() == 0) { + if (!arguments.hasElements()) { sel = "CLIPBOARD"; } else if (arguments.getLength() != 1 || !(arguments[0] >>= sel)) { throw css::lang::IllegalArgumentException( |