From db08c1ac5ed566fbec4d2ce8345ed483fa8bf9ab Mon Sep 17 00:00:00 2001 From: Olivier Hallot Date: Sun, 8 Jan 2012 09:52:25 -0200 Subject: Fix for fdo43460 Part XXXI getLength() to isEmpty() Part XXXI Modules sd --- sd/source/core/CustomAnimationEffect.cxx | 4 ++-- sd/source/core/CustomAnimationPreset.cxx | 4 ++-- sd/source/core/EffectMigration.cxx | 8 ++++---- sd/source/core/TransitionPreset.cxx | 2 +- sd/source/core/stlfamily.cxx | 6 +++--- sd/source/core/stlsheet.cxx | 4 ++-- sd/source/filter/eppt/eppt.cxx | 10 +++++----- sd/source/filter/eppt/epptso.cxx | 8 ++++---- sd/source/filter/eppt/pptexanimations.cxx | 12 ++++++------ sd/source/filter/eppt/pptx-epptbase.cxx | 2 +- sd/source/filter/eppt/pptx-epptooxml.cxx | 6 +++--- sd/source/filter/eppt/pptx-text.cxx | 2 +- sd/source/filter/grf/sdgrffilter.cxx | 12 ++++++------ sd/source/filter/html/pubdlg.cxx | 2 +- sd/source/filter/ppt/pptinanimations.cxx | 22 +++++++++++----------- sd/source/filter/xml/sdxmlwrp.cxx | 6 +++--- .../ui/animations/CustomAnimationCreateDialog.cxx | 2 +- sd/source/ui/animations/CustomAnimationDialog.cxx | 4 ++-- sd/source/ui/animations/CustomAnimationList.cxx | 2 +- sd/source/ui/animations/CustomAnimationPane.cxx | 12 ++++++------ sd/source/ui/animations/SlideTransitionPane.cxx | 2 +- sd/source/ui/annotations/annotationmanager.cxx | 2 +- sd/source/ui/annotations/annotationwindow.cxx | 4 ++-- sd/source/ui/app/optsitem.cxx | 2 +- sd/source/ui/app/tbxww.cxx | 2 +- sd/source/ui/dlg/TemplateScanner.cxx | 2 +- sd/source/ui/dlg/dlgass.cxx | 6 +++--- sd/source/ui/dlg/dlgctrls.cxx | 2 +- sd/source/ui/dlg/filedlg.cxx | 2 +- sd/source/ui/dlg/tpaction.cxx | 2 +- sd/source/ui/docshell/docshel4.cxx | 2 +- .../ui/framework/configuration/Configuration.cxx | 6 +++--- .../GenericConfigurationChangeRequest.cxx | 2 +- .../configuration/ResourceFactoryManager.cxx | 4 ++-- .../ui/framework/configuration/ResourceId.cxx | 2 +- .../ui/framework/factories/FullScreenPane.cxx | 2 +- .../ui/framework/factories/TaskPanelFactory.cxx | 2 +- sd/source/ui/framework/tools/FrameworkHelper.cxx | 2 +- sd/source/ui/func/fuinsert.cxx | 2 +- sd/source/ui/func/futempl.cxx | 2 +- sd/source/ui/presenter/PresenterHelper.cxx | 4 ++-- .../ui/slidesorter/shell/SlideSorterViewShell.cxx | 2 +- sd/source/ui/slidesorter/view/SlsToolTip.cxx | 4 ++-- sd/source/ui/table/TableDesignPane.cxx | 2 +- sd/source/ui/table/tablefunction.cxx | 2 +- sd/source/ui/toolpanel/ToolPanelViewShell.cxx | 6 +++--- .../ui/toolpanel/controls/MasterPageContainer.cxx | 2 +- .../ui/toolpanel/controls/MasterPageDescriptor.cxx | 16 ++++++++-------- sd/source/ui/tools/ConfigurationAccess.cxx | 4 ++-- sd/source/ui/unoidl/UnoDocumentSettings.cxx | 2 +- sd/source/ui/unoidl/sddetect.cxx | 2 +- sd/source/ui/unoidl/unomodel.cxx | 4 ++-- sd/source/ui/unoidl/unoobj.cxx | 2 +- sd/source/ui/unoidl/unopage.cxx | 6 +++--- sd/source/ui/view/DocumentRenderer.cxx | 4 ++-- sd/source/ui/view/ViewShellBase.cxx | 8 ++++---- sd/source/ui/view/ViewTabBar.cxx | 4 ++-- sd/source/ui/view/sdview2.cxx | 2 +- 58 files changed, 129 insertions(+), 129 deletions(-) diff --git a/sd/source/core/CustomAnimationEffect.cxx b/sd/source/core/CustomAnimationEffect.cxx index b3baaa3da2be..bffb1490dec3 100644 --- a/sd/source/core/CustomAnimationEffect.cxx +++ b/sd/source/core/CustomAnimationEffect.cxx @@ -610,7 +610,7 @@ bool CustomAnimationEffect::checkForText() else { maTarget >>= xText; - sal_Bool bHasText = xText.is() && xText->getString().getLength(); + sal_Bool bHasText = xText.is() && !xText->getString().isEmpty(); bChange |= bHasText != mbHasText; mbHasText = bHasText; } @@ -2654,7 +2654,7 @@ void EffectSequenceHelper::createTextGroupParagraphEffects( CustomAnimationTextG for( nPara = 0; xEnumeration->hasMoreElements(); nPara++ ) { Reference< XTextRange > xRange( xEnumeration->nextElement(), UNO_QUERY ); - if( xRange.is() && xRange->getString().getLength() ) + if( xRange.is() && !xRange->getString().isEmpty() ) { if( bTextReverse ) // sort them aParaList.push_front( nPara ); diff --git a/sd/source/core/CustomAnimationPreset.cxx b/sd/source/core/CustomAnimationPreset.cxx index 58761580d6bb..78b7f878bd0c 100644 --- a/sd/source/core/CustomAnimationPreset.cxx +++ b/sd/source/core/CustomAnimationPreset.cxx @@ -117,7 +117,7 @@ void implImportLabels( const Reference< XMultiServiceFactory >& xConfigProvider, { OUString aUIName; xNameAccess->getByName( aLabel ) >>= aUIName; - if( aUIName.getLength() ) + if( !aUIName.isEmpty() ) { rStringMap[ *p ] = aUIName; } @@ -191,7 +191,7 @@ Reference< XAnimationNode > CustomAnimationPreset::create( const rtl::OUString& try { OUString strSubType( rstrSubType ); - if( strSubType.getLength() == 0 ) + if( strSubType.isEmpty() ) strSubType = maDefaultSubTyp; CustomAnimationEffectPtr pEffect = maSubTypes[strSubType]; diff --git a/sd/source/core/EffectMigration.cxx b/sd/source/core/EffectMigration.cxx index 071f302d55fe..0e8d83925f1a 100644 --- a/sd/source/core/EffectMigration.cxx +++ b/sd/source/core/EffectMigration.cxx @@ -754,7 +754,7 @@ AnimationEffect EffectMigration::GetTextAnimationEffect( SvxShape* pShape ) bool EffectMigration::ConvertPreset( const OUString& rPresetId, const OUString* pPresetSubType, AnimationEffect& rEffect ) { rEffect = AnimationEffect_NONE; - if( rPresetId.getLength() ) + if( !rPresetId.isEmpty() ) { // first try a match for preset id and subtype deprecated_AnimationEffect_conversion_table_entry* p = deprecated_AnimationEffect_conversion_table; @@ -1263,7 +1263,7 @@ void EffectMigration::UpdateSoundEffect( SvxShape* pShape, SdAnimationInfo* pInf CustomAnimationEffectPtr pEffect( (*aIter) ); if( pEffect->getTargetShape() == xShape ) { - if( aSoundFile.getLength() ) + if( !aSoundFile.isEmpty() ) { pEffect->createAudio( makeAny( aSoundFile ) ); } @@ -1298,7 +1298,7 @@ OUString EffectMigration::GetSoundFile( SvxShape* pShape ) EffectSequence::iterator aIter; for( aIter = pMainSequence->getBegin(); - (aSoundFile.getLength() == 0) && (aIter != pMainSequence->getEnd()); + (aSoundFile.isEmpty()) && (aIter != pMainSequence->getEnd()); ++aIter ) { CustomAnimationEffectPtr pEffect( (*aIter) ); @@ -1317,7 +1317,7 @@ OUString EffectMigration::GetSoundFile( SvxShape* pShape ) sal_Bool EffectMigration::GetSoundOn( SvxShape* pShape ) { - return GetSoundFile( pShape ).getLength() != 0; + return !GetSoundFile( pShape ).isEmpty(); } // -------------------------------------------------------------------- diff --git a/sd/source/core/TransitionPreset.cxx b/sd/source/core/TransitionPreset.cxx index f2908026e6b0..89b101bbe497 100644 --- a/sd/source/core/TransitionPreset.cxx +++ b/sd/source/core/TransitionPreset.cxx @@ -121,7 +121,7 @@ bool TransitionPreset::importTransitionsFile( TransitionPresetList& rList, // name it OUString aPresetId( pPreset->getPresetId() ); - if( aPresetId.getLength() ) + if( !aPresetId.isEmpty() ) { UStringMap::const_iterator aIter( rTransitionNameMape.find( aPresetId ) ); if( aIter != rTransitionNameMape.end() ) diff --git a/sd/source/core/stlfamily.cxx b/sd/source/core/stlfamily.cxx index 48832c41114c..6405b0cbf548 100644 --- a/sd/source/core/stlfamily.cxx +++ b/sd/source/core/stlfamily.cxx @@ -152,7 +152,7 @@ SdStyleSheet* SdStyleFamily::GetValidNewSheet( const Any& rElement ) throw(Illeg SdStyleSheet* SdStyleFamily::GetSheetByName( const OUString& rName ) throw(NoSuchElementException, WrappedTargetException ) { SdStyleSheet* pRet = 0; - if( rName.getLength() ) + if( !rName.isEmpty() ) { if( mnFamily == SD_STYLE_FAMILY_MASTERPAGE ) { @@ -300,7 +300,7 @@ sal_Bool SAL_CALL SdStyleFamily::hasByName( const OUString& aName ) throw(Runtim SolarMutexGuard aGuard; throwIfDisposed(); - if( aName.getLength() ) + if( !aName.isEmpty() ) { if( mnFamily == SD_STYLE_FAMILY_MASTERPAGE ) { @@ -434,7 +434,7 @@ void SAL_CALL SdStyleFamily::insertByName( const OUString& rName, const Any& rEl SolarMutexGuard aGuard; throwIfDisposed(); - if(rName.getLength() == 0) + if(rName.isEmpty()) throw IllegalArgumentException(); SdStyleSheet* pStyle = GetValidNewSheet( rElement ); diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx index 6f0825770da2..373b8d105d25 100644 --- a/sd/source/core/stlsheet.cxx +++ b/sd/source/core/stlsheet.cxx @@ -161,7 +161,7 @@ void SdStyleSheet::SetApiName( const OUString& rApiName ) rtl::OUString SdStyleSheet::GetApiName() const { - if( msApiName.getLength() ) + if( !msApiName.isEmpty() ) return msApiName; else return GetName(); @@ -1011,7 +1011,7 @@ void SAL_CALL SdStyleSheet::setParentStyle( const OUString& rParentName ) throw SolarMutexGuard aGuard; throwIfDisposed(); - if( rParentName.getLength() ) + if( !rParentName.isEmpty() ) { const SfxStyles& rStyles = mxPool->GetStyles(); diff --git a/sd/source/filter/eppt/eppt.cxx b/sd/source/filter/eppt/eppt.cxx index d79f439a6f01..7da27aa4b243 100644 --- a/sd/source/filter/eppt/eppt.cxx +++ b/sd/source/filter/eppt/eppt.cxx @@ -807,7 +807,7 @@ sal_Bool PPTWriter::ImplCreateDocument() if ( ImplGetPropertyValue( String( RTL_CONSTASCII_USTRINGPARAM( "CustomShow" ) ) ) ) { aCustomShow = ( *(::rtl::OUString*)mAny.getValue() ); - if ( aCustomShow.getLength() ) + if ( !aCustomShow.isEmpty() ) { nFlags |= 8; } @@ -887,7 +887,7 @@ sal_Bool PPTWriter::ImplCreateDocument() sal_uInt32 nCustomShowIndex = 0; for( i = 0; i < nCount; i++ ) // Anzahl der Custom Shows { - if ( pUString[ i ].getLength() ) + if ( !pUString[ i ].isEmpty() ) { mpPptEscherEx->OpenContainer( EPP_NamedShow, nCustomShowIndex++ ); @@ -1136,11 +1136,11 @@ void ImplExportComments( uno::Reference< drawing::XDrawPage > xPage, SvMemoryStr rtl::OUString sText( xText->getString() ); rtl::OUString sInitials( getInitials( sAuthor ) ); util::DateTime aDateTime( xAnnotation->getDateTime() ); - if ( sAuthor.getLength() ) + if ( !sAuthor.isEmpty() ) PPTWriter::WriteCString( rBinaryTagData10Atom, sAuthor, 0 ); - if ( sText.getLength() ) + if ( !sText.isEmpty() ) PPTWriter::WriteCString( rBinaryTagData10Atom, sText, 1 ); - if ( sInitials.getLength() ) + if ( !sInitials.isEmpty() ) PPTWriter::WriteCString( rBinaryTagData10Atom, sInitials, 2 ); sal_Int16 nMilliSeconds = aDateTime.HundredthSeconds * 10; diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx index c320f0c762d3..794953832ceb 100644 --- a/sd/source/filter/eppt/epptso.cxx +++ b/sd/source/filter/eppt/epptso.cxx @@ -411,7 +411,7 @@ sal_uInt32 PPTWriter::ImplInsertBookmarkURL( const String& rBookmarkURL, const s { rtl::OUString aRelUrl( INetURLObject::GetRelURL( maBaseURI, rBookmarkURL, INetURLObject::WAS_ENCODED, INetURLObject::DECODE_TO_IURI, RTL_TEXTENCODING_UTF8, INetURLObject::FSYS_DETECT ) ); - if ( aRelUrl.getLength() ) + if ( !aRelUrl.isEmpty() ) sBookmarkURL = aRelUrl; } maHyperlink.Insert( new EPPTHyperlink( sBookmarkURL, nType ), LIST_APPEND ); @@ -2612,7 +2612,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a } } - if ( aControlName.getLength() ) + if ( !aControlName.isEmpty() ) PPTWriter::WriteCString( *mpExEmbed, aControlName, 1 ); if ( aOleIdentifier.Len() ) PPTWriter::WriteCString( *mpExEmbed, aOleIdentifier, 2 ); @@ -2633,7 +2633,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a aPropOpt.AddOpt( ESCHER_Prop_pictureId, mnExEmbed ); aPropOpt.AddOpt( ESCHER_Prop_pictureActive, 0x10000 ); - if ( aControlName.getLength() ) + if ( !aControlName.isEmpty() ) { sal_uInt16 i, nBufSize; nBufSize = ( aControlName.getLength() + 1 ) << 1; @@ -3180,7 +3180,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a if ( PropValue::GetPropertyValue( aAny, mXPropSet, String( RTL_CONSTASCII_USTRINGPARAM( "MediaURL" ) ), sal_True ) ) { rtl::OUString aMediaURL; - if ( (aAny >>= aMediaURL ) && aMediaURL.getLength() ) + if ( (aAny >>= aMediaURL ) && !aMediaURL.isEmpty() ) { // SJ: creating the Media RefObj sal_uInt32 nRefId = ++mnExEmbed; diff --git a/sd/source/filter/eppt/pptexanimations.cxx b/sd/source/filter/eppt/pptexanimations.cxx index ac8f14da3471..9705c3855aa1 100644 --- a/sd/source/filter/eppt/pptexanimations.cxx +++ b/sd/source/filter/eppt/pptexanimations.cxx @@ -674,7 +674,7 @@ void AnimationExporter::exportNode( SvStream& rStrm, Reference< XAnimationNode > Any aAny( xAudio->getSource() ); rtl::OUString aURL; - if ( ( aAny >>= aURL ) && ( aURL.getLength() ) ) + if ( ( aAny >>= aURL) && !aURL.isEmpty() ) { sal_Int32 nU1 = 2; sal_Int32 nTrigger = 3; @@ -1530,7 +1530,7 @@ Any AnimationExporter::convertAnimateValue( const Any& rSourceValue, const rtl:: } } Any aRet; - if ( aDest.getLength() ) + if ( !aDest.isEmpty() ) aRet <<= aDest; else aRet = rSourceValue; @@ -1666,7 +1666,7 @@ void AnimationExporter::exportAnimateTarget( SvStream& rStrm, const Reference< X sal_uInt32 nTransformType = 0; if ( xAnimate.is() ) { - if ( xAnimate->getAttributeName().getLength() ) + if ( !xAnimate->getAttributeName().isEmpty() ) nBits |= 4; // what is attributeName ?, maybe this is set if a DFF_msofbtAnimateAttributeNames is written sal_Int16 nAdditiveMode = xAnimate->getAdditive(); if ( nAdditiveMode != AnimationAdditiveMode::BASE ) @@ -1691,7 +1691,7 @@ void AnimationExporter::exportAnimateTarget( SvStream& rStrm, const Reference< X << nAccumulate << nTransformType; } - if ( xAnimate->getAttributeName().getLength() || nForceAttributeNames ) + if ( !xAnimate->getAttributeName().isEmpty() || nForceAttributeNames ) { EscherExContainer aAnimateAttributeNames( rStrm, DFF_msofbtAnimateAttributeNames, 1 ); rtl::OUString aAttributeName( xAnimate->getAttributeName() ); @@ -1841,7 +1841,7 @@ void AnimationExporter::exportAnimateKeyPoints( SvStream& rStrm, const Reference { aAny[ 0 ] = convertAnimateValue( aValues[ i ], xAnimate->getAttributeName() ); } - if ( !i && aFormula.getLength() ) + if ( !i && !aFormula.isEmpty() ) { ImplTranslateAttribute( aFormula, TRANSLATE_MEASURE ); aAny[ 1 ] <<= aFormula; @@ -1955,7 +1955,7 @@ void AnimationExporter::exportAnimateMotion( SvStream& rStrm, const Reference< X OUString aStr; if ( xMotion->getPath() >>= aStr ) { - if ( aStr.getLength() ) + if ( !aStr.isEmpty() ) exportAnimPropertyString( rStrm, 1, aStr, TRANSLATE_NONE ); } exportAnimateTarget( rStrm, xNode ); diff --git a/sd/source/filter/eppt/pptx-epptbase.cxx b/sd/source/filter/eppt/pptx-epptbase.cxx index 657cc667a8d1..4f5767b1c577 100644 --- a/sd/source/filter/eppt/pptx-epptbase.cxx +++ b/sd/source/filter/eppt/pptx-epptbase.cxx @@ -1011,7 +1011,7 @@ sal_Bool PPTWriterBase::ContainsOtherShapeThanPlaceholders( sal_Bool bForOOMLX ) mType == "presentation.Notes" ) ) { Reference< XSimpleText > rXText( mXShape, UNO_QUERY ); - if( rXText.is() && rXText->getString().getLength() != 0 ) + if( rXText.is() && !rXText->getString().isEmpty() ) bOtherThanPlaceHolders = sal_True; } else bOtherThanPlaceHolders = sal_True; diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx index b0624b400ed9..9759364eb66b 100644 --- a/sd/source/filter/eppt/pptx-epptooxml.cxx +++ b/sd/source/filter/eppt/pptx-epptooxml.cxx @@ -696,7 +696,7 @@ void PowerPointExport::WriteAnimateValues( FSHelperPtr pFS, const Reference< XAn DBG(printf("animate value %d: %f\n", i, aKeyTimes[ i ])); if( aValues[ i ].hasValue() ) { pFS->startElementNS( XML_p, XML_tav, - XML_fmla, sFormula.getLength() > 0 ? USS( sFormula ) : NULL, + XML_fmla, sFormula.isEmpty() ? NULL : USS( sFormula ), XML_tm, I32S( ( sal_Int32 )( aKeyTimes[ i ]*100000.0 ) ), FSEND ); pFS->startElementNS( XML_p, XML_val, FSEND ); @@ -731,7 +731,7 @@ void PowerPointExport::WriteAnimateTo( FSHelperPtr pFS, Any aValue, const OUStri void PowerPointExport::WriteAnimationAttributeName( FSHelperPtr pFS, const OUString& rAttributeName ) { - if( ! rAttributeName.getLength() ) + if( rAttributeName.isEmpty() ) return; pFS->startElementNS( XML_p, XML_attrNameLst, FSEND ); @@ -1256,7 +1256,7 @@ static OUString lcl_GetInitials( OUString sName ) { OUStringBuffer sRet; - if ( sName.getLength() > 0 ) { + if ( !sName.isEmpty() ) { sRet.append ( sName[0] ); sal_Int32 nStart = 0, nOffset; diff --git a/sd/source/filter/eppt/pptx-text.cxx b/sd/source/filter/eppt/pptx-text.cxx index 67e3535a5a21..470ee9d4f78d 100644 --- a/sd/source/filter/eppt/pptx-text.cxx +++ b/sd/source/filter/eppt/pptx-text.cxx @@ -942,7 +942,7 @@ void ParagraphObj::ImplGetNumberingLevel( PPTExBulletProvider& rBuProv, sal_Int1 aFontDesc.CharSet = eChrSet; } - if ( aFontDesc.Name.getLength() ) + if ( !aFontDesc.Name.isEmpty() ) { nParaFlags |= 0x90; // wir geben den Font und den Charset vor } diff --git a/sd/source/filter/grf/sdgrffilter.cxx b/sd/source/filter/grf/sdgrffilter.cxx index 4337bf5b2cdb..48d46ab11ab1 100644 --- a/sd/source/filter/grf/sdgrffilter.cxx +++ b/sd/source/filter/grf/sdgrffilter.cxx @@ -399,17 +399,17 @@ void SdGRFFilter::SaveGraphic( const ::com::sun::star::uno::Reference< ::com::su Reference< XPropertySet > xGraphicSet( xShapeSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "Graphic" ) ) ), UNO_QUERY_THROW ); xShapeSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "GraphicURL" ) ) ) >>= sGraphicURL; - bool bIsLinked = (sGraphicURL.getLength() != 0) && (sGraphicURL.compareToAscii( RTL_CONSTASCII_STRINGPARAM("vnd.sun.star.GraphicObject:") ) != 0); + bool bIsLinked = !sGraphicURL.isEmpty() && (sGraphicURL.compareToAscii( RTL_CONSTASCII_STRINGPARAM("vnd.sun.star.GraphicObject:") ) != 0); if( !bIsLinked ) xGraphicSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "MimeType" ) ) ) >>= aMimeType; - if( bIsLinked || aMimeType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "image/x-vclgraphic" ) ) || !aMimeType.getLength() ) + if( bIsLinked || aMimeType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "image/x-vclgraphic" ) ) || aMimeType.isEmpty() ) { // this failed, try to detect it from graphic stream and URL OUString aURL( sGraphicURL ); - if( aURL.getLength() == 0 ) + if( aURL.isEmpty() ) xShapeSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "GraphicStreamURL" ) ) ) >>= aURL; { @@ -426,7 +426,7 @@ void SdGRFFilter::SaveGraphic( const ::com::sun::star::uno::Reference< ::com::su } } - if( aMimeType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "image/x-vclgraphic" ) ) || !aMimeType.getLength() ) + if( aMimeType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "image/x-vclgraphic" ) ) || aMimeType.isEmpty() ) { // this also failed, now set a mimetype that fits graphic best @@ -491,7 +491,7 @@ void SdGRFFilter::SaveGraphic( const ::com::sun::star::uno::Reference< ::com::su aDefaultFormatName = aExportFormatName; } - if( aDefaultFormatName.getLength() == 0 ) + if( aDefaultFormatName.isEmpty() ) { nCount = rGF.GetImportFormatCount(); for( sal_uInt16 i = 0; i < nCount; i++ ) @@ -507,7 +507,7 @@ void SdGRFFilter::SaveGraphic( const ::com::sun::star::uno::Reference< ::com::su } } - if( aDefaultFormatName.getLength() == 0 ) + if( aDefaultFormatName.isEmpty() ) aDefaultFormatName = OUString( RTL_CONSTASCII_USTRINGPARAM( "PNG - Portable Network Graphic" ) ); xFltMgr->setCurrentFilter( aDefaultFormatName ); diff --git a/sd/source/filter/html/pubdlg.cxx b/sd/source/filter/html/pubdlg.cxx index 0e4129845e29..94198132cef3 100644 --- a/sd/source/filter/html/pubdlg.cxx +++ b/sd/source/filter/html/pubdlg.cxx @@ -167,7 +167,7 @@ SdPublishingDesign::SdPublishingDesign() m_nResolution = PUB_LOWRES_WIDTH; m_aAuthor = aUserOptions.GetFirstName(); - if( m_aAuthor.Len() && aUserOptions.GetLastName().getLength() ) + if( m_aAuthor.Len() && !aUserOptions.GetLastName().isEmpty() ) m_aAuthor += sal_Unicode(' '); m_aAuthor += (String)aUserOptions.GetLastName(); m_aEMail = aUserOptions.GetEmail(); diff --git a/sd/source/filter/ppt/pptinanimations.cxx b/sd/source/filter/ppt/pptinanimations.cxx index 32f9def046ad..658f46fb8abf 100644 --- a/sd/source/filter/ppt/pptinanimations.cxx +++ b/sd/source/filter/ppt/pptinanimations.cxx @@ -707,7 +707,7 @@ bool AnimationImporter::convertAnimationNode( const Reference< XAnimationNode >& p++; } - DBG_ASSERT( p->mpMSName || (aAttributeName.getLength() == 0), "sd::AnimationImporter::convertAnimationNode(), unknown attribute!" ); + DBG_ASSERT( p->mpMSName || aAttributeName.isEmpty(), "sd::AnimationImporter::convertAnimationNode(), unknown attribute!" ); #ifdef DBG_ANIM_LOG if( p->mpMSName == 0 ) dump( "\n" ); #endif @@ -755,7 +755,7 @@ bool AnimationImporter::convertAnimationNode( const Reference< XAnimationNode >& } OUString aFormula( xAnimate->getFormula() ); - if( aFormula.getLength() ) + if( !aFormula.isEmpty() ) { if( convertMeasure( aFormula ) ) xAnimate->setFormula( aFormula ); @@ -1308,9 +1308,9 @@ void AnimationImporter::fillNode( Reference< XAnimationNode >& xNode, const Anim { rtl::OUString aString; rSet.getProperty( DFF_ANIM_ID ) >>= aString; - if( aString.getLength() ) - { - } + //if( !aString.isEmpty() ) + //{ + //} } // TODO: DFF_ANIM_EVENT_FILTER @@ -1318,9 +1318,9 @@ void AnimationImporter::fillNode( Reference< XAnimationNode >& xNode, const Anim { rtl::OUString aString; rSet.getProperty( DFF_ANIM_EVENT_FILTER ) >>= aString; - if( aString.getLength() ) - { - } + //if( !aString.isEmpty() ) + //{ + //} } // DFF_ANIM_TIMEFILTER @@ -1331,7 +1331,7 @@ void AnimationImporter::fillNode( Reference< XAnimationNode >& xNode, const Anim { rtl::OUString aString; rSet.getProperty( DFF_ANIM_TIMEFILTER ) >>= aString; - if( aString.getLength() ) + if( !aString.isEmpty() ) { sal_Int32 nElements = 1; // a non empty string has at least one value @@ -2686,7 +2686,7 @@ void AnimationImporter::importAnimateKeyPoints( const Atom* pAtom, const Referen { OUString aTest; aValue2 >>= aTest; - bHasValue = aTest.getLength() != 0; + bHasValue = !aTest.isEmpty(); bCouldBeFormula = true; } } @@ -2716,7 +2716,7 @@ void AnimationImporter::importAnimateKeyPoints( const Atom* pAtom, const Referen for( int i=0; isetPropertyValue( sStreamRelPath, Any( aName ) ); @@ -813,7 +813,7 @@ sal_Bool SdXMLFilter::Import( ErrCode& nError ) if( (nRet == 0) ) { - if( sBuildId.getLength() ) + if( !sBuildId.isEmpty() ) { sal_Int32 nIndex = sBuildId.indexOf('$'); if( nIndex != -1 ) @@ -966,7 +966,7 @@ sal_Bool SdXMLFilter::Export() aName = pDocHierarchItem->GetValue(); } - if( aName.getLength() ) + if( !aName.isEmpty() ) { sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("StreamRelPath")); xInfoSet->setPropertyValue( sPropName, makeAny( aName ) ); diff --git a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx index 519f39c72c91..86d53b73fe25 100644 --- a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx +++ b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx @@ -548,7 +548,7 @@ CustomAnimationCreateDialog::CustomAnimationCreateDialog( Window* pParent, Custo setPosition(); // select current preset if available - if( rsPresetId.getLength() != 0 ) + if( !rsPresetId.isEmpty() ) { for( sal_uInt16 i = ENTRANCE; i <= MOTIONPATH; i++ ) { diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx index e8d501a48d20..face5435e487 100644 --- a/sd/source/ui/animations/CustomAnimationDialog.cxx +++ b/sd/source/ui/animations/CustomAnimationDialog.cxx @@ -1269,7 +1269,7 @@ CustomAnimationEffectTabPage::CustomAnimationEffectTabPage( Window* pParent, con // set ui name for property at fixed text OUString aPropertyName( getPropertyName( nType ) ); - if( aPropertyName.getLength() ) + if( !aPropertyName.isEmpty() ) { mpFTProperty1->Show(); mpLBProperty1->Show(); @@ -1444,7 +1444,7 @@ CustomAnimationEffectTabPage::CustomAnimationEffectTabPage( Window* pParent, con OUString aSoundURL; aValue >>= aSoundURL; - if( aSoundURL.getLength() ) + if( !aSoundURL.isEmpty() ) { const String aTmp( aSoundURL ); diff --git a/sd/source/ui/animations/CustomAnimationList.cxx b/sd/source/ui/animations/CustomAnimationList.cxx index eccbc61591af..a9502817cd35 100644 --- a/sd/source/ui/animations/CustomAnimationList.cxx +++ b/sd/source/ui/animations/CustomAnimationList.cxx @@ -148,7 +148,7 @@ OUString getShapeDescription( const Reference< XShape >& xShape, bool bWithText if( xText.is() ) { OUString aText( xText->getString() ); - if( aText.getLength() ) + if( !aText.isEmpty() ) { aDescription += OUString(RTL_CONSTASCII_USTRINGPARAM(": ")); diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx index 742d745e41a4..4b5df8b29761 100644 --- a/sd/source/ui/animations/CustomAnimationPane.cxx +++ b/sd/source/ui/animations/CustomAnimationPane.cxx @@ -763,7 +763,7 @@ void CustomAnimationPane::updateControls() OUString aTemp( maStrModify ); - if( aUIName.getLength() ) + if( !aUIName.isEmpty() ) { aTemp += OUString( (sal_Unicode)' ' ); aTemp += aUIName; @@ -1603,7 +1603,7 @@ void CustomAnimationPane::changeSelection( STLPropertySet* pResultSet, STLProper OUString aSoundURL; aSoundSource >>= aSoundURL; - if( aSoundURL.getLength() ) + if( !aSoundURL.isEmpty() ) { if( !pEffect->getAudio().is() ) { @@ -1811,7 +1811,7 @@ bool getTextSelection( const Any& rSelection, Reference< XShape >& xShape, std:: while( xRange.is() ) { - if( xRange.is() && xRange->getString().getLength() ) + if( xRange.is() && !xRange->getString().isEmpty() ) rParaList.push_back( nPara ); // break if end of selection is before or at end of current paragraph @@ -1866,7 +1866,7 @@ void CustomAnimationPane::onChange( bool bCreate ) { Reference< XText > xText; aTarget >>= xText; - if( !xText.is() || xText->getString().getLength() == 0 ) + if( !xText.is() || xText->getString().isEmpty() ) bHasText = false; } } @@ -1876,7 +1876,7 @@ void CustomAnimationPane::onChange( bool bCreate ) aTargets.push_back( maViewSelection ); Reference< XText > xText; maViewSelection >>= xText; - if( !xText.is() || xText->getString().getLength() == 0 ) + if( !xText.is() || xText->getString().isEmpty() ) bHasText = false; } else if ( maViewSelection.getValueType() == ::getCppuType((const Reference< XTextCursor >*)0) ) @@ -1912,7 +1912,7 @@ void CustomAnimationPane::onChange( bool bCreate ) if( !bHasText || !(*aIter)->hasText() ) bHasText = false; - if( sPresetId.getLength() == 0 ) + if( sPresetId.isEmpty() ) { sPresetId = (*aIter)->getPresetId(); fDuration = (*aIter)->getDuration(); diff --git a/sd/source/ui/animations/SlideTransitionPane.cxx b/sd/source/ui/animations/SlideTransitionPane.cxx index 6e7862d664ec..11eb95333732 100644 --- a/sd/source/ui/animations/SlideTransitionPane.cxx +++ b/sd/source/ui/animations/SlideTransitionPane.cxx @@ -1270,7 +1270,7 @@ IMPL_LINK( SlideTransitionPane, LateInitCallback, Timer*, EMPTYARG ) { TransitionPresetPtr pPreset = (*aIter++); const OUString aUIName( pPreset->getUIName() ); - if( aUIName.getLength() ) + if( !aUIName.isEmpty() ) { maLB_SLIDE_TRANSITIONS.InsertEntry( aUIName ); m_aPresetIndexes[ nIndex ] = (sal_uInt16)nUIIndex; diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx index fac02eb1c0f3..972ba0aef700 100644 --- a/sd/source/ui/annotations/annotationmanager.cxx +++ b/sd/source/ui/annotations/annotationmanager.cxx @@ -473,7 +473,7 @@ void AnnotationManagerImpl::ExecuteReplyToAnnotation( SfxRequest& rReq ) String aStr(SdResId(STR_ANNOTATION_REPLY)); OUString sAuthor( xAnnotation->getAuthor() ); - if( sAuthor.getLength() == 0 ) + if( sAuthor.isEmpty() ) sAuthor = String( SdResId( STR_ANNOTATION_NOAUTHOR ) ); aStr.SearchAndReplaceAscii("%1", sAuthor); diff --git a/sd/source/ui/annotations/annotationwindow.cxx b/sd/source/ui/annotations/annotationwindow.cxx index f679972aac38..56470b875bf3 100644 --- a/sd/source/ui/annotations/annotationwindow.cxx +++ b/sd/source/ui/annotations/annotationwindow.cxx @@ -577,9 +577,9 @@ void AnnotationWindow::setAnnotation( const Reference< XAnnotation >& xAnnotatio OUString sMeta( xAnnotation->getAuthor() ); OUString sDateTime( getAnnotationDateTimeString(xAnnotation) ); - if( sDateTime.getLength() != 0 ) + if( !sDateTime.isEmpty() ) { - if( sMeta.getLength() != 0 ) + if( !sMeta.isEmpty() ) sMeta += OUString( RTL_CONSTASCII_USTRINGPARAM( "\n" ) ); sMeta += sDateTime; diff --git a/sd/source/ui/app/optsitem.cxx b/sd/source/ui/app/optsitem.cxx index 99b944255396..9fb13528ba7f 100644 --- a/sd/source/ui/app/optsitem.cxx +++ b/sd/source/ui/app/optsitem.cxx @@ -111,7 +111,7 @@ SdOptionsGeneric::SdOptionsGeneric( sal_uInt16 nConfigId, const OUString& rSubTr maSubTree ( rSubTree ), mpCfgItem ( NULL ), mnConfigId ( nConfigId ), - mbInit ( rSubTree.getLength() == 0 ) + mbInit ( rSubTree.isEmpty() ) { } diff --git a/sd/source/ui/app/tbxww.cxx b/sd/source/ui/app/tbxww.cxx index ef67cd8d44e5..5c2b6971dc2c 100644 --- a/sd/source/ui/app/tbxww.cxx +++ b/sd/source/ui/app/tbxww.cxx @@ -136,7 +136,7 @@ SfxPopupWindow* SdTbxControl::CreatePopupWindow() break; } - if ( aToolBarResStr.getLength() > 0 ) + if ( !aToolBarResStr.isEmpty() ) createAndPositionSubToolBar( aToolBarResStr ); return( pWin ); diff --git a/sd/source/ui/dlg/TemplateScanner.cxx b/sd/source/ui/dlg/TemplateScanner.cxx index 08119134605c..e087d9ca4be0 100644 --- a/sd/source/ui/dlg/TemplateScanner.cxx +++ b/sd/source/ui/dlg/TemplateScanner.cxx @@ -105,7 +105,7 @@ int Classify (const ::rtl::OUString&, const ::rtl::OUString& rsURL) { int nPriority (0); - if (rsURL.getLength() == 0) + if (rsURL.isEmpty()) nPriority = 100; else if (rsURL.indexOf(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("presnt")))>=0) { diff --git a/sd/source/ui/dlg/dlgass.cxx b/sd/source/ui/dlg/dlgass.cxx index e30ae0313279..c3ecb9581306 100644 --- a/sd/source/ui/dlg/dlgass.cxx +++ b/sd/source/ui/dlg/dlgass.cxx @@ -838,7 +838,7 @@ void AssistentDlgImpl::ScanDocmenu (void) aURL.SetSmartURL (sURL); // The password is set only when it is not empty. - if (sPassword.getLength() > 0) + if (!sPassword.isEmpty()) aURL.SetPass (sPassword); maOpenFilesList.push_back (new String (aURL.GetMainURL( INetURLObject::NO_DECODE ))); mpPage1OpenLB->InsertEntry (sTitle); @@ -1749,7 +1749,7 @@ String AssistentDlgImpl::GetUiTextForCommand (const ::rtl::OUString& sCommandURL { do { - if (sCommandURL.getLength() == 0) + if (sCommandURL.isEmpty()) break; // Retrieve popup menu labels @@ -1810,7 +1810,7 @@ Image AssistentDlgImpl::GetUiIconForCommand (const ::rtl::OUString& sCommandURL) { do { - if (sCommandURL.getLength() == 0) + if (sCommandURL.isEmpty()) break; // Retrieve popup menu labels diff --git a/sd/source/ui/dlg/dlgctrls.cxx b/sd/source/ui/dlg/dlgctrls.cxx index ddc658f7e25d..d7e4a9d64df7 100644 --- a/sd/source/ui/dlg/dlgctrls.cxx +++ b/sd/source/ui/dlg/dlgctrls.cxx @@ -65,7 +65,7 @@ void FadeEffectLB::Fill() { pPreset = (*aIter); const OUString aUIName( pPreset->getUIName() ); - if( aUIName.getLength() ) + if( !aUIName.isEmpty() ) { InsertEntry( aUIName ); mpImpl->maPresets.push_back( pPreset ); diff --git a/sd/source/ui/dlg/filedlg.cxx b/sd/source/ui/dlg/filedlg.cxx index 5cf6e9e5ada4..5f74aa0191bd 100644 --- a/sd/source/ui/dlg/filedlg.cxx +++ b/sd/source/ui/dlg/filedlg.cxx @@ -149,7 +149,7 @@ IMPL_LINK( SdFileDialog_Imp, PlayMusicHdl, void *, EMPTYARG ) else { rtl::OUString aUrl( GetPath() ); - if ( aUrl.getLength() ) + if ( !aUrl.isEmpty() ) { try { diff --git a/sd/source/ui/dlg/tpaction.cxx b/sd/source/ui/dlg/tpaction.cxx index 4608f0d4e52e..f557a4f738d2 100644 --- a/sd/source/ui/dlg/tpaction.cxx +++ b/sd/source/ui/dlg/tpaction.cxx @@ -463,7 +463,7 @@ void SdTPAction::OpenFileDialog() // choose macro dialog ::rtl::OUString aScriptURL = SfxApplication::ChooseScript(); - if ( aScriptURL.getLength() != 0 ) + if ( !aScriptURL.isEmpty() ) { SetEditText( aScriptURL ); } diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx index a486f56244fa..cc152e1374ab 100644 --- a/sd/source/ui/docshell/docshel4.cxx +++ b/sd/source/ui/docshell/docshel4.cxx @@ -814,7 +814,7 @@ sal_Bool DrawDocShell::GotoBookmark(const String& rBookmark) default: break; } - if (sViewURL.getLength() > 0) + if (!sViewURL.isEmpty()) { ::boost::shared_ptr pHelper ( FrameworkHelper::Instance(rBase)); diff --git a/sd/source/ui/framework/configuration/Configuration.cxx b/sd/source/ui/framework/configuration/Configuration.cxx index a01c584f6826..16b25eb0d276 100644 --- a/sd/source/ui/framework/configuration/Configuration.cxx +++ b/sd/source/ui/framework/configuration/Configuration.cxx @@ -158,7 +158,7 @@ void SAL_CALL Configuration::addResource (const Reference& rxResour { ThrowIfDisposed(); - if ( ! rxResourceId.is() || rxResourceId->getResourceURL().getLength()==0) + if ( ! rxResourceId.is() || rxResourceId->getResourceURL().isEmpty()) throw ::com::sun::star::lang::IllegalArgumentException(); if (mpResourceContainer->find(rxResourceId) == mpResourceContainer->end()) @@ -181,7 +181,7 @@ void SAL_CALL Configuration::removeResource (const Reference& rxRes { ThrowIfDisposed(); - if ( ! rxResourceId.is() || rxResourceId->getResourceURL().getLength()==0) + if ( ! rxResourceId.is() || rxResourceId->getResourceURL().isEmpty()) throw ::com::sun::star::lang::IllegalArgumentException(); ResourceContainer::iterator iResource (mpResourceContainer->find(rxResourceId)); @@ -209,7 +209,7 @@ Sequence > SAL_CALL Configuration::getResources ( ::osl::MutexGuard aGuard (maMutex); ThrowIfDisposed(); - bool bFilterResources (rsResourceURLPrefix.getLength() > 0); + bool bFilterResources (!rsResourceURLPrefix.isEmpty()); // Collect the matching resources in a vector. ::std::vector > aResources; diff --git a/sd/source/ui/framework/configuration/GenericConfigurationChangeRequest.cxx b/sd/source/ui/framework/configuration/GenericConfigurationChangeRequest.cxx index 316a81abb2ec..498f22b8d02c 100644 --- a/sd/source/ui/framework/configuration/GenericConfigurationChangeRequest.cxx +++ b/sd/source/ui/framework/configuration/GenericConfigurationChangeRequest.cxx @@ -46,7 +46,7 @@ GenericConfigurationChangeRequest::GenericConfigurationChangeRequest ( mxResourceId(rxResourceId), meMode(eMode) { - if ( ! rxResourceId.is() || rxResourceId->getResourceURL().getLength()==0) + if ( ! rxResourceId.is() || rxResourceId->getResourceURL().isEmpty()) throw ::com::sun::star::lang::IllegalArgumentException(); } diff --git a/sd/source/ui/framework/configuration/ResourceFactoryManager.cxx b/sd/source/ui/framework/configuration/ResourceFactoryManager.cxx index 616f409ecd4c..f4c0965b5d6e 100644 --- a/sd/source/ui/framework/configuration/ResourceFactoryManager.cxx +++ b/sd/source/ui/framework/configuration/ResourceFactoryManager.cxx @@ -79,7 +79,7 @@ void ResourceFactoryManager::AddFactory ( { if ( ! rxFactory.is()) throw lang::IllegalArgumentException(); - if (rsURL.getLength() == 0) + if (rsURL.isEmpty()) throw lang::IllegalArgumentException(); ::osl::MutexGuard aGuard (maMutex); @@ -102,7 +102,7 @@ void ResourceFactoryManager::RemoveFactoryForURL ( const OUString& rsURL) throw (RuntimeException) { - if (rsURL.getLength() == 0) + if (rsURL.isEmpty()) throw lang::IllegalArgumentException(); ::osl::MutexGuard aGuard (maMutex); diff --git a/sd/source/ui/framework/configuration/ResourceId.cxx b/sd/source/ui/framework/configuration/ResourceId.cxx index 2957dfae7671..83b531ef1f16 100644 --- a/sd/source/ui/framework/configuration/ResourceId.cxx +++ b/sd/source/ui/framework/configuration/ResourceId.cxx @@ -114,7 +114,7 @@ ResourceId::ResourceId ( mpURL() { // Handle the special case of an empty resource URL. - if (rsResourceURL.getLength() == 0) + if (rsResourceURL.isEmpty()) maResourceURLs.clear(); ParseResourceURL(); } diff --git a/sd/source/ui/framework/factories/FullScreenPane.cxx b/sd/source/ui/framework/factories/FullScreenPane.cxx index a3d9ab75be1e..d353c75be128 100644 --- a/sd/source/ui/framework/factories/FullScreenPane.cxx +++ b/sd/source/ui/framework/factories/FullScreenPane.cxx @@ -275,7 +275,7 @@ void FullScreenPane::ExtractArguments ( while (nIndex >= 0) { const OUString aToken = aURL.Arguments.getToken(0, '&', nIndex); - if (aToken.getLength() > 0) + if (!aToken.isEmpty()) { // Split at the first '='. const sal_Int32 nAssign = aToken.indexOf('='); diff --git a/sd/source/ui/framework/factories/TaskPanelFactory.cxx b/sd/source/ui/framework/factories/TaskPanelFactory.cxx index dd4075650d7f..1c3c52e4e710 100644 --- a/sd/source/ui/framework/factories/TaskPanelFactory.cxx +++ b/sd/source/ui/framework/factories/TaskPanelFactory.cxx @@ -191,7 +191,7 @@ namespace Reference< XResourceId > xResourceId( i_rResourceId ); ::rtl::OUString sResourceURL = xResourceId->getResourceURL(); - while ( sResourceURL.getLength() > 0 ) + while ( !sResourceURL.isEmpty() ) { o_rResourceURLs.push_back( sResourceURL ); xResourceId = xResourceId->getAnchor(); diff --git a/sd/source/ui/framework/tools/FrameworkHelper.cxx b/sd/source/ui/framework/tools/FrameworkHelper.cxx index d457433d99eb..92dc51acf824 100644 --- a/sd/source/ui/framework/tools/FrameworkHelper.cxx +++ b/sd/source/ui/framework/tools/FrameworkHelper.cxx @@ -905,7 +905,7 @@ OUString FrameworkHelper::ResourceIdToString (const Reference& rxRe if (rxResourceId->hasAnchor()) { Sequence aAnchorURLs (rxResourceId->getAnchorURLs()); - for (sal_Int32 nIndex=0; nIndexGetValue(); - bAPI = aURL.getLength(); + bAPI = !aURL.isEmpty(); } } diff --git a/sd/source/ui/func/futempl.cxx b/sd/source/ui/func/futempl.cxx index b67c71061c7d..d6d3ae18c9ae 100644 --- a/sd/source/ui/func/futempl.cxx +++ b/sd/source/ui/func/futempl.cxx @@ -162,7 +162,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) OUString aUIName; xInfo->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DisplayName")) ) >>= aUIName; - if ( aUIName.getLength() ) + if ( !aUIName.isEmpty() ) rReq.AppendItem( SfxStringItem( nSId, aUIName ) ); } catch( Exception& ) diff --git a/sd/source/ui/presenter/PresenterHelper.cxx b/sd/source/ui/presenter/PresenterHelper.cxx index 0e8c9fbf24f7..b73487453935 100644 --- a/sd/source/ui/presenter/PresenterHelper.cxx +++ b/sd/source/ui/presenter/PresenterHelper.cxx @@ -220,7 +220,7 @@ Reference SAL_CALL PresenterHelper::createCanvas ( mxComponentContext->getServiceManager(), UNO_QUERY_THROW); return Reference( xFactory->createInstanceWithArguments( - rsOptionalCanvasServiceName.getLength()>0 + !rsOptionalCanvasServiceName.isEmpty() ? rsOptionalCanvasServiceName : OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.rendering.VCLCanvas")), aArg), @@ -265,7 +265,7 @@ Reference SAL_CALL PresenterHelper::loadBitmap ( cppcanvas::VCLFactory::getInstance().createCanvas( Reference(rxCanvas,UNO_QUERY))); - if (pCanvas.get()!=NULL && rsURL.getLength()>0 && mpGraphicFilter.get()!=NULL) + if (pCanvas.get()!=NULL && !rsURL.isEmpty() && mpGraphicFilter.get()!=NULL) { Graphic aGraphic; OUString sFileName; diff --git a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx index 22beaae0df9b..e8421a572de1 100644 --- a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx +++ b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx @@ -236,7 +236,7 @@ SlideSorterViewShell* SlideSorterViewShell::GetSlideSorter (ViewShellBase& rBase { ::boost::shared_ptr pFrameworkHelper (FrameworkHelper::Instance(rBase)); if (pFrameworkHelper->IsValid()) - for (int i=0; pViewShell==NULL && aPaneURLs[i].getLength()>0; ++i) + for (int i=0; pViewShell==NULL && !aPaneURLs[i].isEmpty(); ++i) { pViewShell = dynamic_cast( pFrameworkHelper->GetViewShell(aPaneURLs[i]).get()); diff --git a/sd/source/ui/slidesorter/view/SlsToolTip.cxx b/sd/source/ui/slidesorter/view/SlsToolTip.cxx index 565df89fc7e7..48a805c25a5e 100644 --- a/sd/source/ui/slidesorter/view/SlsToolTip.cxx +++ b/sd/source/ui/slidesorter/view/SlsToolTip.cxx @@ -82,7 +82,7 @@ void ToolTip::SetPage (const model::SharedPageDescriptor& rpDescriptor) { OSL_ASSERT(mpDescriptor->GetPage() != NULL); } - if (sHelpText.getLength() == 0) + if (sHelpText.isEmpty()) { sHelpText = String(SdResId(STR_PAGE)); sHelpText += String::CreateFromInt32(mpDescriptor->GetPageIndex()+1); @@ -154,7 +154,7 @@ void ToolTip::DoShow (void) } SharedSdWindow pWindow (mrSlideSorter.GetContentWindow()); - if (msCurrentHelpText.getLength()>0 && pWindow) + if (!msCurrentHelpText.isEmpty() && pWindow) { Rectangle aBox ( mrSlideSorter.GetView().GetLayouter().GetPageObjectLayouter()->GetBoundingBox( diff --git a/sd/source/ui/table/TableDesignPane.cxx b/sd/source/ui/table/TableDesignPane.cxx index a9943f86e300..3af9df4b78a7 100644 --- a/sd/source/ui/table/TableDesignPane.cxx +++ b/sd/source/ui/table/TableDesignPane.cxx @@ -228,7 +228,7 @@ void TableDesignPane::ApplyStyle() sStyleName = xNames->getElementNames()[nIndex]; } - if( sStyleName.getLength() == 0 ) + if( sStyleName.isEmpty() ) return; SdrView* pView = mrBase.GetDrawView(); diff --git a/sd/source/ui/table/tablefunction.cxx b/sd/source/ui/table/tablefunction.cxx index 9a8758929b02..5ca59e1f9db8 100644 --- a/sd/source/ui/table/tablefunction.cxx +++ b/sd/source/ui/table/tablefunction.cxx @@ -100,7 +100,7 @@ static void apply_table_style( SdrTableObj* pObj, SdrModel* pModel, const OUStri const OUString sFamilyName( RTL_CONSTASCII_USTRINGPARAM( "table" ) ); Reference< XNameContainer > xTableFamily( xPool->getByName( sFamilyName ), UNO_QUERY_THROW ); OUString aStdName( RTL_CONSTASCII_USTRINGPARAM("default") ); - if( sTableStyle.getLength() ) + if( !sTableStyle.isEmpty() ) aStdName = sTableStyle; Reference< XIndexAccess > xStyle( xTableFamily->getByName( aStdName ), UNO_QUERY_THROW ); pObj->setTableStyle( xStyle ); diff --git a/sd/source/ui/toolpanel/ToolPanelViewShell.cxx b/sd/source/ui/toolpanel/ToolPanelViewShell.cxx index 7f01523f7273..2a1c2df06fea 100644 --- a/sd/source/ui/toolpanel/ToolPanelViewShell.cxx +++ b/sd/source/ui/toolpanel/ToolPanelViewShell.cxx @@ -414,7 +414,7 @@ void ToolPanelViewShell_Impl::Setup() // initially activate a panel const InitialPanel aInitialPanel = impl_determineInitialPanel(); - if ( aInitialPanel.sPanelResourceURL.getLength() ) + if ( !aInitialPanel.sPanelResourceURL.isEmpty() ) { if ( aInitialPanel.bActivateDirectly ) { @@ -813,13 +813,13 @@ void ToolPanelViewShell_Impl::ActivePanelChanged( const ::boost::optional< size_ const ::rtl::OUString sNewPanelURL( impl_getPanelURL( i_rNewActive ) ); const ::boost::shared_ptr< FrameworkHelper > pFrameworkHelper( FrameworkHelper::Instance( GetAntiImpl().GetViewShellBase() ) ); - if ( sNewPanelURL.getLength() ) + if ( !sNewPanelURL.isEmpty() ) { // activate the resource belonging to the new panel. This will automatically de-activate the previously active // panel resource (since ResourceActivationMode_REPLACE is used) pFrameworkHelper->RequestTaskPanel( sNewPanelURL ); } - else if ( sOldPanelURL.getLength() ) + else if ( !sOldPanelURL.isEmpty() ) { // there is no new active panel, or it is not one of our standard panels, i.e. it is not covered by the // resource framework. => Deactivate the old resource. diff --git a/sd/source/ui/toolpanel/controls/MasterPageContainer.cxx b/sd/source/ui/toolpanel/controls/MasterPageContainer.cxx index fcc71ccbe41c..1533b2e5742f 100644 --- a/sd/source/ui/toolpanel/controls/MasterPageContainer.cxx +++ b/sd/source/ui/toolpanel/controls/MasterPageContainer.cxx @@ -785,7 +785,7 @@ MasterPageContainer::Token MasterPageContainer::Implementation::PutMasterPage ( { // Insert a new MasterPageDescriptor. bool bIgnore (rpDescriptor->mpPageObjectProvider.get()==NULL - && rpDescriptor->msURL.getLength()==0); + && rpDescriptor->msURL.isEmpty()); if ( ! bIgnore) { diff --git a/sd/source/ui/toolpanel/controls/MasterPageDescriptor.cxx b/sd/source/ui/toolpanel/controls/MasterPageDescriptor.cxx index 75e73d7387c9..897c0752a9f6 100644 --- a/sd/source/ui/toolpanel/controls/MasterPageDescriptor.cxx +++ b/sd/source/ui/toolpanel/controls/MasterPageDescriptor.cxx @@ -131,19 +131,19 @@ SAL_WNODEPRECATED_DECLARATIONS_PUSH bIndexChanged = true; } - if (msURL.getLength()==0 && rDescriptor.msURL.getLength()!=0) + if (msURL.isEmpty() && !rDescriptor.msURL.isEmpty()) { msURL = rDescriptor.msURL; bDataChanged = true; } - if (msPageName.getLength()==0 && rDescriptor.msPageName.getLength()!=0) + if (msPageName.isEmpty() && !rDescriptor.msPageName.isEmpty()) { msPageName = rDescriptor.msPageName; bDataChanged = true; } - if (msStyleName.getLength()==0 && rDescriptor.msStyleName.getLength()!=0) + if (msStyleName.isEmpty() && !rDescriptor.msStyleName.isEmpty()) { msStyleName = rDescriptor.msStyleName; bDataChanged = true; @@ -217,7 +217,7 @@ bool MasterPageDescriptor::UpdatePageObject ( if (mpMasterPage != NULL) { // Update page name and style name. - if (msPageName.getLength() == 0) + if (msPageName.isEmpty()) msPageName = mpMasterPage->GetName(); msStyleName = mpMasterPage->GetName(); @@ -289,7 +289,7 @@ MasterPageDescriptor::URLClassification MasterPageDescriptor::GetURLClassificati { if (meURLClassification == URLCLASS_UNDETERMINED) { - if (msURL.getLength() == 0) + if (msURL.isEmpty()) meURLClassification = URLCLASS_UNKNOWN; else if (msURL.indexOf(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("presnt")))>=0) { @@ -404,11 +404,11 @@ bool MasterPageDescriptor::AllComparator::operator() (const SharedMasterPageDesc return mpDescriptor->meOrigin == rDescriptor->meOrigin && ( - (mpDescriptor->msURL.getLength()>0 + (!mpDescriptor->msURL.isEmpty() && mpDescriptor->msURL.equals(rDescriptor->msURL)) - || (mpDescriptor->msPageName.getLength()>0 + || (!mpDescriptor->msPageName.isEmpty() && mpDescriptor->msPageName.equals(rDescriptor->msPageName)) - || (mpDescriptor->msStyleName.getLength()>0 + || (!mpDescriptor->msStyleName.isEmpty() && mpDescriptor->msStyleName.equals(rDescriptor->msStyleName)) || (mpDescriptor->mpMasterPage!=NULL && mpDescriptor->mpMasterPage==rDescriptor->mpMasterPage) diff --git a/sd/source/ui/tools/ConfigurationAccess.cxx b/sd/source/ui/tools/ConfigurationAccess.cxx index 3a9994cf76ca..60dd3114dd1a 100644 --- a/sd/source/ui/tools/ConfigurationAccess.cxx +++ b/sd/source/ui/tools/ConfigurationAccess.cxx @@ -138,7 +138,7 @@ Any ConfigurationAccess::GetConfigurationNode ( const css::uno::Reference& rxNode, const OUString& sPathToNode) { - if (sPathToNode.getLength() == 0) + if (sPathToNode.isEmpty()) return Any(rxNode); try @@ -180,7 +180,7 @@ void ConfigurationAccess::ForAll ( { ::std::vector aValues(rArguments.size()); Sequence aKeys (rxContainer->getElementNames()); - for (sal_Int32 nItemIndex=0; nItemIndex xSetItem (rxContainer->getByName(rsKey), UNO_QUERY); diff --git a/sd/source/ui/unoidl/UnoDocumentSettings.cxx b/sd/source/ui/unoidl/UnoDocumentSettings.cxx index 4158017a9ae8..e36ec7d5b87c 100644 --- a/sd/source/ui/unoidl/UnoDocumentSettings.cxx +++ b/sd/source/ui/unoidl/UnoDocumentSettings.cxx @@ -723,7 +723,7 @@ void DocumentSettings::_setPropertyValues( const PropertyMapEntry** ppEntries, c if( *pValues >>= aPrinterName ) { bOk = true; - if( aPrinterName.getLength() && pDocSh->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED ) + if( !aPrinterName.isEmpty() && pDocSh->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED ) { SfxPrinter *pTempPrinter = pDocSh->GetPrinter( sal_True ); if (pTempPrinter) diff --git a/sd/source/ui/unoidl/sddetect.cxx b/sd/source/ui/unoidl/sddetect.cxx index 47114ca6ccaa..bf61a6fcc8a3 100644 --- a/sd/source/ui/unoidl/sddetect.cxx +++ b/sd/source/ui/unoidl/sddetect.cxx @@ -464,7 +464,7 @@ SdFilterDetect::~SdFilterDetect() lDescriptor[nIndexOfTemplateFlag].Value <<= bOpenAsTemplate; } - if ( aDocumentTitle.getLength() ) + if ( !aDocumentTitle.isEmpty() ) { // the title was set here if ( nIndexOfDocumentTitle == -1 ) diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index 16ab6f2f8796..a061d4fd20eb 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -1645,7 +1645,7 @@ void ImplPDFExportShapeInteraction( uno::Reference< drawing::XShape > xShape, Sd { rtl::OUString aBookmark; xShapePropSet->getPropertyValue( sBookmark ) >>= aBookmark; - if( aBookmark.getLength() ) + if( !aBookmark.isEmpty() ) { switch( eCa ) { @@ -2337,7 +2337,7 @@ uno::Any SAL_CALL SdDrawPagesAccess::getByName( const OUString& aName ) throw(co if( NULL == mpModel ) throw lang::DisposedException(); - if( aName.getLength() != 0 ) + if( !aName.isEmpty() ) { const sal_uInt16 nCount = mpModel->mpDoc->GetSdPageCount( PK_STANDARD ); sal_uInt16 nPage; diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx index 6bfa6982e8a7..9431aa8d8e9b 100644 --- a/sd/source/ui/unoidl/unoobj.cxx +++ b/sd/source/ui/unoidl/unoobj.cxx @@ -1410,7 +1410,7 @@ void SAL_CALL SdUnoEventsAccess::replaceByName( const OUString& aName, const uno { pInfo->SetBookmark( aStrSoundURL ); if( eClickAction != presentation::ClickAction_SOUND ) - pInfo->mbSecondSoundOn = aStrSoundURL.getLength() != 0; + pInfo->mbSecondSoundOn = !aStrSoundURL.isEmpty(); pInfo->mbSecondPlayFull = nFound & FOUND_PLAYFULL ? bPlayFull : sal_False; bOk = sal_True; diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx index 84a76d39d05a..48673388dee1 100644 --- a/sd/source/ui/unoidl/unopage.cxx +++ b/sd/source/ui/unoidl/unopage.cxx @@ -711,7 +711,7 @@ void SAL_CALL SdGenericDrawPage::setPropertyValue( const OUString& aPropertyName if( aValue >>= aURL ) { GetPage()->SetSoundFile( aURL ); - GetPage()->SetSound( aURL.getLength() != 0 ? sal_True : sal_False ); + GetPage()->SetSound( !aURL.isEmpty() ); break; } else @@ -1511,7 +1511,7 @@ OUString SdGenericDrawPage::getBookmarkURL() const if( SvxFmDrawPage::mpPage ) { OUString aFileName( static_cast(SvxFmDrawPage::mpPage)->GetFileName() ); - if( aFileName.getLength() ) + if( !aFileName.isEmpty() ) { const OUString aBookmarkName( SdDrawPage::getPageApiNameFromUiName( static_cast(SvxFmDrawPage::mpPage)->GetBookmarkName() ) ); aRet.append( aFileName ); @@ -2143,7 +2143,7 @@ OUString getPageApiName( SdPage* pPage ) { aPageName = pPage->GetRealName(); - if( aPageName.getLength() == 0 ) + if( aPageName.isEmpty() ) { OUStringBuffer sBuffer; sBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM( sEmptyPageName ) ); diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx index 0d15f445df00..af8f45ff9dcc 100644 --- a/sd/source/ui/view/DocumentRenderer.cxx +++ b/sd/source/ui/view/DocumentRenderer.cxx @@ -222,7 +222,7 @@ namespace { if (nContent == 1) // range { OUString sValue = mrProperties.getStringValue("PageRange"); - return sValue.getLength() ? sValue : sFullRange; + return sValue.isEmpty() ? sFullRange : sValue; } if (nContent == 2 && // selection @@ -261,7 +261,7 @@ namespace { const bool bDefaultValue = false) const { OUString sValue( mrProperties.getStringValue( pName ) ); - if (sValue.getLength()) + if (!sValue.isEmpty()) return sValue.equalsAscii(pValue); else return bDefaultValue; diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx index 94ed8ff2d3dd..253e2884869e 100644 --- a/sd/source/ui/view/ViewShellBase.cxx +++ b/sd/source/ui/view/ViewShellBase.cxx @@ -360,7 +360,7 @@ void ViewShellBase::LateInit (const ::rtl::OUString& rsDefaultView) if (xConfigurationController.is()) { OUString sView (rsDefaultView); - if (sView.getLength() == 0) + if (sView.isEmpty()) sView = GetInitialViewShellType(); ::boost::shared_ptr pHelper (FrameworkHelper::Instance(*this)); @@ -824,7 +824,7 @@ void ViewShellBase::ReadUserDataSequence ( sViewURL = framework::FrameworkHelper::msHandoutViewURL; break; } - if (sViewURL.getLength() > 0) + if (!sViewURL.isEmpty()) framework::FrameworkHelper::Instance(*this)->RequestView( sViewURL, framework::FrameworkHelper::msCenterPaneURL); @@ -1162,7 +1162,7 @@ void ViewShellBase::SetViewTabBar (const ::rtl::Reference& rViewTabB { ::rtl::OUString aLabel; - if ( aCmdURL.getLength() > 0 ) try + if ( !aCmdURL.isEmpty() ) try { Reference< XMultiServiceFactory > xServiceManager( ::comphelper::getProcessServiceFactory(), UNO_QUERY_THROW ); @@ -1171,7 +1171,7 @@ void ViewShellBase::SetViewTabBar (const ::rtl::Reference& rViewTabB ::rtl::OUString aModuleIdentifier( xModuleManager->identify( xIfac ) ); - if( aModuleIdentifier.getLength() > 0 ) + if( !aModuleIdentifier.isEmpty() ) { Reference< XNameAccess > xNameAccess( xServiceManager->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.UICommandDescription" ) ) ), UNO_QUERY ); if( xNameAccess.is() ) diff --git a/sd/source/ui/view/ViewTabBar.cxx b/sd/source/ui/view/ViewTabBar.cxx index 082c78939e37..99521a69625f 100644 --- a/sd/source/ui/view/ViewTabBar.cxx +++ b/sd/source/ui/view/ViewTabBar.cxx @@ -508,8 +508,8 @@ void ViewTabBar::AddTabBarButton ( sal_uInt32 nIndex; if ( ! rAnchor.ResourceId.is() - || (rAnchor.ResourceId->getResourceURL().getLength() == 0 - && rAnchor.ButtonLabel.getLength() == 0)) + || (rAnchor.ResourceId->getResourceURL().isEmpty() + && rAnchor.ButtonLabel.isEmpty())) { nIndex = 0; } diff --git a/sd/source/ui/view/sdview2.cxx b/sd/source/ui/view/sdview2.cxx index f01e5c9ea552..59ee92b32fa4 100644 --- a/sd/source/ui/view/sdview2.cxx +++ b/sd/source/ui/view/sdview2.cxx @@ -782,7 +782,7 @@ sal_Int8 View::ExecuteDrop( const ExecuteDropEvent& rEvt, DropTargetHelper& rTar SdAnimationInfo* pInfo = mpDoc->GetAnimationInfo( pPickObj ); sal_Bool bCreated = sal_False; - if( aBookmark.getLength() ) + if( !aBookmark.isEmpty() ) { presentation::ClickAction eClickAction = presentation::ClickAction_DOCUMENT; -- cgit v1.2.3