From f19d269ab4286b2e2e9f579bc4705daf4f6756ab Mon Sep 17 00:00:00 2001 From: Olivier Hallot Date: Mon, 9 Jan 2012 11:57:52 -0200 Subject: Fix for fdo43460 Part XXXII getLength() to isEmpty() Part XXXII Modules sdext --- sdext/source/minimizer/configurationaccess.cxx | 2 +- sdext/source/minimizer/graphiccollector.cxx | 2 +- sdext/source/minimizer/impoptimizer.cxx | 10 +++++----- sdext/source/minimizer/informationdialog.cxx | 10 +++++----- sdext/source/minimizer/optimizerdialog.cxx | 10 +++++----- sdext/source/minimizer/optimizerdialogcontrols.cxx | 10 +++++----- sdext/source/pdfimport/filterdet.cxx | 10 +++++----- sdext/source/pdfimport/pdfparse/pdfentries.cxx | 2 +- sdext/source/pdfimport/tree/pdfiprocessor.cxx | 2 +- sdext/source/pdfimport/tree/style.cxx | 2 +- sdext/source/pdfimport/wrapper/wrapper.cxx | 4 ++-- sdext/source/presenter/PresenterCanvasHelper.cxx | 2 +- sdext/source/presenter/PresenterComponent.cxx | 2 +- .../source/presenter/PresenterConfigurationAccess.cxx | 2 +- sdext/source/presenter/PresenterController.cxx | 2 +- sdext/source/presenter/PresenterFrameworkObserver.cxx | 2 +- sdext/source/presenter/PresenterHelpView.cxx | 2 +- sdext/source/presenter/PresenterPaneBorderPainter.cxx | 4 ++-- sdext/source/presenter/PresenterPaneFactory.cxx | 2 +- sdext/source/presenter/PresenterScreen.cxx | 4 ++-- sdext/source/presenter/PresenterSlideSorter.cxx | 4 ++-- sdext/source/presenter/PresenterTheme.cxx | 18 +++++++++--------- sdext/source/presenter/PresenterToolBar.cxx | 6 +++--- 23 files changed, 57 insertions(+), 57 deletions(-) (limited to 'sdext') diff --git a/sdext/source/minimizer/configurationaccess.cxx b/sdext/source/minimizer/configurationaccess.cxx index 00a43b3b4b63..b3ffaba4cf90 100644 --- a/sdext/source/minimizer/configurationaccess.cxx +++ b/sdext/source/minimizer/configurationaccess.cxx @@ -373,7 +373,7 @@ Reference< XInterface > ConfigurationAccess::GetConfigurationNode( Reference< XInterface > xNode; try { - if ( !sPathToNode.getLength() ) + if ( sPathToNode.isEmpty() ) xNode = xRoot; else { diff --git a/sdext/source/minimizer/graphiccollector.cxx b/sdext/source/minimizer/graphiccollector.cxx index 5bed8bed9d14..5e5e5f5a7967 100644 --- a/sdext/source/minimizer/graphiccollector.cxx +++ b/sdext/source/minimizer/graphiccollector.cxx @@ -74,7 +74,7 @@ void ImpAddEntity( std::vector< GraphicCollector::GraphicEntity >& rGraphicEntit const rtl::OUString aGraphicURL( rUser.maGraphicURL ); const rtl::OUString sPackageURL( RTL_CONSTASCII_USTRINGPARAM("vnd.sun.star.GraphicObject:") ); - if ( rGraphicSettings.mbEmbedLinkedGraphics || ( !aGraphicURL.getLength() || aGraphicURL.match( sPackageURL, 0 ) ) ) + if ( rGraphicSettings.mbEmbedLinkedGraphics || (aGraphicURL.isEmpty() || aGraphicURL.match( sPackageURL, 0 ) ) ) { std::vector< GraphicCollector::GraphicEntity >::iterator aIter( rGraphicEntities.begin() ); while( aIter != rGraphicEntities.end() ) diff --git a/sdext/source/minimizer/impoptimizer.cxx b/sdext/source/minimizer/impoptimizer.cxx index 74b2b8332309..9ab1d537fc9f 100644 --- a/sdext/source/minimizer/impoptimizer.cxx +++ b/sdext/source/minimizer/impoptimizer.cxx @@ -536,7 +536,7 @@ void ImpOptimizer::DispatchStatus() sal_Bool ImpOptimizer::Optimize() { - if ( maCustomShowName.getLength() ) + if ( !maCustomShowName.isEmpty() ) ImpExtractCustomShow( mxModel, maCustomShowName ); if ( mbDeleteUnusedMasterPages ) @@ -662,7 +662,7 @@ sal_Bool ImpOptimizer::Optimize( const Sequence< PropertyValue >& rArguments ) sal_Int64 nDestSize = 0; Reference< XFrame > xSelf; - if ( maSaveAsURL.getLength() ) + if ( !maSaveAsURL.isEmpty() ) { SetStatusValue( TK_Progress, Any( static_cast< sal_Int32 >( 10 ) ) ); @@ -676,7 +676,7 @@ sal_Bool ImpOptimizer::Optimize( const Sequence< PropertyValue >& rArguments ) nSourceSize = PPPOptimizer::GetFileSize( xStorable->getLocation() ); Sequence< PropertyValue > aArguments; - if ( maFilterName.getLength() ) + if ( !maFilterName.isEmpty() ) { int nLength = aArguments.getLength(); aArguments.realloc( nLength + 1 ); @@ -722,7 +722,7 @@ sal_Bool ImpOptimizer::Optimize( const Sequence< PropertyValue >& rArguments ) } } - if ( maSaveAsURL.getLength() ) + if ( !maSaveAsURL.isEmpty() ) { if ( xStorable.is() ) { @@ -739,7 +739,7 @@ sal_Bool ImpOptimizer::Optimize( const Sequence< PropertyValue >& rArguments ) DispatchStatus(); } - if ( maSaveAsURL.getLength() ) + if ( !maSaveAsURL.isEmpty() ) { if ( mbOpenNewDocument && xSelf.is() ) { diff --git a/sdext/source/minimizer/informationdialog.cxx b/sdext/source/minimizer/informationdialog.cxx index 41dbf5c736f0..6f283d88b542 100644 --- a/sdext/source/minimizer/informationdialog.cxx +++ b/sdext/source/minimizer/informationdialog.cxx @@ -246,7 +246,7 @@ OUString InformationDialog::ImpGetStandardImage( const OUString& sPrivateURL ) void InformationDialog::InitDialog() { sal_Int32 nDialogHeight = DIALOG_HEIGHT; - if ( !maSaveAsURL.getLength() ) + if ( maSaveAsURL.isEmpty() ) nDialogHeight -= 22; // setting the dialog properties @@ -298,7 +298,7 @@ void InformationDialog::InitDialog() } rtl::OUString aTitle; - if ( maSaveAsURL.getLength() ) + if ( !maSaveAsURL.isEmpty() ) { Reference< XURLTransformer > xURLTransformer( mxMSF->getServiceManager()->createInstanceWithContext( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.URLTransformer" ) ), mxMSF ), UNO_QUERY ); @@ -320,7 +320,7 @@ void InformationDialog::InitDialog() OUString aInfoString( getString( eInfoString ) ); const OUString aOldSizePlaceholder( RTL_CONSTASCII_USTRINGPARAM( "%OLDFILESIZE" ) ); const OUString aNewSizePlaceholder( RTL_CONSTASCII_USTRINGPARAM( "%NEWFILESIZE" ) ); - const OUString aTitlePlaceholder( aTitle.getLength() ? OUString(RTL_CONSTASCII_USTRINGPARAM("%TITLE" )) + const OUString aTitlePlaceholder( !aTitle.isEmpty() ? OUString(RTL_CONSTASCII_USTRINGPARAM("%TITLE" )) : OUString(RTL_CONSTASCII_USTRINGPARAM("'%TITLE'")) ); sal_Int32 i = aInfoString.indexOf( aOldSizePlaceholder, 0 ); @@ -338,7 +338,7 @@ void InformationDialog::InitDialog() com::sun::star::uno::Reference< com::sun::star::awt::XItemListener > xItemListener; InsertImage( *this, rtl::OUString( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("aboutimage")) ), ImpGetStandardImage( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("private:standardimage/query")) ), 5, 5, 25, 25 ); InsertFixedText( *this, rtl::OUString( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("fixedtext")) ), aInfoString, PAGE_POS_X, 6, PAGE_WIDTH, 24, sal_True, 0 ); - if ( maSaveAsURL.getLength() ) + if ( !maSaveAsURL.isEmpty() ) InsertCheckBox( *this, TKGet( TK_OpenNewDocument ), xItemListener, getString( STR_AUTOMATICALLY_OPEN ), PAGE_POS_X, 42, PAGE_WIDTH, 8, 1 ); InsertButton( *this, rtl::OUString( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("button")) ), mxActionListener, DIALOG_WIDTH / 2 - 25, nDialogHeight - 20, 50, 14, 2, STR_OK ); @@ -380,7 +380,7 @@ sal_Bool InformationDialog::execute() { UnoDialog::execute(); - if ( maSaveAsURL.getLength() ) + if ( !maSaveAsURL.isEmpty() ) { sal_Int16 nInt16 = 0; Any aAny( getControlProperty( TKGet( TK_OpenNewDocument ), TKGet( TK_State ) ) ); diff --git a/sdext/source/minimizer/optimizerdialog.cxx b/sdext/source/minimizer/optimizerdialog.cxx index 9aae49ebde27..a7076a025200 100644 --- a/sdext/source/minimizer/optimizerdialog.cxx +++ b/sdext/source/minimizer/optimizerdialog.cxx @@ -539,7 +539,7 @@ void ActionListener::actionPerformed( const ActionEvent& rEvent ) if ( xStorable.is() && xStorable->hasLocation() ) { rtl::OUString aLocation( xStorable->getLocation() ); - if ( aLocation.getLength() ) + if ( !aLocation.isEmpty() ) { sal_Int32 nIndex = aLocation.lastIndexOf( '/', aLocation.getLength() - 1 ); if ( nIndex >= 0 ) @@ -565,7 +565,7 @@ void ActionListener::actionPerformed( const ActionEvent& rEvent ) mrOptimizerDialog.SetConfigProperty( TK_SaveAsURL, Any( aSaveAsURL ) ); mrOptimizerDialog.SetConfigProperty( TK_FilterName, Any( aFileOpenDialog.getFilterName() ) ); } - if ( !aSaveAsURL.getLength() ) + if ( aSaveAsURL.isEmpty() ) { // something goes wrong... bSuccessfullyExecuted = sal_False; @@ -585,7 +585,7 @@ void ActionListener::actionPerformed( const ActionEvent& rEvent ) OUString aSettingsName; mrOptimizerDialog.getControlProperty( TKGet( TK_CheckBox1Pg4 ), TKGet( TK_State ) ) >>= nInt16; mrOptimizerDialog.getControlProperty( TKGet( TK_ComboBox0Pg4 ), TKGet( TK_Text ) ) >>= aSettingsName; - if ( nInt16 && aSettingsName.getLength() ) + if ( nInt16 && !aSettingsName.isEmpty() ) { std::vector< OptimizerSettings >::iterator aIter( mrOptimizerDialog.GetOptimizerSettingsByName( aSettingsName ) ); std::vector< OptimizerSettings >& rSettings( mrOptimizerDialog.GetOptimizerSettings() ); @@ -636,7 +636,7 @@ void ActionListener::actionPerformed( const ActionEvent& rEvent ) case TK_Button0Pg0 : // delete configuration { OUString aSelectedItem( mrOptimizerDialog.GetSelectedString( TK_ListBox0Pg0 ) ); - if ( aSelectedItem.getLength() ) + if ( !aSelectedItem.isEmpty() ) { std::vector< OptimizerSettings >::iterator aIter( mrOptimizerDialog.GetOptimizerSettingsByName( aSelectedItem ) ); std::vector< OptimizerSettings >& rList( mrOptimizerDialog.GetOptimizerSettings() ); @@ -661,7 +661,7 @@ void ActionListener::disposing( const ::com::sun::star::lang::EventObject& /* So void ActionListenerListBox0Pg0::actionPerformed( const ActionEvent& rEvent ) throw ( com::sun::star::uno::RuntimeException ) { - if ( rEvent.ActionCommand.getLength() ) + if ( !rEvent.ActionCommand.isEmpty() ) { std::vector< OptimizerSettings >::iterator aIter( mrOptimizerDialog.GetOptimizerSettingsByName( rEvent.ActionCommand ) ); std::vector< OptimizerSettings >& rList( mrOptimizerDialog.GetOptimizerSettings() ); diff --git a/sdext/source/minimizer/optimizerdialogcontrols.cxx b/sdext/source/minimizer/optimizerdialogcontrols.cxx index f1171467a5fb..b71ca83bb403 100644 --- a/sdext/source/minimizer/optimizerdialogcontrols.cxx +++ b/sdext/source/minimizer/optimizerdialogcontrols.cxx @@ -513,7 +513,7 @@ void OptimizerDialog::UpdateControlStatesPage2() aResolutionText = aResolutionItemList[ 2 ]; else if ( getString( STR_IMAGE_RESOLUTION_3 ).getToken( 0, ';', nI3 ).toInt32() == nImageResolution ) aResolutionText = aResolutionItemList[ 3 ]; - if ( !aResolutionText.getLength() ) + if ( aResolutionText.isEmpty() ) aResolutionText = OUString::valueOf( nImageResolution ); setControlProperty( TKGet( TK_RadioButton0Pg1 ), TKGet( TK_State ), Any( (sal_Int16)( bJPEGCompression != sal_True ) ) ); @@ -681,7 +681,7 @@ void OptimizerDialog::UpdateControlStatesPage4() } } } - if ( aCustomShowName.getLength() ) + if ( !aCustomShowName.isEmpty() ) { std::vector< Reference< XDrawPage > > vNonUsedPageList; PageCollector::CollectNonCustomShowPages( mxController->getModel(), aCustomShowName, vNonUsedPageList ); @@ -689,7 +689,7 @@ void OptimizerDialog::UpdateControlStatesPage4() } if ( GetConfigProperty( TK_DeleteHiddenSlides, sal_False ) ) { - if ( aCustomShowName.getLength() ) + if ( !aCustomShowName.isEmpty() ) { std::vector< Reference< XDrawPage > > vUsedPageList; PageCollector::CollectCustomShowPages( mxController->getModel(), aCustomShowName, vUsedPageList ); @@ -835,7 +835,7 @@ void OptimizerDialog::UpdateControlStatesPage4() } sal_Unicode nSeparator = '.'; OUString aStr( getString( STR_FILESIZESEPARATOR ) ); - if ( aStr.getLength() ) + if ( !aStr.isEmpty() ) nSeparator = aStr[ 0 ]; setControlProperty( TKGet( TK_FixedText7Pg4 ), TKGet( TK_Label ), Any( ImpValueOfInMB( nCurrentFileSize, nSeparator ) ) ); setControlProperty( TKGet( TK_FixedText8Pg4 ), TKGet( TK_Label ), Any( ImpValueOfInMB( nEstimatedFileSize, nSeparator ) ) ); @@ -917,7 +917,7 @@ void OptimizerDialog::InitPage4() if ( i == rList.size() ) aSettingsName = aTemp; } - while( !aSettingsName.getLength() ); + while( aSettingsName.isEmpty() ); setControlProperty( TKGet( TK_ComboBox0Pg4 ), TKGet( TK_Text ), Any( aSettingsName ) ); setControlProperty( TKGet( TK_RadioButton0Pg4 ), TKGet( TK_Enabled ), Any( !mbIsReadonly ) ); diff --git a/sdext/source/pdfimport/filterdet.cxx b/sdext/source/pdfimport/filterdet.cxx index 969f378e03a0..deb97dd006d0 100644 --- a/sdext/source/pdfimport/filterdet.cxx +++ b/sdext/source/pdfimport/filterdet.cxx @@ -395,7 +395,7 @@ rtl::OUString SAL_CALL PDFDetector::detect( uno::Sequence< beans::PropertyValue // check for hybrid PDF oslFileHandle aFile = NULL; if( bSuccess && - ( aURL.getLength() == 0 || aURL.compareToAscii( "file:", 5 ) != 0 ) + ( aURL.isEmpty() || aURL.compareToAscii( "file:", 5 ) != 0 ) ) { sal_uInt64 nWritten = 0; @@ -439,7 +439,7 @@ rtl::OUString SAL_CALL PDFDetector::detect( uno::Sequence< beans::PropertyValue xEmbedStream = getAdditionalStream( aURL, aEmbedMimetype, aPwd, m_xContext, rFilterData, false ); if( aFile ) osl_removeFile( aURL.pData ); - if( aEmbedMimetype.getLength() ) + if( !aEmbedMimetype.isEmpty() ) { if( aEmbedMimetype.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "application/vnd.oasis.opendocument.text" ) ) || aEmbedMimetype.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "application/vnd.oasis.opendocument.text-master" ) ) ) @@ -456,7 +456,7 @@ rtl::OUString SAL_CALL PDFDetector::detect( uno::Sequence< beans::PropertyValue if( bSuccess ) { - if( aOutFilterName.getLength() ) + if( !aOutFilterName.isEmpty() ) { if( nFilterNamePos == -1 ) { @@ -478,7 +478,7 @@ rtl::OUString SAL_CALL PDFDetector::detect( uno::Sequence< beans::PropertyValue rFilterData[nAttribs-1].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "EmbeddedSubstream" ) ); rFilterData[nAttribs-1].Value <<= xEmbedStream; } - if( aPwd.getLength() ) + if( !aPwd.isEmpty() ) { if( nPwdPos == -1 ) { @@ -686,7 +686,7 @@ uno::Reference< io::XStream > getAdditionalStream( const rtl::OUString& if( pPDFFile->isEncrypted() ) { bool bAuthenticated = false; - if( io_rPwd.getLength() ) + if( !io_rPwd.isEmpty() ) { rtl::OString aIsoPwd = rtl::OUStringToOString( io_rPwd, RTL_TEXTENCODING_ISO_8859_1 ); diff --git a/sdext/source/pdfimport/pdfparse/pdfentries.cxx b/sdext/source/pdfimport/pdfparse/pdfentries.cxx index 69c7662b025d..1283d10f05bc 100644 --- a/sdext/source/pdfimport/pdfparse/pdfentries.cxx +++ b/sdext/source/pdfimport/pdfparse/pdfentries.cxx @@ -1226,7 +1226,7 @@ static bool check_user_password( const OString& rPwd, PDFFileImplData* pData ) bool PDFFile::setupDecryptionData( const OString& rPwd ) const { if( !impl_getData()->m_bIsEncrypted ) - return rPwd.getLength() == 0; + return rPwd.isEmpty(); // check if we can handle this encryption at all if( ! m_pData->m_bStandardHandler || diff --git a/sdext/source/pdfimport/tree/pdfiprocessor.cxx b/sdext/source/pdfimport/tree/pdfiprocessor.cxx index 6d0e34e7da79..eb490d56a271 100644 --- a/sdext/source/pdfimport/tree/pdfiprocessor.cxx +++ b/sdext/source/pdfimport/tree/pdfiprocessor.cxx @@ -742,7 +742,7 @@ void PDFIProcessor::intersectEoClip(const uno::Reference< rendering::XPolyPolygo void PDFIProcessor::hyperLink( const geometry::RealRectangle2D& rBounds, const ::rtl::OUString& rURI ) { - if( rURI.getLength() ) + if( !rURI.isEmpty() ) { HyperlinkElement* pLink = m_pElFactory->createHyperlinkElement( &m_pCurPage->Hyperlinks, diff --git a/sdext/source/pdfimport/tree/style.cxx b/sdext/source/pdfimport/tree/style.cxx index 3fd8175a82c1..d917f91031ac 100644 --- a/sdext/source/pdfimport/tree/style.cxx +++ b/sdext/source/pdfimport/tree/style.cxx @@ -208,7 +208,7 @@ void StyleContainer::impl_emitStyle( sal_Int32 nStyleId, for( unsigned int n = 0; n < rStyle.SubStyles.size(); ++n ) impl_emitStyle( rStyle.SubStyles[n], rContext, rContainedElemVisitor ); - if( rStyle.Contents.getLength() ) + if( !rStyle.Contents.isEmpty() ) rContext.rEmitter.write( rStyle.Contents ); if( rStyle.ContainedElement ) rStyle.ContainedElement->visitedBy( rContainedElemVisitor, diff --git a/sdext/source/pdfimport/wrapper/wrapper.cxx b/sdext/source/pdfimport/wrapper/wrapper.cxx index b09b50482e82..807bcddb6c4e 100644 --- a/sdext/source/pdfimport/wrapper/wrapper.cxx +++ b/sdext/source/pdfimport/wrapper/wrapper.cxx @@ -621,7 +621,7 @@ void Parser::readFont() { } - if( !aResult.familyName.getLength() ) + if( aResult.familyName.isEmpty() ) { // last fallback aResult.familyName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Arial" ) ); @@ -936,7 +936,7 @@ static bool checkEncryption( const rtl::OUString& if( o_rIsEncrypted ) { bool bAuthenticated = false; - if( io_rPwd.getLength() ) + if( !io_rPwd.isEmpty() ) { rtl::OString aIsoPwd = rtl::OUStringToOString( io_rPwd, RTL_TEXTENCODING_ISO_8859_1 ); diff --git a/sdext/source/presenter/PresenterCanvasHelper.cxx b/sdext/source/presenter/PresenterCanvasHelper.cxx index 5dccb6cca5f2..ffc1d9923f2e 100644 --- a/sdext/source/presenter/PresenterCanvasHelper.cxx +++ b/sdext/source/presenter/PresenterCanvasHelper.cxx @@ -289,7 +289,7 @@ css::geometry::RealRectangle2D PresenterCanvasHelper::GetTextBoundingBox ( const ::rtl::OUString& rsText, const sal_Int8 nTextDirection) { - if (rxFont.is() && rsText.getLength() > 0) + if (rxFont.is() && !rsText.isEmpty()) { rendering::StringContext aContext (rsText, 0, rsText.getLength()); Reference xLayout ( diff --git a/sdext/source/presenter/PresenterComponent.cxx b/sdext/source/presenter/PresenterComponent.cxx index f44989d34cf2..bef0bfab544e 100644 --- a/sdext/source/presenter/PresenterComponent.cxx +++ b/sdext/source/presenter/PresenterComponent.cxx @@ -62,7 +62,7 @@ static OUString gsBasePath; const Reference& rxComponentContext, const OUString& rsExtensionIdentifier) { - if (gsBasePath.getLength() == 0) + if (gsBasePath.isEmpty()) { // Determine the base path of the bitmaps. Reference xInformationProvider ( diff --git a/sdext/source/presenter/PresenterConfigurationAccess.cxx b/sdext/source/presenter/PresenterConfigurationAccess.cxx index 36333b0d8ade..6fddb62fab06 100644 --- a/sdext/source/presenter/PresenterConfigurationAccess.cxx +++ b/sdext/source/presenter/PresenterConfigurationAccess.cxx @@ -185,7 +185,7 @@ Any PresenterConfigurationAccess::GetConfigurationNode ( const css::uno::Reference& rxNode, const OUString& sPathToNode) { - if (sPathToNode.getLength() == 0) + if (sPathToNode.isEmpty()) return Any(rxNode); try diff --git a/sdext/source/presenter/PresenterController.cxx b/sdext/source/presenter/PresenterController.cxx index 3a4b5f6b3b77..7d3352c7cdca 100644 --- a/sdext/source/presenter/PresenterController.cxx +++ b/sdext/source/presenter/PresenterController.cxx @@ -411,7 +411,7 @@ void PresenterController::UpdatePaneTitles (void) OUString sTemplate (IsAccessibilityActive() ? (*iPane)->msAccessibleTitleTemplate : (*iPane)->msTitleTemplate); - if (sTemplate.getLength() <= 0) + if (sTemplate.isEmpty()) continue; OUStringBuffer sResult; diff --git a/sdext/source/presenter/PresenterFrameworkObserver.cxx b/sdext/source/presenter/PresenterFrameworkObserver.cxx index 5d6a900bcc57..babaadfd7f1b 100644 --- a/sdext/source/presenter/PresenterFrameworkObserver.cxx +++ b/sdext/source/presenter/PresenterFrameworkObserver.cxx @@ -56,7 +56,7 @@ PresenterFrameworkObserver::PresenterFrameworkObserver ( if (mxConfigurationController->hasPendingRequests()) { - if (rsEventName.getLength() > 0) + if (!rsEventName.isEmpty()) { mxConfigurationController->addConfigurationChangeListener( this, diff --git a/sdext/source/presenter/PresenterHelpView.cxx b/sdext/source/presenter/PresenterHelpView.cxx index 45a365b34db3..253f39a772f0 100644 --- a/sdext/source/presenter/PresenterHelpView.cxx +++ b/sdext/source/presenter/PresenterHelpView.cxx @@ -601,7 +601,7 @@ void LineDescriptor::AddPart ( bool LineDescriptor::IsEmpty (void) const { - return msLine.getLength()==0; + return msLine.isEmpty(); } diff --git a/sdext/source/presenter/PresenterPaneBorderPainter.cxx b/sdext/source/presenter/PresenterPaneBorderPainter.cxx index 081f439e75d3..aca09fb06d93 100644 --- a/sdext/source/presenter/PresenterPaneBorderPainter.cxx +++ b/sdext/source/presenter/PresenterPaneBorderPainter.cxx @@ -585,7 +585,7 @@ void PresenterPaneBorderPainter::Renderer::PaintTitle ( if ( ! mxCanvas.is()) return; - if (rsTitle.getLength() == 0) + if (rsTitle.isEmpty()) return; Reference xFont (rpStyle->GetFont(mxCanvas)); @@ -688,7 +688,7 @@ void PresenterPaneBorderPainter::Renderer::PaintTitle ( // Get pane layout name for resource URL. const OUString sStyleName (mpTheme->GetStyleName(rsResourceURL)); - if (sStyleName.getLength() > 0) + if (!sStyleName.isEmpty()) sPaneStyleName = sStyleName; // Create a new pane style object and initialize it with bitmaps. diff --git a/sdext/source/presenter/PresenterPaneFactory.cxx b/sdext/source/presenter/PresenterPaneFactory.cxx index cd2aac55a744..326df4a83102 100644 --- a/sdext/source/presenter/PresenterPaneFactory.cxx +++ b/sdext/source/presenter/PresenterPaneFactory.cxx @@ -178,7 +178,7 @@ Reference SAL_CALL PresenterPaneFactory::createResource ( return NULL; const OUString sPaneURL (rxPaneId->getResourceURL()); - if (sPaneURL.getLength() == 0) + if (sPaneURL.isEmpty()) return NULL; if (mpResourceCache.get() != NULL) diff --git a/sdext/source/presenter/PresenterScreen.cxx b/sdext/source/presenter/PresenterScreen.cxx index fd12a38ae6da..ccda5f897527 100644 --- a/sdext/source/presenter/PresenterScreen.cxx +++ b/sdext/source/presenter/PresenterScreen.cxx @@ -764,7 +764,7 @@ void PresenterScreen::ProcessLayout ( rConfiguration.GetConfigurationNode( xLayoutNode, OUString(RTL_CONSTASCII_USTRINGPARAM("ParentLayout"))) >>= sParentLayout; - if (sParentLayout.getLength() > 0) + if (!sParentLayout.isEmpty()) { // Prevent infinite recursion. if (rsLayoutName != sParentLayout) @@ -898,7 +898,7 @@ void PresenterScreen::ProcessViewDescription ( rValues[1] >>= aViewDescriptor.msTitle; rValues[2] >>= aViewDescriptor.msAccessibleTitle; rValues[3] >>= aViewDescriptor.mbIsOpaque; - if (aViewDescriptor.msAccessibleTitle.getLength()==0) + if (aViewDescriptor.msAccessibleTitle.isEmpty()) aViewDescriptor.msAccessibleTitle = aViewDescriptor.msTitle; maViewDescriptors[sViewURL] = aViewDescriptor; } diff --git a/sdext/source/presenter/PresenterSlideSorter.cxx b/sdext/source/presenter/PresenterSlideSorter.cxx index 038b3830d1f4..e874002d0c3d 100644 --- a/sdext/source/presenter/PresenterSlideSorter.cxx +++ b/sdext/source/presenter/PresenterSlideSorter.cxx @@ -1833,7 +1833,7 @@ void PresenterSlideSorter::MouseOverManager::SetSlide ( if (xSlideProperties.is()) xSlideProperties->getPropertyValue(A2S("LinkDisplayName")) >>= msText; - if (msText.getLength() == 0) + if (msText.isEmpty()) msText = A2S("Slide ") + OUString::valueOf(nSlideIndex + 1); } } @@ -1884,7 +1884,7 @@ Reference PresenterSlideSorter::MouseOverManager::CreateBitm PaintButtonBackground(xBitmapCanvas, aLabelSize); // Paint the text. - if (sText.getLength() > 0) + if (!sText.isEmpty()) { const rendering::StringContext aContext (sText, 0, sText.getLength()); diff --git a/sdext/source/presenter/PresenterTheme.cxx b/sdext/source/presenter/PresenterTheme.cxx index 7ed83c9a495e..57c7ee37ba1f 100644 --- a/sdext/source/presenter/PresenterTheme.cxx +++ b/sdext/source/presenter/PresenterTheme.cxx @@ -365,7 +365,7 @@ OUString PresenterTheme::GetStyleName (const ::rtl::OUString& rsResourceURL) con { OUString sStyleName; ::boost::shared_ptr pTheme (mpTheme); - while (sStyleName.getLength()==0 && pTheme.get()!=NULL) + while (sStyleName.isEmpty() && pTheme.get()!=NULL) { sStyleName = pTheme->maStyleAssociations.GetStyleName(rsResourceURL); pTheme = pTheme->mpParentTheme; @@ -468,7 +468,7 @@ SharedBitmapDescriptor PresenterTheme::GetBitmap ( { if (mpTheme.get() != NULL) { - if (rsStyleName.getLength() == 0) + if (rsStyleName.isEmpty()) { if (rsBitmapName == A2S("Background")) { @@ -619,7 +619,7 @@ Reference PresenterTheme::FontDescriptor::CreateFont ( { rendering::FontRequest aFontRequest; aFontRequest.FontDescription.FamilyName = msFamilyName; - if (msFamilyName.getLength() == 0) + if (msFamilyName.isEmpty()) aFontRequest.FontDescription.FamilyName = A2S("Tahoma"); aFontRequest.FontDescription.StyleName = msStyleName; aFontRequest.CellSize = nCellSize; @@ -700,7 +700,7 @@ void PresenterTheme::Theme::Read ( OUString sParentThemeName; if ((PresenterConfigurationAccess::GetConfigurationNode(mxThemeRoot, A2S("ParentTheme")) >>= sParentThemeName) - && sParentThemeName.getLength()>0) + && !sParentThemeName.isEmpty()) { mpParentTheme = rReadContext.ReadTheme(rConfiguration, sParentThemeName); } @@ -710,7 +710,7 @@ void PresenterTheme::Theme::Read ( OUString sBitmapSourceExtension; if ((PresenterConfigurationAccess::GetConfigurationNode( mxThemeRoot, A2S("BitmapSourceExtension")) >>= sBitmapSourceExtension) - && sBitmapSourceExtension.getLength()>0) + && !sBitmapSourceExtension.isEmpty()) { rReadContext.SetBitmapSourceExtension(sBitmapSourceExtension); } @@ -913,11 +913,11 @@ Any ReadContext::GetByName ( ::boost::shared_ptr pTheme; OUString sCurrentThemeName (rsThemeName); - if (sCurrentThemeName.getLength() == 0) + if (sCurrentThemeName.isEmpty()) { // No theme name given. Look up the CurrentTheme property. rConfiguration.GetConfigurationNode(A2S("Presenter/CurrentTheme")) >>= sCurrentThemeName; - if (sCurrentThemeName.getLength() == 0) + if (sCurrentThemeName.isEmpty()) { // Still no name. Use "DefaultTheme". sCurrentThemeName = A2S("DefaultTheme"); @@ -931,9 +931,9 @@ Any ReadContext::GetByName ( { // Iterate over all themes and search the one with the given name. Sequence aKeys (xThemes->getElementNames()); - for (sal_Int32 nItemIndex=0; nItemIndex xTheme ( xThemes->getByName(rsKey), UNO_QUERY); if (xTheme.is()) diff --git a/sdext/source/presenter/PresenterToolBar.cxx b/sdext/source/presenter/PresenterToolBar.cxx index 1ac909840836..19abfd8f5e94 100644 --- a/sdext/source/presenter/PresenterToolBar.cxx +++ b/sdext/source/presenter/PresenterToolBar.cxx @@ -1283,7 +1283,7 @@ bool Element::SetState ( { do { - if (mpMode->msAction.getLength() <= 0) + if (mpMode->msAction.isEmpty()) break; if (mpToolBar.get() == NULL) @@ -1811,7 +1811,7 @@ void Text::Paint ( (void)rOffset; OSL_ASSERT(rxCanvas.is()); - if (msText.getLength() <= 0) + if (msText.isEmpty()) return; if (mpFont.get() == NULL) return; @@ -1854,7 +1854,7 @@ void Text::Paint ( geometry::RealRectangle2D Text::GetBoundingBox (const Reference& rxCanvas) { - if (mpFont.get() != NULL && msText.getLength() > 0) + if (mpFont.get() != NULL && !msText.isEmpty()) { if ( ! mpFont->mxFont.is()) mpFont->PrepareFont(rxCanvas); -- cgit v1.2.3