summaryrefslogtreecommitdiff
path: root/sw/source/ui
diff options
context:
space:
mode:
authorOlivier Hallot <olivier.hallot@alta.org.br>2012-01-17 17:47:34 -0200
committerOlivier Hallot <olivier.hallot@alta.org.br>2012-01-17 19:07:47 -0200
commit964617156260cd157d4f39be01a5d3dec1c29a27 (patch)
tree403c4a06a8739adf8aa0befb75543e41b898601f /sw/source/ui
parent802d82b6e2acedd3581acbf23407d7f5f742c671 (diff)
Fix for fdo43460 Part XL getLength() to isEmpty()
Part XL Modules sw
Diffstat (limited to 'sw/source/ui')
-rw-r--r--sw/source/ui/app/docst.cxx2
-rw-r--r--sw/source/ui/chrdlg/chardlg.cxx2
-rw-r--r--sw/source/ui/config/mailconfigpage.cxx2
-rw-r--r--sw/source/ui/config/modcfg.cxx2
-rw-r--r--sw/source/ui/config/optcomp.cxx2
-rw-r--r--sw/source/ui/dbui/addresslistdialog.cxx10
-rw-r--r--sw/source/ui/dbui/customizeaddresslistdialog.cxx2
-rw-r--r--sw/source/ui/dbui/dbinsdlg.cxx4
-rw-r--r--sw/source/ui/dbui/dbmgr.cxx8
-rw-r--r--sw/source/ui/dbui/mailmergechildwindow.cxx8
-rw-r--r--sw/source/ui/dbui/mailmergehelper.cxx10
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.cxx4
-rw-r--r--sw/source/ui/dbui/mmconfigitem.cxx14
-rw-r--r--sw/source/ui/dbui/mmdocselectpage.cxx8
-rw-r--r--sw/source/ui/dbui/mmgreetingspage.cxx4
-rw-r--r--sw/source/ui/dbui/mmlayoutpage.cxx12
-rw-r--r--sw/source/ui/dbui/mmoutputpage.cxx6
-rw-r--r--sw/source/ui/dbui/selectdbtabledialog.cxx2
-rw-r--r--sw/source/ui/dialog/uiregionsw.cxx2
-rw-r--r--sw/source/ui/docvw/romenu.cxx2
-rw-r--r--sw/source/ui/envelp/label1.cxx2
-rw-r--r--sw/source/ui/envelp/labelcfg.cxx2
-rw-r--r--sw/source/ui/envelp/mailmrge.cxx2
-rw-r--r--sw/source/ui/fldui/flddb.cxx4
-rw-r--r--sw/source/ui/fldui/fldmgr.cxx6
-rw-r--r--sw/source/ui/lingu/hhcwrp.cxx2
-rw-r--r--sw/source/ui/lingu/olmenu.cxx14
-rw-r--r--sw/source/ui/shells/drformsh.cxx8
-rw-r--r--sw/source/ui/shells/grfshex.cxx2
-rw-r--r--sw/source/ui/uiview/srcview.cxx2
-rw-r--r--sw/source/ui/uiview/view2.cxx2
-rw-r--r--sw/source/ui/uiview/viewling.cxx4
-rw-r--r--sw/source/ui/uiview/viewprt.cxx2
-rw-r--r--sw/source/ui/uno/SwXDocumentSettings.cxx2
-rw-r--r--sw/source/ui/uno/swdetect.cxx2
-rw-r--r--sw/source/ui/uno/unoatxt.cxx4
-rw-r--r--sw/source/ui/uno/unodispatch.cxx4
-rw-r--r--sw/source/ui/uno/unomailmerge.cxx22
-rw-r--r--sw/source/ui/utlui/unotools.cxx2
-rw-r--r--sw/source/ui/vba/vbafield.cxx6
-rw-r--r--sw/source/ui/vba/vbafind.cxx2
-rw-r--r--sw/source/ui/vba/vbarange.cxx8
-rw-r--r--sw/source/ui/vba/vbaselection.cxx8
-rw-r--r--sw/source/ui/vba/vbastyle.cxx6
-rw-r--r--sw/source/ui/vba/vbastyles.cxx2
-rw-r--r--sw/source/ui/vba/vbasystem.cxx6
-rw-r--r--sw/source/ui/vba/vbatemplate.cxx4
-rw-r--r--sw/source/ui/wrtsh/wrtsh2.cxx4
-rw-r--r--sw/source/ui/wrtsh/wrtsh3.cxx4
-rw-r--r--sw/source/ui/wrtsh/wrtundo.cxx4
50 files changed, 124 insertions, 124 deletions
diff --git a/sw/source/ui/app/docst.cxx b/sw/source/ui/app/docst.cxx
index 48dc2c5ab240..74bd20eb9e09 100644
--- a/sw/source/ui/app/docst.cxx
+++ b/sw/source/ui/app/docst.cxx
@@ -321,7 +321,7 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
xStyles->getByName( pNameItem->GetValue() ) >>= xInfo;
::rtl::OUString aUIName;
xInfo->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DisplayName")) ) >>= aUIName;
- if ( aUIName.getLength() )
+ if ( !aUIName.isEmpty() )
rReq.AppendItem( SfxStringItem( SID_STYLE_APPLY, aUIName ) );
}
catch (const uno::Exception&)
diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx
index 3040979a3153..14a9bc439ae2 100644
--- a/sw/source/ui/chrdlg/chardlg.cxx
+++ b/sw/source/ui/chrdlg/chardlg.cxx
@@ -271,7 +271,7 @@ void SwCharURLPage::Reset(const SfxItemSet& rSet)
sal_Bool SwCharURLPage::FillItemSet(SfxItemSet& rSet)
{
::rtl::OUString sURL = aURLED.GetText();
- if(sURL.getLength())
+ if(!sURL.isEmpty())
{
sURL = URIHelper::SmartRel2Abs(INetURLObject(), sURL, Link(), false );
// #i100683# file URLs should be normalized in the UI
diff --git a/sw/source/ui/config/mailconfigpage.cxx b/sw/source/ui/config/mailconfigpage.cxx
index f423f01fd7dc..d4ab549a8e52 100644
--- a/sw/source/ui/config/mailconfigpage.cxx
+++ b/sw/source/ui/config/mailconfigpage.cxx
@@ -382,7 +382,7 @@ void SwTestAccountSettingsDialog::Test()
uno::Reference<XAuthenticator> xAuthenticator;
if(m_pParent->m_pConfigItem->IsAuthentication() &&
!m_pParent->m_pConfigItem->IsSMTPAfterPOP() &&
- m_pParent->m_pConfigItem->GetMailUserName().getLength())
+ !m_pParent->m_pConfigItem->GetMailUserName().isEmpty())
xAuthenticator =
new SwAuthenticator(
m_pParent->m_pConfigItem->GetMailUserName(),
diff --git a/sw/source/ui/config/modcfg.cxx b/sw/source/ui/config/modcfg.cxx
index af6d32842c3e..8470b95fa2e0 100644
--- a/sw/source/ui/config/modcfg.cxx
+++ b/sw/source/ui/config/modcfg.cxx
@@ -1121,7 +1121,7 @@ void SwInsertConfig::Load()
//#i61007# initialize caption order, right now only HUNGARIAN seems to need a different order
SvtSysLocaleOptions aSysLocaleOptions;
OUString sLang = aSysLocaleOptions.GetLocaleConfigString();
- bCaptionOrderNumberingFirst = ( sLang.getLength() && sLang.matchAsciiL( "hu", 2 )) ? sal_True : sal_False;
+ bCaptionOrderNumberingFirst = ( !sLang.isEmpty() && sLang.matchAsciiL( "hu", 2 )) ? sal_True : sal_False;
}
}
diff --git a/sw/source/ui/config/optcomp.cxx b/sw/source/ui/config/optcomp.cxx
index 626190427e82..9fc64969b7a2 100644
--- a/sw/source/ui/config/optcomp.cxx
+++ b/sw/source/ui/config/optcomp.cxx
@@ -349,7 +349,7 @@ void SwCompatibilityOptPage::InitControls( const SfxItemSet& rSet )
if ( sName.equals( USER_ENTRY ) )
sNewEntry = m_sUserEntry;
- else if ( pObjShell && sName.getLength() > 0 )
+ else if ( pObjShell && !sName.isEmpty() )
{
SfxFilterContainer* pFacCont = pObjShell->GetFactory().GetFilterContainer();
const SfxFilter* pFilter = pFacCont->GetFilter4FilterName( sName );
diff --git a/sw/source/ui/dbui/addresslistdialog.cxx b/sw/source/ui/dbui/addresslistdialog.cxx
index af1856406b81..e0d3ddbf617e 100644
--- a/sw/source/ui/dbui/addresslistdialog.cxx
+++ b/sw/source/ui/dbui/addresslistdialog.cxx
@@ -257,7 +257,7 @@ SwAddressListDialog::SwAddressListDialog(SwMailMergeAddressBlockPage* pParent) :
{
m_xDBContext->getByName(pNames[nName]) >>= xSourceProperties;
pUserData->sURL = lcl_getFlatURL( xSourceProperties );
- bEnableEdit = pUserData->sURL.getLength() > 0 &&
+ bEnableEdit = !pUserData->sURL.isEmpty() &&
SWUnoHelper::UCB_IsFile( pUserData->sURL ) && //#i97577#
!SWUnoHelper::UCB_IsReadOnlyFileName( pUserData->sURL );
}
@@ -324,7 +324,7 @@ IMPL_LINK(SwAddressListDialog, FilterHdl_Impl, PushButton*, EMPTYARG)
::rtl::OUString sQuery;
xRowProperties->getPropertyValue(C2U("ActiveCommand"))>>= sQuery;
xComposer->setQuery(sQuery);
- if(pUserData->sFilter.getLength())
+ if(!pUserData->sFilter.isEmpty())
xComposer->setFilter(pUserData->sFilter);
aFirst.Value <<= xComposer;
@@ -458,7 +458,7 @@ IMPL_LINK(SwAddressListDialog, EditHdl_Impl, PushButton*, pButton)
{
SvLBoxEntry* pEntry = m_aListLB.FirstSelected();
AddressUserData_Impl* pUserData = pEntry ? static_cast<AddressUserData_Impl*>(pEntry->GetUserData()) : 0;
- if(pUserData && pUserData->sURL.getLength())
+ if(pUserData && !pUserData->sURL.isEmpty())
{
if(pUserData->xResultSet.is())
{
@@ -543,7 +543,7 @@ IMPL_STATIC_LINK(SwAddressListDialog, StaticListBoxSelectHdl_Impl, SvLBoxEntry*,
if(sTable == pThis->m_sConnecting)
pThis->m_aListLB.SetEntryText(String(), pSelect, ITEMID_TABLE - 1);
}
- pThis->m_aEditPB.Enable(pUserData && pUserData->sURL.getLength() &&
+ pThis->m_aEditPB.Enable(pUserData && !pUserData->sURL.isEmpty() &&
SWUnoHelper::UCB_IsFile( pUserData->sURL ) && //#i97577#
!SWUnoHelper::UCB_IsReadOnlyFileName( pUserData->sURL ) );
pThis->m_bInSelectHdl = false;
@@ -622,7 +622,7 @@ void SwAddressListDialog::DetectTablesAndQueries(
}
}
}
- if ( m_aDBData.sCommand.getLength() )
+ if ( !m_aDBData.sCommand.isEmpty() )
{
uno::Reference<beans::XPropertySet> xSourceProperties;
m_xDBContext->getByName(m_aDBData.sDataSource) >>= xSourceProperties;
diff --git a/sw/source/ui/dbui/customizeaddresslistdialog.cxx b/sw/source/ui/dbui/customizeaddresslistdialog.cxx
index e7e6c920e47b..8f6e0e28404e 100644
--- a/sw/source/ui/dbui/customizeaddresslistdialog.cxx
+++ b/sw/source/ui/dbui/customizeaddresslistdialog.cxx
@@ -227,7 +227,7 @@ SwAddRenameEntryDialog::~SwAddRenameEntryDialog()
IMPL_LINK(SwAddRenameEntryDialog, ModifyHdl_Impl, Edit*, pEdit)
{
::rtl::OUString sEntry = pEdit->GetText();
- sal_Bool bFound = sEntry.getLength() ? sal_False : sal_True;
+ sal_Bool bFound = sEntry.isEmpty();
if(!bFound)
{
diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx
index 47fa5297fdde..5a7f3dcf95da 100644
--- a/sw/source/ui/dbui/dbinsdlg.cxx
+++ b/sw/source/ui/dbui/dbinsdlg.cxx
@@ -818,7 +818,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, SelectHdl, ListBox*, pBox )
if( pBox == &aLbDbFmtFromUsr )
{
- if( aSrch.sColumn.getLength() )
+ if( !aSrch.sColumn.isEmpty() )
{
aOldNumFmtLnk.Call( pBox );
aDBColumns[ nFndPos ]->nUsrNumFmt = aLbDbFmtFromUsr.GetFormat();
@@ -829,7 +829,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, SelectHdl, ListBox*, pBox )
// set the selected FieldName at the FormatGroupBox, so that
// it's clear what field is configured by the format!
String sTxt( aFlFormat.GetText().Copy( 0, nGBFmtLen ));
- if( !aSrch.sColumn.getLength() )
+ if( aSrch.sColumn.isEmpty() )
{
aRbDbFmtFromDb.Enable( sal_False );
aRbDbFmtFromUsr.Enable( sal_False );
diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx
index 9b184c865b56..c309595b97ce 100644
--- a/sw/source/ui/dbui/dbmgr.cxx
+++ b/sw/source/ui/dbui/dbmgr.cxx
@@ -345,7 +345,7 @@ sal_Bool SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc )
if ( rMergeDesc.rDescriptor.has(daConnection) )
rMergeDesc.rDescriptor[daConnection] >>= xConnection;
- if(!aData.sDataSource.getLength() || !aData.sCommand.getLength() || !xResSet.is())
+ if(aData.sDataSource.isEmpty() || aData.sCommand.isEmpty() || !xResSet.is())
{
return sal_False;
}
@@ -621,7 +621,7 @@ sal_Bool SwNewDBMgr::GetTableNames(ListBox* pListBox, const String& rDBName)
else
{
rtl::OUString sDBName(rDBName);
- if ( sDBName.getLength() )
+ if ( !sDBName.isEmpty() )
xConnection = RegisterConnection( sDBName );
}
if(xConnection.is())
@@ -2411,7 +2411,7 @@ void SwNewDBMgr::ExecuteFormLetter( SwWrtShell& rSh,
if ( aDescriptor.has(daConnection) )
aDescriptor[daConnection] >>= xConnection;
- if(!sDataSource.getLength() || !sDataTableOrQuery.getLength())
+ if(sDataSource.isEmpty() || sDataTableOrQuery.isEmpty())
{
OSL_FAIL("PropertyValues missing or unset");
return;
@@ -2574,7 +2574,7 @@ void SwNewDBMgr::InsertText(SwWrtShell& rSh,
else if(pValues[nPos].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(cActiveConnection)))
pValues[nPos].Value >>= xConnection;
}
- if(!sDataSource.getLength() || !sDataTableOrQuery.getLength() || !xResSet.is())
+ if(sDataSource.isEmpty() || sDataTableOrQuery.isEmpty() || !xResSet.is())
{
OSL_FAIL("PropertyValues missing or unset");
return;
diff --git a/sw/source/ui/dbui/mailmergechildwindow.cxx b/sw/source/ui/dbui/mailmergechildwindow.cxx
index f76e1dd7f831..326679f5a045 100644
--- a/sw/source/ui/dbui/mailmergechildwindow.cxx
+++ b/sw/source/ui/dbui/mailmergechildwindow.cxx
@@ -242,7 +242,7 @@ void SwMailDispatcherListener_Impl::DeleteAttachments( uno::Reference< mail::XMa
{
::rtl::OUString sURL;
xTransferableProperties->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("URL")) ) >>= sURL;
- if(sURL.getLength())
+ if(!sURL.isEmpty())
SWUnoHelper::UCB_DeleteFile( sURL );
}
}
@@ -579,7 +579,7 @@ void SwSendMailDialog::IterateMails()
pMessage->addRecipient( pCurrentMailDescriptor->sEMail );
pMessage->SetSenderName( m_pConfigItem->GetMailDisplayName() );
pMessage->SetSenderAddress( m_pConfigItem->GetMailAddress() );
- if(pCurrentMailDescriptor->sAttachmentURL.getLength())
+ if(!pCurrentMailDescriptor->sAttachmentURL.isEmpty())
{
mail::MailAttachment aAttach;
aAttach.Data =
@@ -598,7 +598,7 @@ void SwSendMailDialog::IterateMails()
pMessage->setBody( xBody );
//CC and BCC are tokenized by ';'
- if(pCurrentMailDescriptor->sCC.getLength())
+ if(!pCurrentMailDescriptor->sCC.isEmpty())
{
String sTokens( pCurrentMailDescriptor->sCC );
sal_uInt16 nTokens = comphelper::string::getTokenCount(sTokens, ';');
@@ -610,7 +610,7 @@ void SwSendMailDialog::IterateMails()
pMessage->addCcRecipient( sTmp );
}
}
- if(pCurrentMailDescriptor->sBCC.getLength())
+ if(!pCurrentMailDescriptor->sBCC.isEmpty())
{
String sTokens( pCurrentMailDescriptor->sBCC );
sal_uInt16 nTokens = comphelper::string::getTokenCount(sTokens, ';');
diff --git a/sw/source/ui/dbui/mailmergehelper.cxx b/sw/source/ui/dbui/mailmergehelper.cxx
index 13d7705a7181..95633289aaf3 100644
--- a/sw/source/ui/dbui/mailmergehelper.cxx
+++ b/sw/source/ui/dbui/mailmergehelper.cxx
@@ -148,7 +148,7 @@ uno::Reference< mail::XSmtpService > ConnectToSmtpServer(
uno::Reference< mail::XAuthenticator> xAuthenticator;
if(rConfigItem.IsAuthentication() &&
!rConfigItem.IsSMTPAfterPOP() &&
- rConfigItem.GetMailUserName().getLength())
+ !rConfigItem.GetMailUserName().isEmpty())
{
String sPasswd = rConfigItem.GetMailPassword();
if(rOutMailServerPassword.Len())
@@ -479,7 +479,7 @@ String SwAddressPreview::FillData(
sal_Bool bIncludeCountry = rConfigItem.IsIncludeCountry();
const ::rtl::OUString rExcludeCountry = rConfigItem.GetExcludeCountry();
- bool bSpecialReplacementForCountry = (!bIncludeCountry || rExcludeCountry.getLength());
+ bool bSpecialReplacementForCountry = (!bIncludeCountry || !rExcludeCountry.isEmpty());
String sCountryColumn;
if( bSpecialReplacementForCountry )
{
@@ -506,7 +506,7 @@ String SwAddressPreview::FillData(
++nColumn)
{
if(rDefHeaders.GetString(nColumn) == aItem.sText &&
- pAssignment[nColumn].getLength())
+ !pAssignment[nColumn].isEmpty())
{
sConvertedColumn = pAssignment[nColumn];
break;
@@ -528,7 +528,7 @@ String SwAddressPreview::FillData(
if( bSpecialReplacementForCountry && sCountryColumn == sConvertedColumn )
{
- if( rExcludeCountry.getLength() && sReplace != rExcludeCountry )
+ if( !rExcludeCountry.isEmpty() && sReplace != rExcludeCountry )
aItem.sText = sReplace;
else
aItem.sText.Erase();
@@ -617,7 +617,7 @@ OUString SwAuthenticator::getUserName( ) throw (RuntimeException)
OUString SwAuthenticator::getPassword( ) throw (RuntimeException)
{
- if(m_aUserName.getLength() && !m_aPassword.getLength() && m_pParentWindow)
+ if(!m_aUserName.isEmpty() && m_aPassword.isEmpty() && m_pParentWindow)
{
SfxPasswordDialog* pPasswdDlg =
new SfxPasswordDialog( m_pParentWindow );
diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx
index 3116244765bb..b5aa5de8b0a6 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.cxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.cxx
@@ -430,7 +430,7 @@ void SwSelectAddressBlockDialog::SetSettings(
{
if(bIsCountry)
{
- rCountry.getLength() ? m_aDependentRB.Check() : m_aAlwaysRB.Check();
+ !rCountry.isEmpty() ? m_aDependentRB.Check() : m_aAlwaysRB.Check();
m_aCountryED.SetText(rCountry);
}
else
@@ -1052,7 +1052,7 @@ SwAssignFieldsControl::SwAssignFieldsControl(
FixedInfo* pNewPreview = new FixedInfo(&m_aWindow, ResId( FT_PREVIEW, *rResId.GetResMgr() ));
//select the ListBox
//if there is an assignment
- if(aAssignments.getLength() > i && aAssignments[i].getLength())
+ if(aAssignments.getLength() > i && !aAssignments[i].isEmpty())
pNewLB->SelectEntry(aAssignments[i]);
else //otherwise the current column name may match one of the db columns
pNewLB->SelectEntry(rHeader);
diff --git a/sw/source/ui/dbui/mmconfigitem.cxx b/sw/source/ui/dbui/mmconfigitem.cxx
index e21456916adc..948af5e1f0a5 100644
--- a/sw/source/ui/dbui/mmconfigitem.cxx
+++ b/sw/source/ui/dbui/mmconfigitem.cxx
@@ -601,7 +601,7 @@ void SwMailMergeConfigItem_Impl::Commit()
if(aAssignIter->bColumnAssignmentsChanged)
{
//create a new node name
- OUString sNewNode = aAssignIter->sConfigNodeName.getLength() ?
+ OUString sNewNode = !aAssignIter->sConfigNodeName.isEmpty() ?
aAssignIter->sConfigNodeName :
lcl_CreateNodeName(aAssignments);
OUString sSlash = C2U("/");
@@ -896,7 +896,7 @@ void SwMailMergeConfigItem::SetCurrentDBData( const SwDBData& rDBData)
Reference< XResultSet> SwMailMergeConfigItem::GetResultSet() const
{
- if(!m_pImpl->xConnection.is() && m_pImpl->aDBData.sDataSource.getLength())
+ if(!m_pImpl->xConnection.is() && !m_pImpl->aDBData.sDataSource.isEmpty())
{
m_pImpl->xConnection.reset(
SwNewDBMgr::GetConnection( m_pImpl->aDBData.sDataSource, m_pImpl->xSource ),
@@ -920,7 +920,7 @@ Reference< XResultSet> SwMailMergeConfigItem::GetResultSet() const
xRowProperties->setPropertyValue(C2U("ActiveConnection"), makeAny(m_pImpl->xConnection.getTyped()));
try
{
- xRowProperties->setPropertyValue(C2U("ApplyFilter"), makeAny(m_pImpl->sFilter.getLength()>0));
+ xRowProperties->setPropertyValue(C2U("ApplyFilter"), makeAny(!m_pImpl->sFilter.isEmpty()));
xRowProperties->setPropertyValue(C2U("Filter"), makeAny(m_pImpl->sFilter));
}
catch (const Exception&)
@@ -966,7 +966,7 @@ void SwMailMergeConfigItem::SetFilter(::rtl::OUString& rFilter)
{
try
{
- xRowProperties->setPropertyValue(C2U("ApplyFilter"), makeAny(m_pImpl->sFilter.getLength()>0));
+ xRowProperties->setPropertyValue(C2U("ApplyFilter"), makeAny(!m_pImpl->sFilter.isEmpty()));
xRowProperties->setPropertyValue(C2U("Filter"), makeAny(m_pImpl->sFilter));
uno::Reference<XRowSet> xRowSet( m_pImpl->xResultSet, UNO_QUERY_THROW );
xRowSet->execute();
@@ -1260,7 +1260,7 @@ Sequence< ::rtl::OUString> SwMailMergeConfigItem::GetColumnAssignment(
{
::rtl::OUString sRet;
Sequence< ::rtl::OUString> aAssignment = GetColumnAssignment( m_pImpl->aDBData );
- if(aAssignment.getLength() > sal::static_int_cast< sal_Int32, sal_uInt32>(nColumn) && aAssignment[nColumn].getLength())
+ if(aAssignment.getLength() > sal::static_int_cast< sal_Int32, sal_uInt32>(nColumn) && !aAssignment[nColumn].isEmpty())
sRet = aAssignment[nColumn];
else if(nColumn < m_pImpl->m_AddressHeaderSA.Count())
sRet = m_pImpl->m_AddressHeaderSA.GetString(nColumn);
@@ -1326,7 +1326,7 @@ bool SwMailMergeConfigItem::IsAddressFieldsAssigned() const
++nColumn)
{
if(rHeaders.GetString(nColumn) == aItem.sText &&
- pAssignment[nColumn].getLength())
+ !pAssignment[nColumn].isEmpty())
{
sConvertedColumn = pAssignment[nColumn];
break;
@@ -1385,7 +1385,7 @@ bool SwMailMergeConfigItem::IsGreetingFieldsAssigned() const
++nColumn)
{
if(rHeaders.GetString(nColumn) == aItem.sText &&
- pAssignment[nColumn].getLength())
+ !pAssignment[nColumn].isEmpty())
{
sConvertedColumn = pAssignment[nColumn];
break;
diff --git a/sw/source/ui/dbui/mmdocselectpage.cxx b/sw/source/ui/dbui/mmdocselectpage.cxx
index d94e5ceeda60..229ef6866790 100644
--- a/sw/source/ui/dbui/mmdocselectpage.cxx
+++ b/sw/source/ui/dbui/mmdocselectpage.cxx
@@ -188,15 +188,15 @@ sal_Bool SwMailMergeDocSelectPage::commitPage( ::svt::WizardTypes::CommitPageRea
::rtl::OUString sReloadDocument;
bReturn = m_aCurrentDocRB.IsChecked() ||
m_aNewDocRB.IsChecked() ||
- ((sReloadDocument = m_sLoadFileName).getLength() && m_aLoadDocRB.IsChecked() )||
- ((sReloadDocument = m_sLoadTemplateName).getLength() && m_aLoadTemplateRB.IsChecked())||
- (m_aRecentDocRB.IsChecked() && (sReloadDocument = m_aRecentDocLB.GetSelectEntry()).getLength());
+ (!(sReloadDocument = m_sLoadFileName).isEmpty() && m_aLoadDocRB.IsChecked() )||
+ (!(sReloadDocument = m_sLoadTemplateName).isEmpty() && m_aLoadTemplateRB.IsChecked())||
+ (m_aRecentDocRB.IsChecked() && !(sReloadDocument = m_aRecentDocLB.GetSelectEntry()).isEmpty());
if( _eReason == ::svt::WizardTypes::eValidate )
m_pWizard->SetDocumentLoad(!m_aCurrentDocRB.IsChecked());
if(bNext && !m_aCurrentDocRB.IsChecked())
{
- if(sReloadDocument.getLength())
+ if(!sReloadDocument.isEmpty())
m_pWizard->SetReloadDocument( sReloadDocument );
m_pWizard->SetRestartPage(MM_OUTPUTTYPETPAGE);
m_pWizard->EndDialog(RET_LOAD_DOC);
diff --git a/sw/source/ui/dbui/mmgreetingspage.cxx b/sw/source/ui/dbui/mmgreetingspage.cxx
index bc899800c38d..9e5e038db678 100644
--- a/sw/source/ui/dbui/mmgreetingspage.cxx
+++ b/sw/source/ui/dbui/mmgreetingspage.cxx
@@ -177,7 +177,7 @@ void SwMailMergeGreetingsPage::UpdatePreview()
::rtl::OUString sFemaleColumn = m_aFemaleColumnLB.GetSelectEntry();
Reference< sdbcx::XColumnsSupplier > xColsSupp( m_pWizard->GetConfigItem().GetResultSet(), UNO_QUERY);
Reference < container::XNameAccess> xColAccess = xColsSupp.is() ? xColsSupp->getColumns() : 0;
- if(sFemaleValue.getLength() && sFemaleColumn.getLength() &&
+ if(!sFemaleValue.isEmpty() && !sFemaleColumn.isEmpty() &&
xColAccess.is() &&
xColAccess->hasByName(sFemaleColumn))
{
@@ -202,7 +202,7 @@ void SwMailMergeGreetingsPage::UpdatePreview()
aCol = xColAccess->getByName(sLastNameColumn);
aCol >>= xColumn;
::rtl::OUString sLastNameColumnValue = xColumn->getString();
- bNoValue = !sLastNameColumnValue.getLength();
+ bNoValue = sLastNameColumnValue.isEmpty();
}
}
}
diff --git a/sw/source/ui/dbui/mmlayoutpage.cxx b/sw/source/ui/dbui/mmlayoutpage.cxx
index 7f82a9ccc245..5baa5106d765 100644
--- a/sw/source/ui/dbui/mmlayoutpage.cxx
+++ b/sw/source/ui/dbui/mmlayoutpage.cxx
@@ -348,14 +348,14 @@ SwFrmFmt* SwMailMergeLayoutPage::InsertAddressFrame(
sal_Bool bIncludeCountry = rConfigItem.IsIncludeCountry();
sal_Bool bHideEmptyParagraphs = rConfigItem.IsHideEmptyParagraphs();
const ::rtl::OUString rExcludeCountry = rConfigItem.GetExcludeCountry();
- bool bSpecialReplacementForCountry = (!bIncludeCountry || rExcludeCountry.getLength());
+ bool bSpecialReplacementForCountry = (!bIncludeCountry || !rExcludeCountry.isEmpty());
const ResStringArray& rHeaders = rConfigItem.GetDefaultAddressHeaders();
String sCountryColumn = rHeaders.GetString(MM_PART_COUNTRY);
Sequence< ::rtl::OUString> aAssignment =
rConfigItem.GetColumnAssignment( rConfigItem.GetCurrentDBData() );
const ::rtl::OUString* pAssignment = aAssignment.getConstArray();
- if(aAssignment.getLength() > MM_PART_COUNTRY && aAssignment[MM_PART_COUNTRY].getLength())
+ if(aAssignment.getLength() > MM_PART_COUNTRY && !aAssignment[MM_PART_COUNTRY].isEmpty())
sCountryColumn = aAssignment[MM_PART_COUNTRY];
//
String sHideParagraphsExpression;
@@ -371,7 +371,7 @@ SwFrmFmt* SwMailMergeLayoutPage::InsertAddressFrame(
++nColumn)
{
if(rHeaders.GetString(nColumn) == aItem.sText &&
- pAssignment[nColumn].getLength())
+ !pAssignment[nColumn].isEmpty())
{
sConvertedColumn = pAssignment[nColumn];
break;
@@ -392,7 +392,7 @@ SwFrmFmt* SwMailMergeLayoutPage::InsertAddressFrame(
{
// now insert a hidden paragraph field
String sExpression;
- if( rExcludeCountry.getLength() )
+ if( !rExcludeCountry.isEmpty() )
{
sExpression = sDatabaseConditionPrefix;
sExpression.Insert('[', 0);
@@ -560,7 +560,7 @@ void SwMailMergeLayoutPage::InsertGreeting(SwWrtShell& rShell, SwMailMergeConfig
// Female: [database.sGenderColumn] != "rFemaleGenderValue" && [database.NameColumn]
// Male: [database.sGenderColumn] == "rFemaleGenderValue" && [database.rGenderColumn]
// Neutral: [database.sNameColumn]
- OSL_ENSURE(sGenderColumn.Len() && rFemaleGenderValue.getLength(),
+ OSL_ENSURE(sGenderColumn.Len() && !rFemaleGenderValue.isEmpty(),
"gender settings not available - how to form the condition?");
//column used as lastname
for(sal_Int8 eGender = SwMailMergeConfigItem::FEMALE;
@@ -628,7 +628,7 @@ void SwMailMergeLayoutPage::InsertGreeting(SwWrtShell& rShell, SwMailMergeConfig
++nColumn)
{
if(rHeaders.GetString(nColumn) == aItem.sText &&
- pAssignment[nColumn].getLength())
+ !pAssignment[nColumn].isEmpty())
{
sConvertedColumn = pAssignment[nColumn];
break;
diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx
index ea332d3e4343..ef2540887b99 100644
--- a/sw/source/ui/dbui/mmoutputpage.cxx
+++ b/sw/source/ui/dbui/mmoutputpage.cxx
@@ -574,7 +574,7 @@ IMPL_LINK(SwMailMergeOutputPage, OutputTypeHdl_Impl, RadioButton*, pButton)
String sEMailColumn = rHeaders.GetString( MM_PART_E_MAIL );
Sequence< ::rtl::OUString> aAssignment =
rConfigItem.GetColumnAssignment( rConfigItem.GetCurrentDBData() );
- if(aAssignment.getLength() > MM_PART_E_MAIL && aAssignment[MM_PART_E_MAIL].getLength())
+ if(aAssignment.getLength() > MM_PART_E_MAIL && !aAssignment[MM_PART_E_MAIL].isEmpty())
sEMailColumn = aAssignment[MM_PART_E_MAIL];
m_aMailToLB.SelectEntry(sEMailColumn);
// HTML format pre-selected
@@ -1010,7 +1010,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
if(!pTargetView)
return 0;
- if(!rConfigItem.GetMailServer().getLength() ||
+ if(rConfigItem.GetMailServer().isEmpty() ||
!SwMailMergeHelper::CheckMailAddress(rConfigItem.GetMailAddress()) )
{
QueryBox aQuery(pButton, WB_YES_NO_CANCEL, m_sConfigureMail);
@@ -1279,7 +1279,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
::rtl::OUString sNameColumn = rConfigItem.GetAssignedColumn(MM_PART_LASTNAME);
::rtl::OUString sName = lcl_GetColumnValueOf(sNameColumn, xColAccess);
String sGreeting;
- if(sName.getLength() && rConfigItem.IsIndividualGreeting(sal_True))
+ if(!sName.isEmpty() && rConfigItem.IsIndividualGreeting(sal_True))
{
::rtl::OUString sGenderColumn = rConfigItem.GetAssignedColumn(MM_PART_GENDER);
const ::rtl::OUString& sFemaleValue = rConfigItem.GetFemaleGenderValue();
diff --git a/sw/source/ui/dbui/selectdbtabledialog.cxx b/sw/source/ui/dbui/selectdbtabledialog.cxx
index ab848fb26ea2..ebcb474c63fe 100644
--- a/sw/source/ui/dbui/selectdbtabledialog.cxx
+++ b/sw/source/ui/dbui/selectdbtabledialog.cxx
@@ -165,7 +165,7 @@ IMPL_LINK(SwSelectDBTableDialog, PreviewHdl, PushButton*, pButton)
Reference<XPropertySet> xPrSet(xSource, UNO_QUERY);
xPrSet->getPropertyValue(C2U("Name")) >>= sDataSourceName;
}
- OSL_ENSURE(sDataSourceName.getLength(), "no data source found");
+ OSL_ENSURE(!sDataSourceName.isEmpty(), "no data source found");
Sequence<PropertyValue> aProperties(5);
PropertyValue* pProperties = aProperties.getArray();
pProperties[0].Name = C2U("DataSourceName");
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index 8c28df453cc6..284ee74ed0c8 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -1458,7 +1458,7 @@ IMPL_LINK( SwEditRegionDlg, SubRegionEventHdl, VclWindowEvent *, pEvent )
//if necessary fill the names bookmarks/sections/tables now
rtl::OUString sFileName = aFileNameED.GetText();
- if(sFileName.getLength())
+ if(!sFileName.isEmpty())
{
SfxMedium* pMedium = rSh.GetView().GetDocShell()->GetMedium();
INetURLObject aAbs;
diff --git a/sw/source/ui/docvw/romenu.cxx b/sw/source/ui/docvw/romenu.cxx
index fea31eaa4406..dada27df5541 100644
--- a/sw/source/ui/docvw/romenu.cxx
+++ b/sw/source/ui/docvw/romenu.cxx
@@ -493,7 +493,7 @@ String ExportGraphic( const Graphic &rGraphic, const String &rGrfName )
}
sal_uInt16 nFilter;
- if ( xFltMgr->getCurrentFilter().getLength() && rGF.GetExportFormatCount() )
+ if ( !xFltMgr->getCurrentFilter().isEmpty() && rGF.GetExportFormatCount() )
nFilter = rGF.GetExportFormatNumber( xFltMgr->getCurrentFilter() );
else
nFilter = GRFILTER_FORMAT_DONTKNOW;
diff --git a/sw/source/ui/envelp/label1.cxx b/sw/source/ui/envelp/label1.cxx
index b1bde75b300a..e49f36755804 100644
--- a/sw/source/ui/envelp/label1.cxx
+++ b/sw/source/ui/envelp/label1.cxx
@@ -587,7 +587,7 @@ void SwLabPage::Reset(const SfxItemSet& rSet)
aMakeBox.GetSelectHdl().Call( &aMakeBox );
aItem.aType = sType;
//#102806# a newly added make may not be in the type ListBox already
- if (aTypeBox.GetEntryPos(String(aItem.aType)) == LISTBOX_ENTRY_NOTFOUND && aItem.aMake.getLength())
+ if (aTypeBox.GetEntryPos(String(aItem.aType)) == LISTBOX_ENTRY_NOTFOUND && !aItem.aMake.isEmpty())
GetParent()->UpdateGroup( aItem.aMake );
if (aTypeBox.GetEntryPos(String(aItem.aType)) != LISTBOX_ENTRY_NOTFOUND)
{
diff --git a/sw/source/ui/envelp/labelcfg.cxx b/sw/source/ui/envelp/labelcfg.cxx
index d8dc95333717..b6748953a6de 100644
--- a/sw/source/ui/envelp/labelcfg.cxx
+++ b/sw/source/ui/envelp/labelcfg.cxx
@@ -264,7 +264,7 @@ void SwLabelConfig::SaveLabel( const rtl::OUString& rManufacturer,
}
}
// if not found - generate a unique node name
- if(!sFoundNode.getLength())
+ if(sFoundNode.isEmpty())
{
sal_Int32 nIndex = aLabels.getLength();
OUString sPrefix(C2U("Label"));
diff --git a/sw/source/ui/envelp/mailmrge.cxx b/sw/source/ui/envelp/mailmrge.cxx
index c9d61dd1c441..b78e2e8f6da7 100644
--- a/sw/source/ui/envelp/mailmrge.cxx
+++ b/sw/source/ui/envelp/mailmrge.cxx
@@ -452,7 +452,7 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell,
break;
}
}
- if( sUIName2.getLength() )
+ if( !sUIName2.isEmpty() )
{
sal_uInt16 nFilter = aFilterLB.InsertEntry( sUIName2 );
if( 0 == sFilter.compareToAscii("writer8") )
diff --git a/sw/source/ui/fldui/flddb.cxx b/sw/source/ui/fldui/flddb.cxx
index 8f678e33915a..4a4c8a86ffb6 100644
--- a/sw/source/ui/fldui/flddb.cxx
+++ b/sw/source/ui/fldui/flddb.cxx
@@ -201,10 +201,10 @@ sal_Bool SwFldDBPage::FillItemSet(SfxItemSet& )
if(!pSh)
pSh = ::GetActiveWrtShell();
- if (!aData.sDataSource.getLength())
+ if (aData.sDataSource.isEmpty())
aData = pSh->GetDBData();
- if(aData.sDataSource.getLength()) // without database no new field command
+ if(!aData.sDataSource.isEmpty()) // without database no new field command
{
sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
String aVal(aValueED.GetText());
diff --git a/sw/source/ui/fldui/fldmgr.cxx b/sw/source/ui/fldui/fldmgr.cxx
index 54ec65298bf4..2ebd2cecd0dc 100644
--- a/sw/source/ui/fldui/fldmgr.cxx
+++ b/sw/source/ui/fldui/fldmgr.cxx
@@ -1087,7 +1087,7 @@ sal_Bool SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
sPar1 = rData.sPar1.GetToken(3, DB_DELIM);
}
- if(aDBData.sDataSource.getLength() && pCurShell->GetDBData() != aDBData)
+ if(!aDBData.sDataSource.isEmpty() && pCurShell->GetDBData() != aDBData)
pCurShell->ChgDBData(aDBData);
SwDBFieldType* pTyp = (SwDBFieldType*)pCurShell->InsertFldType(
@@ -1146,7 +1146,7 @@ sal_Bool SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
nPos = 0;
sPar1 = rData.sPar1.Copy(nPos);
- if (aDBData.sDataSource.getLength() && pCurShell->GetDBData() != aDBData)
+ if (!aDBData.sDataSource.isEmpty() && pCurShell->GetDBData() != aDBData)
pCurShell->ChgDBData(aDBData);
switch(rData.nTypeId)
@@ -1671,7 +1671,7 @@ sal_Bool SwFldMgr::ChooseMacro(const String&)
::rtl::OUString aScriptURL = SfxApplication::ChooseScript();
// the script selector dialog returns a valid script URL
- if ( aScriptURL.getLength() != 0 )
+ if ( !aScriptURL.isEmpty() )
{
SetMacroPath( aScriptURL );
bRet = sal_True;
diff --git a/sw/source/ui/lingu/hhcwrp.cxx b/sw/source/ui/lingu/hhcwrp.cxx
index 975157e0f9cc..56a77b1eebff 100644
--- a/sw/source/ui/lingu/hhcwrp.cxx
+++ b/sw/source/ui/lingu/hhcwrp.cxx
@@ -765,7 +765,7 @@ sal_Bool SwHHCWrapper::ConvContinue_impl( SwConversionArgs *pConversionArgs )
uno::Any aRet = bProgress ?
pView->GetWrtShell().SpellContinue( &nPageCount, &nPageStart, pConversionArgs ) :
pView->GetWrtShell().SpellContinue( &nPageCount, NULL, pConversionArgs );
- return pConversionArgs->aConvText.getLength() != 0;
+ return !pConversionArgs->aConvText.isEmpty();
}
//////////////////////////////////////////////////////////////////////
diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx
index 22fc7b264cf3..eb2f796311dd 100644
--- a/sw/source/ui/lingu/olmenu.cxx
+++ b/sw/source/ui/lingu/olmenu.cxx
@@ -130,7 +130,7 @@ LanguageType lcl_CheckLanguage(
// if the result from language guessing does not provide a 'Country' part
// try to get it by looking up the locale setting of the office.
- if (aLocale.Country.getLength() == 0)
+ if (aLocale.Country.isEmpty())
{
lang::Locale aTmpLocale = SvxCreateLocale( nTmpLang );
if (aTmpLocale.Language == aLocale.Language)
@@ -247,14 +247,14 @@ void SwSpellPopup::fillLangPopupMenu(
}
//4--guessed language
- if (aGuessedTextLang.getLength() > 0)
+ if (!aGuessedTextLang.isEmpty())
{
if (lcl_checkScriptType(nScriptType, aLanguageTable.GetType(aGuessedTextLang)))
aLangItems.insert( aGuessedTextLang );
}
//5--keyboard language
- if (aKeyboardLang.getLength() > 0)
+ if (!aKeyboardLang.isEmpty())
{
if (lcl_checkScriptType(nScriptType, aLanguageTable.GetType(aKeyboardLang)))
aLangItems.insert( aKeyboardLang );
@@ -337,7 +337,7 @@ static Image lcl_GetImageFromPngUrl( const OUString &rFileUrl )
OUString RetrieveLabelFromCommand( const OUString& aCmdURL )
{
OUString aLabel;
- if ( aCmdURL.getLength() )
+ if ( !aCmdURL.isEmpty() )
{
try
{
@@ -421,7 +421,7 @@ SwSpellPopup::SwSpellPopup(
const String aEntry = aSuggestions[ i ];
InsertItem( nItemId, aEntry, 0, i );
SetHelpId( nItemId, HID_LINGU_REPLACE);
- if (aSuggestionImageUrl.getLength() > 0)
+ if (!aSuggestionImageUrl.isEmpty())
SetItemImage( nItemId, aImage );
pMenu->InsertItem( nAutoCorrItemId, aEntry );
@@ -499,7 +499,7 @@ SwSpellPopup::SwSpellPopup(
{
OUString aDictionaryImageUrl( aCfg.GetSpellAndGrammarContextDictionaryImage(
xSvcInfo->getImplementationName() ) );
- if (aDictionaryImageUrl.getLength() > 0)
+ if (!aDictionaryImageUrl.isEmpty())
{
Image aImage( lcl_GetImageFromPngUrl( aDictionaryImageUrl ) );
pMenu->SetItemImage( nItemId, aImage );
@@ -621,7 +621,7 @@ aInfo16( SW_RES(IMG_INFO_16) )
const String aEntry = aSuggestions[ i ];
InsertItem( nItemId, aEntry, 0, nPos++ );
SetHelpId( nItemId, HID_LINGU_REPLACE );
- if (aSuggestionImageUrl.getLength() > 0)
+ if (!aSuggestionImageUrl.isEmpty())
SetItemImage( nItemId, aImage );
++nItemId;
diff --git a/sw/source/ui/shells/drformsh.cxx b/sw/source/ui/shells/drformsh.cxx
index 3fefd1a1d44a..97cb606d5497 100644
--- a/sw/source/ui/shells/drformsh.cxx
+++ b/sw/source/ui/shells/drformsh.cxx
@@ -130,7 +130,7 @@ void SwDrawFormShell::Execute(SfxRequest &rReq)
if( xPropInfoSet->hasPropertyByName( sTargetURL ))
{
beans::Property aProp = xPropInfoSet->getPropertyByName( sTargetURL );
- if( aProp.Name.getLength() )
+ if( !aProp.Name.isEmpty() )
{
uno::Any aTmp;
// Ja!
@@ -214,7 +214,7 @@ void SwDrawFormShell::GetState(SfxItemSet& rSet)
{
aTmp = xPropSet->getPropertyValue( C2U("Label") );
OUString sTmp;
- if( (aTmp >>= sTmp) && sTmp.getLength())
+ if( (aTmp >>= sTmp) && !sTmp.isEmpty())
{
aHLinkItem.SetName(sTmp);
}
@@ -225,7 +225,7 @@ void SwDrawFormShell::GetState(SfxItemSet& rSet)
{
aTmp = xPropSet->getPropertyValue( C2U("TargetURL") );
OUString sTmp;
- if( (aTmp >>= sTmp) && sTmp.getLength())
+ if( (aTmp >>= sTmp) && !sTmp.isEmpty())
{
aHLinkItem.SetURL(sTmp);
}
@@ -236,7 +236,7 @@ void SwDrawFormShell::GetState(SfxItemSet& rSet)
{
aTmp = xPropSet->getPropertyValue( C2U("TargetFrame") );
OUString sTmp;
- if( (aTmp >>= sTmp) && sTmp.getLength())
+ if( (aTmp >>= sTmp) && !sTmp.isEmpty())
{
aHLinkItem.SetTargetFrame(sTmp);
}
diff --git a/sw/source/ui/shells/grfshex.cxx b/sw/source/ui/shells/grfshex.cxx
index b69b861fb2e9..474809ca73bd 100644
--- a/sw/source/ui/shells/grfshex.cxx
+++ b/sw/source/ui/shells/grfshex.cxx
@@ -84,7 +84,7 @@ bool SwTextShell::InsertMediaDlg( SfxRequest& rReq )
if( pStringItem )
{
aURL = pStringItem->GetValue();
- bAPI = aURL.getLength();
+ bAPI = !aURL.isEmpty();
}
}
diff --git a/sw/source/ui/uiview/srcview.cxx b/sw/source/ui/uiview/srcview.cxx
index d75a26e47e82..96186f713884 100644
--- a/sw/source/ui/uiview/srcview.cxx
+++ b/sw/source/ui/uiview/srcview.cxx
@@ -249,7 +249,7 @@ SwSrcView::~SwSrcView()
::rtl::OUString url = xDocProps->getAutoloadURL();
sal_Int32 delay = xDocProps->getAutoloadSecs();
pDocShell->SetAutoLoad(INetURLObject(url), delay,
- (delay != 0) || url.getLength());
+ (delay != 0) || !url.isEmpty());
EndListening(*pDocShell);
delete pSearchItem;
}
diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx
index ccfd6e94afce..08e5cb876770 100644
--- a/sw/source/ui/uiview/view2.cxx
+++ b/sw/source/ui/uiview/view2.cxx
@@ -390,7 +390,7 @@ sal_Bool SwView::InsertGraphicDlg( SfxRequest& rReq )
ListboxControlActions::GET_SELECTED_ITEM );
OUString sTmpl;
aTemplateValue >>= sTmpl;
- if( sTmpl.getLength() )
+ if( !sTmpl.isEmpty() )
sGraphicFormat = sTmpl;
rReq.AppendItem( SfxStringItem( FN_PARAM_2, sGraphicFormat ) );
rReq.AppendItem( SfxBoolItem( FN_PARAM_1, bAsLink ) );
diff --git a/sw/source/ui/uiview/viewling.cxx b/sw/source/ui/uiview/viewling.cxx
index 423fad97ed11..20f4dd70a95d 100644
--- a/sw/source/ui/uiview/viewling.cxx
+++ b/sw/source/ui/uiview/viewling.cxx
@@ -689,7 +689,7 @@ sal_Bool SwView::ExecSpellPopup(const Point& rPt)
// we like to use the grammar checking context menu if we either get
// some suggestions or at least a comment about the error found...
bUseGrammarContext = bCorrectionRes &&
- (aSuggestions.getLength() > 0 || aMessageText.getLength() > 0);
+ (aSuggestions.getLength() > 0 || !aMessageText.isEmpty());
}
// open respective context menu for spell check or grammar errors with correction suggestions...
@@ -739,7 +739,7 @@ sal_Bool SwView::ExecSpellPopup(const Point& rPt)
OUString aSlotURL( RTL_CONSTASCII_USTRINGPARAM( "slot:" ));
sal_uInt16 nId = ((PopupMenu*)pMenu)->Execute(pEditWin, aPixPos);
OUString aCommand = ((PopupMenu*)pMenu)->GetItemCommand(nId);
- if (aCommand.getLength() == 0 )
+ if (aCommand.isEmpty() )
{
if(!ExecuteMenuCommand( *dynamic_cast<PopupMenu*>(pMenu), *GetViewFrame(), nId ))
pPopup->Execute(nId);
diff --git a/sw/source/ui/uiview/viewprt.cxx b/sw/source/ui/uiview/viewprt.cxx
index 6e0b7e9d9c26..a9c065bee32c 100644
--- a/sw/source/ui/uiview/viewprt.cxx
+++ b/sw/source/ui/uiview/viewprt.cxx
@@ -110,7 +110,7 @@ void SetPrinter( IDocumentDeviceAccess* pIDDA, SfxPrinter* pNew, sal_Bool bWeb )
{
if( pIDDA )
pIDDA->setPrintData( *pAddPrinterAttr );
- if( pAddPrinterAttr->GetFax().getLength() )
+ if( !pAddPrinterAttr->GetFax().isEmpty() )
pOpt->SetFaxName(pAddPrinterAttr->GetFax());
}
}
diff --git a/sw/source/ui/uno/SwXDocumentSettings.cxx b/sw/source/ui/uno/SwXDocumentSettings.cxx
index 2711275c4b4a..7398dfd0f40d 100644
--- a/sw/source/ui/uno/SwXDocumentSettings.cxx
+++ b/sw/source/ui/uno/SwXDocumentSettings.cxx
@@ -375,7 +375,7 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf
OUString sPrinterName;
if( rValue >>= sPrinterName )
{
- if( !mpPrinter && sPrinterName.getLength() > 0 && mpDocSh->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED )
+ if( !mpPrinter && !sPrinterName.isEmpty() && mpDocSh->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED )
{
SfxPrinter* pPrinter = mpDoc->getPrinter( true );
if ( OUString ( pPrinter->GetName()) != sPrinterName )
diff --git a/sw/source/ui/uno/swdetect.cxx b/sw/source/ui/uno/swdetect.cxx
index 734a9ce54267..cf4d6135ac91 100644
--- a/sw/source/ui/uno/swdetect.cxx
+++ b/sw/source/ui/uno/swdetect.cxx
@@ -405,7 +405,7 @@ SwFilterDetect::~SwFilterDetect()
lDescriptor[nIndexOfTemplateFlag].Value <<= bOpenAsTemplate;
}
- if ( aDocumentTitle.getLength() )
+ if ( !aDocumentTitle.isEmpty() )
{
// the title was set here
if ( nIndexOfDocumentTitle == -1 )
diff --git a/sw/source/ui/uno/unoatxt.cxx b/sw/source/ui/uno/unoatxt.cxx
index 40bd990d707c..34a7fdc06e14 100644
--- a/sw/source/ui/uno/unoatxt.cxx
+++ b/sw/source/ui/uno/unoatxt.cxx
@@ -183,7 +183,7 @@ uno::Reference< text::XAutoTextGroup > SwXAutoTextContainer::insertNewByName(
if(hasByName(aGroupName))
throw container::ElementExistException();
//check for non-ASCII characters
- if(!aGroupName.getLength())
+ if(aGroupName.isEmpty())
{
lang::IllegalArgumentException aIllegal;
aIllegal.Message = C2U("group name must not be empty");
@@ -658,7 +658,7 @@ void SwXAutoTextGroup::setPropertyValue(
{
OUString sNewTitle;
aValue >>= sNewTitle;
- if(!sNewTitle.getLength())
+ if(sNewTitle.isEmpty())
throw lang::IllegalArgumentException();
sal_Bool bChanged = !sNewTitle.equals(pGlosGroup->GetName());
pGlosGroup->SetName(sNewTitle);
diff --git a/sw/source/ui/uno/unodispatch.cxx b/sw/source/ui/uno/unodispatch.cxx
index d09282e9b394..f6486b870d09 100644
--- a/sw/source/ui/uno/unodispatch.cxx
+++ b/sw/source/ui/uno/unodispatch.cxx
@@ -255,7 +255,7 @@ void SwXDispatch::dispatch(
aDescriptor[::svx::daCommandType] <<= rData.nCommandType;
aEvent.State <<= aDescriptor.createPropertyValueSequence();
- aEvent.IsEnabled = rData.sDataSource.getLength() > 0;
+ aEvent.IsEnabled = !rData.sDataSource.isEmpty();
StatusListenerList::iterator aListIter = m_aListenerList.begin();
for(aListIter = m_aListenerList.begin(); aListIter != m_aListenerList.end(); ++aListIter)
@@ -301,7 +301,7 @@ void SwXDispatch::addStatusListener(
aDescriptor[::svx::daCommandType] <<= rData.nCommandType;
aEvent.State <<= aDescriptor.createPropertyValueSequence();
- aEvent.IsEnabled = rData.sDataSource.getLength() > 0;
+ aEvent.IsEnabled = !rData.sDataSource.isEmpty();
}
diff --git a/sw/source/ui/uno/unomailmerge.cxx b/sw/source/ui/uno/unomailmerge.cxx
index 4b6a8a1402fe..00caddc10e0a 100644
--- a/sw/source/ui/uno/unomailmerge.cxx
+++ b/sw/source/ui/uno/unomailmerge.cxx
@@ -503,14 +503,14 @@ uno::Any SAL_CALL SwXMailMerge::execute(
else if (rName.equalsAscii( GetPropName( UNO_NAME_DOCUMENT_URL ) ))
{
bOK = rValue >>= aCurDocumentURL;
- if (aCurDocumentURL.getLength()
+ if (!aCurDocumentURL.isEmpty()
&& !LoadFromURL_impl( xCurModel, xCurDocSh, aCurDocumentURL, sal_False ))
throw RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Failed to create document from URL: " ) ) + aCurDocumentURL, static_cast < cppu::OWeakObject * > ( this ) );
}
else if (rName.equalsAscii( GetPropName( UNO_NAME_OUTPUT_URL ) ))
{
bOK = rValue >>= aCurOutputURL;
- if (aCurOutputURL.getLength())
+ if (!aCurOutputURL.isEmpty())
{
if (!UCB_IsDirectory(aCurOutputURL))
throw IllegalArgumentException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "URL does not point to a directory: " ) ) + aCurOutputURL, static_cast < cppu::OWeakObject * > ( this ), 0 );
@@ -625,13 +625,13 @@ uno::Any SAL_CALL SwXMailMerge::execute(
// and thus avoiding the SelectShell call in Writers GetState function
// while still in Update of Sfx.
// (GetSelection in Update is not allowed)
- if (aCurDocumentURL.getLength())
+ if (!aCurDocumentURL.isEmpty())
pView->AttrChangedNotify( &pView->GetWrtShell() );//Damit SelectShell gerufen wird.
SharedComponent aRowSetDisposeHelper;
if (!xCurResultSet.is())
{
- if (!aCurDataSourceName.getLength() || !aCurDataCommand.getLength() )
+ if (aCurDataSourceName.isEmpty() || aCurDataCommand.isEmpty() )
{
OSL_FAIL("PropertyValues missing or unset");
throw IllegalArgumentException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Either the ResultSet or DataSourceName and DataCommand must be set." ) ), static_cast < cppu::OWeakObject * > ( this ), 0 );
@@ -717,14 +717,14 @@ uno::Any SAL_CALL SwXMailMerge::execute(
INetURLObject aURLObj;
aURLObj.SetSmartProtocol( INET_PROT_FILE );
- if (aCurDocumentURL.getLength())
+ if (!aCurDocumentURL.isEmpty())
{
// if OutputURL or FileNamePrefix are missing get
// them from DocumentURL
aURLObj.SetSmartURL( aCurDocumentURL );
- if (!aCurFileNamePrefix.getLength())
+ if (aCurFileNamePrefix.isEmpty())
aCurFileNamePrefix = aURLObj.GetBase(); // filename without extension
- if (!aCurOutputURL.getLength())
+ if (aCurOutputURL.isEmpty())
{
aURLObj.removeSegment();
aCurOutputURL = aURLObj.GetMainURL( INetURLObject::DECODE_TO_IURI );
@@ -732,7 +732,7 @@ uno::Any SAL_CALL SwXMailMerge::execute(
}
else // default empty document without URL
{
- if (!aCurOutputURL.getLength())
+ if (aCurOutputURL.isEmpty())
throw RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "OutputURL is not set and can not be obtained." ) ), static_cast < cppu::OWeakObject * > ( this ) );
}
@@ -761,7 +761,7 @@ uno::Any SAL_CALL SwXMailMerge::execute(
else
{
pMgr->SetEMailColumn( sAddressFromColumn );
- if(!sAddressFromColumn.getLength())
+ if(sAddressFromColumn.isEmpty())
throw RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Mail address column not set." ) ), static_cast < cppu::OWeakObject * > ( this ) );
aMergeDesc.sSaveToFilter = sAttachmentFilter;
aMergeDesc.sSubject = sSubject;
@@ -951,7 +951,7 @@ void SAL_CALL SwXMailMerge::setPropertyValue(
{
OUString aText;
bOK = rValue >>= aText;
- if (aText.getLength()
+ if (!aText.isEmpty()
&& !LoadFromURL_impl( xModel, xDocSh, aText, sal_True ))
throw RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Failed to create document from URL: " ) ) + aText, static_cast < cppu::OWeakObject * > ( this ) );
aDocumentURL = aText;
@@ -960,7 +960,7 @@ void SAL_CALL SwXMailMerge::setPropertyValue(
{
OUString aText;
bOK = rValue >>= aText;
- if (aText.getLength())
+ if (!aText.isEmpty())
{
if (!UCB_IsDirectory(aText))
throw IllegalArgumentException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "URL does not point to a directory: " ) ) + aText, static_cast < cppu::OWeakObject * > ( this ), 0 );
diff --git a/sw/source/ui/utlui/unotools.cxx b/sw/source/ui/utlui/unotools.cxx
index d9089f7008da..98eb46ecc3a8 100644
--- a/sw/source/ui/utlui/unotools.cxx
+++ b/sw/source/ui/utlui/unotools.cxx
@@ -280,7 +280,7 @@ IMPL_LINK( SwOneExampleFrame, TimeoutHdl, Timer*, pTimer )
uno::Reference< container::XNameContainer > xPFamily;
if( 0 == (EX_SHOW_DEFAULT_PAGE == nStyleFlags)
- && (aPFamily >>= xPFamily) && sPageStyle.getLength() )
+ && (aPFamily >>= xPFamily) && !sPageStyle.isEmpty() )
{
uno::Any aPStyle = xPFamily->getByName( sPageStyle );
uno::Reference< style::XStyle > xPStyle;
diff --git a/sw/source/ui/vba/vbafield.cxx b/sw/source/ui/vba/vbafield.cxx
index d83f5705b926..489f57fe4019 100644
--- a/sw/source/ui/vba/vbafield.cxx
+++ b/sw/source/ui/vba/vbafield.cxx
@@ -376,7 +376,7 @@ SwVbaFields::Add( const css::uno::Reference< ::ooo::vba::word::XRange >& Range,
Text >>= sText;
String sFieldName;
- if( ( nType == word::WdFieldType::wdFieldEmpty ) && ( sText.getLength() > 0 ) )
+ if( ( nType == word::WdFieldType::wdFieldEmpty ) && !sText.isEmpty() )
{
_ReadFieldParams aReadParam(sText);
sFieldName = aReadParam.GetFieldName();
@@ -408,7 +408,7 @@ uno::Reference< text::XTextField > SwVbaFields::Create_Field_FileName( const rtl
{
uno::Reference< text::XTextField > xTextField( mxMSF->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextField.FileName")) ), uno::UNO_QUERY_THROW );
sal_Int16 nFileFormat = text::FilenameDisplayFormat::NAME_AND_EXT;
- if( _text.getLength() > 0 )
+ if( !_text.isEmpty() )
{
long nRet;
_ReadFieldParams aReadParam( _text );
@@ -517,7 +517,7 @@ uno::Reference< text::XTextField > SwVbaFields::Create_Field_DocProperty( const
{
sFieldService = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.text.textfield.docinfo.Custom" ) );
}
- else if( sFieldService.getLength() == 0 )
+ else if( sFieldService.isEmpty() )
{
throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() );
}
diff --git a/sw/source/ui/vba/vbafind.cxx b/sw/source/ui/vba/vbafind.cxx
index c995527e20a6..52a0d8c22e3e 100644
--- a/sw/source/ui/vba/vbafind.cxx
+++ b/sw/source/ui/vba/vbafind.cxx
@@ -84,7 +84,7 @@ void SwVbaFind::SetReplace( sal_Int32 type )
uno::Reference< text::XTextRange > SwVbaFind::FindOneElement() throw ( uno::RuntimeException )
{
uno::Reference< text::XTextRange > xFoundOne;
- if( mxTVC->getString().getLength() > 0 )
+ if( !mxTVC->getString().isEmpty() )
{
if( getForward() )
{
diff --git a/sw/source/ui/vba/vbarange.cxx b/sw/source/ui/vba/vbarange.cxx
index 0f514004f375..5b97fa87ab27 100644
--- a/sw/source/ui/vba/vbarange.cxx
+++ b/sw/source/ui/vba/vbarange.cxx
@@ -164,7 +164,7 @@ SwVbaRange::setText( const rtl::OUString& rText ) throw ( uno::RuntimeException
}
// insert the bookmark if the bookmark is deleted during setting text string
- if( sName.getLength() )
+ if( !sName.isEmpty() )
{
uno::Reference< text::XBookmarksSupplier > xBookmarksSupplier( mxTextDocument, uno::UNO_QUERY_THROW );
uno::Reference< container::XNameAccess > xNameAccess( xBookmarksSupplier->getBookmarks(), uno::UNO_QUERY_THROW );
@@ -267,15 +267,15 @@ SwVbaRange::setParagraphFormat( const uno::Reference< word::XParagraphFormat >&
void SwVbaRange::GetStyleInfo(rtl::OUString& aStyleName, rtl::OUString& aStyleType ) throw ( uno::RuntimeException )
{
uno::Reference< beans::XPropertySet > xProp( mxTextCursor, uno::UNO_QUERY_THROW );
- if( ( xProp->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CharStyleName") ) ) >>= aStyleName ) && aStyleName.getLength() )
+ if( ( xProp->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CharStyleName") ) ) >>= aStyleName ) && !aStyleName.isEmpty() )
{
aStyleType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CharacterStyles") );
}
- else if( ( xProp->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaStyleName") ) ) >>= aStyleName ) && aStyleName.getLength() )
+ else if( ( xProp->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaStyleName") ) ) >>= aStyleName ) && !aStyleName.isEmpty() )
{
aStyleType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParagraphStyles") );
}
- if( aStyleType.getLength() == 0 )
+ if( aStyleType.isEmpty() )
{
DebugHelper::exception( SbERR_INTERNAL_ERROR, rtl::OUString() );
}
diff --git a/sw/source/ui/vba/vbaselection.cxx b/sw/source/ui/vba/vbaselection.cxx
index 51530eaca059..4ddee39c9260 100644
--- a/sw/source/ui/vba/vbaselection.cxx
+++ b/sw/source/ui/vba/vbaselection.cxx
@@ -924,7 +924,7 @@ uno::Any SAL_CALL SwVbaSelection::Rows( const uno::Any& index ) throw (uno::Runt
uno::Reference< text::XTextTable > xTextTable = GetXTextTable();
SwVbaTableHelper aTableHelper( xTextTable );
nStartRow = aTableHelper.getTabRowIndex( sTLName );
- if( sBRName.getLength() > 0 )
+ if( !sBRName.isEmpty() )
{
nEndRow = aTableHelper.getTabRowIndex( sBRName );
}
@@ -950,7 +950,7 @@ uno::Any SAL_CALL SwVbaSelection::Columns( const uno::Any& index ) throw (uno::R
uno::Reference< text::XTextTable > xTextTable = GetXTextTable();
SwVbaTableHelper aTableHelper( xTextTable );
nStartColumn = aTableHelper.getTabColIndex( sTLName );
- if( sBRName.getLength() > 0 )
+ if( !sBRName.isEmpty() )
{
nEndColumn = aTableHelper.getTabColIndex( sBRName );
}
@@ -1009,7 +1009,7 @@ void SwVbaSelection::GetSelectedCellRange( rtl::OUString& sTLName, rtl::OUString
sBRName = sRange.GetToken(1, ':');
}
}
- if( !sTLName.getLength() )
+ if( sTLName.isEmpty() )
{
uno::Reference< table::XCell > xCell;
xCursorProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Cell") ) ) >>= xCell;
@@ -1036,7 +1036,7 @@ uno::Any SAL_CALL SwVbaSelection::Cells( const uno::Any& index ) throw (uno::Run
SwVbaTableHelper aTableHelper( xTextTable );
nLeft = aTableHelper.getTabColIndex( sTLName );
nTop = aTableHelper.getTabRowIndex( sTLName );
- if( sBRName.getLength() > 0 )
+ if( !sBRName.isEmpty() )
{
nRight = aTableHelper.getTabColIndex( sBRName );
nBottom = aTableHelper.getTabRowIndex( sBRName );
diff --git a/sw/source/ui/vba/vbastyle.cxx b/sw/source/ui/vba/vbastyle.cxx
index e2ff34edb7d2..4c966e3637ce 100644
--- a/sw/source/ui/vba/vbastyle.cxx
+++ b/sw/source/ui/vba/vbastyle.cxx
@@ -118,7 +118,7 @@ void SwVbaStyle::setStyle( const uno::Reference< beans::XPropertySet >& xParaPro
rStyle >>= sStyle;
}
- if( sStyle.getLength() )
+ if( !sStyle.isEmpty() )
{
xParaProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaStyleName") ), uno::makeAny( sStyle ) );
return;
@@ -196,7 +196,7 @@ uno::Any SAL_CALL SwVbaStyle::getBaseStyle() throw (uno::RuntimeException)
// ParentStyle
rtl::OUString sBaseStyle;
mxStyleProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParentStyle") ) ) >>= sBaseStyle;
- if( sBaseStyle.getLength() > 0 )
+ if( !sBaseStyle.isEmpty() )
{
uno::Reference< XCollection > xCol( new SwVbaStyles( this, mxContext, mxModel ) );
return xCol->Item( uno::makeAny( sBaseStyle ), uno::Any() );
@@ -227,7 +227,7 @@ uno::Any SAL_CALL SwVbaStyle::getNextParagraphStyle() throw (uno::RuntimeExcepti
//FollowStyle
rtl::OUString sFollowStyle;
mxStyleProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FollowStyle") ) ) >>= sFollowStyle;
- if( sFollowStyle.getLength() > 0 )
+ if( !sFollowStyle.isEmpty() )
{
uno::Reference< XCollection > xCol( new SwVbaStyles( this, mxContext, mxModel ) );
return xCol->Item( uno::makeAny( sFollowStyle ), uno::Any() );
diff --git a/sw/source/ui/vba/vbastyles.cxx b/sw/source/ui/vba/vbastyles.cxx
index cd4f353d29d4..09ead7502f39 100644
--- a/sw/source/ui/vba/vbastyles.cxx
+++ b/sw/source/ui/vba/vbastyles.cxx
@@ -312,7 +312,7 @@ SwVbaStyles::Item( const uno::Any& Index1, const uno::Any& Index2 ) throw (uno::
if( nIndex == pTable->wdBuiltinStyle )
{
rtl::OUString aStyleName = rtl::OUString::createFromAscii( pTable->pOOoStyleName );
- if( aStyleName.getLength() > 0 )
+ if( !aStyleName.isEmpty() )
{
rtl::OUString aStyleType;
switch( pTable->wdStyleType )
diff --git a/sw/source/ui/vba/vbasystem.cxx b/sw/source/ui/vba/vbasystem.cxx
index d8be0e21276b..368dae6e0ce3 100644
--- a/sw/source/ui/vba/vbasystem.cxx
+++ b/sw/source/ui/vba/vbasystem.cxx
@@ -87,7 +87,7 @@ uno::Any PrivateProfileStringListener::getValueEvent()
{
// get the private profile string
rtl::OUString sValue;
- if(maFileName.getLength())
+ if(!maFileName.isEmpty())
{
// get key/value from a file
Config aCfg( maFileName );
@@ -133,7 +133,7 @@ void PrivateProfileStringListener::setValueEvent( const css::uno::Any& value )
// set the private profile string
rtl::OUString aValue;
value >>= aValue;
- if(maFileName.getLength())
+ if(!maFileName.isEmpty())
{
// set value into a file
Config aCfg( maFileName );
@@ -251,7 +251,7 @@ SwVbaSystem::PrivateProfileString( const rtl::OUString& rFilename, const rtl::OU
// FIXME: need to detect whether it is a relative file path
// we need to detect if this is a URL, if not then assume its a file path
rtl::OUString sFileUrl;
- if( rFilename.getLength() )
+ if( !rFilename.isEmpty() )
{
INetURLObject aObj;
aObj.SetURL( rFilename );
diff --git a/sw/source/ui/vba/vbatemplate.cxx b/sw/source/ui/vba/vbatemplate.cxx
index 9774a971f114..d09d65e85954 100644
--- a/sw/source/ui/vba/vbatemplate.cxx
+++ b/sw/source/ui/vba/vbatemplate.cxx
@@ -71,7 +71,7 @@ rtl::OUString
SwVbaTemplate::getName() throw ( css::uno::RuntimeException )
{
rtl::OUString sName;
- if( msFullUrl.getLength() )
+ if( !msFullUrl.isEmpty() )
{
INetURLObject aURL( msFullUrl );
::osl::File::getSystemPathFromFileURL( aURL.GetLastName(), sName );
@@ -83,7 +83,7 @@ rtl::OUString
SwVbaTemplate::getPath() throw ( css::uno::RuntimeException )
{
rtl::OUString sPath;
- if( msFullUrl.getLength() )
+ if( !msFullUrl.isEmpty() )
{
INetURLObject aURL( msFullUrl );
rtl::OUString sURL( aURL.GetMainURL( INetURLObject::DECODE_TO_IURI ) );
diff --git a/sw/source/ui/wrtsh/wrtsh2.cxx b/sw/source/ui/wrtsh/wrtsh2.cxx
index 0160b5350914..7fb33e783e5c 100644
--- a/sw/source/ui/wrtsh/wrtsh2.cxx
+++ b/sw/source/ui/wrtsh/wrtsh2.cxx
@@ -153,7 +153,7 @@ sal_Bool SwWrtShell::StartInputFldDlg( SwField* pFld, sal_Bool bNextButton,
AbstractFldInputDlg* pDlg = pFact->CreateFldInputDlg( DLG_FLD_INPUT,
pParentWin, *this, pFld, bNextButton);
OSL_ENSURE(pDlg, "Dialogdiet fail!");
- if(pWindowState && pWindowState->getLength())
+ if(pWindowState && !pWindowState->isEmpty())
pDlg->SetWindowState(*pWindowState);
sal_Bool bRet = RET_CANCEL == pDlg->Execute();
if(pWindowState)
@@ -171,7 +171,7 @@ sal_Bool SwWrtShell::StartDropDownFldDlg(SwField* pFld, sal_Bool bNextButton, rt
AbstractDropDownFieldDialog* pDlg = pFact->CreateDropDownFieldDialog( NULL, *this, pFld, DLG_FLD_DROPDOWN ,bNextButton );
OSL_ENSURE(pDlg, "Dialogdiet fail!");
- if(pWindowState && pWindowState->getLength())
+ if(pWindowState && !pWindowState->isEmpty())
pDlg->SetWindowState(*pWindowState);
sal_uInt16 nRet = pDlg->Execute();
if(pWindowState)
diff --git a/sw/source/ui/wrtsh/wrtsh3.cxx b/sw/source/ui/wrtsh/wrtsh3.cxx
index 077cd9815a41..aaf8671eb39f 100644
--- a/sw/source/ui/wrtsh/wrtsh3.cxx
+++ b/sw/source/ui/wrtsh/wrtsh3.cxx
@@ -220,14 +220,14 @@ sal_Bool SwWrtShell::GetURLFromButton( String& rURL, String& rDescr ) const
// Label
aTmp = xPropSet->getPropertyValue( C2U("Label") );
OUString uTmp;
- if( (aTmp >>= uTmp) && uTmp.getLength())
+ if( (aTmp >>= uTmp) && !uTmp.isEmpty())
{
rDescr = String(uTmp);
}
// util::URL
aTmp = xPropSet->getPropertyValue( C2U("TargetURL") );
- if( (aTmp >>= uTmp) && uTmp.getLength())
+ if( (aTmp >>= uTmp) && !uTmp.isEmpty())
{
rURL = String(uTmp);
}
diff --git a/sw/source/ui/wrtsh/wrtundo.cxx b/sw/source/ui/wrtsh/wrtundo.cxx
index 42bf7750d8a7..f9ce8879cab2 100644
--- a/sw/source/ui/wrtsh/wrtundo.cxx
+++ b/sw/source/ui/wrtsh/wrtundo.cxx
@@ -147,7 +147,7 @@ sal_uInt16 SwWrtShell::GetDoStrings( DoType eDoType, SfxStringListItem& rStrs )
::rtl::OUStringBuffer buf;
for (size_t i = 0; i < comments.size(); ++i)
{
- OSL_ENSURE(comments[i].getLength(), "no Undo/Redo Text set");
+ OSL_ENSURE(!comments[i].isEmpty(), "no Undo/Redo Text set");
buf.append(comments[i]);
buf.append(sal_Unicode('\n'));
}
@@ -161,7 +161,7 @@ String SwWrtShell::GetRepeatString() const
::rtl::OUString str;
GetRepeatInfo(& str);
- if (str.getLength() == 0)
+ if (str.isEmpty())
{
return str;
}