summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Hallot <olivier.hallot@alta.org.br>2012-01-26 14:47:19 -0200
committerOlivier Hallot <olivier.hallot@alta.org.br>2012-01-26 19:19:41 -0200
commitdfa8287f8bbb6c523266237ff67eb4b3d07b5c8b (patch)
tree137193f28913a47993aa341b72a19a73e8452032
parent78cca63070ae6cf82b45ec3bc75fafa2db31a7f2 (diff)
Fix for fdo43460 Part XLIX getLength() to isEmpty()
Part XLIX Modules xmloff (part 3)
-rw-r--r--xmloff/source/style/escphdl.cxx4
-rw-r--r--xmloff/source/style/impastp4.cxx2
-rw-r--r--xmloff/source/style/lspachdl.cxx6
-rw-r--r--xmloff/source/style/numehelp.cxx12
-rw-r--r--xmloff/source/style/prstylei.cxx14
-rw-r--r--xmloff/source/style/styleexp.cxx18
-rw-r--r--xmloff/source/style/xmlaustp.cxx2
-rw-r--r--xmloff/source/style/xmlexppr.cxx6
-rw-r--r--xmloff/source/style/xmlimppr.cxx2
-rw-r--r--xmloff/source/style/xmlnume.cxx24
-rw-r--r--xmloff/source/style/xmlnumfe.cxx18
-rw-r--r--xmloff/source/style/xmlnumfi.cxx18
-rw-r--r--xmloff/source/style/xmlnumi.cxx36
-rw-r--r--xmloff/source/style/xmlstyle.cxx2
-rw-r--r--xmloff/source/style/xmltabi.cxx4
15 files changed, 83 insertions, 85 deletions
diff --git a/xmloff/source/style/escphdl.cxx b/xmloff/source/style/escphdl.cxx
index 8ebd2a50982e..47aad3ebe2a3 100644
--- a/xmloff/source/style/escphdl.cxx
+++ b/xmloff/source/style/escphdl.cxx
@@ -164,14 +164,14 @@ sal_Bool XMLEscapementHeightPropHdl::exportXML( OUString& rStrExpValue, const un
sal_Int32 nValue = 0;
if( rValue >>= nValue )
{
- if( rStrExpValue.getLength() )
+ if( !rStrExpValue.isEmpty() )
aOut.append( sal_Unicode(' '));
::sax::Converter::convertPercent( aOut, nValue );
}
rStrExpValue = aOut.makeStringAndClear();
- return rStrExpValue.getLength() != 0;
+ return !rStrExpValue.isEmpty();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/style/impastp4.cxx b/xmloff/source/style/impastp4.cxx
index bb86944db279..884bf0f09075 100644
--- a/xmloff/source/style/impastp4.cxx
+++ b/xmloff/source/style/impastp4.cxx
@@ -390,7 +390,7 @@ void SvXMLAutoStylePoolP_Impl::exportXML(
XML_NAMESPACE_STYLE, XML_FAMILY, aStrFamilyName );
}
- if( aExpStyles[i].mpParent->getLength() )
+ if( !aExpStyles[i].mpParent->isEmpty() )
{
GetExport().AddAttribute(
XML_NAMESPACE_STYLE, XML_PARENT_STYLE_NAME,
diff --git a/xmloff/source/style/lspachdl.cxx b/xmloff/source/style/lspachdl.cxx
index e02efbcc2767..9a7657411042 100644
--- a/xmloff/source/style/lspachdl.cxx
+++ b/xmloff/source/style/lspachdl.cxx
@@ -110,7 +110,7 @@ sal_Bool XMLLineHeightHdl::exportXML( OUString& rStrExpValue, const uno::Any& rV
}
rStrExpValue = aOut.makeStringAndClear();
- return rStrExpValue.getLength() != 0;
+ return !rStrExpValue.isEmpty();
}
///////////////////////////////////////////////////////////////////////////////
@@ -151,7 +151,7 @@ sal_Bool XMLLineHeightAtLeastHdl::exportXML( OUString& rStrExpValue, const uno::
rUnitConverter.convertMeasureToXML( aOut, aLSp.Height );
rStrExpValue = aOut.makeStringAndClear();
- return rStrExpValue.getLength() != 0;
+ return !rStrExpValue.isEmpty();
}
///////////////////////////////////////////////////////////////////////////////
@@ -192,7 +192,7 @@ sal_Bool XMLLineSpacingHdl::exportXML( OUString& rStrExpValue, const uno::Any& r
rUnitConverter.convertMeasureToXML( aOut, aLSp.Height );
rStrExpValue = aOut.makeStringAndClear();
- return rStrExpValue.getLength() != 0;
+ return !rStrExpValue.isEmpty();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/style/numehelp.cxx b/xmloff/source/style/numehelp.cxx
index d0e0004f3706..702656040f65 100644
--- a/xmloff/source/style/numehelp.cxx
+++ b/xmloff/source/style/numehelp.cxx
@@ -142,7 +142,7 @@ void XMLNumberFormatAttributesExportHelper::WriteAttributes(SvXMLExport& rXMLExp
if (!bWasSetTypeAttribute)
{
rXMLExport.AddAttribute(XML_NAMESPACE_OFFICE, XML_VALUE_TYPE, XML_CURRENCY);
- if (rCurrency.getLength() > 0)
+ if (!rCurrency.isEmpty())
rXMLExport.AddAttribute(XML_NAMESPACE_OFFICE, XML_CURRENCY, rCurrency);
bWasSetTypeAttribute = sal_True;
}
@@ -258,7 +258,7 @@ sal_Bool XMLNumberFormatAttributesExportHelper::GetCurrencySymbol(const sal_Int3
rtl::OUString sCurrencyAbbreviation;
if ( xNumberPropertySet->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(XML_CURRENCYABBREVIATION))) >>= sCurrencyAbbreviation)
{
- if ( sCurrencyAbbreviation.getLength() != 0 )
+ if ( !sCurrencyAbbreviation.isEmpty())
sCurrencySymbol = sCurrencyAbbreviation;
else
{
@@ -323,7 +323,7 @@ void XMLNumberFormatAttributesExportHelper::SetNumberFormatAttributes(SvXMLExpor
{
if (bExportTypeAttribute)
rXMLExport.AddAttribute(XML_NAMESPACE_OFFICE, XML_VALUE_TYPE, XML_STRING);
- if (bExportValue && rValue.getLength() && (rValue != rCharacters))
+ if (bExportValue && !rValue.isEmpty() && (rValue != rCharacters))
rXMLExport.AddAttribute(XML_NAMESPACE_OFFICE, XML_STRING_VALUE, rValue);
}
@@ -342,7 +342,7 @@ sal_Bool XMLNumberFormatAttributesExportHelper::GetCurrencySymbol(const sal_Int3
rtl::OUString sCurrencyAbbreviation;
if ( xNumberPropertySet->getPropertyValue(msCurrencyAbbreviation) >>= sCurrencyAbbreviation)
{
- if ( sCurrencyAbbreviation.getLength() != 0 )
+ if ( !sCurrencyAbbreviation.isEmpty())
rCurrencySymbol = sCurrencyAbbreviation;
else
{
@@ -425,7 +425,7 @@ void XMLNumberFormatAttributesExportHelper::WriteAttributes(
if (!bWasSetTypeAttribute)
{
pExport->AddAttribute(sAttrValueType, XML_CURRENCY);
- if (rCurrency.getLength() > 0)
+ if (!rCurrency.isEmpty())
pExport->AddAttribute(sAttrCurrency, rCurrency);
bWasSetTypeAttribute = sal_True;
}
@@ -548,7 +548,7 @@ void XMLNumberFormatAttributesExportHelper::SetNumberFormatAttributes(
{
if (bExportTypeAttribute)
pExport->AddAttribute(sAttrValueType, XML_STRING);
- if (bExportValue && rValue.getLength() && (rValue != rCharacters))
+ if (bExportValue && !rValue.isEmpty() && (rValue != rCharacters))
pExport->AddAttribute(sAttrStringValue, rValue);
}
else {
diff --git a/xmloff/source/style/prstylei.cxx b/xmloff/source/style/prstylei.cxx
index 8e2a3f7867a3..92178880fdea 100644
--- a/xmloff/source/style/prstylei.cxx
+++ b/xmloff/source/style/prstylei.cxx
@@ -165,7 +165,7 @@ Reference < XStyle > XMLPropStyleContext::Create()
OUString sServiceName(
((SvXMLStylesContext *)&mxStyles)->GetServiceName( GetFamily() ) );
- if( sServiceName.getLength() )
+ if( !sServiceName.isEmpty() )
{
Reference< XMultiServiceFactory > xFactory( GetImport().GetModel(),
UNO_QUERY );
@@ -209,7 +209,7 @@ void XMLPropStyleContext::CreateAndInsert( sal_Bool bOverwrite )
PropertyValue *pProps = aValues.getArray() + nLen;
pProps->Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ParaStyleName"));
OUString sParent( GetParentName() );
- if( sParent.getLength() )
+ if( !sParent.isEmpty() )
sParent = GetImport().GetStyleDisplayName( GetFamily(), sParent );
else
sParent = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Standard"));
@@ -240,7 +240,7 @@ void XMLPropStyleContext::CreateAndInsert( sal_Bool bOverwrite )
else
{
const OUString& rName = GetDisplayName();
- if( 0 == rName.getLength() || IsDefaultStyle() )
+ if( rName.isEmpty() || IsDefaultStyle() )
return;
Reference < XNameContainer > xFamilies =
@@ -354,9 +354,9 @@ void XMLPropStyleContext::Finish( sal_Bool bOverwrite )
// connect parent
OUString sParent( GetParentName() );
- if( sParent.getLength() )
+ if( !sParent.isEmpty() )
sParent = GetImport().GetStyleDisplayName( GetFamily(), sParent );
- if( sParent.getLength() && !xFamilies->hasByName( sParent ) )
+ if( !sParent.isEmpty() && !xFamilies->hasByName( sParent ) )
sParent = OUString();
if( sParent != mxStyle->getParentStyle() )
@@ -392,9 +392,9 @@ void XMLPropStyleContext::Finish( sal_Bool bOverwrite )
// connect follow
OUString sFollow( GetFollow() );
- if( sFollow.getLength() )
+ if( !sFollow.isEmpty() )
sFollow = GetImport().GetStyleDisplayName( GetFamily(), sFollow );
- if( !sFollow.getLength() || !xFamilies->hasByName( sFollow ) )
+ if( sFollow.isEmpty() || !xFamilies->hasByName( sFollow ) )
sFollow = mxStyle->getName();
Reference < XPropertySet > xPropSet( mxStyle, UNO_QUERY );
diff --git a/xmloff/source/style/styleexp.cxx b/xmloff/source/style/styleexp.cxx
index a4af1aa9df5e..e7c48f2f84c3 100644
--- a/xmloff/source/style/styleexp.cxx
+++ b/xmloff/source/style/styleexp.cxx
@@ -131,14 +131,14 @@ sal_Bool XMLStyleExport::exportStyle(
sName);
// style:family="..."
- if( rXMLFamily.getLength() > 0 )
+ if( !rXMLFamily.isEmpty() )
GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_FAMILY, rXMLFamily);
// style:parent-style-name="..."
OUString sParentString(rStyle->getParentStyle());
OUString sParent;
- if(sParentString.getLength())
+ if(!sParentString.isEmpty())
{
if(pPrefix)
sParent = *pPrefix;
@@ -147,7 +147,7 @@ sal_Bool XMLStyleExport::exportStyle(
else
sParent = sPoolStyleName;
- if( sParent.getLength() )
+ if( !sParent.isEmpty() )
GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_PARENT_STYLE_NAME,
GetExport().EncodeStyleName( sParent ) );
@@ -223,7 +223,7 @@ sal_Bool XMLStyleExport::exportStyle(
this information is lost and causes an error, if the parent
style has a list style set. (#i69523#)
*/
- if ( !sListName.getLength() )
+ if ( sListName.isEmpty() )
{
GetExport().AddAttribute( XML_NAMESPACE_STYLE,
XML_LIST_STYLE_NAME,
@@ -259,7 +259,7 @@ sal_Bool XMLStyleExport::exportStyle(
}
}
- if ( sListName.getLength() && !bSuppressListStyle )
+ if ( !sListName.isEmpty() && !bSuppressListStyle )
{
GetExport().AddAttribute( XML_NAMESPACE_STYLE,
XML_LIST_STYLE_NAME,
@@ -278,8 +278,7 @@ sal_Bool XMLStyleExport::exportStyle(
while ( xStyle.is() )
{
OUString aParentStyle( xStyle->getParentStyle() );
- if ( aParentStyle.getLength() == 0 ||
- !xStyles->hasByName( aParentStyle ) )
+ if ( aParentStyle.isEmpty() || !xStyles->hasByName( aParentStyle ) )
{
break;
}
@@ -356,7 +355,7 @@ sal_Bool XMLStyleExport::exportDefaultStyle(
{
// style:family="..."
- if( rXMLFamily.getLength() > 0 )
+ if( !rXMLFamily.isEmpty() )
GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_FAMILY,
rXMLFamily );
// <style:style>
@@ -491,8 +490,7 @@ void XMLStyleExport::exportStyleFamily(
if( !xPropSetInfo->hasPropertyByName( sFollowStyle ) )
{
- DBG_ASSERT( 0==sFollowStyle.getLength(),
- "no follow style???" );
+ DBG_ASSERT( sFollowStyle.isEmpty(), "no follow style???" );
continue;
}
diff --git a/xmloff/source/style/xmlaustp.cxx b/xmloff/source/style/xmlaustp.cxx
index 6af6df561543..d0eed7a50475 100644
--- a/xmloff/source/style/xmlaustp.cxx
+++ b/xmloff/source/style/xmlaustp.cxx
@@ -60,7 +60,7 @@ namespace
// obtain the data style name
::rtl::OUString sDataStyleName;
_rProperty.maValue >>= sDataStyleName;
- DBG_ASSERT( sDataStyleName.getLength(), "xmloff::lcl_exportDataStyle: invalid property value for the data style name!" );
+ DBG_ASSERT( !sDataStyleName.isEmpty(), "xmloff::lcl_exportDataStyle: invalid property value for the data style name!" );
// add the attribute
_rExport.AddAttribute(
diff --git a/xmloff/source/style/xmlexppr.cxx b/xmloff/source/style/xmlexppr.cxx
index 2cdf096308a9..d610e4e0454a 100644
--- a/xmloff/source/style/xmlexppr.cxx
+++ b/xmloff/source/style/xmlexppr.cxx
@@ -976,7 +976,7 @@ void SvXMLExportPropertyMapper::_exportXML(
if( nColonPos != -1 )
sPrefix = pAttribName->copy( 0, nColonPos );
- if( sPrefix.getLength() )
+ if( !sPrefix.isEmpty() )
{
OUString sNamespace( aData.Namespace );
@@ -1044,9 +1044,9 @@ void SvXMLExportPropertyMapper::_exportXML(
}
}
OUString sOldValue( rAttrList.getValueByName( sAttribName ) );
- OSL_ENSURE( sOldValue.getLength() == 0, "alien attribute exists already" );
+ OSL_ENSURE( sOldValue.isEmpty(), "alien attribute exists already" );
OSL_ENSURE(aData.Type == GetXMLToken(XML_CDATA), "different type to our default type which should be written out");
- if( !sOldValue.getLength() )
+ if( sOldValue.isEmpty() )
rAttrList.AddAttribute( sAttribName, aData.Value );
}
diff --git a/xmloff/source/style/xmlimppr.cxx b/xmloff/source/style/xmlimppr.cxx
index 9793a97ed06f..d896429fd9bc 100644
--- a/xmloff/source/style/xmlimppr.cxx
+++ b/xmloff/source/style/xmlimppr.cxx
@@ -374,7 +374,7 @@ void SvXMLImportPropertyMapper::FillPropertySequence(
if( nIdx == -1 )
continue;
pProps->Name = maPropMapper->GetEntryAPIName( nIdx );
- if( pProps->Name.getLength() )
+ if( !pProps->Name.isEmpty() )
{
pProps->Value <<= rProp.maValue;
++pProps;
diff --git a/xmloff/source/style/xmlnume.cxx b/xmloff/source/style/xmlnume.cxx
index ec524b482ccb..3b2aba211495 100644
--- a/xmloff/source/style/xmlnume.cxx
+++ b/xmloff/source/style/xmlnume.cxx
@@ -164,7 +164,7 @@ void SvxXMLNumRuleExport::exportLevelStyle( sal_Int32 nLevel,
{
OUString sValue;
rProp.Value >>= sValue;
- if( sValue.getLength() > 0 )
+ if( !sValue.isEmpty() )
{
cBullet = (sal_Unicode)sValue[0];
}
@@ -294,17 +294,17 @@ void SvxXMLNumRuleExport::exportLevelStyle( sal_Int32 nLevel,
// #i116149#: neither prefix/suffix
if (NumberingType::BITMAP != eType)
{
- if (sTextStyleName.getLength() > 0)
+ if (!sTextStyleName.isEmpty())
{
GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_STYLE_NAME,
GetExport().EncodeStyleName( sTextStyleName ) );
}
- if (sPrefix.getLength() > 0)
+ if (!sPrefix.isEmpty())
{
GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_NUM_PREFIX,
sPrefix );
}
- if (sSuffix.getLength() > 0)
+ if (!sSuffix.isEmpty())
{
GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_NUM_SUFFIX,
sSuffix );
@@ -337,10 +337,10 @@ void SvxXMLNumRuleExport::exportLevelStyle( sal_Int32 nLevel,
eElem = XML_LIST_LEVEL_STYLE_IMAGE;
- if( sImageURL.getLength() )
+ if( !sImageURL.isEmpty() )
{
OUString sURL( GetExport().AddEmbeddedGraphicObject( sImageURL ) );
- if( sURL.getLength() )
+ if( !sURL.isEmpty() )
{
GetExport().AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, sURL );
@@ -562,7 +562,7 @@ void SvxXMLNumRuleExport::exportLevelStyle( sal_Int32 nLevel,
if( NumberingType::CHAR_SPECIAL == eType )
{
- if( sBulletFontName.getLength() )
+ if( !sBulletFontName.isEmpty() )
{
OUString sStyleName =
GetExport().GetFontAutoStylePool()->Find(
@@ -570,7 +570,7 @@ void SvxXMLNumRuleExport::exportLevelStyle( sal_Int32 nLevel,
eBulletFontFamily, eBulletFontPitch,
eBulletFontEncoding );
- if( sStyleName.getLength() )
+ if( !sStyleName.isEmpty() )
{
GetExport().AddAttribute( XML_NAMESPACE_STYLE,
XML_FONT_NAME,
@@ -589,7 +589,7 @@ void SvxXMLNumRuleExport::exportLevelStyle( sal_Int32 nLevel,
GetExport().AddAttribute( XML_NAMESPACE_FO,
XML_FONT_FAMILY, sTemp );
- if( sBulletFontStyleName.getLength() )
+ if( !sBulletFontStyleName.isEmpty() )
GetExport().AddAttribute( XML_NAMESPACE_STYLE,
XML_FONT_STYLE_NAME,
sBulletFontStyleName );
@@ -644,7 +644,7 @@ void SvxXMLNumRuleExport::exportLevelStyle( sal_Int32 nLevel,
SvXMLElementExport aElement( GetExport(), XML_NAMESPACE_STYLE,
XML_TEXT_PROPERTIES, sal_True, sal_True );
}
- if( NumberingType::BITMAP == eType && sImageURL.getLength() )
+ if( NumberingType::BITMAP == eType && !sImageURL.isEmpty() )
{
// optional office:binary-data
GetExport().AddEmbeddedGraphicObjectAsBase64( sImageURL );
@@ -702,7 +702,7 @@ void SvxXMLNumRuleExport::exportNumberingRule(
GetExport().CheckAttrList();
// style:name="..."
- if( rName.getLength() )
+ if( !rName.isEmpty() )
{
sal_Bool bEncoded = sal_False;
GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_NAME,
@@ -802,7 +802,7 @@ void SvxXMLNumRuleExport::exportOutline()
{
// style:name="..."
GetExport().CheckAttrList();
- if ( sOutlineStyleName.getLength() > 0 )
+ if ( !sOutlineStyleName.isEmpty() )
{
sal_Bool bEncoded = sal_False;
GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_NAME,
diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx
index ea923d820d12..7025a3d78a42 100644
--- a/xmloff/source/style/xmlnumfe.cxx
+++ b/xmloff/source/style/xmlnumfe.cxx
@@ -329,7 +329,7 @@ OUString lcl_CreateStyleName( sal_Int32 nKey, sal_Int32 nPart, sal_Bool bDefPart
void SvXMLNumFmtExport::AddCalendarAttr_Impl( const OUString& rCalendar )
{
- if ( rCalendar.getLength() )
+ if ( !rCalendar.isEmpty() )
{
rExport.AddAttribute( XML_NAMESPACE_NUMBER, XML_CALENDAR, rCalendar );
}
@@ -358,9 +358,9 @@ void SvXMLNumFmtExport::AddLanguageAttr_Impl( sal_Int32 nLang )
OUString aLangStr, aCountryStr;
MsLangId::convertLanguageToIsoNames( (LanguageType)nLang, aLangStr, aCountryStr );
- if (aLangStr.getLength())
+ if (!aLangStr.isEmpty())
rExport.AddAttribute( XML_NAMESPACE_NUMBER, XML_LANGUAGE, aLangStr );
- if (aCountryStr.getLength())
+ if (!aCountryStr.isEmpty())
rExport.AddAttribute( XML_NAMESPACE_NUMBER, XML_COUNTRY, aCountryStr );
}
}
@@ -407,7 +407,7 @@ void SvXMLNumFmtExport::WriteCurrencyElement_Impl( const OUString& rString,
{
FinishTextElement_Impl();
- if ( rExt.getLength() )
+ if ( !rExt.isEmpty() )
{
sal_Int32 nLang = rExt.toInt32(16); // hex
if ( nLang < 0 ) // extension string may contain "-" separator
@@ -586,7 +586,7 @@ void SvXMLNumFmtExport::WriteNumberElement_Impl(
}
// decimal replacement (dashes) or variable decimals (#)
- if ( rDashStr.getLength() || bVarDecimals )
+ if ( !rDashStr.isEmpty() || bVarDecimals )
{
// variable decimals means an empty replacement string
rExport.AddAttribute( XML_NAMESPACE_NUMBER, XML_DECIMAL_REPLACEMENT,
@@ -1033,7 +1033,7 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
// title (comment)
// titles for builtin formats are not written
sAttrValue = rFormat.GetComment();
- if ( sAttrValue.getLength() && bUserDef && bDefPart )
+ if ( !sAttrValue.isEmpty() && bUserDef && bDefPart )
{
rExport.AddAttribute( XML_NAMESPACE_NUMBER, XML_TITLE, sAttrValue );
}
@@ -1099,7 +1099,7 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
//
::com::sun::star::i18n::NativeNumberXmlAttributes aAttr;
rFormat.GetNatNumXml( aAttr, nPart );
- if ( aAttr.Format.getLength() )
+ if ( !aAttr.Format.isEmpty() )
{
rExport.AddAttribute( XML_NAMESPACE_NUMBER, XML_TRANSLITERATION_FORMAT,
aAttr.Format );
@@ -1213,7 +1213,7 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
case NF_KEY_EEC:
case NF_KEY_R:
case NF_KEY_RR:
- if (!aCalendar.getLength())
+ if (aCalendar.isEmpty())
aCalendar = lcl_GetDefaultCalendar( pFormatter, nLang );
break;
}
@@ -1474,7 +1474,7 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
if ( nElemType == NF_KEY_AAA || nElemType == NF_KEY_AAAA )
{
// calendar attribute for AAA and AAAA is switched only for this element
- if (!aCalAttr.getLength())
+ if (aCalAttr.isEmpty())
aCalAttr = lcl_GetDefaultCalendar( pFormatter, nLang );
}
diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx
index ea896d969022..3a964a34aef2 100644
--- a/xmloff/source/style/xmlnumfi.cxx
+++ b/xmloff/source/style/xmlnumfi.cxx
@@ -973,7 +973,7 @@ SvXMLNumFmtElementContext::SvXMLNumFmtElementContext( SvXMLImport& rImport,
aNumInfo.fDisplayFactor = fAttrDouble;
break;
case XML_TOK_ELEM_ATTR_DECIMAL_REPLACEMENT:
- if ( sValue.getLength() > 0 )
+ if ( !sValue.isEmpty() )
aNumInfo.bDecReplace = sal_True; // only a default string is supported
else
aNumInfo.bVarDecimals = sal_True; // empty replacement string: variable decimals
@@ -1010,7 +1010,7 @@ SvXMLNumFmtElementContext::SvXMLNumFmtElementContext( SvXMLImport& rImport,
}
}
- if ( sLanguage.getLength() || sCountry.getLength() )
+ if ( !sLanguage.isEmpty() || !sCountry.isEmpty() )
{
nElementLang = MsLangId::convertIsoNamesToLanguage( sLanguage, sCountry );
if ( nElementLang == LANGUAGE_DONTKNOW )
@@ -1044,7 +1044,7 @@ void SvXMLNumFmtElementContext::Characters( const rtl::OUString& rChars )
void SvXMLNumFmtElementContext::AddEmbeddedElement( sal_Int32 nFormatPos, const rtl::OUString& rContent )
{
- if ( rContent.getLength() )
+ if ( !rContent.isEmpty() )
{
SvXMLEmbeddedElement* pObj = new SvXMLEmbeddedElement( nFormatPos, rContent );
if ( !aNumInfo.aEmbeddedElements.Insert( pObj ) )
@@ -1357,14 +1357,14 @@ SvXMLNumFormatContext::SvXMLNumFormatContext( SvXMLImport& rImport,
}
}
- if ( sLanguage.getLength() || sCountry.getLength() )
+ if ( !sLanguage.isEmpty() || !sCountry.isEmpty() )
{
nFormatLang = MsLangId::convertIsoNamesToLanguage( sLanguage, sCountry );
if ( nFormatLang == LANGUAGE_DONTKNOW )
nFormatLang = LANGUAGE_SYSTEM; //! error handling for invalid locales?
}
- if ( aNatNumAttr.Format.getLength() )
+ if ( !aNatNumAttr.Format.isEmpty() )
{
SvNumberFormatter* pFormatter = pData->GetNumberFormatter();
if ( pFormatter )
@@ -1613,7 +1613,7 @@ sal_Int32 SvXMLNumFormatContext::CreateAndInsert(SvNumberFormatter* pFormatter)
}
}
- if ( nIndex == NUMBERFORMAT_ENTRY_NOT_FOUND && sFormat.getLength() )
+ if ( nIndex == NUMBERFORMAT_ENTRY_NOT_FOUND && !sFormat.isEmpty() )
{
// insert by format string
@@ -1662,7 +1662,7 @@ sal_Int32 SvXMLNumFormatContext::CreateAndInsert(SvNumberFormatter* pFormatter)
}
}
- if ((nIndex != NUMBERFORMAT_ENTRY_NOT_FOUND) && sFormatTitle.getLength())
+ if ((nIndex != NUMBERFORMAT_ENTRY_NOT_FOUND) && !sFormatTitle.isEmpty())
{
SvNumberformat* pFormat = const_cast<SvNumberformat*>(pFormatter->GetEntry( nIndex ));
if (pFormat)
@@ -1848,7 +1848,7 @@ void SvXMLNumFormatContext::AddCurrency( const rtl::OUString& rContent, Language
{
sal_Bool bAutomatic = sal_False;
OUString aSymbol = rContent;
- if ( aSymbol.getLength() == 0 )
+ if ( aSymbol.isEmpty())
{
SvNumberFormatter* pFormatter = pData->GetNumberFormatter();
if ( pFormatter )
@@ -2146,7 +2146,7 @@ void SvXMLNumFormatContext::UpdateCalendar( const rtl::OUString& rNewCalendar )
if ( rNewCalendar != sCalendar )
{
sCalendar = rNewCalendar;
- if ( sCalendar.getLength() )
+ if ( !sCalendar.isEmpty() )
{
aFormatCode.appendAscii( "[~" ); // intro for calendar code
aFormatCode.append( sCalendar );
diff --git a/xmloff/source/style/xmlnumi.cxx b/xmloff/source/style/xmlnumi.cxx
index de1ce74e35fc..5903277bc4c1 100644
--- a/xmloff/source/style/xmlnumi.cxx
+++ b/xmloff/source/style/xmlnumi.cxx
@@ -436,7 +436,7 @@ SvXMLImportContext *SvxXMLListLevelStyleContext_Impl::CreateChildContext(
else if( (XML_NAMESPACE_OFFICE == nPrefix) && xmloff::token::IsXMLToken( rLocalName,
xmloff::token::XML_BINARY_DATA ) )
{
- if( bImage && !sImageURL.getLength() && !xBase64Stream.is() )
+ if( bImage && sImageURL.isEmpty() && !xBase64Stream.is() )
{
xBase64Stream = GetImport().GetStreamForGraphicObjectURLFromBase64();
if( xBase64Stream.is() )
@@ -469,7 +469,7 @@ Sequence<beans::PropertyValue> SvxXMLListLevelStyleContext_Impl::GetProperties(
eType = NumberingType::BITMAP;
nCount = 15;
- if( (sImageURL.getLength() > 0L) || xBase64Stream.is() )
+ if( !sImageURL.isEmpty() || xBase64Stream.is() )
nCount++;
}
if( bNum )
@@ -488,7 +488,7 @@ Sequence<beans::PropertyValue> SvxXMLListLevelStyleContext_Impl::GetProperties(
nCount++;
}
- if (bBullet && sSuffix.getLength())
+ if (bBullet && !sSuffix.isEmpty())
{
sal_uInt16 const nVersion(GetImport().getGeneratorVersion());
sal_Int32 nUPD;
@@ -556,7 +556,7 @@ Sequence<beans::PropertyValue> SvxXMLListLevelStyleContext_Impl::GetProperties(
OUString sDisplayTextStyleName = GetImport().GetStyleDisplayName(
XML_STYLE_FAMILY_TEXT_TEXT, sTextStyleName );
OUString sStyleName = sDisplayTextStyleName;
- if( sStyleName.getLength() && pI18NMap )
+ if( !sStyleName.isEmpty() && pI18NMap )
sStyleName = pI18NMap->Get( SFX_STYLE_FAMILY_CHAR, sStyleName );
pProps[nPos].Name =
OUString(RTL_CONSTASCII_USTRINGPARAM( XML_UNO_NAME_NRULE_CHAR_STYLE_NAME ));
@@ -566,7 +566,7 @@ Sequence<beans::PropertyValue> SvxXMLListLevelStyleContext_Impl::GetProperties(
{
awt::FontDescriptor aFDesc;
aFDesc.Name = sBulletFontName;
- if( sBulletFontName.getLength() )
+ if( !sBulletFontName.isEmpty() )
{
aFDesc.StyleName = sBulletFontStyleName;
aFDesc.Family = eBulletFontFamily;
@@ -607,7 +607,7 @@ Sequence<beans::PropertyValue> SvxXMLListLevelStyleContext_Impl::GetProperties(
if( bImage )
{
OUString sStr( sImageURL );
- if( sImageURL.getLength() )
+ if( !sImageURL.isEmpty() )
{
sStr = GetImport().ResolveGraphicObjectURL( sImageURL,
sal_False );
@@ -617,7 +617,7 @@ Sequence<beans::PropertyValue> SvxXMLListLevelStyleContext_Impl::GetProperties(
sStr = GetImport().ResolveGraphicObjectURLFromBase64( xBase64Stream );
}
- if( sStr.getLength() )
+ if( !sStr.isEmpty() )
{
pProps[nPos].Name =
OUString(RTL_CONSTASCII_USTRINGPARAM( XML_UNO_NAME_NRULE_GRAPHICURL ));
@@ -773,7 +773,7 @@ SvxXMLListLevelStyleAttrContext_Impl::SvxXMLListLevelStyleAttrContext_Impl(
rListLevel.SetMinLabelDist( nVal );
break;
case XML_TOK_STYLE_ATTRIBUTES_ATTR_TEXT_ALIGN:
- if( rValue.getLength() )
+ if( !rValue.isEmpty() )
{
sal_Int16 eAdjust = HoriOrientation::LEFT;
if( IsXMLToken( rValue, XML_CENTER ) )
@@ -845,7 +845,7 @@ SvxXMLListLevelStyleAttrContext_Impl::SvxXMLListLevelStyleAttrContext_Impl(
}
}
- if( sFontName.getLength() )
+ if( !sFontName.isEmpty() )
{
const XMLFontStylesContext *pFontDecls =
GetImport().GetTextImport()->GetFontDecls();
@@ -886,7 +886,7 @@ SvxXMLListLevelStyleAttrContext_Impl::SvxXMLListLevelStyleAttrContext_Impl(
}
}
}
- if( sFontFamily.getLength() )
+ if( !sFontFamily.isEmpty() )
{
String sEmpty;
Any aAny;
@@ -900,7 +900,7 @@ SvxXMLListLevelStyleAttrContext_Impl::SvxXMLListLevelStyleAttrContext_Impl(
}
XMLFontFamilyPropHdl aFamilyHdl;
- if( sFontFamilyGeneric.getLength() &&
+ if( !sFontFamilyGeneric.isEmpty() &&
aFamilyHdl.importXML( sFontFamilyGeneric, aAny, rUnitConv ) )
{
sal_Int16 nTmp = 0;
@@ -908,11 +908,11 @@ SvxXMLListLevelStyleAttrContext_Impl::SvxXMLListLevelStyleAttrContext_Impl(
rListLevel.SetBulletFontFamily( nTmp );
}
- if( sFontStyleName.getLength() )
+ if( !sFontStyleName.isEmpty() )
rListLevel.SetBulletFontStyleName( sFontStyleName );
XMLFontPitchPropHdl aPitchHdl;
- if( sFontPitch.getLength() &&
+ if( !sFontPitch.isEmpty() &&
aPitchHdl.importXML( sFontPitch, aAny, rUnitConv ) )
{
sal_Int16 nTmp = 0;
@@ -921,7 +921,7 @@ SvxXMLListLevelStyleAttrContext_Impl::SvxXMLListLevelStyleAttrContext_Impl(
}
XMLFontEncodingPropHdl aEncHdl;
- if( sFontCharset.getLength() &&
+ if( !sFontCharset.isEmpty() &&
aEncHdl.importXML( sFontCharset, aAny, rUnitConv ) )
{
sal_Int16 nTmp = 0;
@@ -931,14 +931,14 @@ SvxXMLListLevelStyleAttrContext_Impl::SvxXMLListLevelStyleAttrContext_Impl(
}
sal_Int16 eVertOrient = VertOrientation::LINE_CENTER;
- if( sVerticalPos.getLength() )
+ if( !sVerticalPos.isEmpty() )
{
if( IsXMLToken( sVerticalPos, XML_TOP ) )
eVertOrient = VertOrientation::LINE_TOP;
else if( IsXMLToken( sVerticalPos, XML_BOTTOM ) )
eVertOrient = VertOrientation::LINE_BOTTOM;
}
- if( sVerticalRel.getLength() )
+ if( !sVerticalRel.isEmpty() )
{
if( IsXMLToken( sVerticalRel, XML_BASELINE ) )
{
@@ -1234,7 +1234,7 @@ void SvxXMLListStyleContext::CreateAndInsertLate( sal_Bool bOverwrite )
{
Reference < XStyle > xStyle;
const OUString& rName = GetDisplayName();
- if( 0 == rName.getLength() )
+ if( rName.isEmpty() )
{
SetValid( sal_False );
return;
@@ -1312,7 +1312,7 @@ void SvxXMLListStyleContext::CreateAndInsertAuto() const
DBG_ASSERT( !xNumRules.is(), "Numbering Rule is existing already" );
const OUString& rName = GetName();
- if( bOutline || xNumRules.is() || 0 == rName.getLength() )
+ if( bOutline || xNumRules.is() || rName.isEmpty() )
{
((SvxXMLListStyleContext *)this)->SetValid( sal_False );
return;
diff --git a/xmloff/source/style/xmlstyle.cxx b/xmloff/source/style/xmlstyle.cxx
index 668577c0322b..beae4d64fbda 100644
--- a/xmloff/source/style/xmlstyle.cxx
+++ b/xmloff/source/style/xmlstyle.cxx
@@ -776,7 +776,7 @@ Reference < XNameContainer > SvXMLStylesContext::GetStylesContainer(
OUString( RTL_CONSTASCII_USTRINGPARAM( "CharacterStyles" ) );
break;
}
- if( !xStyles.is() && sName.getLength() )
+ if( !xStyles.is() && !sName.isEmpty() )
{
Reference< XStyleFamiliesSupplier > xFamiliesSupp(
GetImport().GetModel(), UNO_QUERY );
diff --git a/xmloff/source/style/xmltabi.cxx b/xmloff/source/style/xmltabi.cxx
index ca57577d073d..c61382533480 100644
--- a/xmloff/source/style/xmltabi.cxx
+++ b/xmloff/source/style/xmltabi.cxx
@@ -147,7 +147,7 @@ SvxXMLTabStopContext_Impl::SvxXMLTabStopContext_Impl(
}
break;
case XML_TOK_TABSTOP_CHAR:
- if( 0 != rValue.getLength() )
+ if( !rValue.isEmpty() )
aTabStop.DecimalChar = rValue[0];
break;
case XML_TOK_TABSTOP_LEADER_STYLE:
@@ -159,7 +159,7 @@ SvxXMLTabStopContext_Impl::SvxXMLTabStopContext_Impl(
aTabStop.FillChar = '_';
break;
case XML_TOK_TABSTOP_LEADER_TEXT:
- if( 0 != rValue.getLength() )
+ if( !rValue.isEmpty() )
cTextFillChar = rValue[0];
break;
}