summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Hallot <olivier.hallot@alta.org.br>2012-01-31 17:53:23 -0200
committerOlivier Hallot <olivier.hallot@alta.org.br>2012-01-31 19:58:51 -0200
commit634820b3a8604dd1ed868ddeffc2501f3a0f056f (patch)
tree35e589865645f1bed6d73dc178a7249816f79440
parent0a112c96fd8077a027dac88510915eb93903748b (diff)
Fix for fdo43460 Part LVIII getLength() to isEmpty()
Part LVIII Modules vcl (part 2)
-rw-r--r--vcl/source/gdi/pdfwriter_impl2.cxx4
-rw-r--r--vcl/source/gdi/print3.cxx34
-rw-r--r--vcl/source/gdi/rendergraphic.cxx4
-rw-r--r--vcl/source/gdi/rendergraphicrasterizer.cxx2
-rw-r--r--vcl/source/window/menu.cxx8
-rw-r--r--vcl/source/window/msgbox.cxx2
-rw-r--r--vcl/source/window/printdlg.cxx26
-rw-r--r--vcl/source/window/status.cxx10
-rw-r--r--vcl/source/window/toolbox.cxx8
-rw-r--r--vcl/source/window/toolbox2.cxx2
-rw-r--r--vcl/source/window/window.cxx4
-rw-r--r--vcl/unx/generic/app/saldata.cxx2
-rw-r--r--vcl/unx/generic/app/sm.cxx2
-rw-r--r--vcl/unx/generic/app/wmadaptor.cxx6
-rw-r--r--vcl/unx/generic/dtrans/X11_selection.cxx6
15 files changed, 60 insertions, 60 deletions
diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx
index 0364a9f74d76..71378a6db2ee 100644
--- a/vcl/source/gdi/pdfwriter_impl2.cxx
+++ b/vcl/source/gdi/pdfwriter_impl2.cxx
@@ -1214,14 +1214,14 @@ uno::Reference< beans::XMaterialHolder > PDFWriterImpl::initEncryption( const rt
)
{
uno::Reference< beans::XMaterialHolder > xResult;
- if( i_rOwnerPassword.getLength() || i_rUserPassword.getLength() )
+ if( !i_rOwnerPassword.isEmpty() || !i_rUserPassword.isEmpty() )
{
EncHashTransporter* pTransporter = new EncHashTransporter;
xResult = pTransporter;
// get padded passwords
sal_uInt8 aPadUPW[ENCRYPTED_PWD_SIZE], aPadOPW[ENCRYPTED_PWD_SIZE];
- padPassword( i_rOwnerPassword.getLength() ? i_rOwnerPassword : i_rUserPassword, aPadOPW );
+ padPassword( i_rOwnerPassword.isEmpty() ? i_rUserPassword : i_rOwnerPassword, aPadOPW );
padPassword( i_rUserPassword, aPadUPW );
sal_Int32 nKeyLength = SECUR_40BIT_KEY;
if( b128Bit )
diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx
index 60b449ef8987..a51b039a286a 100644
--- a/vcl/source/gdi/print3.cxx
+++ b/vcl/source/gdi/print3.cxx
@@ -359,7 +359,7 @@ void Printer::ImplPrintJob( const boost::shared_ptr<PrinterController>& i_pContr
{
rtl::OUString aPagesVal;
pPagesVal->Value >>= aPagesVal;
- if( aPagesVal.getLength() )
+ if( !aPagesVal.isEmpty() )
{
// "Pages" attribute from API is now equivalent to "PageRange"
// AND "PrintContent" = 1 except calc where it is "PrintRange" = 1
@@ -384,7 +384,7 @@ void Printer::ImplPrintJob( const boost::shared_ptr<PrinterController>& i_pContr
rtl::OUString aRange;
if( pRangeVal )
pRangeVal->Value >>= aRange;
- if( aRange.getLength() == 0 )
+ if( aRange.isEmpty() )
{
sal_Int32 nPages = i_pController->getPageCount();
if( nPages > 0 )
@@ -442,7 +442,7 @@ void Printer::ImplPrintJob( const boost::shared_ptr<PrinterController>& i_pContr
if( aDlg.isPrintToFile() )
{
rtl::OUString aFile = queryFile( pController->getPrinter().get() );
- if( ! aFile.getLength() )
+ if( aFile.isEmpty() )
{
i_pController->abortJob();
return;
@@ -526,7 +526,7 @@ bool Printer::StartJob( const rtl::OUString& i_rJobName, boost::shared_ptr<vcl::
{
rtl::OUString aFile;
pFileValue->Value >>= aFile;
- if( aFile.getLength() )
+ if( !aFile.isEmpty() )
{
mbPrintFile = sal_True;
maPrintFile = aFile;
@@ -1336,7 +1336,7 @@ void PrinterController::setValue( const beans::PropertyValue& i_rValue )
void PrinterController::setUIOptions( const Sequence< beans::PropertyValue >& i_rOptions )
{
- DBG_ASSERT( mpImplData->maUIOptions.getLength() == 0, "setUIOptions called twice !" );
+ DBG_ASSERT( mpImplData->maUIOptions.isEmpty(), "setUIOptions called twice !" );
mpImplData->maUIOptions = i_rOptions;
@@ -1390,7 +1390,7 @@ void PrinterController::setUIOptions( const Sequence< beans::PropertyValue >& i_
{
mpImplData->maUIPropertyEnabled[ it->second ] = bIsEnabled;
}
- if( aDep.maDependsOnName.getLength() > 0 )
+ if( !aDep.maDependsOnName.isEmpty() )
mpImplData->maControlDependencies[ aPropName ] = aDep;
if( aChoicesDisabled.getLength() > 0 )
mpImplData->maChoiceDisableMap[ aPropName ] = aChoicesDisabled;
@@ -1707,15 +1707,15 @@ Any PrinterOptionsHelper::getUIControlOpt( const rtl::OUString& i_rTitle,
{
sal_Int32 nElements =
1 // ControlType
- + (i_rTitle.getLength() ? 1 : 0) // Text
+ + (i_rTitle.isEmpty() ? 0 : 1) // Text
+ (i_rHelpIds.getLength() ? 1 : 0) // HelpId
+ (i_pVal ? 1 : 0) // Property
+ i_rControlOptions.maAddProps.getLength() // additional props
- + (i_rControlOptions.maGroupHint.getLength() ? 1 : 0) // grouping
+ + (i_rControlOptions.maGroupHint.isEmpty() ? 0 : 1) // grouping
+ (i_rControlOptions.mbInternalOnly ? 1 : 0) // internal hint
+ (i_rControlOptions.mbEnabled ? 0 : 1) // enabled
;
- if( i_rControlOptions.maDependsOnName.getLength() )
+ if( !i_rControlOptions.maDependsOnName.isEmpty() )
{
nElements += 1;
if( i_rControlOptions.mnDependsOnEntry != -1 )
@@ -1726,7 +1726,7 @@ Any PrinterOptionsHelper::getUIControlOpt( const rtl::OUString& i_rTitle,
Sequence< PropertyValue > aCtrl( nElements );
sal_Int32 nUsed = 0;
- if( i_rTitle.getLength() )
+ if( !i_rTitle.isEmpty() )
{
aCtrl[nUsed ].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Text" ) );
aCtrl[nUsed++].Value = makeAny( i_rTitle );
@@ -1743,7 +1743,7 @@ Any PrinterOptionsHelper::getUIControlOpt( const rtl::OUString& i_rTitle,
aCtrl[nUsed ].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Property" ) );
aCtrl[nUsed++].Value = makeAny( *i_pVal );
}
- if( i_rControlOptions.maDependsOnName.getLength() )
+ if( !i_rControlOptions.maDependsOnName.isEmpty() )
{
aCtrl[nUsed ].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DependsOnName" ) );
aCtrl[nUsed++].Value = makeAny( i_rControlOptions.maDependsOnName );
@@ -1758,7 +1758,7 @@ Any PrinterOptionsHelper::getUIControlOpt( const rtl::OUString& i_rTitle,
aCtrl[nUsed++].Value = makeAny( i_rControlOptions.mbAttachToDependency );
}
}
- if( i_rControlOptions.maGroupHint.getLength() )
+ if( !i_rControlOptions.maGroupHint.isEmpty() )
{
aCtrl[nUsed ].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "GroupingHint" ) );
aCtrl[nUsed++].Value <<= i_rControlOptions.maGroupHint;
@@ -1786,7 +1786,7 @@ Any PrinterOptionsHelper::getUIControlOpt( const rtl::OUString& i_rTitle,
Any PrinterOptionsHelper::getGroupControlOpt( const rtl::OUString& i_rTitle, const rtl::OUString& i_rHelpId )
{
Sequence< rtl::OUString > aHelpId;
- if( i_rHelpId.getLength() > 0 )
+ if( !i_rHelpId.isEmpty() )
{
aHelpId.realloc( 1 );
*aHelpId.getArray() = i_rHelpId;
@@ -1800,7 +1800,7 @@ Any PrinterOptionsHelper::getSubgroupControlOpt( const rtl::OUString& i_rTitle,
)
{
Sequence< rtl::OUString > aHelpId;
- if( i_rHelpId.getLength() > 0 )
+ if( !i_rHelpId.isEmpty() )
{
aHelpId.realloc( 1 );
*aHelpId.getArray() = i_rHelpId;
@@ -1817,7 +1817,7 @@ Any PrinterOptionsHelper::getBoolControlOpt( const rtl::OUString& i_rTitle,
)
{
Sequence< rtl::OUString > aHelpId;
- if( i_rHelpId.getLength() > 0 )
+ if( !i_rHelpId.isEmpty() )
{
aHelpId.realloc( 1 );
*aHelpId.getArray() = i_rHelpId;
@@ -1876,7 +1876,7 @@ Any PrinterOptionsHelper::getRangeControlOpt( const rtl::OUString& i_rTitle,
}
Sequence< rtl::OUString > aHelpId;
- if( i_rHelpId.getLength() > 0 )
+ if( !i_rHelpId.isEmpty() )
{
aHelpId.realloc( 1 );
*aHelpId.getArray() = i_rHelpId;
@@ -1900,7 +1900,7 @@ Any PrinterOptionsHelper::getEditControlOpt( const rtl::OUString& i_rTitle,
)
{
Sequence< rtl::OUString > aHelpId;
- if( i_rHelpId.getLength() > 0 )
+ if( !i_rHelpId.isEmpty() )
{
aHelpId.realloc( 1 );
*aHelpId.getArray() = i_rHelpId;
diff --git a/vcl/source/gdi/rendergraphic.cxx b/vcl/source/gdi/rendergraphic.cxx
index 4f333cd1c5c0..e11993fc52f3 100644
--- a/vcl/source/gdi/rendergraphic.cxx
+++ b/vcl/source/gdi/rendergraphic.cxx
@@ -66,7 +66,7 @@ RenderGraphic::RenderGraphic( const rtl::OUString& rGraphicDataMimeType,
mnGraphicDataLength( nGraphicDataLength ),
maGraphicDataMimeType( rGraphicDataMimeType )
{
- if( rGraphicDataMimeType.getLength( ) && nGraphicDataLength )
+ if( !rGraphicDataMimeType.isEmpty( ) && nGraphicDataLength )
{
maGraphicData.reset( new sal_uInt8[ nGraphicDataLength ] );
@@ -113,7 +113,7 @@ bool RenderGraphic::operator==(const RenderGraphic& rRenderGraphic ) const
bool RenderGraphic::operator!() const
{
- return( ( 0 == maGraphicDataMimeType.getLength( ) ) ||
+ return( ( maGraphicDataMimeType.isEmpty( ) ) ||
( 0 == mnGraphicDataLength ) ||
!maGraphicData.get( ) );
}
diff --git a/vcl/source/gdi/rendergraphicrasterizer.cxx b/vcl/source/gdi/rendergraphicrasterizer.cxx
index 701457010d05..fda87c3384fb 100644
--- a/vcl/source/gdi/rendergraphicrasterizer.cxx
+++ b/vcl/source/gdi/rendergraphicrasterizer.cxx
@@ -243,7 +243,7 @@ void RenderGraphicRasterizer::InitializeRasterizer()
aServiceName = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( VCL_SERVICENAME_RASTERIZER_SVG ) );
}
- if( aServiceName.getLength() )
+ if( !aServiceName.isEmpty() )
{
mxRasterizer.set( xFactory->createInstance( aServiceName ), uno::UNO_QUERY );
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 0acbdfb01ab1..11c7d04c833b 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -844,7 +844,7 @@ static sal_Bool ImplHandleHelpEvent( Window* pMenuWindow, Menu* pMenu, sal_uInt1
// use help-index
String aCommand = pMenu->GetItemCommand( nId );
rtl::OString aHelpId( pMenu->GetHelpId( nId ) );
- if( ! aHelpId.getLength() )
+ if( aHelpId.isEmpty() )
aHelpId = OOO_HELP_INDEX;
if ( aCommand.Len() )
@@ -2012,7 +2012,7 @@ const XubString& Menu::ImplGetHelpText( sal_uInt16 nItemId ) const
if ( pData )
{
if ( !pData->aHelpText.Len() &&
- (( pData->aHelpId.getLength() ) || ( pData->aCommandStr.Len() )))
+ (( !pData->aHelpId.isEmpty() ) || ( pData->aCommandStr.Len() )))
{
Help* pHelp = Application::GetHelp();
if ( pHelp )
@@ -2020,7 +2020,7 @@ const XubString& Menu::ImplGetHelpText( sal_uInt16 nItemId ) const
if ( pData->aCommandStr.Len() )
pData->aHelpText = pHelp->GetHelpText( pData->aCommandStr, NULL );
- if( !pData->aHelpText.Len() && pData->aHelpId.getLength() )
+ if( !pData->aHelpText.Len() && !pData->aHelpId.isEmpty() )
pData->aHelpText = pHelp->GetHelpText( rtl::OStringToOUString( pData->aHelpId, RTL_TEXTENCODING_UTF8 ), NULL );
}
}
@@ -2070,7 +2070,7 @@ rtl::OString Menu::GetHelpId( sal_uInt16 nItemId ) const
if ( pData )
{
- if ( pData->aHelpId.getLength() )
+ if ( !pData->aHelpId.isEmpty() )
aRet = pData->aHelpId;
else
aRet = ::rtl::OUStringToOString( pData->aCommandStr, RTL_TEXTENCODING_UTF8 );
diff --git a/vcl/source/window/msgbox.cxx b/vcl/source/window/msgbox.cxx
index 5ffc6b055178..0efd9721cd25 100644
--- a/vcl/source/window/msgbox.cxx
+++ b/vcl/source/window/msgbox.cxx
@@ -222,7 +222,7 @@ MessBox::~MessBox()
void MessBox::ImplPosControls()
{
- if ( GetHelpId().getLength() )
+ if ( !GetHelpId().isEmpty() )
{
if ( !mbHelpBtn )
{
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index 06096839461b..74d6e08809dc 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -160,7 +160,7 @@ void PrintDialog::PrintPreviewWindow::Paint( const Rectangle& )
Point aOffset( (aSize.Width() - maPreviewSize.Width() + nTextHeight) / 2 ,
(aSize.Height() - maPreviewSize.Height() + nTextHeight) / 2 );
- if( maReplacementString.getLength() != 0 )
+ if( !maReplacementString.isEmpty() )
{
// replacement is active
Push();
@@ -266,7 +266,7 @@ void PrintDialog::PrintPreviewWindow::setPreview( const GDIMetaFile& i_rNewPrevi
String aNumText( rLocWrap.getNum( aLogicPaperSize.Width(), nDigits ) );
aBuf.append( aNumText );
aBuf.appendAscii( eUnit == MAP_MM ? "mm" : "in" );
- if( i_rPaperName.getLength() )
+ if( !i_rPaperName.isEmpty() )
{
aBuf.appendAscii( " (" );
aBuf.append( i_rPaperName );
@@ -991,7 +991,7 @@ void PrintDialog::readFromSettings()
// persistent window state
rtl::OUString aWinState( pItem->getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintDialog" ) ),
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "WindowState" ) ) ) );
- if( aWinState.getLength() )
+ if( !aWinState.isEmpty() )
SetWindowState( rtl::OUStringToOString( aWinState, RTL_TEXTENCODING_UTF8 ) );
if( maOptionsPage.maToFileBox.IsChecked() )
@@ -1179,11 +1179,11 @@ void PrintDialog::setupOptionalUI()
}
// bUseDependencyRow should only be true if a dependency exists
- bUseDependencyRow = bUseDependencyRow && (aDependsOnName.getLength() != 0);
+ bUseDependencyRow = bUseDependencyRow && !aDependsOnName.isEmpty();
// is it necessary to switch between static and dynamic pages ?
bool bSwitchPage = false;
- if( aGroupingHint.getLength() )
+ if( !aGroupingHint.isEmpty() )
bSwitchPage = true;
else if( aCtrlType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Subgroup" ) ) || (bOnStaticPage && ! bSubgroupOnStaticPage ) )
bSwitchPage = true;
@@ -1222,7 +1222,7 @@ void PrintDialog::setupOptionalUI()
pCurParent = &maNUpPage; // set layout page as current parent
bOnStaticPage = true;
}
- else if( aGroupingHint.getLength() )
+ else if( !aGroupingHint.isEmpty() )
{
pCurColumn = boost::dynamic_pointer_cast<vcl::RowOrColumn>(maJobPage.getLayout());
pCurParent = &maJobPage; // set job page as current parent
@@ -1231,7 +1231,7 @@ void PrintDialog::setupOptionalUI()
}
if( aCtrlType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Group" ) ) ||
- ( ! pCurParent && ! (bOnStaticPage || aGroupingHint.getLength() ) ) )
+ ( ! pCurParent && ! (bOnStaticPage || !aGroupingHint.isEmpty() ) ) )
{
// add new tab page
TabPage* pNewGroup = new TabPage( &maTabCtrl );
@@ -1252,9 +1252,9 @@ void PrintDialog::setupOptionalUI()
bSubgroupOnStaticPage = false;
bOnStaticPage = false;
}
- else if( aCtrlType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Subgroup" ) ) && (pCurParent || aGroupingHint.getLength() ) )
+ else if( aCtrlType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Subgroup" ) ) && (pCurParent || !aGroupingHint.isEmpty() ) )
{
- bSubgroupOnStaticPage = (aGroupingHint.getLength() != 0);
+ bSubgroupOnStaticPage = !aGroupingHint.isEmpty();
// create group FixedLine
if( ! aGroupingHint.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "PrintRange" ) ) ||
! pCurColumn->countElements() == 0
@@ -1365,7 +1365,7 @@ void PrintDialog::setupOptionalUI()
{
sal_Int32 nCurHelpText = 0;
boost::shared_ptr<vcl::RowOrColumn> pRadioColumn( pCurColumn );
- if( aText.getLength() )
+ if( !aText.isEmpty() )
{
// add a FixedText:
FixedText* pHeading = new FixedText( pCurParent );
@@ -1432,7 +1432,7 @@ void PrintDialog::setupOptionalUI()
aPropertyToDependencyRowMap.insert( std::pair< rtl::OUString, boost::shared_ptr<vcl::RowOrColumn> >( aPropertyName, pFieldColumn ) );
vcl::LabeledElement* pLabel = NULL;
- if( aText.getLength() )
+ if( !aText.isEmpty() )
{
// add a FixedText:
FixedText* pHeading = new FixedText( pCurParent, WB_VCENTER );
@@ -1719,7 +1719,7 @@ void PrintDialog::checkOptionalControlDependencies()
{
rtl::OUString aDep( maPController->getDependency( it->second ) );
// if the dependency is at least enabled, then enable this control anyway
- if( aDep.getLength() && maPController->isUIOptionEnabled( aDep ) )
+ if( !aDep.isEmpty() && maPController->isUIOptionEnabled( aDep ) )
bShouldbeEnabled = true;
}
}
@@ -2258,7 +2258,7 @@ void PrintDialog::makeEnabled( Window* i_pWindow )
if( it != maControlToPropertyMap.end() )
{
rtl::OUString aDependency( maPController->makeEnabled( it->second ) );
- if( aDependency.getLength() )
+ if( !aDependency.isEmpty() )
updateWindowFromProperty( aDependency );
}
}
diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx
index f04871936828..e7ffdffdcb4e 100644
--- a/vcl/source/window/status.cxx
+++ b/vcl/source/window/status.cxx
@@ -873,7 +873,7 @@ void StatusBar::RequestHelp( const HelpEvent& rHEvt )
String aCommand = GetItemCommand( nItemId );
rtl::OString aHelpId( GetHelpId( nItemId ) );
- if ( aCommand.Len() || aHelpId.getLength() )
+ if ( aCommand.Len() || !aHelpId.isEmpty() )
{
// Wenn eine Hilfe existiert, dann ausloesen
Help* pHelp = Application::GetHelp();
@@ -881,7 +881,7 @@ void StatusBar::RequestHelp( const HelpEvent& rHEvt )
{
if ( aCommand.Len() )
pHelp->Start( aCommand, this );
- else if ( aHelpId.getLength() )
+ else if ( !aHelpId.isEmpty() )
pHelp->Start( rtl::OStringToOUString( aHelpId, RTL_TEXTENCODING_UTF8 ), this );
}
return;
@@ -1266,14 +1266,14 @@ const XubString& StatusBar::GetHelpText( sal_uInt16 nItemId ) const
if ( nPos != STATUSBAR_ITEM_NOTFOUND )
{
ImplStatusItem* pItem = (*mpItemList)[ nPos ];
- if ( !pItem->maHelpText.Len() && ( pItem->maHelpId.getLength() || pItem->maCommand.Len() ))
+ if ( !pItem->maHelpText.Len() && ( !pItem->maHelpId.isEmpty() || pItem->maCommand.Len() ))
{
Help* pHelp = Application::GetHelp();
if ( pHelp )
{
if ( pItem->maCommand.Len() )
pItem->maHelpText = pHelp->GetHelpText( pItem->maCommand, this );
- if ( !pItem->maHelpText.Len() && pItem->maHelpId.getLength() )
+ if ( !pItem->maHelpText.Len() && !pItem->maHelpId.isEmpty() )
pItem->maHelpText = pHelp->GetHelpText( rtl::OStringToOUString( pItem->maHelpId, RTL_TEXTENCODING_UTF8 ), this );
}
}
@@ -1329,7 +1329,7 @@ rtl::OString StatusBar::GetHelpId( sal_uInt16 nItemId ) const
if ( nPos != STATUSBAR_ITEM_NOTFOUND )
{
ImplStatusItem* pItem = (*mpItemList)[ nPos ];
- if ( pItem->maHelpId.getLength() )
+ if ( !pItem->maHelpId.isEmpty() )
aRet = pItem->maHelpId;
else
aRet = ::rtl::OUStringToOString( pItem->maCommand, RTL_TEXTENCODING_UTF8 );
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 905f0fe66c8a..2cf7fe092884 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -4578,14 +4578,14 @@ const XubString& ToolBox::ImplGetHelpText( sal_uInt16 nItemId ) const
if ( pItem )
{
- if ( !pItem->maHelpText.Len() && ( pItem->maHelpId.getLength() || pItem->maCommandStr.Len() ))
+ if ( !pItem->maHelpText.Len() && ( !pItem->maHelpId.isEmpty() || pItem->maCommandStr.Len() ))
{
Help* pHelp = Application::GetHelp();
if ( pHelp )
{
if ( pItem->maCommandStr.Len() )
pItem->maHelpText = pHelp->GetHelpText( pItem->maCommandStr, this );
- if ( !pItem->maHelpText.Len() && pItem->maHelpId.getLength() )
+ if ( !pItem->maHelpText.Len() && !pItem->maHelpId.isEmpty() )
pItem->maHelpText = pHelp->GetHelpText( rtl::OStringToOUString( pItem->maHelpId, RTL_TEXTENCODING_UTF8 ), this );
}
}
@@ -4654,7 +4654,7 @@ void ToolBox::RequestHelp( const HelpEvent& rHEvt )
String aCommand = GetItemCommand( nItemId );
rtl::OString aHelpId( GetHelpId( nItemId ) );
- if ( aCommand.Len() || aHelpId.getLength() )
+ if ( aCommand.Len() || !aHelpId.isEmpty() )
{
// If help is available then trigger it
Help* pHelp = Application::GetHelp();
@@ -4662,7 +4662,7 @@ void ToolBox::RequestHelp( const HelpEvent& rHEvt )
{
if ( aCommand.Len() )
pHelp->Start( aCommand, this );
- else if ( aHelpId.getLength() )
+ else if ( !aHelpId.isEmpty() )
pHelp->Start( rtl::OStringToOUString( aHelpId, RTL_TEXTENCODING_UTF8 ), this );
}
return;
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index 067156b6131f..0925ed6dd483 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -1762,7 +1762,7 @@ rtl::OString ToolBox::GetHelpId( sal_uInt16 nItemId ) const
if ( pItem )
{
- if ( pItem->maHelpId.getLength() )
+ if ( !pItem->maHelpId.isEmpty() )
aRet = pItem->maHelpId;
else
aRet = ::rtl::OUStringToOString( pItem->maCommandStr, RTL_TEXTENCODING_UTF8 );
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 06f1efc586c6..662701b88c9f 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -8321,10 +8321,10 @@ uno::Reference< XDragSource > Window::GetDragSource()
aDropTargetAL[ 1 ] = makeAny( (sal_Size)(pEnvData->aShellWindow) );
aDropTargetAL[ 2 ] = makeAny( vcl::createBmpConverter() );
#endif
- if( aDragSourceSN.getLength() )
+ if( !aDragSourceSN.isEmpty() )
mpWindowImpl->mpFrameData->mxDragSource = uno::Reference< XDragSource > ( xFactory->createInstanceWithArguments( aDragSourceSN, aDragSourceAL ), UNO_QUERY );
- if( aDropTargetSN.getLength() )
+ if( !aDropTargetSN.isEmpty() )
mpWindowImpl->mpFrameData->mxDropTarget = uno::Reference< XDropTarget > ( xFactory->createInstanceWithArguments( aDropTargetSN, aDropTargetAL ), UNO_QUERY );
}
}
diff --git a/vcl/unx/generic/app/saldata.cxx b/vcl/unx/generic/app/saldata.cxx
index d4e8b74149ea..d1424762b946 100644
--- a/vcl/unx/generic/app/saldata.cxx
+++ b/vcl/unx/generic/app/saldata.cxx
@@ -449,7 +449,7 @@ void SalXLib::Init()
}
}
- if (!pDisp && !aDisplay.getLength())
+ if (!pDisp && aDisplay.isEmpty())
{
// Open $DISPLAY or default...
char *pDisplay = getenv("DISPLAY");
diff --git a/vcl/unx/generic/app/sm.cxx b/vcl/unx/generic/app/sm.cxx
index 68f1dfee52b5..1bb290cf5148 100644
--- a/vcl/unx/generic/app/sm.cxx
+++ b/vcl/unx/generic/app/sm.cxx
@@ -472,7 +472,7 @@ void SessionManagerClient::open()
SmcSaveCompleteProcMask |
SmcShutdownCancelledProcMask ,
&aCallbacks,
- rPrevId.getLength() ? const_cast<char*>(rPrevId.getStr()) : NULL,
+ rPrevId.isEmpty() ? NULL : const_cast<char*>(rPrevId.getStr()),
&pClientID,
sizeof( aErrBuf ),
aErrBuf );
diff --git a/vcl/unx/generic/app/wmadaptor.cxx b/vcl/unx/generic/app/wmadaptor.cxx
index 46df22686588..8145ef7cd91b 100644
--- a/vcl/unx/generic/app/wmadaptor.cxx
+++ b/vcl/unx/generic/app/wmadaptor.cxx
@@ -905,7 +905,7 @@ bool WMAdaptor::getWMshouldSwitchWorkspace() const
vcl::SettingsConfigItem* pItem = vcl::SettingsConfigItem::get();
rtl::OUString aSetting( pItem->getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "WM" ) ),
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ShouldSwitchWorkspace" ) ) ) );
- if( aSetting.getLength() == 0 )
+ if( aSetting.isEmpty() )
{
if( m_aWMName.EqualsAscii( "awesome" ) )
{
@@ -1008,12 +1008,12 @@ void WMAdaptor::setWMName( X11SalFrame* pFrame, const String& rWMName ) const
::rtl::OUString aCountry( pLocale->Country );
::rtl::OUString aVariant( pLocale->Variant );
- if( aCountry.getLength() )
+ if( !aCountry.isEmpty() )
{
aLocaleString += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_"));
aLocaleString += aCountry;
}
- if( aVariant.getLength() )
+ if( !aVariant.isEmpty() )
aLocaleString += aVariant;
aWMLocale = ::rtl::OUStringToOString( aLocaleString, RTL_TEXTENCODING_ISO_8859_1 );
}
diff --git a/vcl/unx/generic/dtrans/X11_selection.cxx b/vcl/unx/generic/dtrans/X11_selection.cxx
index 3e9da57b7e46..d557b88f7096 100644
--- a/vcl/unx/generic/dtrans/X11_selection.cxx
+++ b/vcl/unx/generic/dtrans/X11_selection.cxx
@@ -377,7 +377,7 @@ void SelectionManager::initialize( const Sequence< Any >& arguments ) throw (::c
OString aDisplayName( OUStringToOString( aUDisplay, RTL_TEXTENCODING_ISO_8859_1 ) );
- m_pDisplay = XOpenDisplay( aDisplayName.getLength() ? aDisplayName.getStr() : NULL );
+ m_pDisplay = XOpenDisplay( aDisplayName.isEmpty() ? NULL : aDisplayName.getStr());
if( m_pDisplay )
{
@@ -611,7 +611,7 @@ OString SelectionManager::convertToCompound( const OUString& rText )
* in these encodings the directly converted text does the
* trick, also.
*/
- if( ! aRet.getLength() && rText.getLength() )
+ if( aRet.isEmpty() && !rText.isEmpty() )
aRet = OUStringToOString( rText, osl_getThreadTextEncoding() );
#endif
}
@@ -708,7 +708,7 @@ SelectionManager& SelectionManager::get( const OUString& rDisplayName )
osl::MutexGuard aGuard( *osl::Mutex::getGlobalMutex() );
OUString aDisplayName( rDisplayName );
- if( ! aDisplayName.getLength() )
+ if( aDisplayName.isEmpty() )
aDisplayName = OStringToOUString( getenv( "DISPLAY" ), RTL_TEXTENCODING_ISO_8859_1 );
SelectionManager* pInstance = NULL;