summaryrefslogtreecommitdiff
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
parent802d82b6e2acedd3581acbf23407d7f5f742c671 (diff)
Fix for fdo43460 Part XL getLength() to isEmpty()
Part XL Modules sw
-rw-r--r--sw/source/core/access/accnotextframe.cxx8
-rw-r--r--sw/source/core/access/accpara.cxx2
-rw-r--r--sw/source/core/access/acctextframe.cxx8
-rw-r--r--sw/source/core/crsr/crossrefbookmark.cxx2
-rw-r--r--sw/source/core/crsr/findattr.cxx6
-rw-r--r--sw/source/core/crsr/findtxt.cxx2
-rw-r--r--sw/source/core/doc/doc.cxx4
-rw-r--r--sw/source/core/doc/docbm.cxx2
-rw-r--r--sw/source/core/doc/docfld.cxx8
-rw-r--r--sw/source/core/edit/edlingu.cxx4
-rw-r--r--sw/source/core/edit/edtox.cxx2
-rw-r--r--sw/source/core/fields/dbfld.cxx6
-rw-r--r--sw/source/core/fields/docufld.cxx2
-rw-r--r--sw/source/core/layout/dbg_lay.cxx6
-rw-r--r--sw/source/core/text/EnhancedPDFExportHelper.cxx2
-rw-r--r--sw/source/core/text/wrong.cxx2
-rw-r--r--sw/source/core/txtnode/txtedt.cxx4
-rw-r--r--sw/source/core/undo/unins.cxx2
-rw-r--r--sw/source/core/unocore/XMLRangeHelper.cxx4
-rw-r--r--sw/source/core/unocore/unobkm.cxx2
-rw-r--r--sw/source/core/unocore/unochart.cxx12
-rw-r--r--sw/source/core/unocore/unocoll.cxx2
-rw-r--r--sw/source/core/unocore/unocrsrhelper.cxx18
-rw-r--r--sw/source/core/unocore/unoftn.cxx2
-rw-r--r--sw/source/core/unocore/unoidx.cxx18
-rw-r--r--sw/source/core/unocore/unoobj2.cxx4
-rw-r--r--sw/source/core/unocore/unoparagraph.cxx2
-rw-r--r--sw/source/core/unocore/unoredline.cxx2
-rw-r--r--sw/source/core/unocore/unosect.cxx14
-rw-r--r--sw/source/core/unocore/unosett.cxx2
-rw-r--r--sw/source/core/unocore/unostyle.cxx8
-rw-r--r--sw/source/core/unocore/unotbl.cxx2
-rw-r--r--sw/source/core/unocore/unotext.cxx2
-rw-r--r--sw/source/filter/html/css1atr.cxx10
-rw-r--r--sw/source/filter/html/htmlatr.cxx12
-rw-r--r--sw/source/filter/html/htmldraw.cxx2
-rw-r--r--sw/source/filter/html/htmlfly.cxx10
-rw-r--r--sw/source/filter/html/htmlforw.cxx36
-rw-r--r--sw/source/filter/html/htmlplug.cxx10
-rw-r--r--sw/source/filter/html/swhtml.cxx10
-rw-r--r--sw/source/filter/html/wrthtml.cxx2
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx26
-rw-r--r--sw/source/filter/ww8/docxexport.cxx4
-rw-r--r--sw/source/filter/ww8/rtfexport.cxx10
-rw-r--r--sw/source/filter/ww8/wrtw8nds.cxx2
-rw-r--r--sw/source/filter/ww8/ww8par.cxx8
-rw-r--r--sw/source/filter/ww8/ww8par5.cxx4
-rw-r--r--sw/source/filter/ww8/ww8toolbar.cxx2
-rw-r--r--sw/source/filter/xml/swxml.cxx2
-rw-r--r--sw/source/filter/xml/wrtxml.cxx4
-rw-r--r--sw/source/filter/xml/xmlbrsh.cxx4
-rw-r--r--sw/source/filter/xml/xmlexpit.cxx2
-rw-r--r--sw/source/filter/xml/xmlfmt.cxx8
-rw-r--r--sw/source/filter/xml/xmlfmte.cxx6
-rw-r--r--sw/source/filter/xml/xmlimpit.cxx2
-rw-r--r--sw/source/filter/xml/xmlitemi.cxx2
-rw-r--r--sw/source/filter/xml/xmlithlp.cxx2
-rw-r--r--sw/source/filter/xml/xmltble.cxx4
-rw-r--r--sw/source/filter/xml/xmltbli.cxx26
-rw-r--r--sw/source/filter/xml/xmltexte.cxx14
-rw-r--r--sw/source/filter/xml/xmltexti.cxx18
-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
111 files changed, 328 insertions, 328 deletions
diff --git a/sw/source/core/access/accnotextframe.cxx b/sw/source/core/access/accnotextframe.cxx
index 3c659152484c..f9a5ea6b5b9e 100644
--- a/sw/source/core/access/accnotextframe.cxx
+++ b/sw/source/core/access/accnotextframe.cxx
@@ -76,7 +76,7 @@ SwAccessibleNoTextFrame::SwAccessibleNoTextFrame(
msTitle = pNd->GetTitle();
msDesc = pNd->GetDescription();
- if ( msDesc.getLength() == 0 &&
+ if ( msDesc.isEmpty() &&
msTitle != GetName() )
{
msDesc = msTitle;
@@ -95,7 +95,7 @@ void SwAccessibleNoTextFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem
// suppress handling of RES_NAME_CHANGED in case that attribute Title is
// used as the accessible name.
if ( nWhich != RES_NAME_CHANGED ||
- msTitle.getLength() == 0 )
+ msTitle.isEmpty() )
{
SwAccessibleFrameBase::Modify( pOld, pNew );
}
@@ -136,7 +136,7 @@ void SwAccessibleNoTextFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem
const String& rDesc = pNd->GetDescription();
msDesc = rDesc;
- if ( msDesc.getLength() == 0 &&
+ if ( msDesc.isEmpty() &&
msTitle != GetName() )
{
msDesc = msTitle;
@@ -174,7 +174,7 @@ OUString SAL_CALL SwAccessibleNoTextFrame::getAccessibleName (void)
CHECK_FOR_DEFUNC( XAccessibleContext )
- if ( msTitle.getLength() != 0 )
+ if ( !msTitle.isEmpty() )
{
return msTitle;
}
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
index 30c3165e09c9..59249ad57a92 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -817,7 +817,7 @@ sal_Bool SwAccessibleParagraph::GetTextBoundary(
CHECK_FOR_DEFUNC( XAccessibleContext );
osl::MutexGuard aGuard2( aMutex );
- if( !sDesc.getLength() )
+ if( sDesc.isEmpty() )
sDesc = GetDescription();
return sDesc;
diff --git a/sw/source/core/access/acctextframe.cxx b/sw/source/core/access/acctextframe.cxx
index 72861edc1af5..0f8175ac1c12 100644
--- a/sw/source/core/access/acctextframe.cxx
+++ b/sw/source/core/access/acctextframe.cxx
@@ -69,7 +69,7 @@ SwAccessibleTextFrame::SwAccessibleTextFrame(
msTitle = pFlyFrmFmt->GetObjTitle();
msDesc = pFlyFrmFmt->GetObjDescription();
- if ( msDesc.getLength() == 0 &&
+ if ( msDesc.isEmpty() &&
msTitle != GetName() )
{
msDesc = msTitle;
@@ -87,7 +87,7 @@ void SwAccessibleTextFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem *
// #i73249# - suppress handling of RES_NAME_CHANGED
// in case that attribute Title is used as the accessible name.
if ( nWhich != RES_NAME_CHANGED ||
- msTitle.getLength() == 0 )
+ msTitle.isEmpty() )
{
SwAccessibleFrameBase::Modify( pOld, pNew );
}
@@ -131,7 +131,7 @@ void SwAccessibleTextFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem *
dynamic_cast<const SwFlyFrmFmt*>( pFlyFrm->GetFmt() );
const String& rDesc = pFlyFrmFmt->GetObjDescription();
msDesc = rDesc;
- if ( msDesc.getLength() == 0 &&
+ if ( msDesc.isEmpty() &&
msTitle != GetName() )
{
msDesc = msTitle;
@@ -159,7 +159,7 @@ OUString SAL_CALL SwAccessibleTextFrame::getAccessibleName (void)
CHECK_FOR_DEFUNC( XAccessibleContext )
- if ( msTitle.getLength() != 0 )
+ if ( !msTitle.isEmpty() )
{
return msTitle;
}
diff --git a/sw/source/core/crsr/crossrefbookmark.cxx b/sw/source/core/crsr/crossrefbookmark.cxx
index 48ab3b88e554..9f77b6c2c9cd 100644
--- a/sw/source/core/crsr/crossrefbookmark.cxx
+++ b/sw/source/core/crsr/crossrefbookmark.cxx
@@ -47,7 +47,7 @@ namespace sw { namespace mark
"<CrossRefBookmark::CrossRefBookmark(..)>"
"- creation of cross-reference bookmark with an expanded PaM that does not expand over exactly one whole paragraph.");
SetMarkPos(*rPaM.Start());
- if(!rName.getLength())
+ if(rName.isEmpty())
m_aName = MarkBase::GenerateNewName(rPrefix);
}
diff --git a/sw/source/core/crsr/findattr.cxx b/sw/source/core/crsr/findattr.cxx
index 4ba652c5ccbb..e88eda064ea6 100644
--- a/sw/source/core/crsr/findattr.cxx
+++ b/sw/source/core/crsr/findattr.cxx
@@ -1102,7 +1102,7 @@ int SwFindParaAttr::Find( SwPaM* pCrsr, SwMoveFn fnMove, const SwPaM* pRegion,
{
// String ersetzen ?? (nur wenn Text angegeben oder nicht attributiert
// gesucht wird)
- sal_Bool bReplaceTxt = pSearchOpt && ( pSearchOpt->replaceString.getLength() ||
+ sal_Bool bReplaceTxt = pSearchOpt && ( !pSearchOpt->replaceString.isEmpty() ||
!pSet->Count() );
sal_Bool bReplaceAttr = pReplSet && pReplSet->Count();
sal_Bool bMoveFirst = !bReplaceAttr;
@@ -1245,7 +1245,7 @@ int SwFindParaAttr::Find( SwPaM* pCrsr, SwMoveFn fnMove, const SwPaM* pRegion,
int SwFindParaAttr::IsReplaceMode() const
{
- return ( pSearchOpt && pSearchOpt->replaceString.getLength() ) ||
+ return ( pSearchOpt && !pSearchOpt->replaceString.isEmpty() ) ||
( pReplSet && pReplSet->Count() );
}
@@ -1262,7 +1262,7 @@ sal_uLong SwCursor::Find( const SfxItemSet& rSet, sal_Bool bNoCollections,
Link aLnk( pDoc->GetOle2Link() );
pDoc->SetOle2Link( Link() );
- sal_Bool bReplace = ( pSearchOpt && ( pSearchOpt->replaceString.getLength() ||
+ sal_Bool bReplace = ( pSearchOpt && ( !pSearchOpt->replaceString.isEmpty() ||
!rSet.Count() ) ) ||
(pReplSet && pReplSet->Count());
bool const bStartUndo = pDoc->GetIDocumentUndoRedo().DoesUndo() && bReplace;
diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx
index 85ef477ccb17..121257ca7d19 100644
--- a/sw/source/core/crsr/findtxt.cxx
+++ b/sw/source/core/crsr/findtxt.cxx
@@ -225,7 +225,7 @@ sal_uInt8 SwPaM::Find( const SearchOptions& rSearchOpt, sal_Bool bSearchInNotes
SwMoveFn fnMove, const SwPaM * pRegion,
sal_Bool bInReadOnly )
{
- if( !rSearchOpt.searchString.getLength() )
+ if( rSearchOpt.searchString.isEmpty() )
return sal_False;
SwPaM* pPam = MakeRegion( fnMove, pRegion );
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index 8c61466eb9f9..41fba1651f1d 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -1380,7 +1380,7 @@ void SwDoc::CalculatePagesForPrinting(
// please note
}
- if (aPageRange.getLength() == 0) // empty string -> print all
+ if (aPageRange.isEmpty()) // empty string -> print all
{
// set page range to print to 'all pages'
aPageRange = OUString::valueOf( (sal_Int32)1 );
@@ -1552,7 +1552,7 @@ void SwDoc::CalculatePagePairsForProspectPrinting(
const sal_Int32 nContent = rOptions.getIntValue( "PrintContent", 0 );
if (nContent == 1)
aPageRange = rOptions.getStringValue( "PageRange", rtl::OUString() );
- if (aPageRange.getLength() == 0) // empty string -> print all
+ if (aPageRange.isEmpty()) // empty string -> print all
{
// set page range to print to 'all pages'
aPageRange = OUString::valueOf( (sal_Int32)1 );
diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index a3ce1310739b..fdbddb521ecf 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -833,7 +833,7 @@ namespace sw { namespace mark
::rtl::OUString MarkManager::getUniqueMarkName(const ::rtl::OUString& rName) const
{
- OSL_ENSURE(rName.getLength(),
+ OSL_ENSURE(!rName.isEmpty(),
"<MarkManager::getUniqueMarkName(..)>"
" - a name should be proposed");
if(!hasMark(rName)) return rName;
diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx
index 198e79496001..cb7aa3780f37 100644
--- a/sw/source/core/doc/docfld.cxx
+++ b/sw/source/core/doc/docfld.cxx
@@ -1524,7 +1524,7 @@ void SwDoc::UpdateDBNumFlds( SwDBNameInfField& rDBFld, SwCalc& rCalc )
else
((SwDBNumSetField&)rDBFld).SetCondValid( bPar1 );
- if( rDBFld.GetRealDBData().sDataSource.getLength() )
+ if( !rDBFld.GetRealDBData().sDataSource.isEmpty() )
{
// Edit a certain database
if( RES_DBNEXTSETFLD == nFldType )
@@ -1606,10 +1606,10 @@ SwDBData SwDoc::GetDBData()
const SwDBData& SwDoc::GetDBDesc()
{
- if(!aDBData.sDataSource.getLength())
+ if(aDBData.sDataSource.isEmpty())
{
const sal_uInt16 nSize = pFldTypes->Count();
- for(sal_uInt16 i = 0; i < nSize && !aDBData.sDataSource.getLength(); ++i)
+ for(sal_uInt16 i = 0; i < nSize && aDBData.sDataSource.isEmpty(); ++i)
{
SwFieldType& rFldType = *((*pFldTypes)[i]);
sal_uInt16 nWhich = rFldType.Which();
@@ -1642,7 +1642,7 @@ const SwDBData& SwDoc::GetDBDesc()
}
}
}
- if(!aDBData.sDataSource.getLength())
+ if(aDBData.sDataSource.isEmpty())
aDBData = GetNewDBMgr()->GetAddressDBName();
return aDBData;
}
diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx
index acf474842981..b502d1220a01 100644
--- a/sw/source/core/edit/edlingu.cxx
+++ b/sw/source/core/edit/edlingu.cxx
@@ -440,7 +440,7 @@ uno::Any SwConvIter::Continue( sal_uInt16* pPageCnt, sal_uInt16* pPageSt )
xEmpty, pPageCnt, pPageSt, false, &rArgs ) >>= aConvText;
bGoOn = GetCrsrCnt() > 1;
- if( aConvText.getLength() )
+ if( !aConvText.isEmpty() )
{
bGoOn = sal_False;
SwPosition* pNewPoint = new SwPosition( *pCrsr->GetPoint() );
@@ -830,7 +830,7 @@ uno::Any SwEditShell::SpellContinue(
}
--nStartAction;
- if( aRet.getLength() || xRet.is() )
+ if( !aRet.isEmpty() || xRet.is() )
{
// dann die awt::Selection sichtbar machen
StartAction();
diff --git a/sw/source/core/edit/edtox.cxx b/sw/source/core/edit/edtox.cxx
index 3a178ed737c4..c47a6059ebe4 100644
--- a/sw/source/core/edit/edtox.cxx
+++ b/sw/source/core/edit/edtox.cxx
@@ -387,7 +387,7 @@ void SwEditShell::ApplyAutoMark()
// ; -> delimiter between entries ->
// Format: TextToSearchFor;AlternativeString;PrimaryKey;SecondaryKey;CaseSensitive;WordOnly
// Leading and trailing blanks are ignored
- if( aRdLine.getLength() && '#' != aRdLine[0] )
+ if( !aRdLine.isEmpty() && '#' != aRdLine[0] )
{
String sLine( aRdLine, eChrSet );
diff --git a/sw/source/core/fields/dbfld.cxx b/sw/source/core/fields/dbfld.cxx
index 26337508485d..66ebfc9c6ff0 100644
--- a/sw/source/core/fields/dbfld.cxx
+++ b/sw/source/core/fields/dbfld.cxx
@@ -77,7 +77,7 @@ SwDBFieldType::SwDBFieldType(SwDoc* pDocPtr, const String& rNam, const SwDBData&
sColumn(rNam),
nRefCnt(0)
{
- if(aDBData.sDataSource.getLength() || aDBData.sCommand.getLength())
+ if(!aDBData.sDataSource.isEmpty() || !aDBData.sCommand.isEmpty())
{
sName = aDBData.sDataSource;
sName += DB_DELIM;
@@ -497,7 +497,7 @@ SwDBNameInfField::SwDBNameInfField(SwFieldType* pTyp, const SwDBData& rDBData, s
SwDBData SwDBNameInfField::GetDBData(SwDoc* pDoc)
{
SwDBData aRet;
- if(aDBData.sDataSource.getLength())
+ if(!aDBData.sDataSource.isEmpty())
aRet = aDBData;
else
aRet = pDoc->GetDBData();
@@ -514,7 +514,7 @@ void SwDBNameInfField::SetDBData(const SwDBData & rDBData)
String SwDBNameInfField::GetFieldName() const
{
String sStr( SwField::GetFieldName() );
- if (aDBData.sDataSource.getLength())
+ if (!aDBData.sDataSource.isEmpty())
{
sStr += ':';
sStr += String(aDBData.sDataSource);
diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx
index 8b0ecf0ec759..2f588ae0d32a 100644
--- a/sw/source/core/fields/docufld.cxx
+++ b/sw/source/core/fields/docufld.cxx
@@ -625,7 +625,7 @@ String SwTemplNameFieldType::Expand(sal_uLong nFmt) const
if( FF_UI_NAME == nFmt )
aRet = xDocProps->getTemplateName();
- else if( xDocProps->getTemplateURL().getLength() )
+ else if( !xDocProps->getTemplateURL().isEmpty() )
{
if( FF_UI_RANGE == nFmt )
{
diff --git a/sw/source/core/layout/dbg_lay.cxx b/sw/source/core/layout/dbg_lay.cxx
index 87f6d83889a5..fc166cb6eca2 100644
--- a/sw/source/core/layout/dbg_lay.cxx
+++ b/sw/source/core/layout/dbg_lay.cxx
@@ -380,7 +380,7 @@ void SwImplProtocol::CheckLine( rtl::OString& rLine )
bNo = sal_True; // Diese(n) Funktion/Typ entfernen
aTok = aTok.copy(1);
}
- if( aTok.getLength() )
+ if( !aTok.isEmpty() )
{
sal_uLong nVal;
sscanf( aTok.getStr(), "%li", &nVal );
@@ -442,14 +442,14 @@ void SwImplProtocol::FileInit()
if( '\n' == c || '\r' == c ) // Zeilenende
{
aLine = aLine.trim();
- if( aLine.getLength() )
+ if( !aLine.isEmpty() )
CheckLine( aLine ); // Zeile auswerten
aLine = rtl::OString();
}
else
aLine = rtl::OString(c);
}
- if( aLine.getLength() )
+ if( !aLine.isEmpty() )
CheckLine( aLine ); // letzte Zeile auswerten
}
aStream.Close();
diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx
index c26d0c89873d..a66d224888fc 100644
--- a/sw/source/core/text/EnhancedPDFExportHelper.cxx
+++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx
@@ -1519,7 +1519,7 @@ SwEnhancedPDFExportHelper::SwEnhancedPDFExportHelper( SwEditShell& rSh,
mbSkipEmptyPages( bSkipEmptyPages ),
mbEditEngineOnly( bEditEngineOnly )
{
- if ( rPageRange.getLength() )
+ if ( !rPageRange.isEmpty() )
mpRangeEnum = new StringRangeEnumerator( rPageRange, 0, mrSh.GetPageCount()-1 );
if ( mbSkipEmptyPages )
diff --git a/sw/source/core/text/wrong.cxx b/sw/source/core/text/wrong.cxx
index 6764f051d748..2441f94a1236 100644
--- a/sw/source/core/text/wrong.cxx
+++ b/sw/source/core/text/wrong.cxx
@@ -188,7 +188,7 @@ MSHORT SwWrongList::GetWrongPos( xub_StrLen nValue ) const
{
// For smart tag lists, we may not use a binary search. We return the
// position of the first smart tag which coveres nValue
- if ( 0 != maList[0].maType.getLength() || maList[0].mpSubList )
+ if ( !maList[0].maType.isEmpty() || maList[0].mpSubList )
{
std::vector<SwWrongArea>::const_iterator aIter = maList.begin();
while ( aIter != maList.end() )
diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx
index e8335ee79654..71749fdeb1bc 100644
--- a/sw/source/core/txtnode/txtedt.cxx
+++ b/sw/source/core/txtnode/txtedt.cxx
@@ -1087,7 +1087,7 @@ sal_uInt16 SwTxtNode::Convert( SwConversionArgs &rArgs )
m_Text = aOldTxt;
}
- return rArgs.aConvText.getLength() ? 1 : 0;
+ return rArgs.aConvText.isEmpty() ? 0 : 1;
}
// Die Aehnlichkeiten zu SwTxtNode::Spell sind beabsichtigt ...
@@ -1828,7 +1828,7 @@ void SwTxtNode::CountWords( SwDocStat& rStat,
const sal_uInt32 nExpandBegin = ModelToViewHelper::ConvertToViewPosition( pConversionMap, nStt );
const sal_uInt32 nExpandEnd = ModelToViewHelper::ConvertToViewPosition( pConversionMap, nEnd );
- if ( aExpandText.getLength() <= 0 )
+ if ( aExpandText.isEmpty() )
{
OSL_ENSURE(aExpandText.getLength() >= 0, "Node text expansion error: length < 0." );
return;
diff --git a/sw/source/core/undo/unins.cxx b/sw/source/core/undo/unins.cxx
index 00c7b58e748a..f08cfa0ad176 100644
--- a/sw/source/core/undo/unins.cxx
+++ b/sw/source/core/undo/unins.cxx
@@ -699,7 +699,7 @@ void SwUndoReplace::Impl::UndoImpl(::sw::UndoRedoContext & rContext)
pNd->RestoreMetadata(m_pMetadataUndoStart);
}
- if (m_sOld.getLength())
+ if (!m_sOld.isEmpty())
{
pNd->InsertText( m_sOld, aIdx );
}
diff --git a/sw/source/core/unocore/XMLRangeHelper.cxx b/sw/source/core/unocore/XMLRangeHelper.cxx
index e77b416a86c8..8b49a5ea7a60 100644
--- a/sw/source/core/unocore/XMLRangeHelper.cxx
+++ b/sw/source/core/unocore/XMLRangeHelper.cxx
@@ -287,7 +287,7 @@ bool lcl_getCellRangeAddressFromXMLString(
sTableSecondName );
}
if( bResult &&
- sTableSecondName.getLength() &&
+ !sTableSecondName.isEmpty() &&
! sTableSecondName.equals( rOutRange.aTableName ))
bResult = false;
}
@@ -364,7 +364,7 @@ OUString getXMLStringFromCellRange( const CellRange & rRange )
::rtl::OUStringBuffer aBuffer;
- if( (rRange.aTableName).getLength())
+ if( !rRange.aTableName.isEmpty())
{
bool bNeedsEscaping = ( rRange.aTableName.indexOf( aQuote ) > -1 );
bool bNeedsQuoting = bNeedsEscaping || ( rRange.aTableName.indexOf( aSpace ) > -1 );
diff --git a/sw/source/core/unocore/unobkm.cxx b/sw/source/core/unocore/unobkm.cxx
index 551b083a13bc..9b335687ceba 100644
--- a/sw/source/core/unocore/unobkm.cxx
+++ b/sw/source/core/unocore/unobkm.cxx
@@ -244,7 +244,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
SwUnoInternalPaM aPam(*m_pImpl->m_pDoc);
::sw::XTextRangeToSwPaM(aPam, xTextRange);
UnoActionContext aCont(m_pImpl->m_pDoc);
- if (!m_pImpl->m_sMarkName.getLength())
+ if (m_pImpl->m_sMarkName.isEmpty())
{
m_pImpl->m_sMarkName = OUString(RTL_CONSTASCII_USTRINGPARAM("Bookmark"));
}
diff --git a/sw/source/core/unocore/unochart.cxx b/sw/source/core/unocore/unochart.cxx
index 048faf85bbef..6238767f910a 100644
--- a/sw/source/core/unocore/unochart.cxx
+++ b/sw/source/core/unocore/unochart.cxx
@@ -638,7 +638,7 @@ uno::Reference< chart2::data::XDataSource > SwChartDataProvider::Impl_createData
// get sub-ranges and check that they all are from the very same table
sal_Bool bOk = GetSubranges( aRangeRepresentation, aSubRanges, sal_True );
- if (!bOk && pDoc && aChartOleObjectName.getLength() )
+ if (!bOk && pDoc && !aChartOleObjectName.isEmpty() )
{
//try to correct the range here
//work around wrong writer ranges ( see Issue 58464 )
@@ -667,7 +667,7 @@ uno::Reference< chart2::data::XDataSource > SwChartDataProvider::Impl_createData
//thus the first row is missing and an invalid row at the end is added.
//Therefore we need to shift the range one row up
SwRangeDescriptor aDesc;
- if (aRangeRepresentation.getLength() == 0)
+ if (aRangeRepresentation.isEmpty())
return xRes; // we cant handle this thus returning an empty references
aRangeRepresentation = aRangeRepresentation.copy( 1 ); // get rid of '.' to have only the cell range left
FillRangeDescriptor( aDesc, aRangeRepresentation );
@@ -1336,7 +1336,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwChartDataProvider::detectArgume
OUString aSortedCellRanges;
for (sal_Int32 i = 0; i < nSortedRanges; ++i)
{
- if (aSortedCellRanges.getLength())
+ if (!aSortedCellRanges.isEmpty())
aSortedCellRanges += OUString::valueOf( (sal_Unicode) ';');
aSortedCellRanges += pSortedRanges[i];
}
@@ -1376,7 +1376,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwChartDataProvider::detectArgume
if (nLabelSeqLen > 0) // == 0 means no label sequence in use
bFirstCellIsLabel = sal_True;
//
- OSL_ENSURE( aSortedCellRanges.getLength(), "CellRangeRepresentation missing" );
+ OSL_ENSURE( !aSortedCellRanges.isEmpty(), "CellRangeRepresentation missing" );
OUString aBrokenCellRangeForExport( GetBrokenCellRangeForExport( aSortedCellRanges ) );
//
aResult.realloc(5);
@@ -1385,7 +1385,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwChartDataProvider::detectArgume
aResult[nProps++].Value <<= bFirstCellIsLabel;
aResult[nProps ].Name = C2U("CellRangeRepresentation");
aResult[nProps++].Value <<= aSortedCellRanges;
- if (0 != aBrokenCellRangeForExport.getLength())
+ if (!aBrokenCellRangeForExport.isEmpty())
{
aResult[nProps ].Name = C2U("BrokenCellRangeForExport");
aResult[nProps++].Value <<= aBrokenCellRangeForExport;
@@ -1857,7 +1857,7 @@ rtl::OUString SAL_CALL SwChartDataProvider::convertRangeFromXML( const rtl::OUSt
XMLRangeHelper::CellRange aCellRange( XMLRangeHelper::getCellRangeFromXMLString( aRange ));
// check that there is only one table used in all ranges
- if (aFirstFoundTable.getLength() == 0)
+ if (aFirstFoundTable.isEmpty())
aFirstFoundTable = aCellRange.aTableName;
if (aCellRange.aTableName != aFirstFoundTable)
throw lang::IllegalArgumentException();
diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx
index 4996bd3114a5..3ea75523f9af 100644
--- a/sw/source/core/unocore/unocoll.cxx
+++ b/sw/source/core/unocore/unocoll.cxx
@@ -114,7 +114,7 @@ public:
rtl::OUString SAL_CALL getCodeNameForObject( const uno::Reference< uno::XInterface >& xIf ) throw( uno::RuntimeException )
{
// Initialise the code name
- if ( msThisDocumentCodeName.getLength() == 0 )
+ if ( msThisDocumentCodeName.isEmpty() )
{
try
{
diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx
index 47be88b4cf20..b4a5c6dd5e3b 100644
--- a/sw/source/core/unocore/unocrsrhelper.cxx
+++ b/sw/source/core/unocore/unocrsrhelper.cxx
@@ -786,9 +786,9 @@ void InsertFile(SwUnoCrsr* pUnoCrsr,
uno::Reference < io::XStream > xStream;
uno::Reference < io::XInputStream > xInputStream;
- if( !sFileName.getLength() )
+ if( sFileName.isEmpty() )
aMediaDescriptor[comphelper::MediaDescriptor::PROP_URL()] >>= sFileName;
- if( !sFileName.getLength() )
+ if( sFileName.isEmpty() )
aMediaDescriptor[comphelper::MediaDescriptor::PROP_FILENAME()] >>= sFileName;
aMediaDescriptor[comphelper::MediaDescriptor::PROP_INPUTSTREAM()] >>= xInputStream;
aMediaDescriptor[comphelper::MediaDescriptor::PROP_STREAM()] >>= xStream;
@@ -800,7 +800,7 @@ void InsertFile(SwUnoCrsr* pUnoCrsr,
if ( !xInputStream.is() && xStream.is() )
xInputStream = xStream->getInputStream();
- if(!pDocSh || (!sFileName.getLength() && !xInputStream.is()))
+ if(!pDocSh || (sFileName.isEmpty() && !xInputStream.is()))
return;
SfxObjectFactory& rFact = pDocSh->GetFactory();
@@ -833,7 +833,7 @@ void InsertFile(SwUnoCrsr* pUnoCrsr,
pMed = xReadStorage.is() ?
new SfxMedium(xReadStorage, sBaseURL, 0 ) :
new SfxMedium(sFileName, STREAM_READ, sal_True, 0, 0 );
- if( sBaseURL.getLength() )
+ if( !sBaseURL.isEmpty() )
pMed->GetItemSet()->Put( SfxStringItem( SID_DOC_BASEURL, sBaseURL ) );
SfxFilterMatcher aMatcher( rFact.GetFilterContainer()->GetName() );
@@ -864,9 +864,9 @@ void InsertFile(SwUnoCrsr* pUnoCrsr,
pMed = new SfxMedium(sFileName, STREAM_READ, sal_True, pFilter, 0);
}
}
- if(sFilterOptions.getLength())
+ if(!sFilterOptions.isEmpty())
pMed->GetItemSet()->Put( SfxStringItem( SID_FILE_FILTEROPTIONS, sFilterOptions ) );
- if( sBaseURL.getLength())
+ if(!sBaseURL.isEmpty())
pMed->GetItemSet()->Put( SfxStringItem( SID_DOC_BASEURL, sBaseURL ) );
}
@@ -883,7 +883,7 @@ void InsertFile(SwUnoCrsr* pUnoCrsr,
SwReader* pRdr;
SfxItemSet* pSet = pMed->GetItemSet();
pSet->Put(SfxBoolItem(FN_API_CALL, sal_True));
- if(sPassword.getLength())
+ if(!sPassword.isEmpty())
pSet->Put(SfxStringItem(SID_PASSWORD, sPassword));
Reader *pRead = pDocSh->StartConvertFrom( *pMed, &pRdr, 0, pUnoCrsr);
if( pRead )
@@ -954,7 +954,7 @@ sal_Bool DocInsertStringSplitCR(
{
OSL_ENSURE( nIdx - nStartIdx >= 0, "index negative!" );
aTxt = rText.Copy( nStartIdx, nIdx - nStartIdx );
- if (aTxt.getLength() &&
+ if (!aTxt.isEmpty() &&
!rDoc.InsertString( rNewCursor, aTxt, nInsertFlags ))
{
OSL_FAIL( "Doc->Insert(Str) failed." );
@@ -969,7 +969,7 @@ sal_Bool DocInsertStringSplitCR(
nIdx = rText.Search( '\r', nStartIdx );
}
aTxt = rText.Copy( nStartIdx );
- if (aTxt.getLength() &&
+ if (!aTxt.isEmpty() &&
!rDoc.InsertString( rNewCursor, aTxt, nInsertFlags ))
{
OSL_FAIL( "Doc->Insert(Str) failed." );
diff --git a/sw/source/core/unocore/unoftn.cxx b/sw/source/core/unocore/unoftn.cxx
index 8bd69c19bfcf..3e1cb79e1a8e 100644
--- a/sw/source/core/unocore/unoftn.cxx
+++ b/sw/source/core/unocore/unoftn.cxx
@@ -335,7 +335,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
pNewDoc->DeleteAndJoin(aPam);
aPam.DeleteMark();
SwFmtFtn aFootNote(m_pImpl->m_bIsEndnote);
- if (m_pImpl->m_sLabel.getLength())
+ if (!m_pImpl->m_sLabel.isEmpty())
{
aFootNote.SetNumStr(m_pImpl->m_sLabel);
}
diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx
index f4fd5d7a9d51..de9d4331f5f9 100644
--- a/sw/source/core/unocore/unoidx.cxx
+++ b/sw/source/core/unocore/unoidx.cxx
@@ -1435,7 +1435,7 @@ SwXDocumentIndex::setName(const OUString& rName) throw (uno::RuntimeException)
{
SolarMutexGuard g;
- if (!rName.getLength())
+ if (rName.isEmpty())
{
throw uno::RuntimeException();
}
@@ -1805,7 +1805,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
break;
case TOX_USER:
{
- if (!m_pImpl->m_sUserIndexName.getLength())
+ if (m_pImpl->m_sUserIndexName.isEmpty())
{
pTOXType = pDoc->GetTOXType( m_pImpl->m_eTOXType, 0 );
}
@@ -1845,30 +1845,30 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
//which must now return sal_True
::sw::XTextRangeToSwPaM(aPam, xTextRange);
SwTOXMark aMark (pTOXType);
- if (m_pImpl->m_sAltText.getLength())
+ if (!m_pImpl->m_sAltText.isEmpty())
{
aMark.SetAlternativeText(m_pImpl->m_sAltText);
}
switch (m_pImpl->m_eTOXType)
{
case TOX_INDEX:
- if (m_pImpl->m_sPrimaryKey.getLength())
+ if (!m_pImpl->m_sPrimaryKey.isEmpty())
{
aMark.SetPrimaryKey(m_pImpl->m_sPrimaryKey);
}
- if (m_pImpl->m_sSecondaryKey.getLength())
+ if (!m_pImpl->m_sSecondaryKey.isEmpty())
{
aMark.SetSecondaryKey(m_pImpl->m_sSecondaryKey);
}
- if (m_pImpl->m_sTextReading.getLength())
+ if (!m_pImpl->m_sTextReading.isEmpty())
{
aMark.SetTextReading(m_pImpl->m_sTextReading);
}
- if (m_pImpl->m_sPrimaryKeyReading.getLength())
+ if (!m_pImpl->m_sPrimaryKeyReading.isEmpty())
{
aMark.SetPrimaryKeyReading(m_pImpl->m_sPrimaryKeyReading);
}
- if (m_pImpl->m_sSecondaryKeyReading.getLength())
+ if (!m_pImpl->m_sSecondaryKeyReading.isEmpty())
{
aMark.SetSecondaryKeyReading(m_pImpl->m_sSecondaryKeyReading);
}
@@ -2850,7 +2850,7 @@ throw (lang::IllegalArgumentException, lang::IndexOutOfBoundsException,
throw lang::IllegalArgumentException();
}
aToken.cTabFillChar =
- (sFillChar.getLength()) ? sFillChar[0] : ' ';
+ sFillChar.isEmpty() ? ' ' : sFillChar[0];
}
else if (pProperties[j].Name.equalsAsciiL(
RTL_CONSTASCII_STRINGPARAM("Text")))
diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx
index 6d6f3c1ff37b..3262b35f7a09 100644
--- a/sw/source/core/unocore/unoobj2.cxx
+++ b/sw/source/core/unocore/unoobj2.cxx
@@ -885,7 +885,7 @@ throw (uno::RuntimeException)
m_pImpl->m_rDoc.DeleteAndJoin(aCursor);
}
- if (rText.getLength())
+ if (!rText.isEmpty())
{
SwUnoCursorHelper::DocInsertStringSplitCR(
m_pImpl->m_rDoc, aCursor, rText, bForceExpandHints);
@@ -1727,7 +1727,7 @@ void SwUnoCursorHelper::SetString(SwCursor & rCursor, const OUString& rString)
{
pDoc->DeleteAndJoin(rCursor);
}
- if (rString.getLength())
+ if (!rString.isEmpty())
{
String aText(rString);
const bool bSuccess( SwUnoCursorHelper::DocInsertStringSplitCR(
diff --git a/sw/source/core/unocore/unoparagraph.cxx b/sw/source/core/unocore/unoparagraph.cxx
index a9cbe42f4bf0..c4e9d6144633 100644
--- a/sw/source/core/unocore/unoparagraph.cxx
+++ b/sw/source/core/unocore/unoparagraph.cxx
@@ -331,7 +331,7 @@ SwXParagraph::attachToText(SwXText & rParent, SwTxtNode & rTxtNode)
rTxtNode.Add(m_pImpl.get());
rTxtNode.SetXParagraph(uno::Reference<text::XTextContent>(this));
m_pImpl->m_xParentText = &rParent;
- if (m_pImpl->m_sText.getLength())
+ if (!m_pImpl->m_sText.isEmpty())
{
try { setString(m_pImpl->m_sText); }
catch(...){}
diff --git a/sw/source/core/unocore/unoredline.cxx b/sw/source/core/unocore/unoredline.cxx
index fececdb91365..977730e83641 100644
--- a/sw/source/core/unocore/unoredline.cxx
+++ b/sw/source/core/unocore/unoredline.cxx
@@ -448,7 +448,7 @@ void SwXRedline::setPropertyValue( const OUString& rPropertyName, const uno::Any
{
OSL_FAIL("currently not available");
OUString sTmp; aValue >>= sTmp;
- if(!sTmp.getLength())
+ if(sTmp.isEmpty())
throw lang::IllegalArgumentException();
}
else if(rPropertyName.equalsAsciiL(SW_PROP_NAME(UNO_NAME_REDLINE_SUCCESSOR_DATA)))
diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx
index 836c6790111d..bfb786f0707d 100644
--- a/sw/source/core/unocore/unosect.cxx
+++ b/sw/source/core/unocore/unosect.cxx
@@ -299,14 +299,14 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
UnoActionContext aCont(pDoc);
pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_INSSECTION, NULL );
- if (!m_pImpl->m_sName.getLength())
+ if (m_pImpl->m_sName.isEmpty())
{
m_pImpl->m_sName = C2U("TextSection");
}
SectionType eType = (m_pImpl->m_pProps->m_bDDE)
? DDE_LINK_SECTION
- : ((m_pImpl->m_pProps->m_sLinkFileName.getLength() ||
- m_pImpl->m_pProps->m_sSectionRegion.getLength())
+ : ((!m_pImpl->m_pProps->m_sLinkFileName.isEmpty() ||
+ !m_pImpl->m_pProps->m_sSectionRegion.isEmpty())
? FILE_LINK_SECTION : CONTENT_SECTION);
// index header section?
if (m_pImpl->m_bIndexHeader)
@@ -405,7 +405,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
// XML import must hide sections depending on their old
// condition status
- if (m_pImpl->m_pProps->m_sCondition.getLength() != 0)
+ if (!m_pImpl->m_pProps->m_sCondition.isEmpty())
{
pRet->SetCondHidden(m_pImpl->m_pProps->m_bCondHidden);
}
@@ -690,12 +690,12 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
else
{
if (pSectionData->GetType() != FILE_LINK_SECTION &&
- aLink.FileURL.getLength())
+ !aLink.FileURL.isEmpty())
{
pSectionData->SetType(FILE_LINK_SECTION);
}
::rtl::OUStringBuffer sFileNameBuf;
- if (aLink.FileURL.getLength())
+ if (!aLink.FileURL.isEmpty())
{
sFileNameBuf.append( URIHelper::SmartRel2Abs(
pFmt->GetDoc()->GetDocShell()->GetMedium()
@@ -730,7 +730,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
else
{
if (pSectionData->GetType() != FILE_LINK_SECTION &&
- sLink.getLength())
+ !sLink.isEmpty())
{
pSectionData->SetType(FILE_LINK_SECTION);
}
diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx
index 76cf9c8cf488..d347c0cf93c5 100644
--- a/sw/source/core/unocore/unosett.cxx
+++ b/sw/source/core/unocore/unosett.cxx
@@ -1925,7 +1925,7 @@ void SwXNumberingRules::SetNumberingRuleByIndex(
{
// #i93725#
// do not accept "empty" font
- if ( pDesc->Name.getLength() > 0 )
+ if ( !pDesc->Name.isEmpty() )
{
Font aFont;
SvxUnoFontDescriptor::ConvertToFont( *pDesc, aFont );
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index 9b8b4959e67c..5e6375458429 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -380,7 +380,7 @@ void SwXStyleFamilies::loadStylesFromURL(const OUString& rURL,
sal_Bool bLoadStyleOverwrite = sal_True;
sal_Bool bLoadStyleNumbering = sal_True;
sal_Bool bLoadStyleFrame = sal_True;
- if(IsValid() && rURL.getLength())
+ if(IsValid() && !rURL.isEmpty())
{
const uno::Any* pVal;
int nCount = aOptions.getLength();
@@ -1974,7 +1974,7 @@ void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
{
OUString sName;
rValue >>= sName;
- SwRegisterItem aReg( sName.getLength() != 0);
+ SwRegisterItem aReg( !sName.isEmpty() );
aReg.SetWhich(SID_SWREGISTER_MODE);
rBase.GetItemSet().Put(aReg);
String aString;
@@ -2000,7 +2000,7 @@ void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
SwStyleNameMapper::FillUIName(sTmp, sStyle, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, sal_True );
pRuby->SetCharFmtName( sTmp );
pRuby->SetCharFmtId( 0 );
- if(sTmp.getLength())
+ if(!sTmp.isEmpty())
{
sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName( sTmp, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT );
pRuby->SetCharFmtId(nId);
@@ -2063,7 +2063,7 @@ put_itemset:
OUString sNewNumberingRuleName;
rValue >>= sNewNumberingRuleName;
String sTmp( sNewNumberingRuleName );
- if ( sNewNumberingRuleName.getLength() == 0 ||
+ if ( sNewNumberingRuleName.isEmpty() ||
sTmp != pDoc->GetOutlineNumRule()->GetName() )
{
rBase.mxNewBase->GetCollection()->DeleteAssignmentToListLevelOfOutlineStyle();
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index 42cf9b21c993..a928d15b3a62 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -709,7 +709,7 @@ void lcl_setString( SwXCell &rCell, const rtl::OUString &rTxt,
double lcl_getValue( SwXCell &rCell )
{
double fRet;
- if(rCell.IsValid() && rCell.getString().getLength()!=0)
+ if(rCell.IsValid() && !rCell.getString().isEmpty())
fRet = rCell.pBox->GetFrmFmt()->GetTblBoxValue().GetValue();
else
::rtl::math::setNan( &fRet );
diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx
index 180dd3738551..db82b1815f89 100644
--- a/sw/source/core/unocore/unotext.cxx
+++ b/sw/source/core/unocore/unotext.cxx
@@ -1404,7 +1404,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
pCursor->MovePara( fnParaCurr, fnParaEnd );
m_pImpl->m_pDoc->DontExpandFmt( *pCursor->Start() );
- if (rText.getLength())
+ if (!rText.isEmpty())
{
const xub_StrLen nContentPos = pCursor->GetPoint()->nContent.GetIndex();
SwUnoCursorHelper::DocInsertStringSplitCR(
diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx
index c16febe8a9b5..46598df63ed1 100644
--- a/sw/source/filter/html/css1atr.cxx
+++ b/sw/source/filter/html/css1atr.cxx
@@ -854,7 +854,7 @@ sal_uInt16 SwHTMLWriter::GetCSS1Selector( const SwFmt *pFmt, rtl::OString& rToke
// Wenn eine PoolId gesetzt ist, entspricht der Name der
// Vorlage dem szugehoerigen Token
- OSL_ENSURE( (rRefPoolId != 0) == (rToken.getLength() > 0),
+ OSL_ENSURE( (rRefPoolId != 0) == (!rToken.isEmpty()),
"Token missing" );
}
else
@@ -1000,11 +1000,11 @@ sal_uInt16 SwHTMLWriter::GetCSS1Selector( const SwFmt *pFmt, rtl::OString& rToke
// Wenn ein Token gesetzt ist, enthaelt nPoolId die dazugehoerige
// Vorlage
- if( rToken.getLength() && !rRefPoolId )
+ if( !rToken.isEmpty() && !rRefPoolId )
rRefPoolId = nPoolId;
}
- if( rToken.getLength() || bStop )
+ if( !rToken.isEmpty() || bStop )
{
// Anhalten wenn eine HTML-Tag-Vorlage gefunden wurde
break;
@@ -1017,7 +1017,7 @@ sal_uInt16 SwHTMLWriter::GetCSS1Selector( const SwFmt *pFmt, rtl::OString& rToke
}
}
- if( rToken.getLength() )
+ if( !rToken.isEmpty() )
{
// Es ist eine HTML-Tag-Vorlage
if( !nDeep )
@@ -1064,7 +1064,7 @@ static sal_uInt16 GetCSS1Selector( const SwFmt *pFmt, String& rSelector,
rRefPoolId, &aPseudo );
if( nDeep )
{
- if( aToken.getLength() )
+ if( !aToken.isEmpty() )
rSelector = String( aToken, RTL_TEXTENCODING_ASCII_US );
else
rSelector.Erase();
diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx
index 8cc76ac6ed6c..73de8423589c 100644
--- a/sw/source/filter/html/htmlatr.cxx
+++ b/sw/source/filter/html/htmlatr.cxx
@@ -341,7 +341,7 @@ SwHTMLFmtInfo::SwHTMLFmtInfo( const SwFmt *pF, SwDoc *pDoc, SwDoc *pTemplate,
// Den Selektor des Formats holen
sal_uInt16 nDeep = SwHTMLWriter::GetCSS1Selector( pFmt, aToken, aClass,
nRefPoolId );
- OSL_ENSURE( nDeep ? aToken.getLength()>0 : aToken.getLength()==0,
+ OSL_ENSURE( nDeep ? !aToken.isEmpty() : aToken.isEmpty(),
"Hier stimmt doch was mit dem Token nicht!" );
OSL_ENSURE( nDeep ? nRefPoolId : !nRefPoolId,
"Hier stimmt doch was mit der Vergleichs-Vorlage nicht!" );
@@ -642,7 +642,7 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
// Jetzt wird festgelegt, was aufgrund des Tokens so moeglich ist
sal_uInt16 nToken = 0; // Token fuer Tag-Wechsel
sal_Bool bOutNewLine = sal_False; // nur ein LF ausgeben?
- if( pFmtInfo->aToken.getLength() )
+ if( !pFmtInfo->aToken.isEmpty() )
{
// Es ist eine HTML-Tag-Vorlage oder die Vorlage ist von einer
// solchen abgeleitet
@@ -1117,7 +1117,7 @@ void OutHTML_SwFmtOff( Writer& rWrt, const SwHTMLTxtCollOutputInfo& rInfo )
SwHTMLWriter & rHWrt = (SwHTMLWriter&)rWrt;
// wenn es kein Token gibt haben wir auch nichts auszugeben
- if( !rInfo.aToken.getLength() )
+ if( rInfo.aToken.isEmpty() )
{
rHWrt.FillNextNumInfo();
const SwHTMLNumRuleInfo& rNextInfo = *rHWrt.GetNextNumInfo();
@@ -1837,7 +1837,7 @@ void HTMLEndPosLst::InsertNoScript( const SfxPoolItem& rItem,
const SwCharFmt* pFmt = rChrFmt.GetCharFmt();
const SwHTMLFmtInfo *pFmtInfo = GetFmtInfo( *pFmt, rFmtInfos );
- if( pFmtInfo->aToken.getLength() )
+ if( !pFmtInfo->aToken.isEmpty() )
{
// das Zeichenvorlagen-Tag muss vor den harten
// Attributen ausgegeben werden
@@ -3230,7 +3230,7 @@ static Writer& OutHTML_SwTxtCharFmt( Writer& rWrt, const SfxPoolItem& rHt )
{
rtl::OStringBuffer sOut;
sOut.append('<');
- if( pFmtInfo->aToken.getLength() > 0 )
+ if( !pFmtInfo->aToken.isEmpty() )
sOut.append(pFmtInfo->aToken);
else
sOut.append(OOO_STRING_SVTOOLS_HTML_span);
@@ -3268,7 +3268,7 @@ static Writer& OutHTML_SwTxtCharFmt( Writer& rWrt, const SfxPoolItem& rHt )
else
{
HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(),
- pFmtInfo->aToken.getLength() ? pFmtInfo->aToken.getStr()
+ !pFmtInfo->aToken.isEmpty() ? pFmtInfo->aToken.getStr()
: OOO_STRING_SVTOOLS_HTML_span,
sal_False );
}
diff --git a/sw/source/filter/html/htmldraw.cxx b/sw/source/filter/html/htmldraw.cxx
index c99433a28f55..14d81d4c2b71 100644
--- a/sw/source/filter/html/htmldraw.cxx
+++ b/sw/source/filter/html/htmldraw.cxx
@@ -856,7 +856,7 @@ Writer& OutHTML_DrawFrmFmtAsMarquee( Writer& rWrt,
HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_marquee, sal_False );
- if( aEndTags.getLength() )
+ if( !aEndTags.isEmpty() )
rWrt.Strm() << aEndTags.getStr();
return rWrt;
diff --git a/sw/source/filter/html/htmlfly.cxx b/sw/source/filter/html/htmlfly.cxx
index 7742f20a0f2f..45dfe8e683c3 100644
--- a/sw/source/filter/html/htmlfly.cxx
+++ b/sw/source/filter/html/htmlfly.cxx
@@ -1195,7 +1195,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
rHTMLWrt.Strm() << '>';
- if( aEndTags.getLength() )
+ if( !aEndTags.isEmpty() )
rWrt.Strm() << aEndTags.getStr();
if( rHTMLWrt.aINetFmts.Count() )
@@ -1488,7 +1488,7 @@ static Writer& OutHTML_FrmFmtAsSpacer( Writer& rWrt, const SwFrmFmt& rFrmFmt )
rtl::OString aEndTags = rHTMLWrt.OutFrmFmtOptions( rFrmFmt, aEmptyStr, HTML_FRMOPTS_SPACER );
rWrt.Strm() << '>';
- if( aEndTags.getLength() )
+ if( !aEndTags.isEmpty() )
rWrt.Strm() << aEndTags.getStr();
return rWrt;
@@ -1553,7 +1553,7 @@ static Writer& OutHTML_FrmFmtAsDivOrSpan( Writer& rWrt,
rHTMLWrt.OutNewLine();
HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), pStr, sal_False );
- if( aEndTags.getLength() )
+ if( !aEndTags.isEmpty() )
rWrt.Strm() << aEndTags.getStr();
return rWrt;
@@ -1733,7 +1733,7 @@ Writer& OutHTML_HeaderFooter( Writer& rWrt, const SwFrmFmt& rFrmFmt,
const SwStartNode* pSttNd = rWrt.pDoc->GetNodes()[nStt]->GetStartNode();
OSL_ENSURE( pSttNd, "Wo ist der Start-Node" );
- if( !bHeader && aSpacer.getLength() )
+ if( !bHeader && !aSpacer.isEmpty() )
{
rHTMLWrt.OutNewLine();
HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), aSpacer.getStr() );
@@ -1754,7 +1754,7 @@ Writer& OutHTML_HeaderFooter( Writer& rWrt, const SwFrmFmt& rFrmFmt,
rHTMLWrt.Out_SwDoc( rWrt.pCurPam );
}
- if( bHeader && aSpacer.getLength() )
+ if( bHeader && !aSpacer.isEmpty() )
{
rHTMLWrt.OutNewLine();
HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), aSpacer.getStr() );
diff --git a/sw/source/filter/html/htmlforw.cxx b/sw/source/filter/html/htmlforw.cxx
index a71c2d3450ba..f2638dc09ba2 100644
--- a/sw/source/filter/html/htmlforw.cxx
+++ b/sw/source/filter/html/htmlforw.cxx
@@ -204,7 +204,7 @@ void lcl_html_outEvents( SvStream& rStrm,
rtl::OStringBuffer sOut;
sOut.append(' ');
if( pOpt && (EXTENDED_STYPE != eScriptType ||
- !pDescs[i].AddListenerParam.getLength()) )
+ pDescs[i].AddListenerParam.isEmpty()) )
sOut.append(pOpt);
else
{
@@ -220,7 +220,7 @@ void lcl_html_outEvents( SvStream& rStrm,
HTMLOutFuncs::Out_String( rStrm, pDescs[i].ScriptCode, eDestEnc, pNonConvertableChars );
rStrm << '\"';
if( EXTENDED_STYPE == eScriptType &&
- pDescs[i].AddListenerParam.getLength() )
+ !pDescs[i].AddListenerParam.isEmpty() )
{
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_sdaddparam)
.append(rtl::OUStringToOString(sListener,
@@ -514,7 +514,7 @@ void SwHTMLWriter::OutForm( sal_Bool bOn,
uno::Any aTmp = xFormPropSet->getPropertyValue(
OUString(RTL_CONSTASCII_USTRINGPARAM("Name")) );
if( aTmp.getValueType() == ::getCppuType((const OUString*)0) &&
- ((OUString*)aTmp.getValue())->getLength() )
+ !((OUString*)aTmp.getValue())->isEmpty() )
{
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_name).append("=\"");
Strm() << sOut.makeStringAndClear().getStr();
@@ -526,7 +526,7 @@ void SwHTMLWriter::OutForm( sal_Bool bOn,
aTmp = xFormPropSet->getPropertyValue(
OUString(RTL_CONSTASCII_USTRINGPARAM("TargetURL")) );
if( aTmp.getValueType() == ::getCppuType((const OUString*)0) &&
- ((OUString*)aTmp.getValue())->getLength() )
+ !((OUString*)aTmp.getValue())->isEmpty() )
{
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_action).append("=\"");
Strm() << sOut.makeStringAndClear().getStr();
@@ -578,7 +578,7 @@ void SwHTMLWriter::OutForm( sal_Bool bOn,
aTmp = xFormPropSet->getPropertyValue(
OUString(RTL_CONSTASCII_USTRINGPARAM("TargetFrame")) );
if( aTmp.getValueType() == ::getCppuType((const OUString*)0)&&
- ((OUString*)aTmp.getValue())->getLength() )
+ !((OUString*)aTmp.getValue())->isEmpty() )
{
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_target).append("=\"");
Strm() << sOut.makeStringAndClear().getStr();
@@ -653,7 +653,7 @@ void SwHTMLWriter::OutHiddenControls(
aTmp = xPropSet->getPropertyValue(
OUString(RTL_CONSTASCII_USTRINGPARAM("Name")) );
if( aTmp.getValueType() == ::getCppuType((const OUString*)0) &&
- ((OUString*)aTmp.getValue())->getLength() )
+ !((OUString*)aTmp.getValue())->isEmpty() )
{
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_name)
.append("=\"");
@@ -665,7 +665,7 @@ void SwHTMLWriter::OutHiddenControls(
aTmp = xPropSet->getPropertyValue(
OUString(RTL_CONSTASCII_USTRINGPARAM("HiddenValue")) );
if( aTmp.getValueType() == ::getCppuType((const OUString*)0) &&
- ((OUString*)aTmp.getValue())->getLength() )
+ !((OUString*)aTmp.getValue())->isEmpty() )
{
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_value)
.append("=\"");
@@ -812,7 +812,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
{
const OUString& rVal = *(OUString*)aTmp.getValue();
- if( !rVal.getLength() )
+ if( rVal.isEmpty() )
bEmptyValue = sal_True;
else if( rVal.compareToAscii( OOO_STRING_SVTOOLS_HTML_on ) != 0 )
sValue = rVal;
@@ -844,7 +844,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
aTmp = xPropSet->getPropertyValue(
OUString(RTL_CONSTASCII_USTRINGPARAM("Label")) );
if( aTmp.getValueType() == ::getCppuType((const OUString*)0) &&
- ((OUString*)aTmp.getValue())->getLength() )
+ !((OUString*)aTmp.getValue())->isEmpty() )
{
sValue = *(OUString*)aTmp.getValue();
}
@@ -964,7 +964,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
{
aTmp = xPropSet->getPropertyValue( sDefaultText );
if( aTmp.getValueType() == ::getCppuType((const OUString*)0) &&
- ((OUString*)aTmp.getValue())->getLength() )
+ !((OUString*)aTmp.getValue())->isEmpty() )
{
sValue = *(OUString*)aTmp.getValue();
}
@@ -1013,7 +1013,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
aTmp = xPropSet->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Name")) );
if( aTmp.getValueType() == ::getCppuType((const OUString*)0) &&
- ((OUString*)aTmp.getValue())->getLength() )
+ !((OUString*)aTmp.getValue())->isEmpty() )
{
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_name).
append(RTL_CONSTASCII_STRINGPARAM("=\""));
@@ -1030,7 +1030,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_disabled);
}
- if( sValue.getLength() || bEmptyValue )
+ if( !sValue.isEmpty() || bEmptyValue )
{
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_value).append(
RTL_CONSTASCII_STRINGPARAM("=\""));
@@ -1046,7 +1046,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
aTmp = xPropSet->getPropertyValue(
OUString(RTL_CONSTASCII_USTRINGPARAM("ImageURL")) );
if( aTmp.getValueType() == ::getCppuType((const OUString*)0) &&
- ((OUString*)aTmp.getValue())->getLength() )
+ !((OUString*)aTmp.getValue())->isEmpty() )
{
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_src).
append(RTL_CONSTASCII_STRINGPARAM("=\""));
@@ -1160,7 +1160,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
{
aTmp = xPropSet->getPropertyValue( sPropName );
if( aTmp.getValueType() == ::getCppuType((const OUString*)0) &&
- ((OUString*)aTmp.getValue())->getLength() )
+ !((OUString*)aTmp.getValue())->isEmpty() )
{
Font aFixedFont( OutputDevice::GetDefaultFont(
DEFAULTFONT_FIXED, LANGUAGE_ENGLISH_US,
@@ -1297,7 +1297,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
rHTMLWrt.OutNewLine(); // jede Option bekommt eine eigene Zeile
sOut.append('<').append(OOO_STRING_SVTOOLS_HTML_option);
- if( sVal.getLength() || bEmptyVal )
+ if( !sVal.isEmpty() || bEmptyVal )
{
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_value).
append(RTL_CONSTASCII_STRINGPARAM("=\""));
@@ -1330,7 +1330,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
aTmp = xPropSet->getPropertyValue(
OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultText")) );
if( aTmp.getValueType() == ::getCppuType((const OUString*)0)&&
- ((OUString*)aTmp.getValue())->getLength() )
+ !((OUString*)aTmp.getValue())->isEmpty() )
{
sVal = String( *(OUString*)aTmp.getValue() );
}
@@ -1353,7 +1353,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
{
aTmp = xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("Label")));
if( aTmp.getValueType() == ::getCppuType((const OUString*)0) &&
- ((OUString*)aTmp.getValue())->getLength() )
+ !((OUString*)aTmp.getValue())->isEmpty() )
{
sValue = *(OUString*)aTmp.getValue();
HTMLOutFuncs::Out_String( rWrt.Strm(), sValue,
@@ -1361,7 +1361,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
}
}
- if( aEndTags.getLength() )
+ if( !aEndTags.isEmpty() )
rWrt.Strm() << aEndTags.getStr();
// Controls sind nicht absatz-gebunden, deshalb kein LF mehr ausgeben!
diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx
index cb3692bd6b28..31f00de2d0c3 100644
--- a/sw/source/filter/html/htmlplug.cxx
+++ b/sw/source/filter/html/htmlplug.cxx
@@ -1033,7 +1033,7 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
::rtl::OUString aStr;
String aURL;
aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PluginURL")) );
- if( (aAny >>= aStr) && aStr.getLength() )
+ if( (aAny >>= aStr) && !aStr.isEmpty() )
{
aURL = URIHelper::simpleNormalizedMakeRelative( rWrt.GetBaseURL(),
aStr);
@@ -1050,7 +1050,7 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
::rtl::OUString aType;
aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PluginMimeType")) );
- if( (aAny >>= aType) && aType.getLength() )
+ if( (aAny >>= aType) && !aType.isEmpty() )
{
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_type)
.append("=\"");
@@ -1082,7 +1082,7 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
// CODEBASE
::rtl::OUString aCd;
aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletCodeBase")) );
- if( (aAny >>= aCd) && aCd.getLength() )
+ if( (aAny >>= aCd) && !aCd.isEmpty() )
{
String sCodeBase( URIHelper::simpleNormalizedMakeRelative(rWrt.GetBaseURL(), aCd) );
if( sCodeBase.Len() )
@@ -1109,7 +1109,7 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
::rtl::OUString aAppletName;
aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletName")) );
aAny >>= aAppletName;
- if( aAppletName.getLength() )
+ if( !aAppletName.isEmpty() )
{
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_name)
.append("=\"");
@@ -1248,7 +1248,7 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_iframe, sal_False );
}
- if( aEndTags.getLength() )
+ if( !aEndTags.isEmpty() )
rWrt.Strm() << aEndTags.getStr();
return rWrt;
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index b4f7f16baec3..b559b74be3a7 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -855,7 +855,7 @@ if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( sal_False ).nNode.GetIndex() )
xDPS->getDocumentProperties());
OSL_ENSURE(xDocProps.is(), "DocumentProperties is null");
if ( xDocProps.is() && (xDocProps->getAutoloadSecs() > 0) &&
- (xDocProps->getAutoloadURL().getLength() == 0) )
+ (xDocProps->getAutoloadURL().isEmpty()) )
{
xDocProps->setAutoloadURL(aPathToFile);
}
@@ -5480,10 +5480,10 @@ void SwHTMLParser::AddMetaUserDefined( ::rtl::OUString const & i_rMetaName )
{
// unless we already have 4 names, append the argument to m_InfoNames
::rtl::OUString* pName // the first empty string in m_InfoNames
- (!m_InfoNames[0].getLength() ? &m_InfoNames[0] :
- (!m_InfoNames[1].getLength() ? &m_InfoNames[1] :
- (!m_InfoNames[2].getLength() ? &m_InfoNames[2] :
- (!m_InfoNames[3].getLength() ? &m_InfoNames[3] : 0 ))));
+ (m_InfoNames[0].isEmpty() ? &m_InfoNames[0] :
+ (m_InfoNames[1].isEmpty() ? &m_InfoNames[1] :
+ (m_InfoNames[2].isEmpty() ? &m_InfoNames[2] :
+ (m_InfoNames[3].isEmpty() ? &m_InfoNames[3] : 0 ))));
if (pName)
{
(*pName) = i_rMetaName;
diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx
index 32c26112214e..346247f05949 100644
--- a/sw/source/filter/html/wrthtml.cxx
+++ b/sw/source/filter/html/wrthtml.cxx
@@ -1045,7 +1045,7 @@ void SwHTMLWriter::OutBookmarks()
// auch nicht eingelesen wird.
// erst die SWG spezifischen Daten:
- if(dynamic_cast< const ::sw::mark::IBookmark* >(pBookmark) && pBookmark->GetName().getLength() )
+ if(dynamic_cast< const ::sw::mark::IBookmark* >(pBookmark) && !pBookmark->GetName().isEmpty() )
OutAnchor( pBookmark->GetName() );
if( ++nBkmkTabPos >= pMarkAccess->getMarksCount() )
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index df37cf0f1c14..18ade4684eda 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -188,7 +188,7 @@ public:
// #TODO check if this defaulted
m_pSerializer->startElementNS( XML_w, XML_sizeAuto, FSEND );
m_pSerializer->endElementNS( XML_w, XML_sizeAuto );
- if ( rDefault.getLength() )
+ if ( !rDefault.isEmpty() )
{
m_pSerializer->singleElementNS( XML_w, XML_default,
FSNS( XML_w, XML_val ),
@@ -202,7 +202,7 @@ public:
void WriteFormText( const rtl::OUString& rName, const rtl::OUString& rDefault )
{
writeCommonStart( rName );
- if ( rDefault.getLength() )
+ if ( !rDefault.isEmpty() )
{
m_pSerializer->startElementNS( XML_w, XML_textInput, FSEND );
m_pSerializer->singleElementNS( XML_w, XML_default,
@@ -798,7 +798,7 @@ void DocxAttributeOutput::EndField_Impl( FieldInfos& rInfos )
// Write the bookmark start if any
OUString aBkmName( m_sFieldBkm );
- if ( aBkmName.getLength( ) > 0 )
+ if ( !aBkmName.isEmpty() )
{
m_pSerializer->singleElementNS( XML_w, XML_bookmarkStart,
FSNS( XML_w, XML_id ), OString::valueOf( sal_Int32( m_nNextMarkId ) ).getStr( ),
@@ -820,7 +820,7 @@ void DocxAttributeOutput::EndField_Impl( FieldInfos& rInfos )
}
// Write the bookmark end if any
- if ( aBkmName.getLength( ) > 0 )
+ if ( !aBkmName.isEmpty() )
{
m_pSerializer->singleElementNS( XML_w, XML_bookmarkEnd,
FSNS( XML_w, XML_id ), OString::valueOf( sal_Int32( m_nNextMarkId ) ).getStr( ),
@@ -1101,7 +1101,7 @@ void DocxAttributeOutput::StartRuby( const SwTxtNode& rNode, xub_StrLen nPos, co
lang::Locale aLocale( SwBreakIt::Get()->GetLocale(
rNode.GetLang( nPos ) ) );
OUString sLang( aLocale.Language );
- if ( aLocale.Country.getLength( ) > 0 )
+ if ( !aLocale.Country.isEmpty() )
sLang += OUString(RTL_CONSTASCII_USTRINGPARAM( "-" )) + OUString( aLocale.Country );
m_pSerializer->singleElementNS( XML_w, XML_lid,
FSNS( XML_w, XML_val ),
@@ -1223,7 +1223,7 @@ bool DocxAttributeOutput::StartURL( const String& rUrl, const String& rTarget )
OUStringToOString( OUString( sMark ), RTL_TEXTENCODING_UTF8 ).getStr( ) );
OUString sTarget( rTarget );
- if ( sTarget.getLength( ) > 0 )
+ if ( !sTarget.isEmpty() )
{
OString soTarget = OUStringToOString( sTarget, RTL_TEXTENCODING_UTF8 );
m_pHyperlinkAttrList->add(FSNS( XML_w, XML_tgtFrame ), soTarget.getStr());
@@ -2007,7 +2007,7 @@ void DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode& rGrfNode, const Size
nImageType = XML_embed;
}
- if ( aRelId.getLength() == 0 )
+ if ( aRelId.isEmpty() )
return;
m_pSerializer->startElementNS( XML_w, XML_drawing,
@@ -2684,7 +2684,7 @@ void DocxAttributeOutput::SectionPageNumbering( sal_uInt16 nNumType, sal_uInt16
// nNumType corresponds to w:fmt. See WW8Export::GetNumId() for more precisions
OString aFmt( impl_NumberingType( nNumType ) );
- if ( aFmt.getLength() )
+ if ( !aFmt.isEmpty() )
pAttr->add( FSNS( XML_w, XML_fmt ), aFmt.getStr() );
XFastAttributeListRef xAttrs( pAttr );
@@ -2850,7 +2850,7 @@ void DocxAttributeOutput::NumberingLevel( sal_uInt8 nLevel,
// format
OString aFmt( impl_NumberingType( nNumberingType ) );
- if ( aFmt.getLength() )
+ if ( !aFmt.isEmpty() )
m_pSerializer->singleElementNS( XML_w, XML_numFmt,
FSNS( XML_w, XML_val ), aFmt.getStr(),
FSEND );
@@ -3025,11 +3025,11 @@ void DocxAttributeOutput::CharEscapement( const SvxEscapementItem& rEscapement )
sIss = OString( "superscript" );
}
- if ( sIss.getLength( ) > 0 )
+ if ( !sIss.isEmpty() )
m_pSerializer->singleElementNS( XML_w, XML_vertAlign,
FSNS( XML_w, XML_val ), sIss.getStr(), FSEND );
- if ( sIss.getLength() == 0 || sIss.match( OString( "baseline" ) ) )
+ if ( sIss.isEmpty() || sIss.match( OString( "baseline" ) ) )
{
long nHeight = ((SvxFontHeightItem&)m_rExport.GetItem(
RES_CHRATR_FONTSIZE )).GetHeight();
@@ -4065,7 +4065,7 @@ void DocxAttributeOutput::FormatVertOrientation( const SwFmtVertOrient& rFlyVert
break;
}
- if ( sAlign.getLength() > 0 )
+ if ( !sAlign.isEmpty() )
m_pFlyAttrList->add( FSNS( XML_w, XML_yAlign ), sAlign );
else
m_pFlyAttrList->add( FSNS( XML_w, XML_y ),
@@ -4121,7 +4121,7 @@ void DocxAttributeOutput::FormatHorizOrientation( const SwFmtHoriOrient& rFlyHor
break;
}
- if ( sAlign.getLength() > 0 )
+ if ( !sAlign.isEmpty() )
m_pFlyAttrList->add( FSNS( XML_w, XML_xAlign ), sAlign );
else
m_pFlyAttrList->add( FSNS( XML_w, XML_x ),
diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx
index 98049c6fc4ea..6d8930c5b09e 100644
--- a/sw/source/filter/ww8/docxexport.cxx
+++ b/sw/source/filter/ww8/docxexport.cxx
@@ -258,12 +258,12 @@ void DocxExport::DoComboBox(const rtl::OUString& rName,
m_pDocumentFS->singleElementNS( XML_w, XML_enabled, FSEND );
- if ( rHelp.getLength( ) > 0 )
+ if ( !rHelp.isEmpty() )
m_pDocumentFS->singleElementNS( XML_w, XML_helpText,
FSNS( XML_w, XML_val ), OUStringToOString( rHelp, RTL_TEXTENCODING_UTF8 ).getStr(),
FSEND );
- if ( rToolTip.getLength( ) > 0 )
+ if ( !rToolTip.isEmpty() )
m_pDocumentFS->singleElementNS( XML_w, XML_statusText,
FSNS( XML_w, XML_val ), OUStringToOString( rToolTip, RTL_TEXTENCODING_UTF8 ).getStr(),
FSEND );
diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx
index e1d55e22abcf..8534f8200f5d 100644
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -344,18 +344,18 @@ void RtfExport::DoFormText(const SwInputField* pFld )
::rtl::OUString sStatus = pFld->GetToolTip();
m_pAttrOutput->RunText().append("{" OOO_STRING_SVTOOLS_RTF_FIELD "{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_FLDINST "{ FORMTEXT }");
m_pAttrOutput->RunText().append("{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_FORMFIELD " {" OOO_STRING_SVTOOLS_RTF_FFTYPE "0" );
- if( sHelp.getLength() )
+ if( !sHelp.isEmpty() )
m_pAttrOutput->RunText().append( OOO_STRING_SVTOOLS_RTF_FFOWNHELP );
- if( sStatus.getLength() )
+ if( !sStatus.isEmpty() )
m_pAttrOutput->RunText().append( OOO_STRING_SVTOOLS_RTF_FFOWNSTAT );
m_pAttrOutput->RunText().append( OOO_STRING_SVTOOLS_RTF_FFTYPETXT "0" );
- if( sName.getLength() )
+ if( !sName.isEmpty() )
m_pAttrOutput->RunText().append( "{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_FFNAME " ").append( OutString( sName, eDefaultEncoding )).append( "}" );
- if( sHelp.getLength() )
+ if( !sHelp.isEmpty() )
m_pAttrOutput->RunText().append( "{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_FFHELPTEXT " ").append( OutString( sHelp, eDefaultEncoding )).append( "}" );
m_pAttrOutput->RunText().append( "{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_FFDEFTEXT " ").append( OutString( sResult, eDefaultEncoding )).append( "}" );
- if( sStatus.getLength() )
+ if( !sStatus.isEmpty() )
m_pAttrOutput->RunText().append( "{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_FFSTATTEXT " ").append( OutString( sStatus, eDefaultEncoding )).append( "}");
m_pAttrOutput->RunText().append( "}}}{" OOO_STRING_SVTOOLS_RTF_FLDRSLT " " );
m_pAttrOutput->RunText().append( OutString( sResult, eDefaultEncoding )).append( "}}" );
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index ad4b03e1c7b4..998197d008c9 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -1880,7 +1880,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
rtl::OUString sOleId;
uno::Any aValue = it->second;
aValue >>= sOleId;
- if ( sOleId.getLength( ) > 0 )
+ if ( !sOleId.isEmpty() )
OutputLinkedOLE( sOleId );
}
}
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 5335ae7c9125..a14279d5f669 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -2822,7 +2822,7 @@ namespace
//See https://bugs.freedesktop.org/show_bug.cgi?id=34319 for an example
void SwWW8ImplReader::emulateMSWordAddTextToParagraph(const rtl::OUString& rAddString)
{
- if (!rAddString.getLength())
+ if (rAddString.isEmpty())
return;
uno::Reference<i18n::XBreakIterator> xBI(pBreakIt->GetBreakIter());
@@ -4233,7 +4233,7 @@ void SwWW8ImplReader::ReadDocInfo()
rtl::OUString aName = pMedium->GetName();
INetURLObject aURL( aName );
sTemplateURL = aURL.GetMainURL(INetURLObject::DECODE_TO_IURI);
- if ( sTemplateURL.getLength() > 0 )
+ if ( !sTemplateURL.isEmpty() )
xDocProps->setTemplateURL( sTemplateURL );
}
}
@@ -4253,7 +4253,7 @@ void SwWW8ImplReader::ReadDocInfo()
// attempt to convert to url ( won't work for obvious reasons on linux
if ( sPath.Len() )
::utl::LocalFileHelper::ConvertPhysicalNameToURL( sPath, aURL );
- if (!aURL.getLength())
+ if (aURL.isEmpty())
xDocProps->setTemplateURL( aURL );
else
xDocProps->setTemplateURL( sPath );
@@ -4353,7 +4353,7 @@ bool SwWW8ImplReader::ReadGlobalTemplateSettings( const rtl::OUString& sCreatedF
aURL = sGlobalTemplates[ i ];
else
osl::FileBase::getFileURLFromSystemPath( sGlobalTemplates[ i ], aURL );
- if ( !aURL.endsWithIgnoreAsciiCaseAsciiL( ".dot", 4 ) || ( sCreatedFrom.getLength() && sCreatedFrom.equals( aURL ) ) )
+ if ( !aURL.endsWithIgnoreAsciiCaseAsciiL( ".dot", 4 ) || ( !sCreatedFrom.isEmpty() && sCreatedFrom.equals( aURL ) ) )
continue; // don't try and read the same document as ourselves
SotStorageRef rRoot = new SotStorage( aURL, STREAM_STD_READWRITE, STORAGE_TRANSACTED );
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index e39f5c7d9a8b..6a7a02aad34c 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -731,7 +731,7 @@ sal_uInt16 SwWW8ImplReader::End_Field()
break;
default:
rtl::OUString aCode = maFieldStack.back().GetBookmarkCode();
- if ( aCode.getLength() > 0 )
+ if ( !aCode.isEmpty() )
{
// Unhandled field with stored code
SwPosition aEndPos = *pPaM->GetPoint();
@@ -2326,7 +2326,7 @@ bool CanUseRemoteLink(const String &rGrfName)
aCnt.getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")))
>>= aTitle;
- bUseRemote = (aTitle.getLength() > 0);
+ bUseRemote = !aTitle.isEmpty();
}
catch ( ... )
{
diff --git a/sw/source/filter/ww8/ww8toolbar.cxx b/sw/source/filter/ww8/ww8toolbar.cxx
index 06cf7e707e2b..2f18072e80d4 100644
--- a/sw/source/filter/ww8/ww8toolbar.cxx
+++ b/sw/source/filter/ww8/ww8toolbar.cxx
@@ -707,7 +707,7 @@ TBC::ImportToolBarControl( CTBWrapper& rWrapper, const css::uno::Reference< css:
if ( bBuiltin )
{
rtl::OUString sCommand = helper.MSOCommandToOOCommand( cmdId );
- if ( sCommand.getLength() > 0 )
+ if ( !sCommand.isEmpty() )
{
beans::PropertyValue aProp;
diff --git a/sw/source/filter/xml/swxml.cxx b/sw/source/filter/xml/swxml.cxx
index d0be6210d7fd..5a6e5ff996d8 100644
--- a/sw/source/filter/xml/swxml.cxx
+++ b/sw/source/filter/xml/swxml.cxx
@@ -831,7 +831,7 @@ sal_uLong XMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPaM, con
StreamPath = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("dummyObjectName"));
}
- if( StreamPath.getLength() )
+ if( !StreamPath.isEmpty() )
{
sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("StreamRelPath"));
xInfoSet->setPropertyValue( sPropName, makeAny( StreamPath ) );
diff --git a/sw/source/filter/xml/wrtxml.cxx b/sw/source/filter/xml/wrtxml.cxx
index 259f9dee9621..fe1395e5f700 100644
--- a/sw/source/filter/xml/wrtxml.cxx
+++ b/sw/source/filter/xml/wrtxml.cxx
@@ -248,7 +248,7 @@ pGraphicHelper = SvXMLGraphicHelper::Create( xStg,
else
aName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "dummyObjectName" ) );
- if( aName.getLength() )
+ if( !aName.isEmpty() )
{
sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("StreamRelPath"));
xInfoSet->setPropertyValue( sPropName, makeAny( aName ) );
@@ -365,7 +365,7 @@ pGraphicHelper = SvXMLGraphicHelper::Create( xStg,
if ( xModule.is() )
{
::rtl::OUString aModuleID = xModule->getIdentifier();
- bStoreMeta = ( aModuleID.getLength()
+ bStoreMeta = ( !aModuleID.isEmpty()
&& ( aModuleID.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sdb.FormDesign" ) ) )
|| aModuleID.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sdb.TextReportDesign" ) ) ) ) );
}
diff --git a/sw/source/filter/xml/xmlbrsh.cxx b/sw/source/filter/xml/xmlbrsh.cxx
index df130d163e28..0753d8ae9603 100644
--- a/sw/source/filter/xml/xmlbrsh.cxx
+++ b/sw/source/filter/xml/xmlbrsh.cxx
@@ -221,7 +221,7 @@ void SwXMLBrushItemExport::exportXML( const SvxBrushItem& rItem )
rItem, sURL, MID_GRAPHIC_LINK, rUnitConv ) )
{
sValue = GetExport().AddEmbeddedGraphicObject( sURL );
- if( sValue.getLength() )
+ if( !sValue.isEmpty() )
{
GetExport().AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, sValue );
GetExport().AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE );
@@ -244,7 +244,7 @@ void SwXMLBrushItemExport::exportXML( const SvxBrushItem& rItem )
{
SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_STYLE, XML_BACKGROUND_IMAGE,
sal_True, sal_True );
- if( sURL.getLength() )
+ if( !sURL.isEmpty() )
{
// optional office:binary-data
GetExport().AddEmbeddedGraphicObjectAsBase64( sURL );
diff --git a/sw/source/filter/xml/xmlexpit.cxx b/sw/source/filter/xml/xmlexpit.cxx
index f1afbd08db09..5018607ef493 100644
--- a/sw/source/filter/xml/xmlexpit.cxx
+++ b/sw/source/filter/xml/xmlexpit.cxx
@@ -169,7 +169,7 @@ void SvXMLExportItemMapper::exportXML( const SvXMLExport& rExport,
for( sal_uInt16 i=0; i < nCount; i++ )
{
OUString sPrefix( pUnknown->GetAttrPrefix( i ) );
- if( sPrefix.getLength() )
+ if( !sPrefix.isEmpty() )
{
OUString sNamespace( pUnknown->GetAttrNamespace( i ) );
diff --git a/sw/source/filter/xml/xmlfmt.cxx b/sw/source/filter/xml/xmlfmt.cxx
index 8320b91a5012..5e54d6bd8b1b 100644
--- a/sw/source/filter/xml/xmlfmt.cxx
+++ b/sw/source/filter/xml/xmlfmt.cxx
@@ -119,7 +119,7 @@ inline sal_Bool SwXMLConditionParser_Impl::MatchName( OUString& rName )
nPos++;
}
rName = sBuffer.makeStringAndClear();
- return rName.getLength() > 0;
+ return !rName.isEmpty();
}
inline sal_Bool SwXMLConditionParser_Impl::MatchNumber( sal_uInt32& rNumber )
@@ -132,9 +132,9 @@ inline sal_Bool SwXMLConditionParser_Impl::MatchNumber( sal_uInt32& rNumber )
}
OUString sNum( sBuffer.makeStringAndClear() );
- if( sNum.getLength() )
+ if( !sNum.isEmpty() )
rNumber = sNum.toInt32();
- return sNum.getLength() > 0;
+ return !sNum.isEmpty();
}
SwXMLConditionParser_Impl::SwXMLConditionParser_Impl( const OUString& rInp ) :
@@ -512,7 +512,7 @@ void SwXMLItemSetStyleContext_Impl::SetAttribute( sal_uInt16 nPrefixKey,
else if ( IsXMLToken( rLocalName, XML_DATA_STYLE_NAME ) )
{
// if we have a valid data style name
- if (rValue.getLength() > 0)
+ if (!rValue.isEmpty())
{
sDataStyleName = rValue;
bDataStyleIsResolved = sal_False; // needs to be resolved
diff --git a/sw/source/filter/xml/xmlfmte.cxx b/sw/source/filter/xml/xmlfmte.cxx
index 80d2475e6c07..a57b8955efa8 100644
--- a/sw/source/filter/xml/xmlfmte.cxx
+++ b/sw/source/filter/xml/xmlfmte.cxx
@@ -133,7 +133,7 @@ void SwXMLExport::ExportFmt( const SwFmt& rFmt, enum XMLTokenEnum eFamily )
// written after cell styles)
addDataStyle(nFormat);
OUString sDataStyleName = getDataStyleName(nFormat);
- if( sDataStyleName.getLength() > 0 )
+ if( !sDataStyleName.isEmpty() )
AddAttribute( XML_NAMESPACE_STYLE, XML_DATA_STYLE_NAME,
sDataStyleName );
}
@@ -316,10 +316,10 @@ void SwXMLAutoStylePoolP::exportStyleAttributes(
OUString sStyleName;
aProperty->maValue >>= sStyleName;
// #i70748# - export also empty list styles
- if( sStyleName.getLength() )
+ if( !sStyleName.isEmpty() )
{
OUString sTmp = rExport.GetTextParagraphExport()->GetListAutoStylePool().Find( sStyleName );
- if( sTmp.getLength() )
+ if( !sTmp.isEmpty() )
sStyleName = sTmp;
}
GetExport().AddAttribute( XML_NAMESPACE_STYLE,
diff --git a/sw/source/filter/xml/xmlimpit.cxx b/sw/source/filter/xml/xmlimpit.cxx
index 28051ee2e2ea..bdf879518b26 100644
--- a/sw/source/filter/xml/xmlimpit.cxx
+++ b/sw/source/filter/xml/xmlimpit.cxx
@@ -841,7 +841,7 @@ sal_Bool SvXMLImportItemMapper::PutXMLValue(
if( bOk )
pVertOrient->SetVertOrient( nValue );
//#i8855# text::VertOrientation::NONE is stored as empty string and should be applied here
- else if(!rValue.getLength())
+ else if(rValue.isEmpty())
{
pVertOrient->SetVertOrient( text::VertOrientation::NONE );
bOk = sal_True;
diff --git a/sw/source/filter/xml/xmlitemi.cxx b/sw/source/filter/xml/xmlitemi.cxx
index a04c95966455..956676721f05 100644
--- a/sw/source/filter/xml/xmlitemi.cxx
+++ b/sw/source/filter/xml/xmlitemi.cxx
@@ -208,7 +208,7 @@ sal_Bool SwXMLImportTableItemMapper_Impl::handleNoItem(
void SwXMLImportTableItemMapper_Impl::finished(
SfxItemSet & rSet, SvXMLUnitConverter const& rUnitConverter) const
{
- if (m_FoMarginValue.getLength())
+ if (!m_FoMarginValue.isEmpty())
{
sal_uInt16 const Ids[4][2] = {
{ RES_LR_SPACE, MID_L_MARGIN },
diff --git a/sw/source/filter/xml/xmlithlp.cxx b/sw/source/filter/xml/xmlithlp.cxx
index 4db411c65fb4..18a1b6b02410 100644
--- a/sw/source/filter/xml/xmlithlp.cxx
+++ b/sw/source/filter/xml/xmlithlp.cxx
@@ -117,7 +117,7 @@ sal_Bool lcl_frmitems_parseXMLBorder( const OUString& rValue,
rNamedWidth = USHRT_MAX;
sal_Int32 nTemp;
- while( aTokens.getNextToken( aToken ) && aToken.getLength() != 0 )
+ while( aTokens.getNextToken( aToken ) && !aToken.isEmpty() )
{
if( !rHasWidth &&
rUnitConverter.convertEnum( rNamedWidth, aToken,
diff --git a/sw/source/filter/xml/xmltble.cxx b/sw/source/filter/xml/xmltble.cxx
index f3ee9c746279..0a77c1b03c79 100644
--- a/sw/source/filter/xml/xmltble.cxx
+++ b/sw/source/filter/xml/xmltble.cxx
@@ -836,7 +836,7 @@ void SwXMLExport::ExportTableBox( const SwTableBox& rBox,
// if this cell has a formula, export it
// (with value and number format)
- if (sCellFormula.getLength()>0)
+ if (!sCellFormula.isEmpty())
{
OUString sQValue =
GetNamespaceMap().GetQNameByKey(
@@ -860,7 +860,7 @@ void SwXMLExport::ExportTableBox( const SwTableBox& rBox,
AddAttribute( XML_NAMESPACE_OFFICE,
XML_VALUE_TYPE, XML_STRING );
}
- else if ( (-1 != nNumberFormat) && (xText->getString().getLength() > 0) )
+ else if ( (-1 != nNumberFormat) && !xText->getString().isEmpty() )
{
// number format key:
// (export values only if cell contains text;)
diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx
index 978e5e127a53..43a284b60d14 100644
--- a/sw/source/filter/xml/xmltbli.cxx
+++ b/sw/source/filter/xml/xmltbli.cxx
@@ -776,7 +776,7 @@ SwXMLTableColContext_Impl::SwXMLTableColContext_Impl(
sal_Int32 nWidth = MINLAY;
sal_Bool bRelWidth = sal_True;
- if( aStyleName.getLength() )
+ if( !aStyleName.isEmpty() )
{
const SfxPoolItem *pItem;
const SfxItemSet *pAutoItemSet = 0;
@@ -1339,7 +1339,7 @@ SwXMLTableContext::SwXMLTableContext( SwXMLImport& rImport,
SwDoc *pDoc = SwImport::GetDocFromXMLImport( GetSwImport() );
String sTblName;
- if( aName.getLength() )
+ if( !aName.isEmpty() )
{
const SwTableFmt *pTblFmt = pDoc->FindTblFmtByName( aName );
if( !pTblFmt )
@@ -1533,7 +1533,7 @@ void SwXMLTableContext::InsertColumn( sal_Int32 nWidth2, sal_Bool bRelWidth2,
else if( nWidth2 > USHRT_MAX )
nWidth2 = USHRT_MAX;
aColumnWidths.push_back( ColumnWidthInfo(nWidth2, bRelWidth2) );
- if( (pDfltCellStyleName && pDfltCellStyleName->getLength() > 0) ||
+ if( (pDfltCellStyleName && !pDfltCellStyleName->isEmpty()) ||
pColumnDefaultCellStyleNames )
{
if( !pColumnDefaultCellStyleNames )
@@ -1657,13 +1657,13 @@ void SwXMLTableContext::InsertCell( const OUString& rStyleName,
}
OUString sStyleName( rStyleName );
- if( !sStyleName.getLength() )
+ if( sStyleName.isEmpty() )
{
sStyleName = ((*pRows)[(sal_uInt16)nCurRow])->GetDefaultCellStyleName();
- if( !sStyleName.getLength() && HasColumnDefaultCellStyleNames() )
+ if( sStyleName.isEmpty() && HasColumnDefaultCellStyleNames() )
{
sStyleName = GetColumnDefaultCellStyleName( nCurCol );
- if( !sStyleName.getLength() )
+ if( sStyleName.isEmpty() )
sStyleName = aDfltCellStyleName;
}
}
@@ -2062,7 +2062,7 @@ SwTableBox *SwXMLTableContext::MakeTableBox(
sal_Bool bNew;
SwTableBoxFmt *pBoxFmt2 = GetSharedBoxFormat(
pBox, sStyleName, nColWidth, pCell->IsProtected(),
- pCell->GetStartNode() && pCell->GetFormula().getLength() == 0 &&
+ pCell->GetStartNode() && pCell->GetFormula().isEmpty() &&
! pCell->HasValue(),
bNew, &bModifyLocked );
@@ -2071,7 +2071,7 @@ SwTableBox *SwXMLTableContext::MakeTableBox(
{
// set style
const SfxItemSet *pAutoItemSet = 0;
- if( pCell->GetStartNode() && sStyleName.getLength() &&
+ if( pCell->GetStartNode() && !sStyleName.isEmpty() &&
GetSwImport().FindAutomaticStyle(
XML_STYLE_FAMILY_TABLE_CELL, sStyleName, &pAutoItemSet ) )
{
@@ -2092,8 +2092,8 @@ SwTableBox *SwXMLTableContext::MakeTableBox(
// then make it a text cell!
bool bSuppressNumericContent = false;
if( pCell->HasValue() && (pCell->GetValue() == 0.0) &&
- (pCell->GetFormula().getLength() == 0) &&
- (sStyleName.getLength() != 0) )
+ pCell->GetFormula().isEmpty() &&
+ !sStyleName.isEmpty() )
{
// default num format?
const SfxPoolItem* pItem = NULL;
@@ -2139,7 +2139,7 @@ SwTableBox *SwXMLTableContext::MakeTableBox(
// the normal case: set formula and value (if available)
const OUString& rFormula = pCell->GetFormula();
- if (rFormula.getLength() > 0)
+ if (!rFormula.isEmpty())
{
// formula cell: insert formula if valid
SwTblBoxFormula aFormulaItem( rFormula );
@@ -2220,7 +2220,7 @@ SwTableLine *SwXMLTableContext::MakeTableLine( SwTableBox *pUpper,
const SfxItemSet *pAutoItemSet = 0;
const OUString& rStyleName = (*pRows)[(sal_uInt16)nTopRow]->GetStyleName();
if( 1UL == (nBottomRow - nTopRow) &&
- rStyleName.getLength() &&
+ !rStyleName.isEmpty() &&
GetSwImport().FindAutomaticStyle(
XML_STYLE_FAMILY_TABLE_ROW, rStyleName, &pAutoItemSet ) )
{
@@ -2684,7 +2684,7 @@ void SwXMLTableContext::MakeTable()
pTableNode->GetTable().SetTableModel( !bHasSubTables );
const SfxItemSet *pAutoItemSet = 0;
- if( aStyleName.getLength() &&
+ if( !aStyleName.isEmpty() &&
rSwImport.FindAutomaticStyle(
XML_STYLE_FAMILY_TABLE_TABLE, aStyleName, &pAutoItemSet ) &&
pAutoItemSet )
diff --git a/sw/source/filter/xml/xmltexte.cxx b/sw/source/filter/xml/xmltexte.cxx
index 2dc565c04f97..c62bce3f9c36 100644
--- a/sw/source/filter/xml/xmltexte.cxx
+++ b/sw/source/filter/xml/xmltexte.cxx
@@ -165,7 +165,7 @@ void SwXMLTextParagraphExport::exportStyleContent(
sBuffer.append( GetXMLToken(eFunc) );
sBuffer.append( (sal_Unicode)'(' );
sBuffer.append( (sal_Unicode)')' );
- if( sVal.getLength() )
+ if( !sVal.isEmpty() )
{
sBuffer.append( (sal_Unicode)'=' );
sBuffer.append( sVal );
@@ -213,7 +213,7 @@ void SwXMLTextParagraphExport::setTextEmbeddedGraphicURL(
const Reference < XPropertySet >& rPropSet,
OUString& rURL) const
{
- if( !rURL.getLength() )
+ if( rURL.isEmpty() )
return;
SwGrfNode *pGrfNd = GetNoTxtNode( rPropSet )->GetGrfNode();
@@ -473,7 +473,7 @@ void SwXMLTextParagraphExport::_exportTextEmbedded(
pStates++;
}
- if( sAutoStyle.getLength() )
+ if( !sAutoStyle.isEmpty() )
rXMLExport.AddAttribute( XML_NAMESPACE_DRAW, XML_STYLE_NAME, sAutoStyle );
addTextFrameAttributes( rPropSet, sal_False );
@@ -561,12 +561,12 @@ void SwXMLTextParagraphExport::_exportTextEmbedded(
::rtl::OUString aStr;
Any aAny2 = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletCodeBase")) );
aAny2 >>= aStr;
- if (aStr.getLength() )
+ if (!aStr.isEmpty() )
lcl_addURL(rXMLExport, aStr);
aAny2 = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletName")) );
aAny2 >>= aStr;
- if (aStr.getLength())
+ if (!aStr.isEmpty())
rXMLExport.AddAttribute( XML_NAMESPACE_DRAW, XML_APPLET_NAME, aStr );
aAny2 = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletCode")) );
@@ -612,7 +612,7 @@ void SwXMLTextParagraphExport::_exportTextEmbedded(
aAny2 = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PluginMimeType")) );
aAny2 >>= aStr;
- if (aStr.getLength())
+ if (!aStr.isEmpty())
rXMLExport.AddAttribute( XML_NAMESPACE_DRAW, XML_MIME_TYPE, aStr );
eElementName = XML_PLUGIN;
}
@@ -633,7 +633,7 @@ void SwXMLTextParagraphExport::_exportTextEmbedded(
aAny2 = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameName")) );
aAny2 >>= aStr;
- if (aStr.getLength())
+ if (!aStr.isEmpty())
rXMLExport.AddAttribute( XML_NAMESPACE_DRAW, XML_FRAME_NAME, aStr );
eElementName = XML_FLOATING_FRAME;
}
diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx
index 926f42363c66..4b77b18c4887 100644
--- a/sw/source/filter/xml/xmltexti.cxx
+++ b/sw/source/filter/xml/xmltexti.cxx
@@ -240,7 +240,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOLEObject(
OUString aObjName( rHRef.copy( nPos+1) );
- if( !aObjName.getLength() )
+ if( aObjName.isEmpty() )
return xPropSet;
uno::Reference<XUnoTunnel> xCrsrTunnel( GetCursor(), UNO_QUERY );
@@ -378,7 +378,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOLEObject(
if( pDoc->GetDrawModel() )
SwXFrame::GetOrCreateSdrObject(
static_cast<SwFlyFrmFmt*>( pXFrame->GetFrmFmt() ) ); // req for z-order
- if( rTblName.getLength() )
+ if( !rTblName.isEmpty() )
{
const SwFmtCntnt& rCntnt = pFrmFmt->GetCntnt();
const SwNodeIndex *pNdIdx = rCntnt.GetCntntIdx();
@@ -457,7 +457,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOLEObject(
sal_Int64 nDrawAspect = 0;
const XMLPropStyleContext *pStyle = 0;
sal_Bool bHasSizeProps = sal_False;
- if( rStyleName.getLength() )
+ if( !rStyleName.isEmpty() )
{
pStyle = FindAutoFrameStyle( rStyleName );
if( pStyle )
@@ -569,7 +569,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOOoLink(
// We'll need a (valid) URL. If we don't have do not insert the link and return early.
// Copy URL into URL oject on the way.
INetURLObject aURLObj;
- bool bValidURL = rHRef.getLength() != 0 &&
+ bool bValidURL = !rHRef.isEmpty() &&
aURLObj.SetURL( URIHelper::SmartRel2Abs(
INetURLObject( GetXMLImport().GetBaseURL() ), rHRef ) );
if( !bValidURL )
@@ -654,7 +654,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertApplet(
SwApplet_Impl aAppletImpl ( aItemSet );
String sCodeBase;
- if( rHRef.getLength() )
+ if( !rHRef.isEmpty() )
sCodeBase = GetXMLImport().GetAbsoluteReference( rHRef );
aAppletImpl.CreateApplet ( rCode, rName, bMayScript, sCodeBase, GetXMLImport().GetDocumentBase() );
@@ -701,9 +701,9 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertPlugin(
// on the way.
INetURLObject aURLObj;
- bool bValidURL = rHRef.getLength() != 0 &&
+ bool bValidURL = !rHRef.isEmpty() &&
aURLObj.SetURL( URIHelper::SmartRel2Abs( INetURLObject( GetXMLImport().GetBaseURL() ), rHRef ) );
- bool bValidMimeType = rMimeType.getLength() != 0;
+ bool bValidMimeType = !rMimeType.isEmpty();
if( !bValidURL && !bValidMimeType )
return xPropSet;
@@ -783,7 +783,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertFloatingFra
sal_Bool bIsBorderSet = sal_False;
Size aMargin( SIZE_NOT_SET, SIZE_NOT_SET );
const XMLPropStyleContext *pStyle = 0;
- if( rStyleName.getLength() )
+ if( !rStyleName.isEmpty() )
{
pStyle = FindAutoFrameStyle( rStyleName );
if( pStyle )
@@ -1029,7 +1029,7 @@ void SwXMLTextImportHelper::RedlineAdjustStartNodeCursor(
sal_Bool bStart)
{
OUString rId = GetOpenRedlineId();
- if ((NULL != pRedlineHelper) && (rId.getLength() > 0))
+ if ((NULL != pRedlineHelper) && !rId.isEmpty())
{
uno::Reference<XTextRange> xTextRange( GetCursor()->getStart() );
pRedlineHelper->AdjustStartNodeCursor(rId, bStart, xTextRange );
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;
}