summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/core/data/document.cxx4
-rw-r--r--sc/source/core/data/dpsave.cxx2
-rw-r--r--sc/source/core/data/dpshttab.cxx4
-rw-r--r--sc/source/core/data/funcdesc.cxx14
-rw-r--r--sc/source/core/data/pivot2.cxx4
-rw-r--r--sc/source/core/data/postit.cxx6
-rw-r--r--sc/source/core/data/table3.cxx2
-rw-r--r--sc/source/core/data/table6.cxx2
-rw-r--r--sc/source/core/tool/addincol.cxx2
-rw-r--r--sc/source/core/tool/address.cxx2
-rw-r--r--sc/source/core/tool/docoptio.cxx8
-rw-r--r--sc/source/core/tool/formulaparserpool.cxx2
-rw-r--r--sc/source/core/tool/interpr1.cxx2
-rw-r--r--sc/source/core/tool/rangeutl.cxx10
-rw-r--r--sc/source/core/tool/token.cxx2
-rw-r--r--sc/source/filter/excel/xecontent.cxx8
-rw-r--r--sc/source/filter/excel/xeescher.cxx12
-rw-r--r--sc/source/filter/excel/xepivot.cxx2
-rw-r--r--sc/source/filter/excel/xeroot.cxx2
-rw-r--r--sc/source/filter/excel/xichart.cxx2
-rw-r--r--sc/source/filter/excel/xiescher.cxx2
-rw-r--r--sc/source/filter/excel/xipivot.cxx6
-rw-r--r--sc/source/filter/excel/xlchart.cxx6
-rw-r--r--sc/source/filter/excel/xlescher.cxx2
-rw-r--r--sc/source/filter/excel/xlpivot.cxx2
-rw-r--r--sc/source/filter/excel/xltools.cxx2
-rw-r--r--sc/source/filter/html/htmlexp.cxx2
-rw-r--r--sc/source/filter/html/htmlexp2.cxx2
-rw-r--r--sc/source/filter/xcl97/xcl97esc.cxx4
-rw-r--r--sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx8
-rw-r--r--sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx2
-rw-r--r--sc/source/filter/xml/XMLConverter.cxx6
-rw-r--r--sc/source/filter/xml/XMLDDELinksContext.cxx6
-rw-r--r--sc/source/filter/xml/XMLExportDataPilot.cxx16
-rw-r--r--sc/source/filter/xml/XMLExportDatabaseRanges.cxx12
-rw-r--r--sc/source/filter/xml/XMLExportIterator.cxx2
-rw-r--r--sc/source/filter/xml/XMLStylesExportHelper.cxx18
-rw-r--r--sc/source/filter/xml/XMLStylesImportHelper.cxx4
-rw-r--r--sc/source/filter/xml/XMLTableMasterPageExport.cxx8
-rw-r--r--sc/source/filter/xml/XMLTableShapeResizer.cxx4
-rw-r--r--sc/source/filter/xml/XMLTableSourceContext.cxx2
-rw-r--r--sc/source/filter/xml/XMLTextPContext.cxx2
-rw-r--r--sc/source/filter/xml/XMLTrackedChangesContext.cxx4
-rw-r--r--sc/source/filter/xml/xmlannoi.cxx2
-rw-r--r--sc/source/filter/xml/xmlbodyi.cxx2
-rw-r--r--sc/source/filter/xml/xmlcelli.cxx48
-rw-r--r--sc/source/filter/xml/xmlcoli.cxx4
-rw-r--r--sc/source/filter/xml/xmlcvali.cxx2
-rw-r--r--sc/source/filter/xml/xmldpimp.cxx14
-rw-r--r--sc/source/filter/xml/xmldrani.cxx14
-rw-r--r--sc/source/filter/xml/xmlexprt.cxx30
-rw-r--r--sc/source/filter/xml/xmlexternaltabi.cxx12
-rw-r--r--sc/source/filter/xml/xmlimprt.cxx22
-rw-r--r--sc/source/filter/xml/xmlrowi.cxx2
-rw-r--r--sc/source/filter/xml/xmlstyle.cxx2
-rw-r--r--sc/source/filter/xml/xmlstyli.cxx12
-rw-r--r--sc/source/filter/xml/xmlsubti.cxx2
-rw-r--r--sc/source/filter/xml/xmltabi.cxx2
-rw-r--r--sc/source/filter/xml/xmlwrap.cxx8
-rw-r--r--sc/source/ui/Accessibility/AccessibleContextBase.cxx6
-rw-r--r--sc/source/ui/app/drwtrans.cxx4
-rw-r--r--sc/source/ui/app/inputhdl.cxx6
-rw-r--r--sc/source/ui/cctrl/editfield.cxx2
-rw-r--r--sc/source/ui/dbgui/pvfundlg.cxx6
-rw-r--r--sc/source/ui/dbgui/pvlaydlg.cxx22
-rw-r--r--sc/source/ui/dbgui/validate.cxx2
-rw-r--r--sc/source/ui/docshell/docsh.cxx4
-rw-r--r--sc/source/ui/docshell/docsh4.cxx4
-rw-r--r--sc/source/ui/docshell/docsh8.cxx2
-rw-r--r--sc/source/ui/docshell/externalrefmgr.cxx6
-rw-r--r--sc/source/ui/drawfunc/drawsh.cxx4
-rw-r--r--sc/source/ui/drawfunc/drawsh2.cxx2
-rw-r--r--sc/source/ui/drawfunc/drawsh5.cxx8
-rw-r--r--sc/source/ui/drawfunc/fudraw.cxx2
-rw-r--r--sc/source/ui/drawfunc/fuins2.cxx4
-rw-r--r--sc/source/ui/drawfunc/fusel.cxx4
-rw-r--r--sc/source/ui/miscdlgs/anyrefdg.cxx2
-rw-r--r--sc/source/ui/miscdlgs/linkarea.cxx2
-rw-r--r--sc/source/ui/miscdlgs/sharedocdlg.cxx4
-rw-r--r--sc/source/ui/miscdlgs/solveroptions.cxx2
-rw-r--r--sc/source/ui/miscdlgs/solverutil.cxx2
-rw-r--r--sc/source/ui/namedlg/namedefdlg.cxx4
-rw-r--r--sc/source/ui/namedlg/namedlg.cxx2
-rw-r--r--sc/source/ui/optdlg/tpformula.cxx2
-rw-r--r--sc/source/ui/unoobj/cellsuno.cxx6
-rw-r--r--sc/source/ui/unoobj/chart2uno.cxx4
-rw-r--r--sc/source/ui/unoobj/confuno.cxx2
-rw-r--r--sc/source/ui/unoobj/convuno.cxx2
-rw-r--r--sc/source/ui/unoobj/dapiuno.cxx16
-rw-r--r--sc/source/ui/unoobj/defltuno.cxx2
-rw-r--r--sc/source/ui/unoobj/docuno.cxx2
-rw-r--r--sc/source/ui/unoobj/eventuno.cxx2
-rw-r--r--sc/source/ui/unoobj/funcuno.cxx2
-rw-r--r--sc/source/ui/unoobj/scdetect.cxx2
-rw-r--r--sc/source/ui/unoobj/shapeuno.cxx2
-rw-r--r--sc/source/ui/vba/vbaapplication.cxx12
-rw-r--r--sc/source/ui/vba/vbachartobject.cxx2
-rw-r--r--sc/source/ui/vba/vbafiledialog.cxx2
-rw-r--r--sc/source/ui/vba/vbahyperlink.cxx10
-rw-r--r--sc/source/ui/vba/vbanames.cxx2
-rw-r--r--sc/source/ui/vba/vbapagesetup.cxx2
-rw-r--r--sc/source/ui/vba/vbapane.cxx4
-rw-r--r--sc/source/ui/vba/vbarange.cxx18
-rw-r--r--sc/source/ui/vba/vbasheetobject.cxx2
-rw-r--r--sc/source/ui/vba/vbavalidation.cxx4
-rw-r--r--sc/source/ui/vba/vbaworkbook.cxx2
-rw-r--r--sc/source/ui/vba/vbaworkbooks.cxx2
-rw-r--r--sc/source/ui/vba/vbaworksheets.cxx4
-rw-r--r--sc/source/ui/view/dbfunc3.cxx4
-rw-r--r--sc/source/ui/view/formatsh.cxx2
-rw-r--r--sc/source/ui/view/gridwin.cxx2
111 files changed, 308 insertions, 308 deletions
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 61fdbe5e848c..f3507ff2c09a 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -251,9 +251,9 @@ void ScDocument::SetAnonymousDBData(SCTAB nTab, ScDBData* pDBData)
bool ScDocument::ValidTabName( const rtl::OUString& rName )
{
- sal_Int32 nLen = rName.getLength();
- if (!nLen)
+ if (rName.isEmpty())
return false;
+ sal_Int32 nLen = rName.getLength();
#if 1
// Restrict sheet names to what Excel accepts.
diff --git a/sc/source/core/data/dpsave.cxx b/sc/source/core/data/dpsave.cxx
index 68e69eb70a8c..33bcc42dd516 100644
--- a/sc/source/core/data/dpsave.cxx
+++ b/sc/source/core/data/dpsave.cxx
@@ -1203,7 +1203,7 @@ void ScDPSaveData::BuildAllDimensionMembers(ScDPTableData* pData)
for (iter = aDimList.begin(); iter != aDimList.end(); ++iter)
{
const ::rtl::OUString& rDimName = iter->GetName();
- if (!rDimName.getLength())
+ if (rDimName.isEmpty())
// empty dimension name. It must be data layout.
continue;
diff --git a/sc/source/core/data/dpshttab.cxx b/sc/source/core/data/dpshttab.cxx
index a04bb5a8f988..539fd882e7b2 100644
--- a/sc/source/core/data/dpshttab.cxx
+++ b/sc/source/core/data/dpshttab.cxx
@@ -236,7 +236,7 @@ void ScSheetSourceDesc::SetSourceRange(const ScRange& rRange)
const ScRange& ScSheetSourceDesc::GetSourceRange() const
{
- if (maRangeName.getLength())
+ if (!maRangeName.isEmpty())
{
// Obtain the source range from the range name first.
maSourceRange = ScRange();
@@ -276,7 +276,7 @@ const OUString& ScSheetSourceDesc::GetRangeName() const
bool ScSheetSourceDesc::HasRangeName() const
{
- return maRangeName.getLength() > 0;
+ return !maRangeName.isEmpty();
}
void ScSheetSourceDesc::SetQueryParam(const ScQueryParam& rParam)
diff --git a/sc/source/core/data/funcdesc.cxx b/sc/source/core/data/funcdesc.cxx
index 024045c37264..cbaeb21014e7 100644
--- a/sc/source/core/data/funcdesc.cxx
+++ b/sc/source/core/data/funcdesc.cxx
@@ -196,7 +196,7 @@ void ScFuncDesc::Clear()
aSig.append(*pFuncName);
::rtl::OUString aParamList = GetParamList();
- if( aParamList.getLength() )
+ if( !aParamList.isEmpty() )
{
aSig.appendAscii( "( " );
aSig.append(aParamList);
@@ -226,14 +226,14 @@ void ScFuncDesc::Clear()
if ( nArgCount > 0 && aIter != aEnd )
{
- bool bLastArg = ( aIter->getLength() == 0 );
+ bool bLastArg = aIter->isEmpty();
while( aIter != aEnd && !bLastArg )
{
aFormula.append( *(aIter) );
if ( aIter != (aEnd-1) )
{
- bLastArg = !( (aIter+1)->getLength() > 0 );
+ bLastArg = (aIter+1)->isEmpty();
if ( !bLastArg )
aFormula.append( sep );
}
@@ -324,7 +324,7 @@ void ScFuncDesc::initArgumentInfo() const
ScUnoAddInCollection& rAddIns = *ScGlobal::GetAddInCollection();
::rtl::OUString aIntName(rAddIns.FindFunction( *pFuncName, true )); // pFuncName is upper-case
- if ( aIntName.getLength() )
+ if ( !aIntName.isEmpty() )
{
// GetFuncData with bComplete=true loads the component and updates
// the global function list if needed.
@@ -471,7 +471,7 @@ ScFunctionList::ScFunctionList() :
pDesc->pDefArgFlags[j].bOptional = false;
pDesc->pDefArgFlags[j].bSuppress = false;
pAddInFuncData->getParamDesc( aArgName, aArgDesc, j+1 );
- if ( aArgName.getLength() )
+ if ( !aArgName.isEmpty() )
pDesc->ppDefArgNames[j] = new ::rtl::OUString( aArgName );
else
{
@@ -497,7 +497,7 @@ ScFunctionList::ScFunctionList() :
break;
}
}
- if ( aArgDesc.getLength() )
+ if ( !aArgDesc.isEmpty() )
pDesc->ppDefArgDescs[j] = new ::rtl::OUString( aArgDesc );
else
{
@@ -617,7 +617,7 @@ const formula::IFunctionManager* ScFunctionCategory::getFunctionManager() const
::rtl::OUString ScFunctionCategory::getName() const
{
- if ( !m_sName.getLength() )
+ if ( m_sName.isEmpty() )
m_sName = ScFunctionMgr::GetCategoryName(m_nCategory+1);
return m_sName;
}
diff --git a/sc/source/core/data/pivot2.cxx b/sc/source/core/data/pivot2.cxx
index 677289e2a4dd..80d35f3c1fa2 100644
--- a/sc/source/core/data/pivot2.cxx
+++ b/sc/source/core/data/pivot2.cxx
@@ -73,7 +73,7 @@ ScDPLabelData::Member::Member() :
OUString ScDPLabelData::Member::getDisplayName() const
{
- if (maLayoutName.getLength())
+ if (!maLayoutName.isEmpty())
return maLayoutName;
return maName;
@@ -92,7 +92,7 @@ ScDPLabelData::ScDPLabelData( const String& rName, SCCOL nCol, bool bIsValue ) :
OUString ScDPLabelData::getDisplayName() const
{
- if (maLayoutName.getLength())
+ if (!maLayoutName.isEmpty())
return maLayoutName;
return maName;
diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx
index 04001c362793..5c6eed7ffe79 100644
--- a/sc/source/core/data/postit.cxx
+++ b/sc/source/core/data/postit.cxx
@@ -658,7 +658,7 @@ void ScPostIt::CreateCaptionFromInitData( const ScAddress& rPos ) const
ScCaptionInitData& rInitData = *maNoteData.mxInitData;
// transfer ownership of outliner object to caption, or set simple text
- OSL_ENSURE( rInitData.mxOutlinerObj.get() || (rInitData.maSimpleText.getLength() > 0),
+ OSL_ENSURE( rInitData.mxOutlinerObj.get() || !rInitData.maSimpleText.isEmpty(),
"ScPostIt::CreateCaptionFromInitData - need either outliner para object or simple text" );
if( rInitData.mxOutlinerObj.get() )
maNoteData.mpCaption->SetOutlinerParaObject( rInitData.mxOutlinerObj.release() );
@@ -818,7 +818,7 @@ SdrCaptionObj* ScNoteUtil::CreateTempCaption(
rDrawPage.InsertObject( pCaption );
// clone the edit text object, unless user text is present, then set this text
- if( pNoteCaption && (rUserText.getLength() == 0) )
+ if( pNoteCaption && rUserText.isEmpty() )
{
if( OutlinerParaObject* pOPO = pNoteCaption->GetOutlinerParaObject() )
pCaption->SetOutlinerParaObject( new OutlinerParaObject( *pOPO ) );
@@ -900,7 +900,7 @@ ScPostIt* ScNoteUtil::CreateNoteFromString(
bool bShown, bool bAlwaysCreateCaption )
{
ScPostIt* pNote = 0;
- if( rNoteText.getLength() > 0 )
+ if( !rNoteText.isEmpty() )
{
ScNoteData aNoteData( bShown );
aNoteData.mxInitData.reset( new ScCaptionInitData );
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index e47d88eeefa5..d98552bfd1a0 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -316,7 +316,7 @@ bool ScTable::IsSortCollatorGlobal() const
void ScTable::InitSortCollator( const ScSortParam& rPar )
{
- if ( rPar.aCollatorLocale.Language.getLength() )
+ if ( !rPar.aCollatorLocale.Language.isEmpty() )
{
if ( !pSortCollator || IsSortCollatorGlobal() )
pSortCollator = new CollatorWrapper( pDocument->GetServiceManager() );
diff --git a/sc/source/core/data/table6.cxx b/sc/source/core/data/table6.cxx
index 55ac0660c420..f4cbe46ecd98 100644
--- a/sc/source/core/data/table6.cxx
+++ b/sc/source/core/data/table6.cxx
@@ -718,7 +718,7 @@ bool ScTable::SearchAndReplace(
com::sun::star::util::SearchOptions aSearchOptions = rSearchItem.GetSearchOptions();
aSearchOptions.Locale = *ScGlobal::GetLocale();
- if (!aSearchOptions.searchString.getLength())
+ if (aSearchOptions.searchString.isEmpty())
{
// Search for empty cells.
return SearchAndReplaceEmptyCells(rSearchItem, rCol, rRow, rMark, rMatchedRanges, rUndoStr, pUndoDoc);
diff --git a/sc/source/core/tool/addincol.cxx b/sc/source/core/tool/addincol.cxx
index dadafd754a2f..505a65020340 100644
--- a/sc/source/core/tool/addincol.cxx
+++ b/sc/source/core/tool/addincol.cxx
@@ -1345,7 +1345,7 @@ sal_Bool ScUnoAddInCollection::FillFunctionDescFromData( const ScUnoAddInFuncDat
rDesc.pDefArgFlags[nArg].bSuppress = false;
// no empty names...
- if ( rDesc.ppDefArgNames[nArg]->getLength() == 0 )
+ if ( rDesc.ppDefArgNames[nArg]->isEmpty() )
{
String aDefName( RTL_CONSTASCII_USTRINGPARAM("arg") );
aDefName += String::CreateFromInt32( nArg+1 );
diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx
index d616b466f231..69ab8553b002 100644
--- a/sc/source/core/tool/address.cxx
+++ b/sc/source/core/tool/address.cxx
@@ -1619,7 +1619,7 @@ getFileNameFromDoc( const ScDocument* pDoc )
uno::Reference< frame::XModel > xModel( pShell->GetModel(), uno::UNO_QUERY );
if( xModel.is() )
{
- if( xModel->getURL().getLength() )
+ if( !xModel->getURL().isEmpty() )
{
INetURLObject aURL( xModel->getURL() );
sFileName = aURL.GetLastName();
diff --git a/sc/source/core/tool/docoptio.cxx b/sc/source/core/tool/docoptio.cxx
index 25f0a19d0d6e..3247ecaa63b9 100644
--- a/sc/source/core/tool/docoptio.cxx
+++ b/sc/source/core/tool/docoptio.cxx
@@ -161,7 +161,7 @@ void ScDocOptions::ResetFormulaSeparators()
const OUString& rDecSep = rLocaleData.getNumDecimalSep();
const OUString& rListSep = rLocaleData.getListSep();
- if (!rDecSep.getLength() || !rListSep.getLength())
+ if (rDecSep.isEmpty() || rListSep.isEmpty())
// Something is wrong. Stick with the default separators.
return;
@@ -509,21 +509,21 @@ ScDocCfg::ScDocCfg() :
case SCFORMULAOPT_SEP_ARG:
{
OUString aSep;
- if ((pValues[nProp] >>= aSep) && aSep.getLength())
+ if ((pValues[nProp] >>= aSep) && !aSep.isEmpty())
SetFormulaSepArg(aSep);
}
break;
case SCFORMULAOPT_SEP_ARRAY_ROW:
{
OUString aSep;
- if ((pValues[nProp] >>= aSep) && aSep.getLength())
+ if ((pValues[nProp] >>= aSep) && !aSep.isEmpty())
SetFormulaSepArrayRow(aSep);
}
break;
case SCFORMULAOPT_SEP_ARRAY_COL:
{
OUString aSep;
- if ((pValues[nProp] >>= aSep) && aSep.getLength())
+ if ((pValues[nProp] >>= aSep) && !aSep.isEmpty())
SetFormulaSepArrayCol(aSep);
}
break;
diff --git a/sc/source/core/tool/formulaparserpool.cxx b/sc/source/core/tool/formulaparserpool.cxx
index 2b3a5205dfcc..11f72de473b5 100644
--- a/sc/source/core/tool/formulaparserpool.cxx
+++ b/sc/source/core/tool/formulaparserpool.cxx
@@ -86,7 +86,7 @@ ScParserFactoryMap::ScParserFactoryMap() :
// store factory in the map
OUString aNamespace = xParser->getSupportedNamespace();
- if( aNamespace.getLength() > 0 )
+ if( !aNamespace.isEmpty() )
maFactories[ aNamespace ] = xCompFactory;
}
catch( Exception& )
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index dcdc5fe74fbb..34f027dd00b2 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -3241,7 +3241,7 @@ void ScInterpreter::ScUnicode()
if ( MustHaveParamCount( GetByte(), 1 ) )
{
const rtl::OUString& rStr = GetString();
- if (rStr.getLength() <= 0)
+ if (rStr.isEmpty())
PushIllegalParameter();
else
{
diff --git a/sc/source/core/tool/rangeutl.cxx b/sc/source/core/tool/rangeutl.cxx
index 572ff179d079..82d9dcb9c06f 100644
--- a/sc/source/core/tool/rangeutl.cxx
+++ b/sc/source/core/tool/rangeutl.cxx
@@ -374,9 +374,9 @@ void ScRangeStringConverter::AssignString(
{
if( bAppendStr )
{
- if( rNewStr.getLength() )
+ if( !rNewStr.isEmpty() )
{
- if( rString.getLength() )
+ if( !rString.isEmpty() )
rString += rtl::OUString(cSeperator);
rString += rNewStr;
}
@@ -570,7 +570,7 @@ sal_Bool ScRangeStringConverter::GetRangeListFromString(
sal_Unicode cQuote )
{
sal_Bool bRet = sal_True;
- OSL_ENSURE( rRangeListStr.getLength(), "ScXMLConverter::GetRangeListFromString - empty string!" );
+ OSL_ENSURE( !rRangeListStr.isEmpty(), "ScXMLConverter::GetRangeListFromString - empty string!" );
sal_Int32 nOffset = 0;
while( nOffset >= 0 )
{
@@ -668,7 +668,7 @@ sal_Bool ScRangeStringConverter::GetRangeListFromString(
sal_Unicode cQuote )
{
sal_Bool bRet = sal_True;
- OSL_ENSURE( rRangeListStr.getLength(), "ScXMLConverter::GetRangeListFromString - empty string!" );
+ OSL_ENSURE( !rRangeListStr.isEmpty(), "ScXMLConverter::GetRangeListFromString - empty string!" );
table::CellRangeAddress aRange;
sal_Int32 nOffset = 0;
while( nOffset >= 0 )
@@ -920,7 +920,7 @@ void ScRangeStringConverter::GetStringFromXMLRangeString( OUString& rString, con
OUString aBeginCell = aToken.copy(0, nSepPos);
OUString aEndCell = aToken.copy(nSepPos+1);
- if (!aBeginCell.getLength() || !aEndCell.getLength())
+ if (aBeginCell.isEmpty() || aEndCell.isEmpty())
// both cell addresses must exist for this to work.
continue;
diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index 68de15420ead..133324feb71a 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -1209,7 +1209,7 @@ bool ScTokenArray::AddFormulaToken(const com::sun::star::sheet::FormulaToken& _a
}
else if( aApiExtRef.Reference >>= aName )
{
- if( aName.getLength() > 0 )
+ if( !aName.isEmpty() )
AddExternalName( nFileId, aName );
else
bError = true;
diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx
index 3e8878de2aa7..f0193d3229a0 100644
--- a/sc/source/filter/excel/xecontent.cxx
+++ b/sc/source/filter/excel/xecontent.cxx
@@ -506,12 +506,12 @@ void XclExpHyperlink::WriteEmbeddedData( XclExpStream& rStrm )
void XclExpHyperlink::SaveXml( XclExpXmlStream& rStrm )
{
- OUString sId = msTarget.getLength() ? rStrm.addRelation( rStrm.GetCurrentStream()->getOutputStream(),
+ OUString sId = !msTarget.isEmpty() ? rStrm.addRelation( rStrm.GetCurrentStream()->getOutputStream(),
XclXmlUtils::ToOUString( "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" ),
msTarget, true ) : OUString();
rStrm.GetCurrentStream()->singleElement( XML_hyperlink,
XML_ref, XclXmlUtils::ToOString( maScPos ).getStr(),
- FSNS( XML_r, XML_id ), sId.getLength()
+ FSNS( XML_r, XML_id ), !sId.isEmpty()
? XclXmlUtils::ToOString( sId ).getStr()
: NULL,
XML_location, mxTextMark.get() != NULL
@@ -1151,13 +1151,13 @@ void XclExpDV::SaveXml( XclExpXmlStream& rStrm )
XML_sqref, XclXmlUtils::ToOString( maScRanges ).getStr(),
XML_type, lcl_GetValidationType( mnFlags ),
FSEND );
- if( msFormula1.getLength() )
+ if( !msFormula1.isEmpty() )
{
rWorksheet->startElement( XML_formula1, FSEND );
rWorksheet->writeEscaped( msFormula1 );
rWorksheet->endElement( XML_formula1 );
}
- if( msFormula2.getLength() )
+ if( !msFormula2.isEmpty() )
{
rWorksheet->startElement( XML_formula2, FSEND );
rWorksheet->writeEscaped( msFormula2 );
diff --git a/sc/source/filter/excel/xeescher.cxx b/sc/source/filter/excel/xeescher.cxx
index 8c4de9694eed..bf71424d9d3c 100644
--- a/sc/source/filter/excel/xeescher.cxx
+++ b/sc/source/filter/excel/xeescher.cxx
@@ -544,7 +544,7 @@ XclExpOcxControlObj::XclExpOcxControlObj( XclExpObjectManager& rObjMgr, Referenc
// #i51348# name of the control, may overwrite shape name
OUString aCtrlName;
- if( aCtrlProp.GetProperty( aCtrlName, CREATE_OUSTRING( "Name" ) ) && (aCtrlName.getLength() > 0) )
+ if( aCtrlProp.GetProperty( aCtrlName, CREATE_OUSTRING( "Name" ) ) && !aCtrlName.isEmpty() )
aPropOpt.AddOpt( ESCHER_Prop_wzName, aCtrlName );
// meta file
@@ -693,7 +693,7 @@ XclExpTbxControlObj::XclExpTbxControlObj( XclExpObjectManager& rRoot, Reference<
// #i51348# name of the control, may overwrite shape name
OUString aCtrlName;
- if( aCtrlProp.GetProperty( aCtrlName, CREATE_OUSTRING( "Name" ) ) && (aCtrlName.getLength() > 0) )
+ if( aCtrlProp.GetProperty( aCtrlName, CREATE_OUSTRING( "Name" ) ) && !aCtrlName.isEmpty() )
aPropOpt.AddOpt( ESCHER_Prop_wzName, aCtrlName );
// write DFF property set to stream
@@ -717,7 +717,7 @@ XclExpTbxControlObj::XclExpTbxControlObj( XclExpObjectManager& rRoot, Reference<
mrEscherEx.UpdateDffFragmentEnd();
sal_uInt16 nXclFont = EXC_FONT_APP;
- if( aString.getLength() > 0 )
+ if( !aString.isEmpty() )
{
XclFontData aFontData;
GetFontPropSetHelper().ReadFontProperties( aFontData, aCtrlProp, EXC_FONTPROPSET_CONTROL );
@@ -815,7 +815,7 @@ XclExpTbxControlObj::XclExpTbxControlObj( XclExpObjectManager& rRoot, Reference<
OUString aDefText;
if( aCtrlProp.GetProperty( aStringList, CREATE_OUSTRING( "StringItemList" ) ) &&
aCtrlProp.GetProperty( aDefText, CREATE_OUSTRING( "Text" ) ) &&
- aStringList.getLength() && aDefText.getLength() )
+ aStringList.getLength() && !aDefText.isEmpty() )
{
const OUString* pBegin = aStringList.getConstArray();
const OUString* pEnd = pBegin + aStringList.getLength();
@@ -1253,7 +1253,7 @@ XclExpNote::XclExpNote( const XclExpRoot& rRoot, const ScAddress& rScPos,
// AutoFill style would change if Postit.cxx object creation values are changed
OUString aCol(((XFillColorItem &)GETITEM(aItemSet, XFillColorItem , XATTR_FILLCOLOR)).GetValue());
- mbAutoFill = !aCol.getLength() && (GETITEMVALUE(aItemSet, XFillStyleItem, XATTR_FILLSTYLE, sal_uLong) == XFILL_SOLID);
+ mbAutoFill = aCol.isEmpty() && (GETITEMVALUE(aItemSet, XFillStyleItem, XATTR_FILLSTYLE, sal_uLong) == XFILL_SOLID);
mbAutoLine = true;
mbRowHidden = (rRoot.GetDoc().RowHidden(maScPos.Row(),maScPos.Tab()));
mbColHidden = (rRoot.GetDoc().ColHidden(maScPos.Col(),maScPos.Tab()));
@@ -1435,7 +1435,7 @@ XclExpShapeObj::XclExpShapeObj( XclExpObjectManager& rRoot, ::com::sun::star::un
if( SdrObject* pSdrObj = ::GetSdrObjectFromXShape( xShape ) )
{
ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pSdrObj );
- if ( pInfo && pInfo->GetMacro().getLength() )
+ if ( pInfo && !pInfo->GetMacro().isEmpty() )
// FIXME ooo330-m2: XclControlHelper::GetXclMacroName was removed in upstream sources; they started to call XclTools::GetXclMacroName instead; is this enough? it has only one parameter
// SetMacroLink( XclControlHelper::GetXclMacroName( pInfo->GetMacro(), rRoot.GetDocShell() ) );
SetMacroLink( XclTools::GetXclMacroName( pInfo->GetMacro() ) );
diff --git a/sc/source/filter/excel/xepivot.cxx b/sc/source/filter/excel/xepivot.cxx
index 72ce8c5b765d..b0224b3e68de 100644
--- a/sc/source/filter/excel/xepivot.cxx
+++ b/sc/source/filter/excel/xepivot.cxx
@@ -730,7 +730,7 @@ void XclExpPivotCache::Save( XclExpStream& rStrm )
// SXVS
XclExpUInt16Record( EXC_ID_SXVS, EXC_SXVS_SHEET ).Save( rStrm );
- if (maSrcRangeName.getLength())
+ if (!maSrcRangeName.isEmpty())
// DCONNAME
WriteDConName(rStrm);
else
diff --git a/sc/source/filter/excel/xeroot.cxx b/sc/source/filter/excel/xeroot.cxx
index 0141525cccad..bf8609dd0568 100644
--- a/sc/source/filter/excel/xeroot.cxx
+++ b/sc/source/filter/excel/xeroot.cxx
@@ -256,7 +256,7 @@ uno::Sequence< beans::NamedValue > XclExpRoot::GenerateEncryptionData( const ::r
{
uno::Sequence< beans::NamedValue > aEncryptionData;
- if ( aPass.getLength() > 0 && aPass.getLength() < 16 )
+ if ( !aPass.isEmpty() && aPass.getLength() < 16 )
{
TimeValue aTime;
osl_getSystemTime( &aTime );
diff --git a/sc/source/filter/excel/xichart.cxx b/sc/source/filter/excel/xichart.cxx
index 8cf884d2ef00..d02cecf484b2 100644
--- a/sc/source/filter/excel/xichart.cxx
+++ b/sc/source/filter/excel/xichart.cxx
@@ -1655,7 +1655,7 @@ Reference< XRegressionCurve > XclImpChSerTrendLine::CreateRegressionCurve() cons
break;
}
Reference< XRegressionCurve > xRegCurve;
- if( aService.getLength() > 0 )
+ if( !aService.isEmpty() )
xRegCurve.set( ScfApiHelper::CreateInstance( aService ), UNO_QUERY );
// trend line formatting
diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx
index f6fda06afcde..d953fc1bcbba 100644
--- a/sc/source/filter/excel/xiescher.cxx
+++ b/sc/source/filter/excel/xiescher.cxx
@@ -3291,7 +3291,7 @@ SdrObject* XclImpDffConverter::CreateSdrObject( const XclImpTbxObjBase& rTbxObj,
SdrObjectPtr xSdrObj;
OUString aServiceName = rTbxObj.GetServiceName();
- if( SupportsOleObjects() && (aServiceName.getLength() > 0) ) try
+ if( SupportsOleObjects() && !aServiceName.isEmpty() ) try
{
// create the form control from scratch
Reference< XFormComponent > xFormComp( ScfApiHelper::CreateInstance( GetDocShell(), aServiceName ), UNO_QUERY_THROW );
diff --git a/sc/source/filter/excel/xipivot.cxx b/sc/source/filter/excel/xipivot.cxx
index d47ffeddda0d..8cbd721b6d10 100644
--- a/sc/source/filter/excel/xipivot.cxx
+++ b/sc/source/filter/excel/xipivot.cxx
@@ -680,7 +680,7 @@ void XclImpPivotCache::ReadPivotCacheStream( XclImpStream& rStrm )
if( mbSelfRef )
{
- if (!maSrcRangeName.getLength())
+ if (maSrcRangeName.isEmpty())
{
// try to find internal sheet containing the source data
nScTab = GetTabInfo().GetScTabFromXclName( maTabName );
@@ -881,7 +881,7 @@ bool XclImpPivotCache::IsRefreshOnLoad() const
bool XclImpPivotCache::IsValid() const
{
- if (maSrcRangeName.getLength())
+ if (!maSrcRangeName.isEmpty())
return true;
return maSrcRange.IsValid();
@@ -1417,7 +1417,7 @@ void XclImpPivotTable::Convert()
// create source descriptor
ScSheetSourceDesc aDesc(GetDocPtr());
const OUString& rSrcName = mxPCache->GetSourceRangeName();
- if (rSrcName.getLength())
+ if (!rSrcName.isEmpty())
// Range name is the data source.
aDesc.SetRangeName(rSrcName);
else
diff --git a/sc/source/filter/excel/xlchart.cxx b/sc/source/filter/excel/xlchart.cxx
index 26edb4ddb9b5..53f1136c04bd 100644
--- a/sc/source/filter/excel/xlchart.cxx
+++ b/sc/source/filter/excel/xlchart.cxx
@@ -1040,7 +1040,7 @@ void XclChPropSetHelper::WriteLineProperties(
if( eApiStyle == cssd::LineStyle_DASH )
{
OUString aDashName = rDashTable.InsertObject( ::com::sun::star::uno::makeAny( aApiDash ) );
- if( aDashName.getLength() )
+ if( !aDashName.isEmpty() )
aDashNameAny <<= aDashName;
}
@@ -1105,7 +1105,7 @@ void XclChPropSetHelper::WriteEscherProperties( ScfPropertySet& rPropSet,
if( pGradItem->QueryValue( aGradientAny, MID_FILLGRADIENT ) )
{
OUString aGradName = rGradientTable.InsertObject( aGradientAny );
- if( aGradName.getLength() )
+ if( !aGradName.isEmpty() )
{
namespace cssd = ::com::sun::star::drawing;
ScfPropSetHelper& rGradHlp = GetGradientHelper( ePropMode );
@@ -1123,7 +1123,7 @@ void XclChPropSetHelper::WriteEscherProperties( ScfPropertySet& rPropSet,
if( pBmpItem->QueryValue( aBitmapAny, MID_GRAFURL ) )
{
OUString aBmpName = rBitmapTable.InsertObject( aBitmapAny );
- if( aBmpName.getLength() )
+ if( !aBmpName.isEmpty() )
{
namespace cssd = ::com::sun::star::drawing;
/* #i71810# Caller decides whether to use a CHPICFORMAT record for bitmap mode.
diff --git a/sc/source/filter/excel/xlescher.cxx b/sc/source/filter/excel/xlescher.cxx
index 1deb83697954..3d87a897aa39 100644
--- a/sc/source/filter/excel/xlescher.cxx
+++ b/sc/source/filter/excel/xlescher.cxx
@@ -370,7 +370,7 @@ bool XclControlHelper::FillMacroDescriptor( ScriptEventDescriptor& rDescriptor,
String XclControlHelper::ExtractFromMacroDescriptor(
const ScriptEventDescriptor& rDescriptor, XclTbxEventType eEventType, SfxObjectShell* /*pShell*/ )
{
- if( (rDescriptor.ScriptCode.getLength() > 0) &&
+ if( (!rDescriptor.ScriptCode.isEmpty()) &&
rDescriptor.ScriptType.equalsIgnoreAsciiCaseAscii( "Script" ) &&
rDescriptor.ListenerType.equalsAscii( spTbxListenerData[ eEventType ].mpcListenerType ) &&
rDescriptor.EventMethod.equalsAscii( spTbxListenerData[ eEventType ].mpcEventMethod ) )
diff --git a/sc/source/filter/excel/xlpivot.cxx b/sc/source/filter/excel/xlpivot.cxx
index 7c581c38ab70..5d2c4fed5d72 100644
--- a/sc/source/filter/excel/xlpivot.cxx
+++ b/sc/source/filter/excel/xlpivot.cxx
@@ -656,7 +656,7 @@ XclExpStream& operator<<( XclExpStream& rStrm, const XclPTFieldExtInfo& rInfo )
<< rInfo.mnShowField
<< EXC_SXVDEX_FORMAT_NONE;
- if (rInfo.mpFieldTotalName.get() && rInfo.mpFieldTotalName->getLength() > 0)
+ if (rInfo.mpFieldTotalName.get() && !rInfo.mpFieldTotalName->isEmpty())
{
rtl::OUString aFinalName = *rInfo.mpFieldTotalName;
if (aFinalName.getLength() >= 254)
diff --git a/sc/source/filter/excel/xltools.cxx b/sc/source/filter/excel/xltools.cxx
index d87355628c08..d801b6f5efc7 100644
--- a/sc/source/filter/excel/xltools.cxx
+++ b/sc/source/filter/excel/xltools.cxx
@@ -710,7 +710,7 @@ const OUString XclTools::maSbMacroSuffix( RTL_CONSTASCII_USTRINGPARAM( "?languag
OUString XclTools::GetSbMacroUrl( const OUString& rMacroName, SfxObjectShell* pDocShell )
{
- OSL_ENSURE( rMacroName.getLength() > 0, "XclTools::GetSbMacroUrl - macro name is empty" );
+ OSL_ENSURE( !rMacroName.isEmpty(), "XclTools::GetSbMacroUrl - macro name is empty" );
::ooo::vba::MacroResolvedInfo aMacroInfo = ::ooo::vba::resolveVBAMacro( pDocShell, rMacroName, false );
if( aMacroInfo.mbFound )
return ::ooo::vba::makeMacroURL( aMacroInfo.msResolvedMacro );
diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx
index 1d2a9791f4a9..c48c570152f1 100644
--- a/sc/source/filter/html/htmlexp.cxx
+++ b/sc/source/filter/html/htmlexp.cxx
@@ -376,7 +376,7 @@ void ScHTMLExport::WriteHeader()
OUT_LF();
//----------------------------------------------------------
- if (xDocProps->getPrintedBy().getLength())
+ if (!xDocProps->getPrintedBy().isEmpty())
{
OUT_COMMENT( GLOBSTR( STR_DOC_INFO ) );
String aStrOut( GLOBSTR( STR_DOC_PRINTED ) );
diff --git a/sc/source/filter/html/htmlexp2.cxx b/sc/source/filter/html/htmlexp2.cxx
index ac1ca9bcf75f..aab0c5a65fa2 100644
--- a/sc/source/filter/html/htmlexp2.cxx
+++ b/sc/source/filter/html/htmlexp2.cxx
@@ -239,7 +239,7 @@ void ScHTMLExport::WriteImage( String& rLinkName, const Graphic& rGrf,
HTMLOutFuncs::Out_String( rStrm, URIHelper::simpleNormalizedMakeRelative(
aBaseURL,
rLinkName ), eDestEnc ) << '\"';
- if ( rImgOptions.getLength() )
+ if ( !rImgOptions.isEmpty() )
rStrm << rImgOptions.getStr();
rStrm << '>' << sNewLine << GetIndentStr();
}
diff --git a/sc/source/filter/xcl97/xcl97esc.cxx b/sc/source/filter/xcl97/xcl97esc.cxx
index 50b53c2e43b1..e001062b93ef 100644
--- a/sc/source/filter/xcl97/xcl97esc.cxx
+++ b/sc/source/filter/xcl97/xcl97esc.cxx
@@ -539,7 +539,7 @@ ShapeInteractionHelper::PopulateShapeInteractionInfo( XclExpObjectManager& rObjM
sHyperLink = pInfo->GetHlink();
sMacro = pInfo->GetMacro();
}
- if ( sHyperLink.getLength() > 0 )
+ if ( !sHyperLink.isEmpty() )
{
pMemStrm = new SvMemoryStream();
XclExpStream tmpStream( *pMemStrm, rObjMgr.GetRoot() );
@@ -549,7 +549,7 @@ ShapeInteractionHelper::PopulateShapeInteractionInfo( XclExpObjectManager& rObjM
XclExpHyperlink hExpHlink( rObjMgr.GetRoot(), aUrlField, dummyAddress );
hExpHlink.WriteEmbeddedData( tmpStream );
}
- if ( ( sHyperLink.getLength() > 0 ) || ( sMacro.getLength() > 0 ) )
+ if ( !sHyperLink.isEmpty() || !sMacro.isEmpty() )
rHostAppData.SetInteractionInfo( new InteractionInfo( pMemStrm, true ) );
}
catch( Exception& )
diff --git a/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx b/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx
index b2c8d1c38a19..e666da96e2d2 100644
--- a/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx
+++ b/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx
@@ -142,7 +142,7 @@ void ScChangeTrackingExportHelper::WriteChangeInfo(const ScChangeAction* pAction
}
rtl::OUString sComment(pAction->GetComment());
- if (sComment.getLength())
+ if (!sComment.isEmpty())
{
SvXMLElementExport aElemC(rExport, XML_NAMESPACE_TEXT, XML_P, true, false);
bool bPrevCharWasSpace(true);
@@ -279,7 +279,7 @@ void ScChangeTrackingExportHelper::SetValueAttributes(const double& fValue, cons
rtl::OUStringBuffer sBuffer;
::sax::Converter::convertDouble(sBuffer, fValue);
rtl::OUString sNumValue(sBuffer.makeStringAndClear());
- if (sNumValue.getLength())
+ if (!sNumValue.isEmpty())
rExport.AddAttribute(XML_NAMESPACE_OFFICE, XML_VALUE, sNumValue);
}
}
@@ -305,7 +305,7 @@ void ScChangeTrackingExportHelper::WriteStringCell(const ScBaseCell* pCell)
rtl::OUString sOUString(sString);
rExport.AddAttribute(XML_NAMESPACE_OFFICE, XML_VALUE_TYPE, XML_STRING);
SvXMLElementExport aElemC(rExport, XML_NAMESPACE_TABLE, XML_CHANGE_TRACK_TABLE_CELL, true, true);
- if (sOUString.getLength())
+ if (!sOUString.isEmpty())
{
SvXMLElementExport aElemP(rExport, XML_NAMESPACE_TEXT, XML_P, true, false);
bool bPrevCharWasSpace(true);
@@ -392,7 +392,7 @@ void ScChangeTrackingExportHelper::WriteFormulaCell(const ScBaseCell* pCell, con
pFormulaCell->GetString(sCellValue);
rtl::OUString sOUValue(sCellValue);
SvXMLElementExport aElemC(rExport, XML_NAMESPACE_TABLE, XML_CHANGE_TRACK_TABLE_CELL, true, true);
- if (sOUValue.getLength())
+ if (!sOUValue.isEmpty())
{
SvXMLElementExport aElemP(rExport, XML_NAMESPACE_TEXT, XML_P, true, false);
bool bPrevCharWasSpace(true);
diff --git a/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx b/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx
index 26ba5993cb9c..12c7be8e2d80 100644
--- a/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx
+++ b/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx
@@ -79,7 +79,7 @@ ScBaseCell* ScMyCellInfo::CreateCell(ScDocument* pDoc)
{
if (pDoc)
{
- if (!pCell && sFormula.getLength() && sFormulaAddress.getLength())
+ if (!pCell && !sFormula.isEmpty() && !sFormulaAddress.isEmpty())
{
ScAddress aPos;
sal_Int32 nOffset(0);
diff --git a/sc/source/filter/xml/XMLConverter.cxx b/sc/source/filter/xml/XMLConverter.cxx
index 0b709d9fda8b..aa67e5502b2a 100644
--- a/sc/source/filter/xml/XMLConverter.cxx
+++ b/sc/source/filter/xml/XMLConverter.cxx
@@ -635,7 +635,7 @@ void ScXMLConditionHelper::parseCondition(
if( (pcString < pcEnd) && (*pcString == '(') )
{
rParseResult.maOperand1 = lclGetExpression( ++pcString, pcEnd, ')' );
- if( rParseResult.maOperand1.getLength() > 0 )
+ if( !rParseResult.maOperand1.isEmpty() )
rParseResult.meToken = pCondInfo->meToken;
}
break;
@@ -645,10 +645,10 @@ void ScXMLConditionHelper::parseCondition(
if( (pcString < pcEnd) && (*pcString == '(') )
{
rParseResult.maOperand1 = lclGetExpression( ++pcString, pcEnd, ',' );
- if( rParseResult.maOperand1.getLength() > 0 )
+ if( !rParseResult.maOperand1.isEmpty() )
{
rParseResult.maOperand2 = lclGetExpression( pcString, pcEnd, ')' );
- if( rParseResult.maOperand2.getLength() > 0 )
+ if( !rParseResult.maOperand2.isEmpty() )
rParseResult.meToken = pCondInfo->meToken;
}
}
diff --git a/sc/source/filter/xml/XMLDDELinksContext.cxx b/sc/source/filter/xml/XMLDDELinksContext.cxx
index 00c495e221de..21fd2167e31d 100644
--- a/sc/source/filter/xml/XMLDDELinksContext.cxx
+++ b/sc/source/filter/xml/XMLDDELinksContext.cxx
@@ -127,9 +127,9 @@ SvXMLImportContext *ScXMLDDELinkContext::CreateChildContext( sal_uInt16 nPrefix,
void ScXMLDDELinkContext::CreateDDELink()
{
if (GetScImport().GetDocument() &&
- sApplication.getLength() &&
- sTopic.getLength() &&
- sItem.getLength())
+ !sApplication.isEmpty() &&
+ !sTopic.isEmpty() &&
+ !sItem.isEmpty())
{
String sAppl(sApplication);
String sTop(sTopic);
diff --git a/sc/source/filter/xml/XMLExportDataPilot.cxx b/sc/source/filter/xml/XMLExportDataPilot.cxx
index e91a4afca678..ea9e5e635ae0 100644
--- a/sc/source/filter/xml/XMLExportDataPilot.cxx
+++ b/sc/source/filter/xml/XMLExportDataPilot.cxx
@@ -311,10 +311,10 @@ void ScXMLExportDataPilot::WriteFieldReference(ScDPSaveDimension* pDim)
sValueStr = GetXMLToken(XML_INDEX);
break;
}
- if (sValueStr.getLength())
+ if (!sValueStr.isEmpty())
rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_TYPE, sValueStr);
- if (pRef->ReferenceField.getLength())
+ if (!pRef->ReferenceField.isEmpty())
rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_FIELD_NAME, pRef->ReferenceField);
if (pRef->ReferenceItemType == sheet::DataPilotFieldReferenceItemType::NAMED)
@@ -334,7 +334,7 @@ void ScXMLExportDataPilot::WriteFieldReference(ScDPSaveDimension* pDim)
sValueStr = GetXMLToken(XML_NEXT);
break;
}
- if (sValueStr.getLength())
+ if (!sValueStr.isEmpty())
rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_MEMBER_TYPE, sValueStr);
}
SvXMLElementExport aElemDPFR(rExport, XML_NAMESPACE_TABLE, XML_DATA_PILOT_FIELD_REFERENCE, true, true);
@@ -366,11 +366,11 @@ void ScXMLExportDataPilot::WriteSortInfo(ScDPSaveDimension* pDim)
break;
case sheet::DataPilotFieldSortMode::DATA:
sValueStr = GetXMLToken(XML_DATA);
- if (pSortInfo->Field.getLength())
+ if (!pSortInfo->Field.isEmpty())
rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_DATA_FIELD, pSortInfo->Field);
break;
}
- if (sValueStr.getLength())
+ if (!sValueStr.isEmpty())
rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_SORT_MODE, sValueStr);
SvXMLElementExport aElemDPLSI(rExport, XML_NAMESPACE_TABLE, XML_DATA_PILOT_SORT_INFO, true, true);
}
@@ -396,7 +396,7 @@ void ScXMLExportDataPilot::WriteAutoShowInfo(ScDPSaveDimension* pDim)
sValueStr = GetXMLToken(XML_FROM_BOTTOM);
break;
}
- if (sValueStr.getLength())
+ if (!sValueStr.isEmpty())
rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_DISPLAY_MEMBER_MODE, sValueStr);
rtl::OUStringBuffer sBuffer;
@@ -432,7 +432,7 @@ void ScXMLExportDataPilot::WriteLayoutInfo(ScDPSaveDimension* pDim)
sValueStr = GetXMLToken(XML_OUTLINE_SUBTOTALS_BOTTOM);
break;
}
- if (sValueStr.getLength())
+ if (!sValueStr.isEmpty())
rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_LAYOUT_MODE, sValueStr);
SvXMLElementExport aElemDPLLI(rExport, XML_NAMESPACE_TABLE, XML_DATA_PILOT_LAYOUT_INFO, true, true);
}
@@ -698,7 +698,7 @@ void ScXMLExportDataPilot::WriteDimension(ScDPSaveDimension* pDim, const ScDPDim
rtl::OUString sValueStr;
ScXMLConverter::GetStringFromOrientation( sValueStr,
(sheet::DataPilotFieldOrientation) pDim->GetOrientation() );
- if( sValueStr.getLength() )
+ if( !sValueStr.isEmpty() )
rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_ORIENTATION, sValueStr );
if (pDim->GetOrientation() == sheet::DataPilotFieldOrientation_PAGE)
if (pDim->HasCurrentPage())
diff --git a/sc/source/filter/xml/XMLExportDatabaseRanges.cxx b/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
index f5fd2bbd52e9..a552ee93d60b 100644
--- a/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
+++ b/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
@@ -264,11 +264,11 @@ private:
case sheet::DataImportMode_NONE : break;
case sheet::DataImportMode_QUERY :
{
- if (sDatabaseName.getLength())
+ if (!sDatabaseName.isEmpty())
mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_DATABASE_NAME, sDatabaseName);
mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_QUERY_NAME, aParam.aStatement);
SvXMLElementExport aElemID(mrExport, XML_NAMESPACE_TABLE, XML_DATABASE_SOURCE_QUERY, true, true);
- if (sConRes.getLength())
+ if (!sConRes.isEmpty())
{
mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, sConRes );
SvXMLElementExport aElemCR(mrExport, XML_NAMESPACE_FORM, XML_CONNECTION_RESOURCE, true, true);
@@ -277,11 +277,11 @@ private:
break;
case sheet::DataImportMode_TABLE :
{
- if (sDatabaseName.getLength())
+ if (!sDatabaseName.isEmpty())
mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_DATABASE_NAME, sDatabaseName);
mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_TABLE_NAME, aParam.aStatement);
SvXMLElementExport aElemID(mrExport, XML_NAMESPACE_TABLE, XML_DATABASE_SOURCE_TABLE, true, true);
- if (sConRes.getLength())
+ if (!sConRes.isEmpty())
{
mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, sConRes );
SvXMLElementExport aElemCR(mrExport, XML_NAMESPACE_FORM, XML_CONNECTION_RESOURCE, true, true);
@@ -290,13 +290,13 @@ private:
break;
case sheet::DataImportMode_SQL :
{
- if (sDatabaseName.getLength())
+ if (!sDatabaseName.isEmpty())
mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_DATABASE_NAME, sDatabaseName);
mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_SQL_STATEMENT, aParam.aStatement);
if (!aParam.bNative)
mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_PARSE_SQL_STATEMENT, XML_TRUE);
SvXMLElementExport aElemID(mrExport, XML_NAMESPACE_TABLE, XML_DATABASE_SOURCE_SQL, true, true);
- if (sConRes.getLength())
+ if (!sConRes.isEmpty())
{
mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, sConRes );
SvXMLElementExport aElemCR(mrExport, XML_NAMESPACE_FORM, XML_CONNECTION_RESOURCE, true, true);
diff --git a/sc/source/filter/xml/XMLExportIterator.cxx b/sc/source/filter/xml/XMLExportIterator.cxx
index 44f8987b8d4d..298cda550eae 100644
--- a/sc/source/filter/xml/XMLExportIterator.cxx
+++ b/sc/source/filter/xml/XMLExportIterator.cxx
@@ -756,7 +756,7 @@ void ScMyNotEmptyCellsIterator::HasAnnotation(ScMyCell& aCell)
if (aCell.xAnnotation.is() && xSimpleText.is())
{
aCell.sAnnotationText = xSimpleText->getString();
- if (aCell.sAnnotationText.getLength())
+ if (!aCell.sAnnotationText.isEmpty())
aCell.bHasAnnotation = true;
}
aAnnotations.erase(aItr);
diff --git a/sc/source/filter/xml/XMLStylesExportHelper.cxx b/sc/source/filter/xml/XMLStylesExportHelper.cxx
index 1c7897f47bd2..cd086044b052 100644
--- a/sc/source/filter/xml/XMLStylesExportHelper.cxx
+++ b/sc/source/filter/xml/XMLStylesExportHelper.cxx
@@ -138,7 +138,7 @@ bool ScMyValidationsContainer::AddValidation(const uno::Any& aTempAny,
sheet::ValidationType aValidationType;
xPropertySet->getPropertyValue(sTYPE) >>= aValidationType;
if (bShowErrorMessage || bShowImputMessage || aValidationType != sheet::ValidationType_ANY ||
- sErrorMessage.getLength() || sErrorTitle.getLength() || sImputMessage.getLength() || sImputTitle.getLength())
+ !sErrorMessage.isEmpty() || !sErrorTitle.isEmpty() || !sImputMessage.isEmpty() || !sImputTitle.isEmpty())
{
ScMyValidation aValidation;
aValidation.sErrorMessage = sErrorMessage;
@@ -227,10 +227,10 @@ rtl::OUString ScMyValidationsContainer::GetCondition(ScXMLExport& rExport, const
}
}
if (aValidation.aValidationType != sheet::ValidationType_LIST &&
- (aValidation.sFormula1.getLength() ||
+ (!aValidation.sFormula1.isEmpty() ||
(aValidation.aOperator == sheet::ConditionOperator_BETWEEN &&
aValidation.aOperator == sheet::ConditionOperator_NOT_BETWEEN &&
- aValidation.sFormula2.getLength())))
+ !aValidation.sFormula2.isEmpty())))
{
if (aValidation.aValidationType != sheet::ValidationType_TEXT_LEN)
sCondition += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" and "));
@@ -292,7 +292,7 @@ rtl::OUString ScMyValidationsContainer::GetCondition(ScXMLExport& rExport, const
if (aValidation.aValidationType == sheet::ValidationType_TEXT_LEN)
sCondition = rtl::OUString();
}
- if (sCondition.getLength())
+ if (!sCondition.isEmpty())
{
const formula::FormulaGrammar::Grammar eGrammar = rExport.GetDocument()->GetStorageGrammar();
sal_uInt16 nNamespacePrefix = (eGrammar == formula::FormulaGrammar::GRAM_ODFF ? XML_NAMESPACE_OF : XML_NAMESPACE_OOOC);
@@ -313,7 +313,7 @@ void ScMyValidationsContainer::WriteMessage(ScXMLExport& rExport,
const rtl::OUString& sTitle, const rtl::OUString& sOUMessage,
const bool bShowMessage, const bool bIsHelpMessage)
{
- if (sTitle.getLength())
+ if (!sTitle.isEmpty())
rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_TITLE, sTitle);
if (bShowMessage)
rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_DISPLAY, XML_TRUE);
@@ -324,7 +324,7 @@ void ScMyValidationsContainer::WriteMessage(ScXMLExport& rExport,
pMessage = new SvXMLElementExport(rExport, XML_NAMESPACE_TABLE, XML_HELP_MESSAGE, true, true);
else
pMessage = new SvXMLElementExport(rExport, XML_NAMESPACE_TABLE, XML_ERROR_MESSAGE, true, true);
- if (sOUMessage.getLength())
+ if (!sOUMessage.isEmpty())
{
sal_Int32 i(0);
rtl::OUStringBuffer sTemp;
@@ -363,7 +363,7 @@ void ScMyValidationsContainer::WriteValidations(ScXMLExport& rExport)
{
rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_NAME, aItr->sName);
rtl::OUString sCondition(GetCondition(rExport, *aItr));
- if (sCondition.getLength())
+ if (!sCondition.isEmpty())
{
rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_CONDITION, sCondition);
if (aItr->bIgnoreBlanks)
@@ -390,11 +390,11 @@ void ScMyValidationsContainer::WriteValidations(ScXMLExport& rExport)
}
rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_BASE_CELL_ADDRESS, GetBaseCellAddress(rExport.GetDocument(), aItr->aBaseCell));
SvXMLElementExport aElemV(rExport, XML_NAMESPACE_TABLE, XML_CONTENT_VALIDATION, true, true);
- if (aItr->bShowImputMessage || aItr->sImputMessage.getLength() || aItr->sImputTitle.getLength())
+ if (aItr->bShowImputMessage || !aItr->sImputMessage.isEmpty() || !aItr->sImputTitle.isEmpty())
{
WriteMessage(rExport, aItr->sImputTitle, aItr->sImputMessage, aItr->bShowImputMessage, true);
}
- if (aItr->bShowErrorMessage || aItr->sErrorMessage.getLength() || aItr->sErrorTitle.getLength())
+ if (aItr->bShowErrorMessage || !aItr->sErrorMessage.isEmpty() || !aItr->sErrorTitle.isEmpty())
{
switch (aItr->aAlertStyle)
{
diff --git a/sc/source/filter/xml/XMLStylesImportHelper.cxx b/sc/source/filter/xml/XMLStylesImportHelper.cxx
index c6e645813a74..9610eaa60526 100644
--- a/sc/source/filter/xml/XMLStylesImportHelper.cxx
+++ b/sc/source/filter/xml/XMLStylesImportHelper.cxx
@@ -364,7 +364,7 @@ ScMyStylesSet::iterator ScMyStylesImportHelper::GetIterator(const rtl::OUString*
void ScMyStylesImportHelper::AddDefaultRange(const ScRange& rRange)
{
OSL_ENSURE(aRowDefaultStyle != aCellStyles.end(), "no row default style");
- if (!aRowDefaultStyle->sStyleName.getLength())
+ if (aRowDefaultStyle->sStyleName.isEmpty())
{
SCCOL nStartCol(rRange.aStart.Col());
SCCOL nEndCol(rRange.aEnd.Col());
@@ -434,7 +434,7 @@ void ScMyStylesImportHelper::AddSingleRange(const ScRange& rRange)
void ScMyStylesImportHelper::AddRange()
{
- if (pPrevStyleName && pPrevStyleName->getLength())
+ if (pPrevStyleName && !pPrevStyleName->isEmpty())
AddSingleRange(aPrevRange);
else
AddDefaultRange(aPrevRange);
diff --git a/sc/source/filter/xml/XMLTableMasterPageExport.cxx b/sc/source/filter/xml/XMLTableMasterPageExport.cxx
index ee526b9c6c33..b906a927a952 100644
--- a/sc/source/filter/xml/XMLTableMasterPageExport.cxx
+++ b/sc/source/filter/xml/XMLTableMasterPageExport.cxx
@@ -88,23 +88,23 @@ void XMLTableMasterPageExport::exportHeaderFooter(const com::sun::star::uno::Ref
XML_DISPLAY, XML_FALSE );
SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_STYLE,
aName, sal_True, sal_True );
- if (sCenter.getLength() && !sLeft.getLength() && !sRight.getLength())
+ if (!sCenter.isEmpty() && sLeft.isEmpty() && sRight.isEmpty())
exportHeaderFooterContent( xCenter, false, false );
else
{
- if (sLeft.getLength())
+ if (!sLeft.isEmpty())
{
SvXMLElementExport aSubElem( GetExport(), XML_NAMESPACE_STYLE,
XML_REGION_LEFT, sal_True, sal_True );
exportHeaderFooterContent( xLeft, false, false );
}
- if (sCenter.getLength())
+ if (!sCenter.isEmpty())
{
SvXMLElementExport aSubElem( GetExport(), XML_NAMESPACE_STYLE,
XML_REGION_CENTER, sal_True, sal_True );
exportHeaderFooterContent( xCenter, false, false );
}
- if (sRight.getLength())
+ if (!sRight.isEmpty())
{
SvXMLElementExport aSubElem( GetExport(), XML_NAMESPACE_STYLE,
XML_REGION_RIGHT, sal_True, sal_True );
diff --git a/sc/source/filter/xml/XMLTableShapeResizer.cxx b/sc/source/filter/xml/XMLTableShapeResizer.cxx
index 6bf445fa1dab..8bbc6b843c17 100644
--- a/sc/source/filter/xml/XMLTableShapeResizer.cxx
+++ b/sc/source/filter/xml/XMLTableShapeResizer.cxx
@@ -72,7 +72,7 @@ void ScMyOLEFixer::CreateChartListener(ScDocument* pDoc,
if (!pDoc)
return;
- if (!rRangeList.getLength())
+ if (rRangeList.isEmpty())
{
pDoc->AddOLEObjectToCollection(rName);
return;
@@ -80,7 +80,7 @@ void ScMyOLEFixer::CreateChartListener(ScDocument* pDoc,
OUString aRangeStr;
ScRangeStringConverter::GetStringFromXMLRangeString(aRangeStr, rRangeList, pDoc);
- if (!aRangeStr.getLength())
+ if (aRangeStr.isEmpty())
{
pDoc->AddOLEObjectToCollection(rName);
return;
diff --git a/sc/source/filter/xml/XMLTableSourceContext.cxx b/sc/source/filter/xml/XMLTableSourceContext.cxx
index a1c40b5af1fe..5c2e6a0176d5 100644
--- a/sc/source/filter/xml/XMLTableSourceContext.cxx
+++ b/sc/source/filter/xml/XMLTableSourceContext.cxx
@@ -109,7 +109,7 @@ SvXMLImportContext *ScXMLTableSourceContext::CreateChildContext( sal_uInt16 nPre
void ScXMLTableSourceContext::EndElement()
{
- if (sLink.getLength())
+ if (!sLink.isEmpty())
{
uno::Reference <sheet::XSheetLinkable> xLinkable (GetScImport().GetTables().GetCurrentXSheet(), uno::UNO_QUERY);
ScDocument* pDoc(GetScImport().GetDocument());
diff --git a/sc/source/filter/xml/XMLTextPContext.cxx b/sc/source/filter/xml/XMLTextPContext.cxx
index 0489675083f3..97af05f286fb 100644
--- a/sc/source/filter/xml/XMLTextPContext.cxx
+++ b/sc/source/filter/xml/XMLTextPContext.cxx
@@ -191,7 +191,7 @@ void ScXMLTextPContext::Characters( const ::rtl::OUString& rChars )
// For the first call to an empty context, copy (ref-counted) the OUString.
// The OUStringBuffer is used only if there is more complex content.
- if ( !pContentBuffer && sSimpleContent.getLength() == 0 )
+ if ( !pContentBuffer && sSimpleContent.isEmpty() )
sSimpleContent = rChars;
else
{
diff --git a/sc/source/filter/xml/XMLTrackedChangesContext.cxx b/sc/source/filter/xml/XMLTrackedChangesContext.cxx
index 1d02abc04cba..3cea3aac651f 100644
--- a/sc/source/filter/xml/XMLTrackedChangesContext.cxx
+++ b/sc/source/filter/xml/XMLTrackedChangesContext.cxx
@@ -563,7 +563,7 @@ ScXMLTrackedChangesContext::ScXMLTrackedChangesContext( ScXMLImport& rImport,
{
if (IsXMLToken(aLocalName, XML_PROTECTION_KEY))
{
- if (sValue.getLength())
+ if (!sValue.isEmpty())
{
uno::Sequence<sal_Int8> aPass;
::sax::Converter::decodeBase64(aPass, sValue);
@@ -1297,7 +1297,7 @@ void ScXMLChangeCellContext::EndElement()
{
if (!bFormula)
{
- if (sText.getLength() && bString)
+ if (!sText.isEmpty() && bString)
rOldCell = new ScStringCell(sText);
else
rOldCell = new ScValueCell(fValue);
diff --git a/sc/source/filter/xml/xmlannoi.cxx b/sc/source/filter/xml/xmlannoi.cxx
index 63cd7a15b977..a503d70298ec 100644
--- a/sc/source/filter/xml/xmlannoi.cxx
+++ b/sc/source/filter/xml/xmlannoi.cxx
@@ -182,7 +182,7 @@ void ScXMLAnnotationContext::EndElement()
mrAnnotationData.maAuthor = maAuthorBuffer.makeStringAndClear();
mrAnnotationData.maCreateDate = maCreateDateBuffer.makeStringAndClear();
- if (!mrAnnotationData.maCreateDate.getLength())
+ if (mrAnnotationData.maCreateDate.isEmpty())
mrAnnotationData.maCreateDate = maCreateDateStringBuffer.makeStringAndClear();
mrAnnotationData.maSimpleText = maTextBuffer.makeStringAndClear();
diff --git a/sc/source/filter/xml/xmlbodyi.cxx b/sc/source/filter/xml/xmlbodyi.cxx
index 044a5deb6d4f..a7bf9c43636a 100644
--- a/sc/source/filter/xml/xmlbodyi.cxx
+++ b/sc/source/filter/xml/xmlbodyi.cxx
@@ -280,7 +280,7 @@ void ScXMLBodyContext::EndElement()
pProtection->setProtected(true);
uno::Sequence<sal_Int8> aPass;
- if (sPassword.getLength())
+ if (!sPassword.isEmpty())
{
::sax::Converter::decodeBase64(aPass, sPassword);
pProtection->setPasswordHash(aPass, meHash1, meHash2);
diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx
index 3f837a93b5ea..c75991ab135e 100644
--- a/sc/source/filter/xml/xmlcelli.cxx
+++ b/sc/source/filter/xml/xmlcelli.cxx
@@ -177,7 +177,7 @@ ScXMLTableRowCellContext::ScXMLTableRowCellContext( ScXMLImport& rImport,
break;
case XML_TOK_TABLE_ROW_CELL_ATTR_VALUE:
{
- if (sValue.getLength())
+ if (!sValue.isEmpty())
{
::sax::Converter::convertDouble(fValue, sValue);
bIsEmpty = false;
@@ -186,7 +186,7 @@ ScXMLTableRowCellContext::ScXMLTableRowCellContext( ScXMLImport& rImport,
break;
case XML_TOK_TABLE_ROW_CELL_ATTR_DATE_VALUE:
{
- if (sValue.getLength() && rXMLImport.SetNullDateOnUnitConverter())
+ if (!sValue.isEmpty() && rXMLImport.SetNullDateOnUnitConverter())
{
rXMLImport.GetMM100UnitConverter().convertDateTime(fValue, sValue);
bIsEmpty = false;
@@ -195,7 +195,7 @@ ScXMLTableRowCellContext::ScXMLTableRowCellContext( ScXMLImport& rImport,
break;
case XML_TOK_TABLE_ROW_CELL_ATTR_TIME_VALUE:
{
- if (sValue.getLength())
+ if (!sValue.isEmpty())
{
::sax::Converter::convertDuration(fValue, sValue);
bIsEmpty = false;
@@ -204,7 +204,7 @@ ScXMLTableRowCellContext::ScXMLTableRowCellContext( ScXMLImport& rImport,
break;
case XML_TOK_TABLE_ROW_CELL_ATTR_STRING_VALUE:
{
- if (sValue.getLength())
+ if (!sValue.isEmpty())
{
OSL_ENSURE(!pOUTextValue, "here should be only one string value");
pOUTextValue.reset(sValue);
@@ -214,7 +214,7 @@ ScXMLTableRowCellContext::ScXMLTableRowCellContext( ScXMLImport& rImport,
break;
case XML_TOK_TABLE_ROW_CELL_ATTR_BOOLEAN_VALUE:
{
- if (sValue.getLength())
+ if (!sValue.isEmpty())
{
if ( IsXMLToken(sValue, XML_TRUE) )
fValue = 1.0;
@@ -228,7 +228,7 @@ ScXMLTableRowCellContext::ScXMLTableRowCellContext( ScXMLImport& rImport,
break;
case XML_TOK_TABLE_ROW_CELL_ATTR_FORMULA:
{
- if (sValue.getLength())
+ if (!sValue.isEmpty())
{
OSL_ENSURE(!pOUFormula, "here should be only one formula");
rtl::OUString aFormula, aFormulaNmsp;
@@ -529,13 +529,13 @@ void ScXMLTableRowCellContext::SetContentValidation(com::sun::star::uno::Referen
uno::Reference<beans::XPropertySet> xPropertySet(xPropSet->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_VALIXML))), uno::UNO_QUERY);
if (xPropertySet.is())
{
- if (aValidation.sErrorMessage.getLength())
+ if (!aValidation.sErrorMessage.isEmpty())
xPropertySet->setPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_ERRMESS)), uno::makeAny(aValidation.sErrorMessage));
- if (aValidation.sErrorTitle.getLength())
+ if (!aValidation.sErrorTitle.isEmpty())
xPropertySet->setPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_ERRTITLE)), uno::makeAny(aValidation.sErrorTitle));
- if (aValidation.sImputMessage.getLength())
+ if (!aValidation.sImputMessage.isEmpty())
xPropertySet->setPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_INPMESS)), uno::makeAny(aValidation.sImputMessage));
- if (aValidation.sImputTitle.getLength())
+ if (!aValidation.sImputTitle.isEmpty())
xPropertySet->setPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_INPTITLE)), uno::makeAny(aValidation.sImputTitle));
xPropertySet->setPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_SHOWERR)), uno::makeAny(aValidation.bShowErrorMessage));
xPropertySet->setPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_SHOWINP)), uno::makeAny(aValidation.bShowImputMessage));
@@ -572,7 +572,7 @@ void ScXMLTableRowCellContext::SetContentValidation(com::sun::star::uno::Referen
void ScXMLTableRowCellContext::SetCellProperties(const uno::Reference<table::XCellRange>& xCellRange,
const table::CellAddress& aCellAddress)
{
- if (CellExists(aCellAddress) && pContentValidationName && pContentValidationName->getLength())
+ if (CellExists(aCellAddress) && pContentValidationName && !pContentValidationName->isEmpty())
{
sal_Int32 nBottom = aCellAddress.Row + nRepeatedRows - 1;
sal_Int32 nRight = aCellAddress.Column + nCellsRepeated - 1;
@@ -589,7 +589,7 @@ void ScXMLTableRowCellContext::SetCellProperties(const uno::Reference<table::XCe
void ScXMLTableRowCellContext::SetCellProperties(const uno::Reference<table::XCell>& xCell)
{
- if (pContentValidationName && pContentValidationName->getLength())
+ if (pContentValidationName && !pContentValidationName->isEmpty())
{
uno::Reference <beans::XPropertySet> xProperties (xCell, uno::UNO_QUERY);
if (xProperties.is())
@@ -663,7 +663,7 @@ void ScXMLTableRowCellContext::SetAnnotation(const table::CellAddress& aCellAddr
}
}
}
- else if( mxAnnotationData->maSimpleText.getLength() > 0 )
+ else if( !mxAnnotationData->maSimpleText.isEmpty() )
{
// create note from simple text
pNote = ScNoteUtil::CreateNoteFromString( *pDoc, aPos,
@@ -734,8 +734,8 @@ void ScXMLTableRowCellContext::SetDetectiveObj( const table::CellAddress& rPosit
// core implementation
void ScXMLTableRowCellContext::SetCellRangeSource( const table::CellAddress& rPosition )
{
- if( CellExists(rPosition) && pCellRangeSource && pCellRangeSource->sSourceStr.getLength() &&
- pCellRangeSource->sFilterName.getLength() && pCellRangeSource->sURL.getLength() )
+ if( CellExists(rPosition) && pCellRangeSource && !pCellRangeSource->sSourceStr.isEmpty() &&
+ !pCellRangeSource->sFilterName.isEmpty() && !pCellRangeSource->sURL.isEmpty() )
{
ScDocument* pDoc = rXMLImport.GetDocument();
if (pDoc)
@@ -827,7 +827,7 @@ void ScXMLTableRowCellContext::EndElement()
bool bWasEmpty = bIsEmpty;
// uno::Reference <table::XCell> xCell;
table::CellAddress aCurrentPos( aCellPos );
- if ((pContentValidationName && pContentValidationName->getLength()) ||
+ if ((pContentValidationName && !pContentValidationName->isEmpty()) ||
mxAnnotationData.get() || pDetectiveObjVec || pCellRangeSource)
bIsEmpty = false;
@@ -899,11 +899,11 @@ void ScXMLTableRowCellContext::EndElement()
if ( bDoIncrement )
{
ScFormulaCell* pFCell = static_cast<ScFormulaCell*>(pCell);
- if (pOUTextValue && pOUTextValue->getLength())
+ if (pOUTextValue && !pOUTextValue->isEmpty())
pFCell->SetHybridString( *pOUTextValue );
- else if (pOUTextContent && pOUTextContent->getLength())
+ else if (pOUTextContent && !pOUTextContent->isEmpty())
pFCell->SetHybridString( *pOUTextContent );
- else if ( i > 0 && pOUText && pOUText->getLength() )
+ else if ( i > 0 && pOUText && !pOUText->isEmpty() )
pFCell->SetHybridString( *pOUText );
else
bDoIncrement = false;
@@ -929,11 +929,11 @@ void ScXMLTableRowCellContext::EndElement()
LockSolarMutex();
ScBaseCell* pNewCell = NULL;
ScDocument* pDoc = rXMLImport.GetDocument();
- if (pOUTextValue && pOUTextValue->getLength())
+ if (pOUTextValue && !pOUTextValue->isEmpty())
pNewCell = ScBaseCell::CreateTextCell( *pOUTextValue, pDoc );
- else if (pOUTextContent && pOUTextContent->getLength())
+ else if (pOUTextContent && !pOUTextContent->isEmpty())
pNewCell = ScBaseCell::CreateTextCell( *pOUTextContent, pDoc );
- else if ( i > 0 && pOUText && pOUText->getLength() )
+ else if ( i > 0 && pOUText && !pOUText->isEmpty() )
pNewCell = ScBaseCell::CreateTextCell( *pOUText, pDoc );
bDoIncrement = pNewCell != NULL;
@@ -1099,7 +1099,7 @@ void ScXMLTableRowCellContext::EndElement()
// temporary formula string as string tokens
ScTokenArray* pCode = new ScTokenArray;
pCode->AddStringXML( aText );
- if( (eGrammar == formula::FormulaGrammar::GRAM_EXTERNAL) && (aFormulaNmsp.getLength() > 0) )
+ if( (eGrammar == formula::FormulaGrammar::GRAM_EXTERNAL) && !aFormulaNmsp.isEmpty() )
pCode->AddStringXML( aFormulaNmsp );
pDoc->IncXMLImportedFormulaCount( aText.getLength() );
@@ -1133,7 +1133,7 @@ void ScXMLTableRowCellContext::EndElement()
ScBaseCell* pCell = rXMLImport.GetDocument()->GetCell( aScAddress );
if ( pCell && pCell->GetCellType() == CELLTYPE_FORMULA )
{
- if (bFormulaTextResult && pOUTextValue && pOUTextValue->getLength())
+ if (bFormulaTextResult && pOUTextValue && !pOUTextValue->isEmpty())
static_cast<ScFormulaCell*>(pCell)->SetHybridString( *pOUTextValue );
else
static_cast<ScFormulaCell*>(pCell)->SetHybridDouble( fValue );
diff --git a/sc/source/filter/xml/xmlcoli.cxx b/sc/source/filter/xml/xmlcoli.cxx
index 30ea2492c589..b4d31b2f0e3a 100644
--- a/sc/source/filter/xml/xmlcoli.cxx
+++ b/sc/source/filter/xml/xmlcoli.cxx
@@ -135,7 +135,7 @@ void ScXMLTableColContext::EndElement()
uno::Reference <beans::XPropertySet> xColumnProperties(xColumnRowRange->getColumns(), uno::UNO_QUERY);
if (xColumnProperties.is())
{
- if (sStyleName.getLength())
+ if (!sStyleName.isEmpty())
{
XMLTableStylesContext *pStyles = (XMLTableStylesContext *)rXMLImport.GetAutoStyles();
if ( pStyles )
@@ -166,7 +166,7 @@ void ScXMLTableColContext::EndElement()
// #i57915# ScXMLImport::SetStyleToRange can't handle empty style names.
// The default for a column if there is no attribute is the style "Default" (programmatic API name).
- if ( !sCellStyleName.getLength() )
+ if ( sCellStyleName.isEmpty() )
sCellStyleName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Default" ));
GetScImport().GetTables().AddColCount(nColCount);
diff --git a/sc/source/filter/xml/xmlcvali.cxx b/sc/source/filter/xml/xmlcvali.cxx
index efce69f07787..6c55563fbb40 100644
--- a/sc/source/filter/xml/xmlcvali.cxx
+++ b/sc/source/filter/xml/xmlcvali.cxx
@@ -354,7 +354,7 @@ void ScXMLContentValidationContext::GetCondition( ScMyImportValidation& rValidat
rValidation.aValidationType = sheet::ValidationType_ANY; // default if no condition is given
rValidation.aOperator = sheet::ConditionOperator_NONE;
- if( sCondition.getLength() > 0 )
+ if( !sCondition.isEmpty() )
{
// extract leading namespace from condition string
OUString aCondition, aConditionNmsp;
diff --git a/sc/source/filter/xml/xmldpimp.cxx b/sc/source/filter/xml/xmldpimp.cxx
index f1a7a2017d16..4d48946d3b4c 100644
--- a/sc/source/filter/xml/xmldpimp.cxx
+++ b/sc/source/filter/xml/xmldpimp.cxx
@@ -448,7 +448,7 @@ void ScXMLDataPilotTableContext::EndElement()
if (bSourceCellRange)
{
ScSheetSourceDesc aSheetDesc(pDoc);
- if (sSourceRangeName.getLength())
+ if (!sSourceRangeName.isEmpty())
// Range name takes precedence.
aSheetDesc.SetRangeName(sSourceRangeName);
else
@@ -462,7 +462,7 @@ void ScXMLDataPilotTableContext::EndElement()
pDPSave->SetRowGrand(maRowGrandTotal.mbVisible);
pDPSave->SetColumnGrand(maColGrandTotal.mbVisible);
- if (maRowGrandTotal.maDisplayName.getLength())
+ if (!maRowGrandTotal.maDisplayName.isEmpty())
// TODO: Right now, we only support one grand total name for both
// column and row totals. Take the value from the row total for
// now.
@@ -976,7 +976,7 @@ ScXMLDataPilotFieldContext::ScXMLDataPilotFieldContext( ScXMLImport& rImport,
if (bHasName)
{
pDim = new ScDPSaveDimension(String(sName), bDataLayout);
- if (aDisplayName.getLength())
+ if (!aDisplayName.isEmpty())
pDim->SetLayoutName(aDisplayName);
}
}
@@ -1058,7 +1058,7 @@ void ScXMLDataPilotFieldContext::EndElement()
aInfo.Start = fStart;
aInfo.End = fEnd;
aInfo.Step = fStep;
- if (sGroupSource.getLength())
+ if (!sGroupSource.isEmpty())
{
ScDPSaveGroupDimension aGroupDim(sGroupSource, sName);
if (nGroupPart)
@@ -1418,7 +1418,7 @@ SvXMLImportContext *ScXMLDataPilotSubTotalsContext::CreateChildContext( sal_uInt
void ScXMLDataPilotSubTotalsContext::EndElement()
{
pDataPilotField->SetSubTotals(pFunctions, nFunctionCount);
- if (maDisplayName.getLength())
+ if (!maDisplayName.isEmpty())
pDataPilotField->SetSubTotalName(maDisplayName);
}
@@ -1615,7 +1615,7 @@ void ScXMLDataPilotMemberContext::EndElement()
if (bHasName) // #i53407# don't check sName, empty name is allowed
{
ScDPSaveMember* pMember = new ScDPSaveMember(String(sName));
- if (maDisplayName.getLength())
+ if (!maDisplayName.isEmpty())
pMember->SetLayoutName(maDisplayName);
pMember->SetIsVisible(bDisplay);
pMember->SetShowDetails(bDisplayDetails);
@@ -1847,7 +1847,7 @@ SvXMLImportContext *ScXMLDataPilotGroupMemberContext::CreateChildContext( sal_uI
void ScXMLDataPilotGroupMemberContext::EndElement()
{
- if (sName.getLength())
+ if (!sName.isEmpty())
pDataPilotGroup->AddMember(sName);
}
diff --git a/sc/source/filter/xml/xmldrani.cxx b/sc/source/filter/xml/xmldrani.cxx
index 653af637990f..3ac0fe22f218 100644
--- a/sc/source/filter/xml/xmldrani.cxx
+++ b/sc/source/filter/xml/xmldrani.cxx
@@ -563,7 +563,7 @@ SvXMLImportContext *ScXMLSourceSQLContext::CreateChildContext( sal_uInt16 nPrefi
if ( nPrefix == XML_NAMESPACE_FORM )
{
- if (IsXMLToken(rLName, XML_CONNECTION_RESOURCE) && (sDBName.getLength() == 0))
+ if (IsXMLToken(rLName, XML_CONNECTION_RESOURCE) && sDBName.isEmpty())
{
pContext = new ScXMLConResContext( GetScImport(), nPrefix,
rLName, xAttrList, pDatabaseRangeContext);
@@ -578,7 +578,7 @@ SvXMLImportContext *ScXMLSourceSQLContext::CreateChildContext( sal_uInt16 nPrefi
void ScXMLSourceSQLContext::EndElement()
{
- if (sDBName.getLength())
+ if (!sDBName.isEmpty())
pDatabaseRangeContext->SetDatabaseName(sDBName);
}
@@ -631,7 +631,7 @@ SvXMLImportContext *ScXMLSourceTableContext::CreateChildContext( sal_uInt16 nPre
if ( nPrefix == XML_NAMESPACE_FORM )
{
- if (IsXMLToken(rLName, XML_CONNECTION_RESOURCE) && (sDBName.getLength() == 0))
+ if (IsXMLToken(rLName, XML_CONNECTION_RESOURCE) && sDBName.isEmpty())
{
pContext = new ScXMLConResContext( GetScImport(), nPrefix,
rLName, xAttrList, pDatabaseRangeContext);
@@ -646,7 +646,7 @@ SvXMLImportContext *ScXMLSourceTableContext::CreateChildContext( sal_uInt16 nPre
void ScXMLSourceTableContext::EndElement()
{
- if (sDBName.getLength())
+ if (!sDBName.isEmpty())
pDatabaseRangeContext->SetDatabaseName(sDBName);
}
@@ -699,7 +699,7 @@ SvXMLImportContext *ScXMLSourceQueryContext::CreateChildContext( sal_uInt16 nPre
if ( nPrefix == XML_NAMESPACE_FORM )
{
- if (IsXMLToken(rLName, XML_CONNECTION_RESOURCE) && (sDBName.getLength() == 0))
+ if (IsXMLToken(rLName, XML_CONNECTION_RESOURCE) && sDBName.isEmpty())
{
pContext = new ScXMLConResContext( GetScImport(), nPrefix,
rLName, xAttrList, pDatabaseRangeContext);
@@ -714,7 +714,7 @@ SvXMLImportContext *ScXMLSourceQueryContext::CreateChildContext( sal_uInt16 nPre
void ScXMLSourceQueryContext::EndElement()
{
- if (sDBName.getLength())
+ if (!sDBName.isEmpty())
pDatabaseRangeContext->SetDatabaseName(sDBName);
}
@@ -743,7 +743,7 @@ ScXMLConResContext::ScXMLConResContext( ScXMLImport& rImport,
sConRes = sValue;
}
}
- if (sConRes.getLength())
+ if (!sConRes.isEmpty())
pDatabaseRangeContext->SetConnectionRessource(sConRes);
}
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index 1757c6b81b3b..a8e077bb8391 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -1890,7 +1890,7 @@ void ScXMLExport::AddStyleFromCells(const uno::Reference<beans::XPropertySet>& x
xPropStates.clear();
if (nNumberFormat == -1)
xProperties->getPropertyValue(SC_NUMBERFORMAT) >>= nNumberFormat;
- if (sStyleName.getLength())
+ if (!sStyleName.isEmpty())
{
if (xPropStates.size())
{
@@ -2210,7 +2210,7 @@ void ScXMLExport::_ExportAutoStyles()
Reference<beans::XPropertySet> xShapeProperties( pDrawObj->getUnoShape(), uno::UNO_QUERY );
if (xShapeProperties.is())
{
- if ( aNoteIter->maStyleName.getLength() )
+ if ( !aNoteIter->maStyleName.isEmpty() )
{
std::vector<XMLPropertyState> xPropStates(xShapeMapper->Filter(xShapeProperties));
rtl::OUString sParent;
@@ -2218,7 +2218,7 @@ void ScXMLExport::_ExportAutoStyles()
GetAutoStylePool()->AddNamed(sName, XML_STYLE_FAMILY_SD_GRAPHICS_ID, sParent, xPropStates);
GetAutoStylePool()->RegisterName(XML_STYLE_FAMILY_SD_GRAPHICS_ID, sName);
}
- if ( aNoteIter->maTextStyle.getLength() )
+ if ( !aNoteIter->maTextStyle.isEmpty() )
{
std::vector<XMLPropertyState> xPropStates(
GetTextParagraphExport()->GetParagraphPropertyMapper()->Filter(xShapeProperties));
@@ -2744,7 +2744,7 @@ void ScXMLExport::WriteTable(sal_Int32 nTable, const Reference<sheet::XSpreadshe
table::CellRangeAddress aColumnHeaderRange;
bool bHasColumnHeader;
GetColumnRowHeader(bHasColumnHeader, aColumnHeaderRange, bHasRowHeader, aRowHeaderRange, sPrintRanges);
- if( sPrintRanges.getLength() )
+ if( !sPrintRanges.isEmpty() )
AddAttribute( XML_NAMESPACE_TABLE, XML_PRINT_RANGES, sPrintRanges );
else if (!pDoc->IsPrintEntireSheet(static_cast<SCTAB>(nTable)))
AddAttribute( XML_NAMESPACE_TABLE, XML_PRINT, XML_FALSE);
@@ -2966,7 +2966,7 @@ void ScXMLExport::WriteCell(ScMyCell& aCell, sal_Int32 nEqualCellCount)
else
{
if (GetCellText(aCell, aCellPos))
- if (aCell.sStringValue.getLength())
+ if (!aCell.sStringValue.isEmpty())
{
AddAttribute(sAttrValueType, XML_STRING);
AddAttribute(sAttrStringValue, aCell.sStringValue);
@@ -3073,7 +3073,7 @@ void ScXMLExport::ExportShape(const uno::Reference < drawing::XShape >& xShape,
if ( rRangeList.Is() )
{
ScRangeStringConverter::GetStringFromRangeList( sRanges, rRangeList, pDoc, FormulaGrammar::CONV_OOO );
- if ( sRanges.getLength() > 0 )
+ if ( !sRanges.isEmpty() )
{
bIsChart = true;
SvXMLAttributeList* pAttrList = new SvXMLAttributeList();
@@ -3089,7 +3089,7 @@ void ScXMLExport::ExportShape(const uno::Reference < drawing::XShape >& xShape,
}
}
- if ( sRanges.getLength() == 0 )
+ if ( sRanges.isEmpty() )
{
uno::Reference< frame::XModel > xChartModel;
if( ( xShapeProps->getPropertyValue( sPropModel ) >>= xChartModel ) &&
@@ -3134,7 +3134,7 @@ void ScXMLExport::ExportShape(const uno::Reference < drawing::XShape >& xShape,
std::auto_ptr< SvXMLElementExport > pDrawA;
// enlose shapes with <draw:a> element only if sHlink contains something
- if ( sHlink.getLength() > 0 )
+ if ( !sHlink.isEmpty() )
{
// need to get delete the attributes that are pre-loaded
// for the shape export ( otherwise they will become
@@ -3237,7 +3237,7 @@ void ScXMLExport::WriteAreaLink( const ScMyCell& rMyCell )
AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE );
AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, GetRelativeReference(rAreaLink.sURL) );
AddAttribute( XML_NAMESPACE_TABLE, XML_FILTER_NAME, rAreaLink.sFilter );
- if( rAreaLink.sFilterOptions.getLength() )
+ if( !rAreaLink.sFilterOptions.isEmpty() )
AddAttribute( XML_NAMESPACE_TABLE, XML_FILTER_OPTIONS, rAreaLink.sFilterOptions );
OUStringBuffer sValue;
::sax::Converter::convertNumber( sValue, rAreaLink.GetColCount() );
@@ -3259,7 +3259,7 @@ void ScXMLExport::exportAnnotationMeta( const uno::Reference < drawing::XShape >
if (pCurrentCell && pCurrentCell->xNoteShape.is() && pCurrentCell->xNoteShape.get() == xShape.get() && pCurrentCell->xAnnotation.is())
{
rtl::OUString sAuthor(pCurrentCell->xAnnotation->getAuthor());
- if (sAuthor.getLength())
+ if (!sAuthor.isEmpty())
{
SvXMLElementExport aCreatorElem( *this, XML_NAMESPACE_DC,
XML_CREATOR, true,
@@ -3635,15 +3635,15 @@ void ScXMLExport::WriteTableSource()
xLinkProps->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_FILTER))) >>= sFilter;
xLinkProps->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_FILTOPT))) >>= sFilterOptions;
xLinkProps->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_REFDELAY))) >>= nRefresh;
- if (sLink.getLength())
+ if (!sLink.isEmpty())
{
AddAttribute(XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE);
AddAttribute(XML_NAMESPACE_XLINK, XML_HREF, GetRelativeReference(sLink));
- if (sTableName.getLength())
+ if (!sTableName.isEmpty())
AddAttribute(XML_NAMESPACE_TABLE, XML_TABLE_NAME, sTableName);
- if (sFilter.getLength())
+ if (!sFilter.isEmpty())
AddAttribute(XML_NAMESPACE_TABLE, XML_FILTER_NAME, sFilter);
- if (sFilterOptions.getLength())
+ if (!sFilterOptions.isEmpty())
AddAttribute(XML_NAMESPACE_TABLE, XML_FILTER_OPTIONS, sFilterOptions);
if (nMode != sheet::SheetLinkMode_NORMAL)
AddAttribute(XML_NAMESPACE_TABLE, XML_MODE, XML_COPY_RESULTS_ONLY);
@@ -3798,7 +3798,7 @@ void ScXMLExport::WriteNamedRange(ScRangeName* pRangeName)
sBufferRangeType.append(GetXMLToken(XML_PRINT_RANGE));
}
rtl::OUString sRangeType = sBufferRangeType.makeStringAndClear();
- if (sRangeType.getLength())
+ if (!sRangeType.isEmpty())
AddAttribute(XML_NAMESPACE_TABLE, XML_RANGE_USABLE_AS, sRangeType);
SvXMLElementExport aElemNR(*this, XML_NAMESPACE_TABLE, XML_NAMED_RANGE, true, true);
diff --git a/sc/source/filter/xml/xmlexternaltabi.cxx b/sc/source/filter/xml/xmlexternaltabi.cxx
index 1694e8861146..29a8b34e9157 100644
--- a/sc/source/filter/xml/xmlexternaltabi.cxx
+++ b/sc/source/filter/xml/xmlexternaltabi.cxx
@@ -308,7 +308,7 @@ ScXMLExternalRefCellContext::ScXMLExternalRefCellContext(
break;
case XML_TOK_TABLE_ROW_CELL_ATTR_VALUE:
{
- if (sValue.getLength())
+ if (!sValue.isEmpty())
{
::sax::Converter::convertDouble(mfCellValue, sValue);
mbIsNumeric = true;
@@ -318,7 +318,7 @@ ScXMLExternalRefCellContext::ScXMLExternalRefCellContext(
break;
case XML_TOK_TABLE_ROW_CELL_ATTR_DATE_VALUE:
{
- if (sValue.getLength() && mrScImport.SetNullDateOnUnitConverter())
+ if (!sValue.isEmpty() && mrScImport.SetNullDateOnUnitConverter())
{
mrScImport.GetMM100UnitConverter().convertDateTime(mfCellValue, sValue);
mbIsNumeric = true;
@@ -328,7 +328,7 @@ ScXMLExternalRefCellContext::ScXMLExternalRefCellContext(
break;
case XML_TOK_TABLE_ROW_CELL_ATTR_TIME_VALUE:
{
- if (sValue.getLength())
+ if (!sValue.isEmpty())
{
::sax::Converter::convertDuration(mfCellValue, sValue);
mbIsNumeric = true;
@@ -338,7 +338,7 @@ ScXMLExternalRefCellContext::ScXMLExternalRefCellContext(
break;
case XML_TOK_TABLE_ROW_CELL_ATTR_STRING_VALUE:
{
- if (sValue.getLength())
+ if (!sValue.isEmpty())
{
maCellString = sValue;
mbIsNumeric = false;
@@ -348,7 +348,7 @@ ScXMLExternalRefCellContext::ScXMLExternalRefCellContext(
break;
case XML_TOK_TABLE_ROW_CELL_ATTR_BOOLEAN_VALUE:
{
- if (sValue.getLength())
+ if (!sValue.isEmpty())
{
mfCellValue = IsXMLToken(sValue, XML_TRUE) ? 1.0 : 0.0;
mbIsNumeric = true;
@@ -379,7 +379,7 @@ SvXMLImportContext* ScXMLExternalRefCellContext::CreateChildContext(
void ScXMLExternalRefCellContext::EndElement()
{
- if (maCellString.getLength())
+ if (!maCellString.isEmpty())
mbIsEmpty = false;
for (sal_Int32 i = 0; i < mnRepeatCount; ++i, ++mrExternalRefInfo.mnCol)
diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx
index 10259c4e3028..c8bc6ce0976b 100644
--- a/sc/source/filter/xml/xmlimprt.cxx
+++ b/sc/source/filter/xml/xmlimprt.cxx
@@ -2205,7 +2205,7 @@ void ScXMLImport::SetChangeTrackingViewSettings(const com::sun::star::uno::Seque
else if (sName.compareToAscii("ShowChangesByRangesList") == 0)
{
rtl::OUString sRanges;
- if ((rChangeProps[i].Value >>= sRanges) && sRanges.getLength())
+ if ((rChangeProps[i].Value >>= sRanges) && !sRanges.isEmpty())
{
ScRangeList aRangeList;
ScRangeStringConverter::GetRangeListFromString(
@@ -2463,7 +2463,7 @@ void ScXMLImport::SetType(uno::Reference <beans::XPropertySet>& rProperties,
rProperties->setPropertyValue( sNumberFormat, uno::makeAny(xNumberFormatTypes->getStandardFormat(nCellType, aLocale)) );
}
}
- else if (rCurrency.getLength() && sCurrentCurrency.getLength())
+ else if (!rCurrency.isEmpty() && !sCurrentCurrency.isEmpty())
{
if (!sCurrentCurrency.equals(rCurrency))
if (!IsCurrencySymbol(rNumberFormat, sCurrentCurrency, rCurrency))
@@ -2479,7 +2479,7 @@ void ScXMLImport::SetType(uno::Reference <beans::XPropertySet>& rProperties,
}
else
{
- if ((nCellType == util::NumberFormat::CURRENCY) && rCurrency.getLength() && sCurrentCurrency.getLength() &&
+ if ((nCellType == util::NumberFormat::CURRENCY) && !rCurrency.isEmpty() && !sCurrentCurrency.isEmpty() &&
!sCurrentCurrency.equals(rCurrency) && !IsCurrencySymbol(rNumberFormat, sCurrentCurrency, rCurrency))
rProperties->setPropertyValue( sNumberFormat, uno::makeAny(SetCurrencySymbol(rNumberFormat, rCurrency)));
}
@@ -2501,7 +2501,7 @@ void ScXMLImport::AddStyleRange(const table::CellRangeAddress& rCellRange)
void ScXMLImport::SetStyleToRanges()
{
- if (sPrevStyleName.getLength())
+ if (!sPrevStyleName.isEmpty())
{
uno::Reference <beans::XPropertySet> xProperties (xSheetCellRanges, uno::UNO_QUERY);
if (xProperties.is())
@@ -2555,31 +2555,31 @@ void ScXMLImport::SetStyleToRanges()
void ScXMLImport::SetStyleToRange(const ScRange& rRange, const rtl::OUString* pStyleName,
const sal_Int16 nCellType, const rtl::OUString* pCurrency)
{
- if (!sPrevStyleName.getLength())
+ if (sPrevStyleName.isEmpty())
{
nPrevCellType = nCellType;
if (pStyleName)
sPrevStyleName = *pStyleName;
if (pCurrency)
sPrevCurrency = *pCurrency;
- else if (sPrevCurrency.getLength())
+ else if (!sPrevCurrency.isEmpty())
sPrevCurrency = sEmpty;
}
else if ((nCellType != nPrevCellType) ||
((pStyleName && !pStyleName->equals(sPrevStyleName)) ||
- (!pStyleName && sPrevStyleName.getLength())) ||
+ (!pStyleName && !sPrevStyleName.isEmpty())) ||
((pCurrency && !pCurrency->equals(sPrevCurrency)) ||
- (!pCurrency && sPrevCurrency.getLength())))
+ (!pCurrency && !sPrevCurrency.isEmpty())))
{
SetStyleToRanges();
nPrevCellType = nCellType;
if (pStyleName)
sPrevStyleName = *pStyleName;
- else if(sPrevStyleName.getLength())
+ else if(!sPrevStyleName.isEmpty())
sPrevStyleName = sEmpty;
if (pCurrency)
sPrevCurrency = *pCurrency;
- else if(sPrevCurrency.getLength())
+ else if(!sPrevCurrency.isEmpty())
sPrevCurrency = sEmpty;
}
table::CellRangeAddress aCellRange;
@@ -3111,7 +3111,7 @@ void ScXMLImport::ExtractFormulaNamespaceGrammar(
external formula parser. This prevents that the range operator in
conjunction with defined names is confused as namespaces prefix, e.g.
in the expression 'table:A1' where 'table' is a named reference. */
- if( ((nNsId & XML_NAMESPACE_UNKNOWN_FLAG) != 0) && (rFormulaNmsp.getLength() > 0) &&
+ if( ((nNsId & XML_NAMESPACE_UNKNOWN_FLAG) != 0) && !rFormulaNmsp.isEmpty() &&
GetDocument()->GetFormulaParserPool().hasFormulaParser( rFormulaNmsp ) )
{
reGrammar = FormulaGrammar::GRAM_EXTERNAL;
diff --git a/sc/source/filter/xml/xmlrowi.cxx b/sc/source/filter/xml/xmlrowi.cxx
index a1f440fdcac1..edfe4e55bd2c 100644
--- a/sc/source/filter/xml/xmlrowi.cxx
+++ b/sc/source/filter/xml/xmlrowi.cxx
@@ -186,7 +186,7 @@ void ScXMLTableRowContext::EndElement()
uno::Reference <beans::XPropertySet> xRowProperties(xColumnRowRange->getRows(), uno::UNO_QUERY);
if (xRowProperties.is())
{
- if (sStyleName.getLength())
+ if (!sStyleName.isEmpty())
{
XMLTableStylesContext *pStyles((XMLTableStylesContext *)rXMLImport.GetAutoStyles());
if ( pStyles )
diff --git a/sc/source/filter/xml/xmlstyle.cxx b/sc/source/filter/xml/xmlstyle.cxx
index 0e91a0de8f2a..f76c2fc48964 100644
--- a/sc/source/filter/xml/xmlstyle.cxx
+++ b/sc/source/filter/xml/xmlstyle.cxx
@@ -611,7 +611,7 @@ void ScXMLAutoStylePoolP::exportStyleAttributes(
if (i->maValue >>= nNumberFormat)
{
rtl::OUString sAttrValue(rScXMLExport.getDataStyleName(nNumberFormat));
- if (sAttrValue.getLength())
+ if (!sAttrValue.isEmpty())
{
GetExport().AddAttribute(
aPropMapper->GetEntryNameSpace(i->mnIndex),
diff --git a/sc/source/filter/xml/xmlstyli.cxx b/sc/source/filter/xml/xmlstyli.cxx
index b22bbf4fe895..7691c4b13010 100644
--- a/sc/source/filter/xml/xmlstyli.cxx
+++ b/sc/source/filter/xml/xmlstyli.cxx
@@ -399,13 +399,13 @@ void XMLTableStyleContext::GetConditionalFormat(uno::Any& aAny,
const rtl::OUString& sTempCondition,
const rtl::OUString& sApplyStyle, const rtl::OUString& sBaseCell) const
{
- if (sTempCondition.getLength() && sApplyStyle.getLength())
+ if (!sTempCondition.isEmpty() && !sApplyStyle.isEmpty())
{
uno::Reference<sheet::XSheetConditionalEntries> xConditionalEntries(aAny, uno::UNO_QUERY);
if (xConditionalEntries.is())
{
uno::Sequence<beans::PropertyValue> aProps;
- if (sBaseCell.getLength())
+ if (!sBaseCell.isEmpty())
SetBaseCellAddress(aProps, sBaseCell);
SetStyle(aProps, sApplyStyle);
@@ -540,7 +540,7 @@ void XMLTableStyleContext::FillPropertySet(
}
else if (GetFamily() == XML_STYLE_FAMILY_TABLE_TABLE)
{
- if (sPageStyle.getLength())
+ if (!sPageStyle.isEmpty())
AddProperty(CTF_SC_MASTERPAGENAME, uno::makeAny(GetImport().GetStyleDisplayName( XML_STYLE_FAMILY_MASTER_PAGE, sPageStyle )));
}
}
@@ -601,7 +601,7 @@ XMLPropertyState* XMLTableStyleContext::FindProperty(const sal_Int16 nContextID)
sal_Int32 XMLTableStyleContext::GetNumberFormat()
{
- if (nNumberFormat < 0 && sDataStyleName.getLength())
+ if (nNumberFormat < 0 && !sDataStyleName.isEmpty())
{
const SvXMLNumFormatContext* pStyle = static_cast<const SvXMLNumFormatContext*>(
pStyles->FindStyleChildContext(XML_STYLE_FAMILY_DATA_STYLE, sDataStyleName, sal_True));
@@ -808,7 +808,7 @@ uno::Reference < XNameContainer >
}
break;
}
- if( !xStyles.is() && sName.getLength() && GetScImport().GetModel().is() )
+ if( !xStyles.is() && !sName.isEmpty() && GetScImport().GetModel().is() )
{
uno::Reference< XStyleFamiliesSupplier > xFamiliesSupp(
GetScImport().GetModel(), UNO_QUERY );
@@ -851,7 +851,7 @@ uno::Reference < XNameContainer >
OUString XMLTableStylesContext::GetServiceName( sal_uInt16 nFamily ) const
{
rtl::OUString sServiceName(SvXMLStylesContext::GetServiceName(nFamily));
- if (!sServiceName.getLength())
+ if (sServiceName.isEmpty())
{
switch( nFamily )
{
diff --git a/sc/source/filter/xml/xmlsubti.cxx b/sc/source/filter/xml/xmlsubti.cxx
index 32684b70e747..aead6b718a4c 100644
--- a/sc/source/filter/xml/xmlsubti.cxx
+++ b/sc/source/filter/xml/xmlsubti.cxx
@@ -232,7 +232,7 @@ void ScMyTables::SetTableStyle(const rtl::OUString& sStyleName)
{
//these uno calls are a bit difficult to remove, XMLTableStyleContext::FillPropertySet uses
//SvXMLImportPropertyMapper::FillPropertySet
- if ( sStyleName.getLength() )
+ if ( !sStyleName.isEmpty() )
{
// #i57869# All table style properties for all sheets are now applied here,
// before importing the contents.
diff --git a/sc/source/filter/xml/xmltabi.cxx b/sc/source/filter/xml/xmltabi.cxx
index 14a711f0cd39..c6c43ec34255 100644
--- a/sc/source/filter/xml/xmltabi.cxx
+++ b/sc/source/filter/xml/xmltabi.cxx
@@ -378,7 +378,7 @@ void ScXMLTableContext::EndElement()
ScMyTables& rTables = rImport.GetTables();
SCTAB nCurTab = rTables.GetCurrentSheet();
- if (sPrintRanges.getLength())
+ if (!sPrintRanges.isEmpty())
{
Reference< sheet::XPrintAreas > xPrintAreas(
rTables.GetCurrentXSheet(), UNO_QUERY);
diff --git a/sc/source/filter/xml/xmlwrap.cxx b/sc/source/filter/xml/xmlwrap.cxx
index c9819f6f49f8..82ab2ccabd8e 100644
--- a/sc/source/filter/xml/xmlwrap.cxx
+++ b/sc/source/filter/xml/xmlwrap.cxx
@@ -131,7 +131,7 @@ sal_uInt32 ScXMLImportWrapper::ImportFromComponent(uno::Reference<lang::XMultiSe
uno::Reference < container::XNameAccess > xAccess( xStorage, uno::UNO_QUERY );
if ( xAccess->hasByName(sDocName) && xStorage->isStreamElement( sDocName) )
xDocStream = xStorage->openStreamElement( sDocName, embed::ElementModes::READ );
- else if (sOldDocName.getLength() && xAccess->hasByName(sOldDocName) && xStorage->isStreamElement( sOldDocName) )
+ else if (!sOldDocName.isEmpty() && xAccess->hasByName(sOldDocName) && xStorage->isStreamElement( sOldDocName) )
{
xDocStream = xStorage->openStreamElement( sOldDocName, embed::ElementModes::READ );
sStream = sOldDocName;
@@ -228,7 +228,7 @@ sal_uInt32 ScXMLImportWrapper::ImportFromComponent(uno::Reference<lang::XMultiSe
sErr += ',';
sErr += String::CreateFromInt32( r.ColumnNumber );
- if( sDocName.getLength() )
+ if( !sDocName.isEmpty() )
{
nReturn = *new TwoStringErrorInfo(
(bMustBeSuccessfull ? SCERR_IMPORT_FILE_ROWCOL
@@ -419,7 +419,7 @@ sal_Bool ScXMLImportWrapper::Import(sal_Bool bStylesOnly, ErrCode& nError)
else
aName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "dummyObjectName" ));
- if( aName.getLength() )
+ if( !aName.isEmpty() )
{
sPropName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("StreamRelPath"));
xInfoSet->setPropertyValue( sPropName, uno::makeAny( aName ) );
@@ -828,7 +828,7 @@ sal_Bool ScXMLImportWrapper::Export(sal_Bool bStylesOnly)
aName = pDocHierarchItem->GetValue();
}
- if( aName.getLength() )
+ if( !aName.isEmpty() )
{
sPropName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("StreamRelPath"));
xInfoSet->setPropertyValue( sPropName, uno::makeAny( aName ) );
diff --git a/sc/source/ui/Accessibility/AccessibleContextBase.cxx b/sc/source/ui/Accessibility/AccessibleContextBase.cxx
index b4fad11de92d..02cdde2f2331 100644
--- a/sc/source/ui/Accessibility/AccessibleContextBase.cxx
+++ b/sc/source/ui/Accessibility/AccessibleContextBase.cxx
@@ -330,7 +330,7 @@ sal_Int16 SAL_CALL
{
SolarMutexGuard aGuard;
IsObjectValid();
- if (!msDescription.getLength())
+ if (msDescription.isEmpty())
{
OUString sDescription(createAccessibleDescription());
@@ -356,10 +356,10 @@ OUString SAL_CALL
{
SolarMutexGuard aGuard;
IsObjectValid();
- if (!msName.getLength())
+ if (msName.isEmpty())
{
OUString sName(createAccessibleName());
- OSL_ENSURE(sName.getLength(), "We should give always a name.");
+ OSL_ENSURE(!sName.isEmpty(), "We should give always a name.");
if (msName != sName)
{
diff --git a/sc/source/ui/app/drwtrans.cxx b/sc/source/ui/app/drwtrans.cxx
index 794c28f0e810..b7a6eac35e86 100644
--- a/sc/source/ui/app/drwtrans.cxx
+++ b/sc/source/ui/app/drwtrans.cxx
@@ -180,7 +180,7 @@ ScDrawTransferObj::ScDrawTransferObj( SdrModel* pClipModel, ScDocShell* pContain
{
aAny = xPropSet->getPropertyValue( sPropTargetURL );
rtl::OUString sTmp;
- if ( (aAny >>= sTmp) && sTmp.getLength() )
+ if ( (aAny >>= sTmp) && !sTmp.isEmpty() )
{
String aUrl = sTmp;
String aAbs;
@@ -200,7 +200,7 @@ ScDrawTransferObj::ScDrawTransferObj( SdrModel* pClipModel, ScDocShell* pContain
if(xInfo->hasPropertyByName( sPropLabel ))
{
aAny = xPropSet->getPropertyValue( sPropLabel );
- if ( (aAny >>= sTmp) && sTmp.getLength() )
+ if ( (aAny >>= sTmp) && !sTmp.isEmpty() )
{
aLabel = String(sTmp);
}
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 68b08dea5a9f..83b58ff8004f 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -778,7 +778,7 @@ void ScInputHandler::ShowTipCursor()
nNextFStart = aHelper.GetFunctionStart( aSelText, nLeftParentPos, sal_True);
if( aHelper.GetNextFunc( aSelText, false, nNextFStart, &nNextFEnd, &ppFDesc, &aArgs ) )
{
- if( ppFDesc->getFunctionName().getLength() )
+ if( !ppFDesc->getFunctionName().isEmpty() )
{
nArgPos = aHelper.GetArgStart( aSelText, nNextFStart, 0 );
nArgs = static_cast<sal_uInt16>(ppFDesc->getParameterCount());
@@ -1022,7 +1022,7 @@ void ScInputHandler::UseFormulaData()
nNextFStart = aHelper.GetFunctionStart( aFormula, nLeftParentPos, sal_True);
if( aHelper.GetNextFunc( aFormula, false, nNextFStart, &nNextFEnd, &ppFDesc, &aArgs ) )
{
- if( ppFDesc->getFunctionName().getLength() )
+ if( !ppFDesc->getFunctionName().isEmpty() )
{
nArgPos = aHelper.GetArgStart( aFormula, nNextFStart, 0 );
nArgs = static_cast<sal_uInt16>(ppFDesc->getParameterCount());
@@ -3443,7 +3443,7 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* pState,
pActiveViewSh->GetViewData()->GetDocument()->
GetRangeAtBlock( ScRange( rSPos, rEPos ), &aPosStr );
- if ( !aPosStr.getLength() ) // kein Name -> formatieren
+ if ( aPosStr.isEmpty() ) // kein Name -> formatieren
{
sal_uInt16 nFlags = 0;
if( aAddrDetails.eConv == formula::FormulaGrammar::CONV_XL_R1C1 )
diff --git a/sc/source/ui/cctrl/editfield.cxx b/sc/source/ui/cctrl/editfield.cxx
index 11df402e2c44..51147e5cd2cb 100644
--- a/sc/source/ui/cctrl/editfield.cxx
+++ b/sc/source/ui/cctrl/editfield.cxx
@@ -62,7 +62,7 @@ ScDoubleField::ScDoubleField( Window* pParent, const ResId& rResId ) :
bool ScDoubleField::GetValue( double& rfValue ) const
{
rtl::OUString aStr(comphelper::string::strip(GetText(), ' '));
- bool bOk = aStr.getLength() > 0;
+ bool bOk = !aStr.isEmpty();
if( bOk )
{
rtl_math_ConversionStatus eStatus;
diff --git a/sc/source/ui/dbgui/pvfundlg.cxx b/sc/source/ui/dbgui/pvfundlg.cxx
index dc47e040ca85..263a6ae08ecd 100644
--- a/sc/source/ui/dbgui/pvfundlg.cxx
+++ b/sc/source/ui/dbgui/pvfundlg.cxx
@@ -76,7 +76,7 @@ bool lclFillListBox( ListBoxType& rLBox, const Sequence< OUString >& rStrings, s
{
for( const OUString* pEnd = pStr + rStrings.getLength(); pStr != pEnd; ++pStr )
{
- if( pStr->getLength() )
+ if( !pStr->isEmpty() )
rLBox.InsertEntry( *pStr );
else
{
@@ -96,7 +96,7 @@ bool lclFillListBox( ListBoxType& rLBox, const vector<ScDPLabelData::Member>& rM
for (; itr != itrEnd; ++itr)
{
OUString aName = itr->getDisplayName();
- if (aName.getLength())
+ if (!aName.isEmpty())
rLBox.InsertEntry(aName);
else
{
@@ -316,7 +316,7 @@ void ScDPFunctionDlg::Init( const ScDPLabelData& rLabelData, const ScDPFuncData&
break;
default:
{
- if( mbEmptyItem && !rFuncData.maFieldRef.ReferenceItemName.getLength() )
+ if( mbEmptyItem && rFuncData.maFieldRef.ReferenceItemName.isEmpty() )
{
// select special "(empty)" entry added before other items
maLbBaseItem.SelectEntryPos( SC_BASEITEM_USER_POS );
diff --git a/sc/source/ui/dbgui/pvlaydlg.cxx b/sc/source/ui/dbgui/pvlaydlg.cxx
index bbd30e7d8e77..4c0bf59d38eb 100644
--- a/sc/source/ui/dbgui/pvlaydlg.cxx
+++ b/sc/source/ui/dbgui/pvlaydlg.cxx
@@ -205,7 +205,7 @@ void ScDPLayoutDlg::Init(bool bNewOutput)
aRbInPos.Enable();
const ScSheetSourceDesc* p = xDlgDPObject->GetSheetDesc();
OUString aRangeName = p->GetRangeName();
- if (aRangeName.getLength())
+ if (!aRangeName.isEmpty())
aEdInPos.SetText(aRangeName);
else
{
@@ -393,7 +393,7 @@ void ScDPLayoutDlg::InitFieldWindow( const vector<PivotField>& rFields, ScDPFiel
if (pData)
{
OUString aStr = pData->maLayoutName;
- if (!aStr.getLength())
+ if (aStr.isEmpty())
{
sal_uInt16 nInitMask = pInitArr->back()->mnFuncMask;
aStr = GetFuncString(nInitMask, pData->mbIsValue);
@@ -489,7 +489,7 @@ void ScDPLayoutDlg::AddField( size_t nFromIndex, ScDPFieldType eToType, const Po
ScDPLabelData* p = GetLabelData(fData.mnCol);
OUString aStr = p->maLayoutName;
sal_uInt16 nMask = fData.mnFuncMask;
- if (!aStr.getLength())
+ if (aStr.isEmpty())
{
aStr = GetFuncString(nMask);
aStr += p->maName;
@@ -561,7 +561,7 @@ void ScDPLayoutDlg::AppendField(size_t nFromIndex, ScDPFieldType eToType)
ScDPLabelData* p = GetLabelData(aFuncData.mnCol);
OUString aStr = p->maLayoutName;
sal_uInt16 nMask = aFuncData.mnFuncMask;
- if (!aStr.getLength())
+ if (aStr.isEmpty())
{
aStr = GetFuncString(nMask);
aStr += p->maName;
@@ -648,7 +648,7 @@ void ScDPLayoutDlg::MoveField( ScDPFieldType eFromType, size_t nFromIndex, ScDPF
ScDPLabelData* p = GetLabelData(fData.mnCol);
OUString aStr = p->maLayoutName;
sal_uInt16 nMask = fData.mnFuncMask;
- if (!aStr.getLength())
+ if (aStr.isEmpty())
{
aStr = GetFuncString(nMask);
aStr += p->maName;
@@ -704,7 +704,7 @@ void ScDPLayoutDlg::MoveField( ScDPFieldType eFromType, size_t nFromIndex, ScDPF
ScDPLabelData* p = GetLabelData(fData.mnCol);
OUString aStr = p->maLayoutName;
sal_uInt16 nMask = fData.mnFuncMask;
- if (!aStr.getLength())
+ if (aStr.isEmpty())
{
aStr = GetFuncString(nMask);
aStr += p->maName;
@@ -789,7 +789,7 @@ void ScDPLayoutDlg::MoveFieldToEnd( ScDPFieldType eFromType, size_t nFromIndex,
ScDPLabelData* p = GetLabelData(fData.mnCol);
OUString aStr = p->maLayoutName;
sal_uInt16 nMask = fData.mnFuncMask;
- if (!aStr.getLength())
+ if (aStr.isEmpty())
{
aStr = GetFuncString(nMask);
aStr += p->maName;
@@ -840,7 +840,7 @@ void ScDPLayoutDlg::MoveFieldToEnd( ScDPFieldType eFromType, size_t nFromIndex,
ScDPLabelData* p = GetLabelData(fData.mnCol);
OUString aStr = p->maLayoutName;
sal_uInt16 nMask = fData.mnFuncMask;
- if (!aStr.getLength())
+ if (aStr.isEmpty())
{
aStr = GetFuncString(nMask);
aStr += p->maName;
@@ -1015,11 +1015,11 @@ void ScDPLayoutDlg::NotifyDoubleClick( ScDPFieldType eType, size_t nFieldIndex )
if (!pDFData)
continue;
- if (!pDFData->maName.getLength())
+ if (pDFData->maName.isEmpty())
continue;
OUString aLayoutName = pDFData->maLayoutName;
- if (!aLayoutName.getLength())
+ if (aLayoutName.isEmpty())
{
// No layout name exists. Use the stock name.
sal_uInt16 nMask = (*aIt)->mnFuncMask;
@@ -1058,7 +1058,7 @@ void ScDPLayoutDlg::NotifyDoubleClick( ScDPFieldType eType, size_t nFieldIndex )
ScDPLabelData* p = GetLabelData(aDataArr[nFieldIndex]->mnCol);
OUString aStr = p->maLayoutName;
- if (!aStr.getLength())
+ if (aStr.isEmpty())
{
// Layout name is not available. Use default name.
aStr = GetFuncString (aDataArr[nFieldIndex]->mnFuncMask);
diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx
index e1fb2384bc49..f463b7d5b101 100644
--- a/sc/source/ui/dbgui/validate.cxx
+++ b/sc/source/ui/dbgui/validate.cxx
@@ -879,7 +879,7 @@ IMPL_LINK( ScTPValidationError, ClickSearchHdl, PushButton*, EMPTYARG )
Application::SetDefDialogParent( pOld );
- if ( aScriptURL != NULL && aScriptURL.getLength() != 0 )
+ if ( aScriptURL != NULL && !aScriptURL.isEmpty() )
{
aEdtTitle.SetText( aScriptURL );
}
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 908446fcd482..1041126e7026 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -782,11 +782,11 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
uno::Sequence< ::rtl::OUString > aData = aLockFile.GetLockData();
if ( aData.getLength() > LOCKFILE_SYSUSERNAME_ID )
{
- if ( aData[LOCKFILE_OOOUSERNAME_ID].getLength() > 0 )
+ if ( !aData[LOCKFILE_OOOUSERNAME_ID].isEmpty() )
{
aUserName = aData[LOCKFILE_OOOUSERNAME_ID];
}
- else if ( aData[LOCKFILE_SYSUSERNAME_ID].getLength() > 0 )
+ else if ( !aData[LOCKFILE_SYSUSERNAME_ID].isEmpty() )
{
aUserName = aData[LOCKFILE_SYSUSERNAME_ID];
}
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index 93d5c42f793c..f1f1305ecddb 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -1014,11 +1014,11 @@ void ScDocShell::Execute( SfxRequest& rReq )
uno::Sequence< ::rtl::OUString > aData = aLockFile.GetLockData();
if ( aData.getLength() > LOCKFILE_SYSUSERNAME_ID )
{
- if ( aData[LOCKFILE_OOOUSERNAME_ID].getLength() > 0 )
+ if ( !aData[LOCKFILE_OOOUSERNAME_ID].isEmpty() )
{
aUserName = aData[LOCKFILE_OOOUSERNAME_ID];
}
- else if ( aData[LOCKFILE_SYSUSERNAME_ID].getLength() > 0 )
+ else if ( !aData[LOCKFILE_SYSUSERNAME_ID].isEmpty() )
{
aUserName = aData[LOCKFILE_SYSUSERNAME_ID];
}
diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx
index bf409456766a..4c81cc0b213b 100644
--- a/sc/source/ui/docshell/docsh8.cxx
+++ b/sc/source/ui/docshell/docsh8.cxx
@@ -1153,7 +1153,7 @@ sal_uLong ScDocShell::DBaseExport( const String& rFullFileName, CharSet eCharSet
SCERR_EXPORT_FIELDWIDTH), sPosition, sEncoding,
ERRCODE_BUTTON_OK | ERRCODE_MSG_ERROR);
}
- else if ( aException.Message.getLength() )
+ else if ( !aException.Message.isEmpty() )
nErr = *new StringErrorInfo( (SCERR_EXPORT_SQLEXCEPTION), aException.Message, ERRCODE_BUTTON_OK | ERRCODE_MSG_ERROR);
else
nErr = SCERR_EXPORT_DATA;
diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx
index 83881a5ecd3d..bddc951160c6 100644
--- a/sc/source/ui/docshell/externalrefmgr.cxx
+++ b/sc/source/ui/docshell/externalrefmgr.cxx
@@ -2201,7 +2201,7 @@ SfxObjectShellRef ScExternalRefManager::loadSrcDocument(sal_uInt16 nFileId, OUSt
return NULL;
OUString aOptions = pFileData->maFilterOptions;
- if ( pFileData->maFilterName.getLength() )
+ if ( !pFileData->maFilterName.isEmpty() )
rFilter = pFileData->maFilterName; // don't overwrite stored filter with guessed filter
else
ScDocumentLoader::GetFilterName(aFile, rFilter, aOptions, true, false);;
@@ -2274,7 +2274,7 @@ bool ScExternalRefManager::isFileLoadable(const OUString& rFile) const
if (isOwnDocument(rFile))
return false;
rtl::OUString aPhysical;
- if (utl::LocalFileHelper::ConvertURLToPhysicalName(rFile, aPhysical) && aPhysical.getLength())
+ if (utl::LocalFileHelper::ConvertURLToPhysicalName(rFile, aPhysical) && !aPhysical.isEmpty())
{
// #i114504# try IsFolder/Exists only for file URLs
@@ -2307,7 +2307,7 @@ void ScExternalRefManager::maybeLinkExternalFile(sal_uInt16 nFileId)
}
// If a filter was already set (for example, loading the cached table),
// don't call GetFilterName which has to access the source file.
- if (!aFilter.getLength())
+ if (aFilter.isEmpty())
ScDocumentLoader::GetFilterName(*pFileName, aFilter, aOptions, true, false);
sfx2::LinkManager* pLinkMgr = mpDoc->GetLinkManager();
ScExternalRefLink* pLink = new ScExternalRefLink(mpDoc, nFileId, aFilter);
diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx
index 4c7e32fbbfdf..992f296b9d8c 100644
--- a/sc/source/ui/drawfunc/drawsh.cxx
+++ b/sc/source/ui/drawfunc/drawsh.cxx
@@ -226,7 +226,7 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq )
}
ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj );
- if ( pInfo && (pInfo->GetHlink().getLength() > 0) )
+ if ( pInfo && !pInfo->GetHlink().isEmpty() )
ScGlobal::OpenURL( pInfo->GetHlink(), String::EmptyString() );
}
break;
@@ -306,7 +306,7 @@ void ScDrawShell::ExecuteMacroAssign( SdrObject* pObj, Window* pWin )
{
SvxMacroItem aItem ( SFX_APP()->GetPool().GetWhich( SID_ATTR_MACROITEM ) );
ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj, sal_True );
- if ( pInfo->GetMacro().getLength() > 0 )
+ if ( !pInfo->GetMacro().isEmpty() )
{
SvxMacroTableDtor aTab;
String sMacro( pInfo->GetMacro() );
diff --git a/sc/source/ui/drawfunc/drawsh2.cxx b/sc/source/ui/drawfunc/drawsh2.cxx
index 8c9c1e5ce10a..ff082367f621 100644
--- a/sc/source/ui/drawfunc/drawsh2.cxx
+++ b/sc/source/ui/drawfunc/drawsh2.cxx
@@ -205,7 +205,7 @@ void ScDrawShell::GetDrawFuncState( SfxItemSet& rSet ) // Funktionen disabl
{
SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj();
ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj );
- if ( !pInfo || (pInfo->GetHlink().getLength() == 0) )
+ if ( !pInfo || pInfo->GetHlink().isEmpty() )
{
rSet.DisableItem( SID_DRAW_HLINK_DELETE );
rSet.DisableItem( SID_OPEN_HYPERLINK );
diff --git a/sc/source/ui/drawfunc/drawsh5.cxx b/sc/source/ui/drawfunc/drawsh5.cxx
index d72d5295aa85..a146b426452a 100644
--- a/sc/source/ui/drawfunc/drawsh5.cxx
+++ b/sc/source/ui/drawfunc/drawsh5.cxx
@@ -90,7 +90,7 @@ void ScDrawShell::GetHLinkState( SfxItemSet& rSet ) // Hyperlink
{
SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj );
- if ( pInfo && (pInfo->GetHlink().getLength() > 0) )
+ if ( pInfo && !pInfo->GetHlink().isEmpty() )
{
aHLinkItem.SetURL( pInfo->GetHlink() );
aHLinkItem.SetInsertMode(HLINK_FIELD);
@@ -122,7 +122,7 @@ void ScDrawShell::GetHLinkState( SfxItemSet& rSet ) // Hyperlink
if(xInfo->hasPropertyByName( sPropLabel ))
{
aAny = xPropSet->getPropertyValue( sPropLabel );
- if ( (aAny >>= sTmp) && sTmp.getLength() )
+ if ( (aAny >>= sTmp) && !sTmp.isEmpty() )
{
aHLinkItem.SetName(sTmp);
}
@@ -131,7 +131,7 @@ void ScDrawShell::GetHLinkState( SfxItemSet& rSet ) // Hyperlink
if(xInfo->hasPropertyByName( sPropTargetURL ))
{
aAny = xPropSet->getPropertyValue( sPropTargetURL );
- if ( (aAny >>= sTmp) && sTmp.getLength() )
+ if ( (aAny >>= sTmp) && !sTmp.isEmpty() )
{
aHLinkItem.SetURL(sTmp);
}
@@ -140,7 +140,7 @@ void ScDrawShell::GetHLinkState( SfxItemSet& rSet ) // Hyperlink
if(xInfo->hasPropertyByName( sPropTargetFrame ))
{
aAny = xPropSet->getPropertyValue( sPropTargetFrame );
- if ( (aAny >>= sTmp) && sTmp.getLength() )
+ if ( (aAny >>= sTmp) && !sTmp.isEmpty() )
{
aHLinkItem.SetTargetFrame(sTmp);
}
diff --git a/sc/source/ui/drawfunc/fudraw.cxx b/sc/source/ui/drawfunc/fudraw.cxx
index e949b75aa011..ed0e51840e59 100644
--- a/sc/source/ui/drawfunc/fudraw.cxx
+++ b/sc/source/ui/drawfunc/fudraw.cxx
@@ -793,7 +793,7 @@ void FuDraw::ForcePointer(const MouseEvent* pMEvt)
SdrObjMacroHitRec aHitRec; //! muss da noch irgendwas gesetzt werden ????
pViewShell->SetActivePointer( pObj->GetMacroPointer(aHitRec) );
}
- else if ( !bAlt && pInfo && ((pInfo->GetMacro().getLength() > 0) || (pInfo->GetHlink().getLength() > 0)) )
+ else if ( !bAlt && pInfo && (!pInfo->GetMacro().isEmpty() || !pInfo->GetHlink().isEmpty()) )
pWindow->SetPointer( Pointer( POINTER_REFHAND ) );
else if ( IsDetectiveHit( aPnt ) )
pViewShell->SetActivePointer( Pointer( POINTER_DETECTIVE ) );
diff --git a/sc/source/ui/drawfunc/fuins2.cxx b/sc/source/ui/drawfunc/fuins2.cxx
index bf7338cb6304..ba7f2df9e54b 100644
--- a/sc/source/ui/drawfunc/fuins2.cxx
+++ b/sc/source/ui/drawfunc/fuins2.cxx
@@ -109,7 +109,7 @@ void lcl_ChartInit( const uno::Reference < embed::XEmbeddedObject >& xObj, ScVie
ScDocument* pScDoc = pDocShell->GetDocument();
rtl::OUString aRangeString( rRangeParam );
- if ( !aRangeString.getLength() )
+ if ( aRangeString.isEmpty() )
{
SCCOL nCol1 = 0;
SCROW nRow1 = 0;
@@ -137,7 +137,7 @@ void lcl_ChartInit( const uno::Reference < embed::XEmbeddedObject >& xObj, ScVie
}
}
- if ( aRangeString.getLength() )
+ if ( !aRangeString.isEmpty() )
{
// connect to Calc data (if no range string, leave chart alone, with its own data)
diff --git a/sc/source/ui/drawfunc/fusel.cxx b/sc/source/ui/drawfunc/fusel.cxx
index ccd47d353632..eec1dee833b2 100644
--- a/sc/source/ui/drawfunc/fusel.cxx
+++ b/sc/source/ui/drawfunc/fusel.cxx
@@ -206,12 +206,12 @@ sal_Bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj, true );
// For interoperability favour links over macros if both are defined
- if ( pInfo->GetHlink().getLength() > 0 )
+ if ( !pInfo->GetHlink().isEmpty() )
{
OSL_TRACE("** Got URL");
sURL = pInfo->GetHlink();
}
- else if ( pInfo->GetMacro().getLength() > 0 )
+ else if ( !pInfo->GetMacro().isEmpty() )
{
SfxObjectShell* pObjSh = SfxObjectShell::Current();
if ( pObjSh && SfxApplication::IsXScriptURL( pInfo->GetMacro() ) )
diff --git a/sc/source/ui/miscdlgs/anyrefdg.cxx b/sc/source/ui/miscdlgs/anyrefdg.cxx
index e3484e243281..7e77de1e4d50 100644
--- a/sc/source/ui/miscdlgs/anyrefdg.cxx
+++ b/sc/source/ui/miscdlgs/anyrefdg.cxx
@@ -678,7 +678,7 @@ ScRefHandler::ScRefHandler( Window &rWindow, SfxBindings* pB/*, SfxChildWindow*
pActiveWin(NULL)
{
m_aHelper.SetWindow(/*this*/&m_rWindow);
- if(m_rWindow.GetHelpId().getLength()==0) //Hack, da im SfxModelessDialog die HelpId
+ if(m_rWindow.GetHelpId().isEmpty()) //Hack, da im SfxModelessDialog die HelpId
m_rWindow.SetHelpId(m_rWindow.GetUniqueId()); //fuer einen ModelessDialog entfernt und
//in eine UniqueId gewandelt wird, machen
//wir das an dieser Stelle rueckgaengig.
diff --git a/sc/source/ui/miscdlgs/linkarea.cxx b/sc/source/ui/miscdlgs/linkarea.cxx
index f8ed5a89e830..6298afcc6146 100644
--- a/sc/source/ui/miscdlgs/linkarea.cxx
+++ b/sc/source/ui/miscdlgs/linkarea.cxx
@@ -157,7 +157,7 @@ void ScLinkedAreaDlg::LoadDocument( const rtl::OUString& rFile, const String& rF
aSourceRef.Clear();
}
- if ( rFile.getLength() )
+ if ( !rFile.isEmpty() )
{
WaitObject aWait( this );
diff --git a/sc/source/ui/miscdlgs/sharedocdlg.cxx b/sc/source/ui/miscdlgs/sharedocdlg.cxx
index e5d15a5eb6cc..48911952bf76 100644
--- a/sc/source/ui/miscdlgs/sharedocdlg.cxx
+++ b/sc/source/ui/miscdlgs/sharedocdlg.cxx
@@ -137,11 +137,11 @@ void ScShareDocumentDlg::UpdateView()
if ( pUsersData[i].getLength() > SHARED_EDITTIME_ID )
{
String aUser;
- if ( pUsersData[i][SHARED_OOOUSERNAME_ID].getLength() )
+ if ( !pUsersData[i][SHARED_OOOUSERNAME_ID].isEmpty() )
{
aUser = pUsersData[i][SHARED_OOOUSERNAME_ID];
}
- else if ( pUsersData[i][SHARED_SYSUSERNAME_ID].getLength() )
+ else if ( !pUsersData[i][SHARED_SYSUSERNAME_ID].isEmpty() )
{
aUser = pUsersData[i][SHARED_SYSUSERNAME_ID];
}
diff --git a/sc/source/ui/miscdlgs/solveroptions.cxx b/sc/source/ui/miscdlgs/solveroptions.cxx
index 853d9840152e..d3cd0989f8bb 100644
--- a/sc/source/ui/miscdlgs/solveroptions.cxx
+++ b/sc/source/ui/miscdlgs/solveroptions.cxx
@@ -246,7 +246,7 @@ void ScSolverOptionsDialog::FillListBox()
rtl::OUString aVisName;
if ( xDesc.is() )
aVisName = xDesc->getPropertyDescription( aPropName );
- if ( !aVisName.getLength() )
+ if ( aVisName.isEmpty() )
aVisName = aPropName;
aDescriptions[nPos].nPosition = nPos;
aDescriptions[nPos].aDescription = aVisName;
diff --git a/sc/source/ui/miscdlgs/solverutil.cxx b/sc/source/ui/miscdlgs/solverutil.cxx
index f4ed0a3e61df..23db32fae2b6 100644
--- a/sc/source/ui/miscdlgs/solverutil.cxx
+++ b/sc/source/ui/miscdlgs/solverutil.cxx
@@ -124,7 +124,7 @@ void ScSolverUtil::GetImplementations( uno::Sequence<rtl::OUString>& rImplNames,
if ( xDesc.is() )
sDescription = xDesc->getComponentDescription();
- if ( !sDescription.getLength() )
+ if ( sDescription.isEmpty() )
sDescription = sName; // use implementation name if no description available
rImplNames.realloc( nCount+1 );
diff --git a/sc/source/ui/namedlg/namedefdlg.cxx b/sc/source/ui/namedlg/namedefdlg.cxx
index 1f335650fcd7..19de63123d1d 100644
--- a/sc/source/ui/namedlg/namedefdlg.cxx
+++ b/sc/source/ui/namedlg/namedefdlg.cxx
@@ -200,11 +200,11 @@ void ScNameDefDlg::AddPushed()
rtl::OUString aName = maEdName.GetText();
rtl::OUString aExpression = maEdRange.GetText();
- if (!aName.getLength())
+ if (aName.isEmpty())
{
return;
}
- if (!aScope.getLength())
+ if (aScope.isEmpty())
{
return;
}
diff --git a/sc/source/ui/namedlg/namedlg.cxx b/sc/source/ui/namedlg/namedlg.cxx
index 56c50e8d4b5f..fe2453f3b808 100644
--- a/sc/source/ui/namedlg/namedlg.cxx
+++ b/sc/source/ui/namedlg/namedlg.cxx
@@ -281,7 +281,7 @@ bool ScNameDlg::IsNameValid()
rtl::OUString aName = maEdName.GetText();
aName = aName.trim();
- if (!aName.getLength())
+ if (aName.isEmpty())
return false;
ScRangeName* pRangeName = GetRangeName( aScope );
diff --git a/sc/source/ui/optdlg/tpformula.cxx b/sc/source/ui/optdlg/tpformula.cxx
index 9e86800db4a0..5d625935b4a7 100644
--- a/sc/source/ui/optdlg/tpformula.cxx
+++ b/sc/source/ui/optdlg/tpformula.cxx
@@ -194,7 +194,7 @@ IMPL_LINK( ScTpFormulaOptions, SepModifyHdl, Edit*, pEdit )
pEdit->SetText(aStr);
}
- if ((!IsValidSeparator(aStr) || !IsValidSeparatorSet()) && maOldSepValue.getLength())
+ if ((!IsValidSeparator(aStr) || !IsValidSeparatorSet()) && !maOldSepValue.isEmpty())
// Invalid separator. Restore the old value.
pEdit->SetText(maOldSepValue);
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index cb836d7cb571..c93f67589d89 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -1150,7 +1150,7 @@ sal_Bool lcl_PutDataArray( ScDocShell& rDocShell, const ScRange& rRange,
{
rtl::OUString aUStr;
rElement >>= aUStr;
- if ( aUStr.getLength() )
+ if ( !aUStr.isEmpty() )
pDoc->PutCell( nDocCol, nDocRow, nTab, new ScStringCell( aUStr ) );
}
else
@@ -4419,7 +4419,7 @@ void SAL_CALL ScCellRangesObj::insertByName( const rtl::OUString& aName, const u
SetNewRanges(aNew);
bDone = sal_True;
- if ( aName.getLength() && nAddCount == 1 )
+ if ( !aName.isEmpty() && nAddCount == 1 )
{
// if a name is given, also insert into list of named entries
// (only possible for a single range)
@@ -5072,7 +5072,7 @@ void ScCellRangeObj::SetArrayFormula_Impl( const rtl::OUString& rFormula,
if (pDocSh)
{
ScDocFunc aFunc(*pDocSh);
- if ( rFormula.getLength() )
+ if ( !rFormula.isEmpty() )
{
if ( ScTableSheetObj::getImplementation( (cppu::OWeakObject*)this ) )
{
diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx
index ca9100778482..0317f94e09a0 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -2068,7 +2068,7 @@ uno::Reference< chart2::data::XDataSequence > SAL_CALL
uno::Reference< chart2::data::XDataSequence > xResult;
OSL_ENSURE( m_pDocument, "No Document -> no createDataSequenceByRangeRepresentation" );
- if(!m_pDocument || (aRangeRepresentation.getLength() == 0))
+ if(!m_pDocument || aRangeRepresentation.isEmpty())
return xResult;
vector<ScTokenRef> aRefTokens;
@@ -2237,7 +2237,7 @@ rtl::OUString SAL_CALL ScChart2DataProvider::convertRangeToXML( const rtl::OUStr
if (!m_pDocument)
return aRet;
- if (!sRangeRepresentation.getLength())
+ if (sRangeRepresentation.isEmpty())
// Empty data range is allowed.
return aRet;
diff --git a/sc/source/ui/unoobj/confuno.cxx b/sc/source/ui/unoobj/confuno.cxx
index 536e63ab79d1..fef4186d6d9f 100644
--- a/sc/source/ui/unoobj/confuno.cxx
+++ b/sc/source/ui/unoobj/confuno.cxx
@@ -184,7 +184,7 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue(
if ( aValue >>= sPrinterName )
{
// #i75610# if the name is empty, do nothing (don't create any printer)
- if ( sPrinterName.getLength() != 0 && pDocShell->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED )
+ if ( !sPrinterName.isEmpty() && pDocShell->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED )
{
SfxPrinter* pPrinter = pDocShell->GetPrinter();
if (pPrinter)
diff --git a/sc/source/ui/unoobj/convuno.cxx b/sc/source/ui/unoobj/convuno.cxx
index a6943696a256..250f3eba0451 100644
--- a/sc/source/ui/unoobj/convuno.cxx
+++ b/sc/source/ui/unoobj/convuno.cxx
@@ -43,7 +43,7 @@ using namespace com::sun::star;
LanguageType ScUnoConversion::GetLanguage( const lang::Locale& rLocale )
{
// empty language -> LANGUAGE_SYSTEM
- if ( rLocale.Language.getLength() == 0 )
+ if ( rLocale.Language.isEmpty() )
return LANGUAGE_SYSTEM;
LanguageType eRet = MsLangId::convertLocaleToLanguage( rLocale );
diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx
index 5a5bed38bed8..c9ff82ac1be9 100644
--- a/sc/source/ui/unoobj/dapiuno.cxx
+++ b/sc/source/ui/unoobj/dapiuno.cxx
@@ -425,7 +425,7 @@ void SAL_CALL ScDataPilotTablesObj::insertNewByName( const OUString& aNewName,
if (!xDescriptor.is()) return;
// inserting with already existing name?
- if ( aNewName.getLength() && hasByName( aNewName ) )
+ if ( !aNewName.isEmpty() && hasByName( aNewName ) )
throw RuntimeException(); // no other exceptions specified
sal_Bool bDone = false;
@@ -2708,7 +2708,7 @@ Reference< XDataPilotField > SAL_CALL ScDataPilotFieldObj::createNameGroup( cons
}
// if new grouping field has been created (on first group), return it
- if( sNewDim.getLength() > 0 )
+ if( !sNewDim.isEmpty() )
{
Reference< XNameAccess > xFields(mrParent.getDataPilotFields(), UNO_QUERY);
if (xFields.is())
@@ -2925,7 +2925,7 @@ void SAL_CALL ScDataPilotFieldGroupsObj::replaceByName( const OUString& rName, c
{
SolarMutexGuard aGuard;
- if( rName.getLength() == 0 )
+ if( rName.isEmpty() )
throw IllegalArgumentException();
ScFieldGroups::iterator aIt = implFindByName( rName );
@@ -2948,7 +2948,7 @@ void SAL_CALL ScDataPilotFieldGroupsObj::insertByName( const OUString& rName, co
{
SolarMutexGuard aGuard;
- if( rName.getLength() == 0 )
+ if( rName.isEmpty() )
throw IllegalArgumentException();
ScFieldGroups::iterator aIt = implFindByName( rName );
@@ -2972,7 +2972,7 @@ void SAL_CALL ScDataPilotFieldGroupsObj::removeByName( const OUString& rName )
{
SolarMutexGuard aGuard;
- if( rName.getLength() == 0 )
+ if( rName.isEmpty() )
throw IllegalArgumentException();
ScFieldGroups::iterator aIt = implFindByName( rName );
@@ -3118,7 +3118,7 @@ void SAL_CALL ScDataPilotFieldGroupObj::replaceByName( const OUString& rName, co
// it should be possible to quickly rename an item -> accept string or XNamed
OUString aNewName = lclExtractMember( rElement );
- if( (rName.getLength() == 0) || (aNewName.getLength() == 0) )
+ if( rName.isEmpty() || aNewName.isEmpty() )
throw IllegalArgumentException();
if( rName == aNewName )
return;
@@ -3143,7 +3143,7 @@ void SAL_CALL ScDataPilotFieldGroupObj::insertByName( const OUString& rName, con
SolarMutexGuard aGuard;
// we will ignore the passed element and just try to insert the name
- if( rName.getLength() == 0 )
+ if( rName.isEmpty() )
throw IllegalArgumentException();
ScFieldGroupMembers& rMembers = mrParent.getFieldGroup( maGroupName ).maMembers;
@@ -3159,7 +3159,7 @@ void SAL_CALL ScDataPilotFieldGroupObj::removeByName( const OUString& rName )
{
SolarMutexGuard aGuard;
- if( rName.getLength() == 0 )
+ if( rName.isEmpty() )
throw IllegalArgumentException();
ScFieldGroupMembers& rMembers = mrParent.getFieldGroup( maGroupName ).maMembers;
ScFieldGroupMembers::iterator aIt = ::std::find( rMembers.begin(), rMembers.end(), rName );
diff --git a/sc/source/ui/unoobj/defltuno.cxx b/sc/source/ui/unoobj/defltuno.cxx
index a2d16432a899..d4bdc9824808 100644
--- a/sc/source/ui/unoobj/defltuno.cxx
+++ b/sc/source/ui/unoobj/defltuno.cxx
@@ -193,7 +193,7 @@ void SAL_CALL ScDocDefaultsObj::setPropertyValue(
if ( aValue >>= aLocale )
{
LanguageType eNew;
- if (aLocale.Language.getLength() || aLocale.Country.getLength())
+ if (!aLocale.Language.isEmpty() || !aLocale.Country.isEmpty())
eNew = MsLangId::convertLocaleToLanguage( aLocale );
else
eNew = LANGUAGE_NONE;
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 71c1a07ab7b0..a0866c3a01e4 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -1711,7 +1711,7 @@ void SAL_CALL ScModelObj::setPropertyValue(
{
rtl::OUString aObjName;
aValue >>= aObjName;
- if ( aObjName.getLength() )
+ if ( !aObjName.isEmpty() )
pDoc->RestoreChartListener( aObjName );
}
diff --git a/sc/source/ui/unoobj/eventuno.cxx b/sc/source/ui/unoobj/eventuno.cxx
index 83c868c2abde..94c08b5a674d 100644
--- a/sc/source/ui/unoobj/eventuno.cxx
+++ b/sc/source/ui/unoobj/eventuno.cxx
@@ -118,7 +118,7 @@ void SAL_CALL ScSheetEventsObj::replaceByName( const rtl::OUString& aName, const
}
}
}
- if (aScript.getLength())
+ if (!aScript.isEmpty())
aNewEvents.SetScript( nEvent, &aScript );
else
aNewEvents.SetScript( nEvent, NULL ); // reset
diff --git a/sc/source/ui/unoobj/funcuno.cxx b/sc/source/ui/unoobj/funcuno.cxx
index cbf4b1d7fd26..722f2629fc3e 100644
--- a/sc/source/ui/unoobj/funcuno.cxx
+++ b/sc/source/ui/unoobj/funcuno.cxx
@@ -429,7 +429,7 @@ public:
}
void visitElem( long nCol, long nRow, const rtl::OUString& elem )
{
- if ( elem.getLength() )
+ if ( !elem.isEmpty() )
mpDoc->PutCell( (SCCOL) nCol, (SCROW) nRow, 0,
new ScStringCell( elem ) );
}
diff --git a/sc/source/ui/unoobj/scdetect.cxx b/sc/source/ui/unoobj/scdetect.cxx
index fd3b0d264ebd..d45fbd536314 100644
--- a/sc/source/ui/unoobj/scdetect.cxx
+++ b/sc/source/ui/unoobj/scdetect.cxx
@@ -832,7 +832,7 @@ static sal_Bool lcl_MayBeDBase( SvStream& rStream )
lDescriptor[nIndexOfTemplateFlag].Value <<= bOpenAsTemplate;
}
- if ( aDocumentTitle.getLength() )
+ if ( !aDocumentTitle.isEmpty() )
{
// the title was set here
if ( nIndexOfDocumentTitle == -1 )
diff --git a/sc/source/ui/unoobj/shapeuno.cxx b/sc/source/ui/unoobj/shapeuno.cxx
index 70a15483a7c6..f794994bb0fe 100644
--- a/sc/source/ui/unoobj/shapeuno.cxx
+++ b/sc/source/ui/unoobj/shapeuno.cxx
@@ -1427,7 +1427,7 @@ public:
if ( aName == SC_EVENTACC_ONCLICK )
{
- if ( pInfo && (pInfo->GetMacro().getLength() > 0) )
+ if ( pInfo && !pInfo->GetMacro().isEmpty() )
{
aProperties.realloc( 2 );
aProperties[ 0 ].Name = SC_EVENTACC_EVENTTYPE;
diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx
index d1102b7935c6..fe74c56907b2 100644
--- a/sc/source/ui/vba/vbaapplication.cxx
+++ b/sc/source/ui/vba/vbaapplication.cxx
@@ -546,7 +546,7 @@ ScVbaApplication::setStatusBar( const uno::Any& _statusbar ) throw (uno::Runtime
if( _statusbar >>= sText )
{
setDisplayStatusBar( sal_True );
- if ( sText.getLength() )
+ if ( !sText.isEmpty() )
xStatusIndicator->start( sText, 100 );
else
xStatusIndicator->end(); // restore normal state for empty text
@@ -1502,7 +1502,7 @@ ScVbaApplication::GetOpenFilename(const uno::Any& FileFilter, const uno::Any& Fi
if ( aObj.GetProtocol() == INET_PROT_FILE )
{
rtl::OUString aTemp = aObj.PathToFileName();
- aSelectedFiles[i] = aTemp.getLength() > 0 ? aTemp : aSelectedFiles[i];
+ aSelectedFiles[i] = aTemp.isEmpty() ? aSelectedFiles[i] : aTemp ;
}
}
if ( bMultiSelect )
@@ -1641,10 +1641,10 @@ ScVbaApplication::GetSaveAsFilename( const ::com::sun::star::uno::Any& InitialFi
sal_Int32 nSemicolonID = 0;
::rtl::OUString sFirstFilter = sSelectedFilters.getToken( 0, ';' , nSemicolonID );
::rtl::OUString sFileExtension = aURLObj.GetExtension();
- if ( sFileExtension.getLength() == 0 )
+ if ( sFileExtension.isEmpty() )
{
sFileExtension = sFirstFilter.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("*.*")) ? sFileExtension : sFirstFilter.copy( sFirstFilter.indexOfAsciiL("*.", 2) + 2 );
- aPathStr = sFileExtension.getLength() == 0 ? aPathStr : aPathStr + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".")) + sFileExtension;
+ aPathStr = sFileExtension.isEmpty() ? aPathStr : aPathStr + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".")) + sFileExtension;
}
else
{
@@ -1673,8 +1673,8 @@ ScVbaApplication::GetSaveAsFilename( const ::com::sun::star::uno::Any& InitialFi
{
sFileExtension = sFirstFilter.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("*.*")) ? rtl::OUString()
: sFirstFilter.copy( sFirstFilter.indexOfAsciiL("*.", 2) + 2 );
- aPathStr = sFileExtension.getLength() == 0 ? aPathStr
- : aPathStr + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".")) + sFileExtension;
+ aPathStr = sFileExtension.isEmpty() ? aPathStr
+ : aPathStr + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".")) + sFileExtension;
}
}
}
diff --git a/sc/source/ui/vba/vbachartobject.cxx b/sc/source/ui/vba/vbachartobject.cxx
index f1947608d07d..4a02bdabc1c7 100644
--- a/sc/source/ui/vba/vbachartobject.cxx
+++ b/sc/source/ui/vba/vbachartobject.cxx
@@ -53,7 +53,7 @@ ScVbaChartObject::ScVbaChartObject( const css::uno::Reference< ov::XHelperInterf
rtl::OUString ScVbaChartObject::getPersistName()
{
- if ( !sPersistName.getLength() )
+ if ( sPersistName.isEmpty() )
sPersistName = xNamed->getName();
return sPersistName;
}
diff --git a/sc/source/ui/vba/vbafiledialog.cxx b/sc/source/ui/vba/vbafiledialog.cxx
index 653117fad9dd..cb4917d4c9c3 100644
--- a/sc/source/ui/vba/vbafiledialog.cxx
+++ b/sc/source/ui/vba/vbafiledialog.cxx
@@ -152,7 +152,7 @@ ScVbaFileDialog::Show( ) throw (::com::sun::star::uno::RuntimeException)
if ( aObj.GetProtocol() == INET_PROT_FILE )
{
aTemp = aObj.PathToFileName();
- m_sSelectedItems[i] = aTemp.getLength() > 0 ? aTemp : m_sSelectedItems[i];
+ m_sSelectedItems[i] = aTemp.isEmpty() ? m_sSelectedItems[i] : aTemp;
}
}
}
diff --git a/sc/source/ui/vba/vbahyperlink.cxx b/sc/source/ui/vba/vbahyperlink.cxx
index 0a8f8463e390..e1b9d79f0c33 100644
--- a/sc/source/ui/vba/vbahyperlink.cxx
+++ b/sc/source/ui/vba/vbahyperlink.cxx
@@ -63,7 +63,7 @@ ScVbaHyperlink::ScVbaHyperlink( const uno::Reference< XHelperInterface >& rxAnch
// extract parameters, Address must not be empty
UrlComponents aUrlComp;
OUString aTextToDisplay;
- if( !(rAddress >>= aUrlComp.first) || (aUrlComp.first.getLength() == 0) )
+ if( !(rAddress >>= aUrlComp.first) || aUrlComp.first.isEmpty() )
throw uno::RuntimeException( OUString( RTL_CONSTASCII_USTRINGPARAM( "Cannot get address" ) ), uno::Reference< uno::XInterface >() );
rSubAddress >>= aUrlComp.second;
rScreenTip >>= maScreenTip;
@@ -80,13 +80,13 @@ ScVbaHyperlink::ScVbaHyperlink( const uno::Reference< XHelperInterface >& rxAnch
mxCell.set( xUnoRange->getCellByPosition( 0, 0 ), uno::UNO_SET_THROW );
uno::Reference< text::XText > xText( mxCell, uno::UNO_QUERY_THROW );
// use cell text or URL if no TextToDisplay has been passed
- if( aTextToDisplay.getLength() == 0 )
+ if( aTextToDisplay.isEmpty() )
{
aTextToDisplay = xText->getString();
- if( aTextToDisplay.getLength() == 0 )
+ if( aTextToDisplay.isEmpty() )
{
OUStringBuffer aBuffer( aUrlComp.first );
- if( aUrlComp.second.getLength() > 0 )
+ if( !aUrlComp.second.isEmpty() )
aBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM( " - " ) ).append( aUrlComp.second );
aTextToDisplay = aBuffer.makeStringAndClear();
}
@@ -229,7 +229,7 @@ void ScVbaHyperlink::setUrlComponents( const UrlComponents& rUrlComp ) throw (un
{
ensureTextField();
OUStringBuffer aUrl( rUrlComp.first );
- if( rUrlComp.second.getLength() > 0 )
+ if( !rUrlComp.second.isEmpty() )
aUrl.append( sal_Unicode( '#' ) ).append( rUrlComp.second );
mxTextField->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "URL" ) ), uno::Any( aUrl.makeStringAndClear() ) );
}
diff --git a/sc/source/ui/vba/vbanames.cxx b/sc/source/ui/vba/vbanames.cxx
index 1e104e7ff5f4..01910c7e354b 100644
--- a/sc/source/ui/vba/vbanames.cxx
+++ b/sc/source/ui/vba/vbanames.cxx
@@ -136,7 +136,7 @@ ScVbaNames::Add( const css::uno::Any& Name ,
Name >>= sName;
else if ( NameLocal.hasValue() )
NameLocal >>= sName;
- if ( sName.getLength() != 0 )
+ if ( !sName.isEmpty() )
{
sal_Int32 nTokenIndex = sName.indexOf('!');
if ( nTokenIndex >= 0 )
diff --git a/sc/source/ui/vba/vbapagesetup.cxx b/sc/source/ui/vba/vbapagesetup.cxx
index f01e06a64a50..16f05622c760 100644
--- a/sc/source/ui/vba/vbapagesetup.cxx
+++ b/sc/source/ui/vba/vbapagesetup.cxx
@@ -100,7 +100,7 @@ rtl::OUString SAL_CALL ScVbaPageSetup::getPrintArea() throw (css::uno::RuntimeEx
void SAL_CALL ScVbaPageSetup::setPrintArea( const rtl::OUString& rAreas ) throw (css::uno::RuntimeException)
{
uno::Reference< sheet::XPrintAreas > xPrintAreas( mxSheet, uno::UNO_QUERY_THROW );
- if( rAreas.getLength() == 0 ||
+ if( rAreas.isEmpty() ||
rAreas.equalsIgnoreAsciiCase ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FALSE")) ) )
{
// print the whole sheet
diff --git a/sc/source/ui/vba/vbapane.cxx b/sc/source/ui/vba/vbapane.cxx
index 8d606f31571b..5a2e1b85f4fd 100644
--- a/sc/source/ui/vba/vbapane.cxx
+++ b/sc/source/ui/vba/vbapane.cxx
@@ -134,7 +134,7 @@ ScVbaPane::SmallScroll( const uno::Any& Down, const uno::Any& Up, const uno::Any
else
messageBuffer += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Error getting parameter: ToLeft\n" ));
}
- if( messageBuffer.getLength() > 0 )
+ if( !messageBuffer.isEmpty() )
throw(uno::RuntimeException( messageBuffer, uno::Reference< uno::XInterface >() ) );
sal_Int32 newStartRow = visibleRange.StartRow + downRows;
@@ -189,7 +189,7 @@ ScVbaPane::LargeScroll( const uno::Any& Down, const uno::Any& Up, const uno::Any
else
messageBuffer += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Error getting parameter: ToLeft\n" ));
}
- if( messageBuffer.getLength() > 0 )
+ if( !messageBuffer.isEmpty() )
throw(uno::RuntimeException( messageBuffer, uno::Reference< uno::XInterface >() ) );
sal_Int32 newStartRow = visibleRange.StartRow + (downPages * vertPageSize );
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index 9aeda09f25f6..21500db44d7d 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -2730,7 +2730,7 @@ ScVbaRange::getNumberFormat() throw ( script::BasicErrorException, uno::RuntimeE
}
NumFormatHelper numFormat( mxRange );
rtl::OUString sFormat = numFormat.getNumberFormatString();
- if ( sFormat.getLength() > 0 )
+ if ( !sFormat.isEmpty() )
return uno::makeAny( sFormat );
return aNULL();
}
@@ -3077,7 +3077,7 @@ ScVbaRange::AddComment( const uno::Any& Text ) throw (uno::RuntimeException)
::rtl::OUString aNoteText;
if( Text.hasValue() && !(Text >>= aNoteText) )
throw uno::RuntimeException();
- if( aNoteText.getLength() == 0 )
+ if( aNoteText.isEmpty() )
aNoteText = ::rtl::OUString( sal_Unicode( ' ' ) );
// try to create a new annotation
@@ -3096,7 +3096,7 @@ ScVbaRange::getComment() throw (uno::RuntimeException)
// intentional behavior to return a null object if no
// comment defined
uno::Reference< excel::XComment > xComment( new ScVbaComment( this, mxContext, getUnoModel(), mxRange ) );
- if ( !xComment->Text( uno::Any(), uno::Any(), uno::Any() ).getLength() )
+ if ( xComment->Text( uno::Any(), uno::Any(), uno::Any() ).isEmpty() )
return NULL;
return xComment;
@@ -3178,7 +3178,7 @@ ScVbaRange::Replace( const ::rtl::OUString& What, const ::rtl::OUString& Replace
}
// sanity check required params
- if ( !What.getLength() )
+ if ( What.isEmpty() )
throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Range::Replace, missing params" )) , uno::Reference< uno::XInterface >() );
rtl::OUString sWhat = VBAToRegexp( What);
// #TODO #FIXME SearchFormat & ReplacesFormat are not processed
@@ -3267,7 +3267,7 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L
// string.
if( What >>= sWhat )
{
- if( !sWhat.getLength() )
+ if( sWhat.isEmpty() )
throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Range::Find, missing params" )) , uno::Reference< uno::XInterface >() );
}
else if( What >>= nWhat )
@@ -4312,7 +4312,7 @@ ScVbaRange::ApplicationRange( const uno::Reference< uno::XComponentContext >& xC
// Single param Range
rtl::OUString sRangeName;
Cell1 >>= sRangeName;
- if ( Cell1.hasValue() && !Cell2.hasValue() && sRangeName.getLength() )
+ if ( Cell1.hasValue() && !Cell2.hasValue() && !sRangeName.isEmpty() )
{
const static rtl::OUString sNamedRanges( RTL_CONSTASCII_USTRINGPARAM("NamedRanges"));
uno::Reference< beans::XPropertySet > xPropSet( getCurrentExcelDoc(xContext), uno::UNO_QUERY_THROW );
@@ -4632,7 +4632,7 @@ ScVbaRange::AutoFilter( const uno::Any& Field, const uno::Any& Criteria1, const
{
Criteria1 >>= sCriteria1;
sTabFilts[0].IsNumeric = bCritHasNumericValue;
- if ( bHasCritValue && sCriteria1.getLength() )
+ if ( bHasCritValue && !sCriteria1.isEmpty() )
lcl_setTableFieldsFromCriteria( sCriteria1, xDescProps, sTabFilts[0] );
else
bAll = true;
@@ -4663,7 +4663,7 @@ ScVbaRange::AutoFilter( const uno::Any& Field, const uno::Any& Criteria1, const
{
// if its a bottom/top Ten(Percent/Value) and there
// is no value specified for critera1 set it to 10
- if ( !bCritHasNumericValue && !sCriteria1.getLength() && ( nOperator != excel::XlAutoFilterOperator::xlOr ) && ( nOperator != excel::XlAutoFilterOperator::xlAnd ) )
+ if ( !bCritHasNumericValue && sCriteria1.isEmpty() && ( nOperator != excel::XlAutoFilterOperator::xlOr ) && ( nOperator != excel::XlAutoFilterOperator::xlAnd ) )
{
sTabFilts[0].IsNumeric = sal_True;
sTabFilts[0].NumericValue = 10;
@@ -4709,7 +4709,7 @@ ScVbaRange::AutoFilter( const uno::Any& Field, const uno::Any& Criteria1, const
if ( Criteria2 >>= sCriteria2 )
{
- if ( sCriteria2.getLength() > 0 )
+ if ( !sCriteria2.isEmpty() )
{
uno::Reference< beans::XPropertySet > xProps;
lcl_setTableFieldsFromCriteria( sCriteria2, xProps, sTabFilts[1] );
diff --git a/sc/source/ui/vba/vbasheetobject.cxx b/sc/source/ui/vba/vbasheetobject.cxx
index 9c8b5e2e501b..7e0431cc5a05 100644
--- a/sc/source/ui/vba/vbasheetobject.cxx
+++ b/sc/source/ui/vba/vbasheetobject.cxx
@@ -380,7 +380,7 @@ void SAL_CALL ScVbaControlObjectBase::setOnAction( const OUString& rMacroName )
try { xEventMgr->revokeScriptEvent( nIndex, maListenerType, maEventMethod, OUString() ); } catch( uno::Exception& ) {}
// if a macro name has been passed, try to attach it to the event
- if( rMacroName.getLength() > 0 )
+ if( !rMacroName.isEmpty() )
{
MacroResolvedInfo aResolvedMacro = resolveVBAMacro( getSfxObjShell( mxModel ), rMacroName );
if( !aResolvedMacro.mbFound )
diff --git a/sc/source/ui/vba/vbavalidation.cxx b/sc/source/ui/vba/vbavalidation.cxx
index 2c52556b23a9..25c8c47d0424 100644
--- a/sc/source/ui/vba/vbavalidation.cxx
+++ b/sc/source/ui/vba/vbavalidation.cxx
@@ -302,9 +302,9 @@ ScVbaValidation::Add( const uno::Any& Type, const uno::Any& AlertStyle, const un
xCond->setOperator( conOperator );
}
- if ( sFormula1.getLength() )
+ if ( !sFormula1.isEmpty() )
xCond->setFormula1( sFormula1 );
- if ( sFormula2.getLength() )
+ if ( !sFormula2.isEmpty() )
xCond->setFormula2( sFormula2 );
lcl_setValidationProps( m_xRange, xProps );
diff --git a/sc/source/ui/vba/vbaworkbook.cxx b/sc/source/ui/vba/vbaworkbook.cxx
index 0ae2615079a8..935d5290d2f6 100644
--- a/sc/source/ui/vba/vbaworkbook.cxx
+++ b/sc/source/ui/vba/vbaworkbook.cxx
@@ -346,7 +346,7 @@ ScVbaWorkbook::SaveAs( const rtl::OUString& FileName, const uno::Any& FileFormat
//if the input parameter "FileName" takes the form as "MyFile", we need to get the current directory and combine the current directory and the file name
INetURLObject aFileNameURL( aURL );
aURL = aFileNameURL.GetMainURL( INetURLObject::NO_DECODE );
- if ( aURL.getLength() == 0 )
+ if ( aURL.isEmpty() )
{
uno::Reference< excel::XApplication > xApplication ( Application(),uno::UNO_QUERY_THROW );
rtl::OUString aPathStr = xApplication->getDefaultFilePath();
diff --git a/sc/source/ui/vba/vbaworkbooks.cxx b/sc/source/ui/vba/vbaworkbooks.cxx
index e513c22e9b69..267d9451b934 100644
--- a/sc/source/ui/vba/vbaworkbooks.cxx
+++ b/sc/source/ui/vba/vbaworkbooks.cxx
@@ -197,7 +197,7 @@ ScVbaWorkbooks::isTextFile( const rtl::OUString& sType )
const static rtl::OUString txtType( RTL_CONSTASCII_USTRINGPARAM("writer_Text" ) );
const static rtl::OUString csvType( RTL_CONSTASCII_USTRINGPARAM("calc_Text_txt_csv_StarCalc" ) );
const static rtl::OUString encodedTxtType( RTL_CONSTASCII_USTRINGPARAM("writer_Text_encoded" ) );
- return sType.equals( txtType ) || sType.equals( csvType ) || ( sType.getLength() == 0 ) || sType.equals( encodedTxtType );
+ return sType.equals( txtType ) || sType.equals( csvType ) || sType.isEmpty() || sType.equals( encodedTxtType );
}
bool
diff --git a/sc/source/ui/vba/vbaworksheets.cxx b/sc/source/ui/vba/vbaworksheets.cxx
index 02828efd2f7e..732e07ac79d2 100644
--- a/sc/source/ui/vba/vbaworksheets.cxx
+++ b/sc/source/ui/vba/vbaworksheets.cxx
@@ -264,7 +264,7 @@ ScVbaWorksheets::Add( const uno::Any& Before, const uno::Any& After,
Before >>= aStringSheet;
}
- if (!aStringSheet.getLength() && After.hasValue() )
+ if (aStringSheet.isEmpty() && After.hasValue() )
{
if ( After >>= xBeforeAfterSheet )
aStringSheet = xBeforeAfterSheet->getName();
@@ -272,7 +272,7 @@ ScVbaWorksheets::Add( const uno::Any& Before, const uno::Any& After,
After >>= aStringSheet;
bBefore = false;
}
- if (!aStringSheet.getLength())
+ if (aStringSheet.isEmpty())
{
uno::Reference< excel::XApplication > xApplication( Application(), uno::UNO_QUERY_THROW );
aStringSheet = xApplication->getActiveWorkbook()->getActiveSheet()->getName();
diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx
index 0d4de9452e61..2b21a162dc80 100644
--- a/sc/source/ui/view/dbfunc3.cxx
+++ b/sc/source/ui/view/dbfunc3.cxx
@@ -1571,7 +1571,7 @@ void ScDBFunc::DataPilotInput( const ScAddress& rPos, const String& rString )
aData.SetGrandTotalName(rString);
bChange = true;
}
- else if (aPosData.Dimension >= 0 && aPosData.MemberName.getLength() > 0)
+ else if (aPosData.Dimension >= 0 && !aPosData.MemberName.isEmpty())
{
bool bDataLayout = false;
OUString aDimName = pDPObj->GetDimName(static_cast<long>(aPosData.Dimension), bDataLayout);
@@ -1880,7 +1880,7 @@ sal_Bool ScDBFunc::DataPilotMove( const ScRange& rSource, const ScAddress& rDest
{
sheet::DataPilotTableHeaderData aSourceData;
pDPObj->GetHeaderPositionData( ScAddress( nCol, nRow, rSource.aStart.Tab() ), aSourceData );
- if ( aSourceData.Dimension == aDestData.Dimension && aSourceData.MemberName.getLength() )
+ if ( aSourceData.Dimension == aDestData.Dimension && !aSourceData.MemberName.isEmpty() )
{
if ( aMembersSet.find( aSourceData.MemberName ) == aMembersSet.end() )
{
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index dd619fecc583..3093b8d9ba14 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -368,7 +368,7 @@ void ScFormatShell::ExecuteStyle( 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( com::sun::star::uno::Exception& )
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 948d4332025e..7753a1e731a1 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -3571,7 +3571,7 @@ sal_Int8 ScGridWindow::AcceptPrivateDrop( const AcceptDropEvent& rEvt )
{
sheet::DataPilotTableHeaderData aSourceData;
pDPObj->GetHeaderPositionData( ScAddress( nCol, nRow, aSourceRange.aStart.Tab() ), aSourceData );
- if ( aSourceData.Dimension != aDestData.Dimension || !aSourceData.MemberName.getLength() )
+ if ( aSourceData.Dimension != aDestData.Dimension || aSourceData.MemberName.isEmpty() )
bValid = false; // empty (subtotal) or different field
}