summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Hallot <olivier.hallot@alta.org.br>2012-01-27 16:46:15 -0200
committerOlivier Hallot <olivier.hallot@alta.org.br>2012-01-27 19:14:06 -0200
commit260054594c91af05f2825d512801200797d10075 (patch)
tree189a9b27389a76fa373b2f427b39acc4868971f9
parent983de9808159036bd5de008d895ba6e5566c99f6 (diff)
Fix for fdo43460 Part LIII getLength() to isEmpty()
Part LIII Modules xmloff (part 6)
-rw-r--r--xmloff/source/transform/ChartOASISTContext.cxx2
-rw-r--r--xmloff/source/transform/ChartOOoTContext.cxx2
-rw-r--r--xmloff/source/transform/ControlOOoTContext.cxx4
-rw-r--r--xmloff/source/transform/DocumentTContext.cxx2
-rw-r--r--xmloff/source/transform/EventOASISTContext.cxx4
-rw-r--r--xmloff/source/transform/EventOOoTContext.cxx2
-rw-r--r--xmloff/source/transform/FormPropOOoTContext.cxx2
-rw-r--r--xmloff/source/transform/FrameOASISTContext.cxx8
-rw-r--r--xmloff/source/transform/OOo2Oasis.cxx6
-rw-r--r--xmloff/source/transform/RenameElemTContext.cxx2
-rw-r--r--xmloff/source/transform/StyleOASISTContext.cxx8
-rw-r--r--xmloff/source/transform/StyleOOoTContext.cxx8
-rw-r--r--xmloff/source/transform/TransformerBase.cxx12
-rw-r--r--xmloff/source/xforms/SchemaRestrictionContext.cxx4
-rw-r--r--xmloff/source/xforms/XFormsBindContext.cxx2
-rw-r--r--xmloff/source/xforms/xformsexport.cxx12
16 files changed, 40 insertions, 40 deletions
diff --git a/xmloff/source/transform/ChartOASISTContext.cxx b/xmloff/source/transform/ChartOASISTContext.cxx
index ed8934dba9e2..e3547382ff35 100644
--- a/xmloff/source/transform/ChartOASISTContext.cxx
+++ b/xmloff/source/transform/ChartOASISTContext.cxx
@@ -130,7 +130,7 @@ void XMLChartOASISTransformerContext::StartElement(
}
}
- if( aAddInName.getLength() > 0 )
+ if( !aAddInName.isEmpty() )
{
OUString aAttrQName( GetTransformer().GetNamespaceMap().GetQNameByKey(
XML_NAMESPACE_CHART,
diff --git a/xmloff/source/transform/ChartOOoTContext.cxx b/xmloff/source/transform/ChartOOoTContext.cxx
index 7ec387cc3462..d405f0cb7b16 100644
--- a/xmloff/source/transform/ChartOOoTContext.cxx
+++ b/xmloff/source/transform/ChartOOoTContext.cxx
@@ -135,7 +135,7 @@ void XMLChartOOoTransformerContext::StartElement(
}
}
- if( nClassName != -1 && aAddInName.getLength() > 0 )
+ if( nClassName != -1 && !aAddInName.isEmpty() )
{
GetTransformer().AddNamespacePrefix( aAddInName, XML_NAMESPACE_OOO );
pMutableAttrList->SetValueByIndex( nClassName, aAddInName );
diff --git a/xmloff/source/transform/ControlOOoTContext.cxx b/xmloff/source/transform/ControlOOoTContext.cxx
index bbbefa8b2677..941b9d241370 100644
--- a/xmloff/source/transform/ControlOOoTContext.cxx
+++ b/xmloff/source/transform/ControlOOoTContext.cxx
@@ -68,7 +68,7 @@ XMLTransformerContext *XMLControlOOoTransformerContext::CreateChildContext(
{
XMLTransformerContext *pContext = 0;
- if( !m_aElemQName.getLength() )
+ if( m_aElemQName.isEmpty() )
{
pContext = new XMLIgnoreTransformerContext( GetTransformer(),
rQName,
@@ -99,7 +99,7 @@ void XMLControlOOoTransformerContext::EndElement()
void XMLControlOOoTransformerContext::Characters( const OUString& rChars )
{
// ignore
- if( m_aElemQName.getLength() )
+ if( !m_aElemQName.isEmpty() )
XMLTransformerContext::Characters( rChars );
}
diff --git a/xmloff/source/transform/DocumentTContext.cxx b/xmloff/source/transform/DocumentTContext.cxx
index 1d923a6f644f..4c38e843de34 100644
--- a/xmloff/source/transform/DocumentTContext.cxx
+++ b/xmloff/source/transform/DocumentTContext.cxx
@@ -129,7 +129,7 @@ void XMLDocumentTransformerContext::StartElement( const Reference< XAttributeLis
}
}
- if( aClass.getLength() )
+ if( !aClass.isEmpty() )
{
if( !pMutableAttrList )
{
diff --git a/xmloff/source/transform/EventOASISTContext.cxx b/xmloff/source/transform/EventOASISTContext.cxx
index a042d0bab554..cf8eeda19284 100644
--- a/xmloff/source/transform/EventOASISTContext.cxx
+++ b/xmloff/source/transform/EventOASISTContext.cxx
@@ -386,10 +386,10 @@ void XMLEventOASISTransformerContext::StartElement(
aLocation= rDoc;
aAttrValue = rAttrValue.copy( rDoc.getLength()+1 );
}
- if( aAttrValue.getLength() )
+ if( !aAttrValue.isEmpty() )
pMutableAttrList->SetValueByIndex( i,
aAttrValue );
- if( aLocation.getLength() )
+ if( !aLocation.isEmpty() )
{
OUString aAttrQName( GetTransformer().GetNamespaceMap().
GetQNameByKey( XML_NAMESPACE_SCRIPT,
diff --git a/xmloff/source/transform/EventOOoTContext.cxx b/xmloff/source/transform/EventOOoTContext.cxx
index 1e63de302a71..7fb6eb2ba349 100644
--- a/xmloff/source/transform/EventOOoTContext.cxx
+++ b/xmloff/source/transform/EventOOoTContext.cxx
@@ -216,7 +216,7 @@ void XMLEventOOoTransformerContext::StartElement(
}
}
- if( nMacroName != -1 && aLocation.getLength() > 0 )
+ if( nMacroName != -1 && !aLocation.isEmpty() )
{
if( !IsXMLToken( aLocation, XML_APPLICATION ) )
aLocation = GetXMLToken( XML_DOCUMENT );
diff --git a/xmloff/source/transform/FormPropOOoTContext.cxx b/xmloff/source/transform/FormPropOOoTContext.cxx
index 93441629cf93..d2c914267e05 100644
--- a/xmloff/source/transform/FormPropOOoTContext.cxx
+++ b/xmloff/source/transform/FormPropOOoTContext.cxx
@@ -264,7 +264,7 @@ void XMLFormPropOOoTransformerContext::StartElement(
}
}
- if( aValueType.getLength() )
+ if( !aValueType.isEmpty() )
{
if( IsXMLToken( aValueType, XML_STRING ) )
m_eValueToken = XML_STRING_VALUE;
diff --git a/xmloff/source/transform/FrameOASISTContext.cxx b/xmloff/source/transform/FrameOASISTContext.cxx
index 1b96da79e45d..6d9d1d9ea832 100644
--- a/xmloff/source/transform/FrameOASISTContext.cxx
+++ b/xmloff/source/transform/FrameOASISTContext.cxx
@@ -63,14 +63,14 @@ sal_Bool XMLFrameOASISTransformerContext::IsLinkedEmbeddedObject(
IsXMLToken( aLocalName, XML_HREF ) )
{
OUString sHRef( rAttrList->getValueByIndex( i ) );
- if (sHRef.getLength() == 0)
+ if (sHRef.isEmpty())
{
// When the href is empty then the object is not linked but
// a placeholder.
return sal_False;
}
GetTransformer().ConvertURIToOOo( sHRef, sal_True );
- return !(sHRef.getLength() && '#'==sHRef[0]);
+ return !(!sHRef.isEmpty() && '#'==sHRef[0]);
}
}
@@ -144,7 +144,7 @@ XMLTransformerContext *XMLFrameOASISTransformerContext::CreateChildContext(
switch( (*aIter).second.m_nActionType )
{
case XML_ETACTION_COPY:
- if( !m_aElemQName.getLength() &&
+ if( m_aElemQName.isEmpty() &&
!IsLinkedEmbeddedObject( rLocalName, rAttrList ) )
{
pContext = new XMLIgnoreTransformerContext( GetTransformer(),
@@ -192,7 +192,7 @@ void XMLFrameOASISTransformerContext::EndElement()
void XMLFrameOASISTransformerContext::Characters( const OUString& rChars )
{
// ignore
- if( m_aElemQName.getLength() && !m_bIgnoreElement )
+ if( !m_aElemQName.isEmpty() && !m_bIgnoreElement )
XMLTransformerContext::Characters( rChars );
}
diff --git a/xmloff/source/transform/OOo2Oasis.cxx b/xmloff/source/transform/OOo2Oasis.cxx
index 264b062d141c..35824f820522 100644
--- a/xmloff/source/transform/OOo2Oasis.cxx
+++ b/xmloff/source/transform/OOo2Oasis.cxx
@@ -1287,7 +1287,7 @@ void XMLBodyTransformerContext_Impl::StartElement(
new XMLMutableAttributeList( rAttrList );
Reference< XAttributeList > xAttrList = pMutableAttrList;
OUString aClass( GetTransformer().GetClass() );
- if( !aClass.getLength() )
+ if( aClass.isEmpty() )
{
aClass = GetXMLToken( XML_TEXT );
}
@@ -1383,7 +1383,7 @@ void XMLTabStopOOoTContext_Impl::StartElement(
aNewAttrQName );
}
if( IsXMLToken( aLocalName, XML_LEADER_CHAR ) &&
- rAttrValue.getLength() > 0 &&
+ !rAttrValue.isEmpty() &&
rAttrValue[0] != ' ' )
{
OUString aNewAttrQName(
@@ -1980,7 +1980,7 @@ void SAL_CALL OOo2OasisTransformer::Initialize(
OSL_ENSURE( !GetDocHandler().is(), "duplication initialization" );
Reference< XDocumentHandler > xDocHandler;
- if( m_aSubServiceName.getLength() )
+ if( !m_aSubServiceName.isEmpty() )
{
Reference< XMultiServiceFactory > xFactory =
comphelper::getProcessServiceFactory();
diff --git a/xmloff/source/transform/RenameElemTContext.cxx b/xmloff/source/transform/RenameElemTContext.cxx
index ef9e5b903cc5..9eeaaf93f9cf 100644
--- a/xmloff/source/transform/RenameElemTContext.cxx
+++ b/xmloff/source/transform/RenameElemTContext.cxx
@@ -74,7 +74,7 @@ void XMLRenameElemTransformerContext::StartElement(
const Reference< XAttributeList >& rAttrList )
{
Reference< XAttributeList > xAttrList( rAttrList );
- if( m_aAttrQName.getLength() )
+ if( !m_aAttrQName.isEmpty() )
{
XMLMutableAttributeList *pMutableAttrList =
new XMLMutableAttributeList( xAttrList );
diff --git a/xmloff/source/transform/StyleOASISTContext.cxx b/xmloff/source/transform/StyleOASISTContext.cxx
index 3c7636f1d5f2..0a0bce3163ca 100644
--- a/xmloff/source/transform/StyleOASISTContext.cxx
+++ b/xmloff/source/transform/StyleOASISTContext.cxx
@@ -319,7 +319,7 @@ void XMLPropertiesTContext_Impl::StartElement(
eLineThrough = GetTransformer().GetToken( rAttrValue );
break;
case XML_OPTACTION_LINETHROUGH_TEXT:
- if( rAttrValue.getLength() )
+ if( !rAttrValue.isEmpty() )
cLineThroughChar = rAttrValue[0];
break;
case XML_OPTACTION_INTERPOLATION:
@@ -513,7 +513,7 @@ void XMLPropertiesTContext_Impl::StartElement(
OUString aToken;
while( aTokenEnum.getNextToken( aToken ) )
{
- if ( aNewAttrValue.getLength() > 0 )
+ if ( !aNewAttrValue.isEmpty() )
{
aNewAttrValue += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( " " ));
}
@@ -606,13 +606,13 @@ void XMLPropertiesTContext_Impl::StartElement(
}
// #i25616#
- if(aOpacityValueRemember.getLength() || aImageOpacityValueRemember.getLength())
+ if(!aOpacityValueRemember.isEmpty() || !aImageOpacityValueRemember.isEmpty())
{
pAttrList->AddAttribute(
GetTransformer().GetNamespaceMap().GetQNameByKey(
XML_NAMESPACE_DRAW,
GetXMLToken( XML_TRANSPARENCY ) ),
- aImageOpacityValueRemember.getLength()
+ !aImageOpacityValueRemember.isEmpty()
? aImageOpacityValueRemember : aOpacityValueRemember );
}
}
diff --git a/xmloff/source/transform/StyleOOoTContext.cxx b/xmloff/source/transform/StyleOOoTContext.cxx
index 4f1d8d81f1ab..4b80b3c803fa 100644
--- a/xmloff/source/transform/StyleOOoTContext.cxx
+++ b/xmloff/source/transform/StyleOOoTContext.cxx
@@ -926,7 +926,7 @@ void XMLPropertiesOOoTContext_Impl::StartElement(
OUString aToken;
while( aTokenEnum.getNextToken( aToken ) )
{
- if ( aStyleMirrorAttrValue.getLength() > 0 )
+ if ( !aStyleMirrorAttrValue.isEmpty() )
{
aStyleMirrorAttrValue += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( " " ));
}
@@ -999,7 +999,7 @@ void XMLPropertiesOOoTContext_Impl::StartElement(
aDrawMirrorAttrValue);
}
- if( bMoveProtect || bSizeProtect || aProtectAttrValue.getLength() )
+ if( bMoveProtect || bSizeProtect || !aProtectAttrValue.isEmpty() )
{
if( (bMoveProtect ||bSizeProtect) && IsXMLToken( aProtectAttrValue, XML_NONE ) )
aProtectAttrValue = OUString();
@@ -1007,7 +1007,7 @@ void XMLPropertiesOOoTContext_Impl::StartElement(
const OUString& rPosition = GetXMLToken( XML_POSITION );
if( bMoveProtect && -1 == aProtectAttrValue.indexOf( rPosition ) )
{
- if( aProtectAttrValue.getLength() )
+ if( !aProtectAttrValue.isEmpty() )
aProtectAttrValue += OUString::valueOf( sal_Unicode( ' ' ) );
aProtectAttrValue += rPosition;
}
@@ -1015,7 +1015,7 @@ void XMLPropertiesOOoTContext_Impl::StartElement(
const OUString& rSize = GetXMLToken( XML_SIZE );
if( bSizeProtect && -1 == aProtectAttrValue.indexOf( rSize ) )
{
- if( aProtectAttrValue.getLength() )
+ if( !aProtectAttrValue.isEmpty() )
aProtectAttrValue += OUString::valueOf( sal_Unicode( ' ' ) );
aProtectAttrValue += rSize;
}
diff --git a/xmloff/source/transform/TransformerBase.cxx b/xmloff/source/transform/TransformerBase.cxx
index cc859733a444..e3a33042816d 100644
--- a/xmloff/source/transform/TransformerBase.cxx
+++ b/xmloff/source/transform/TransformerBase.cxx
@@ -279,7 +279,7 @@ void SAL_CALL XMLTransformerBase::startElement( const OUString& rName,
nKey = m_pNamespaceMap->Add( aPrefix, rAttrValue );
const OUString& rRepName = m_pReplaceNamespaceMap->GetNameByKey( nKey );
- if( rRepName.getLength() )
+ if( !rRepName.isEmpty() )
{
if( !pMutableAttrList )
{
@@ -473,7 +473,7 @@ void SAL_CALL XMLTransformerBase::initialize( const Sequence< Any >& aArguments
aAny = m_xPropSet->getPropertyValue(sPropName);
aAny >>= sName;
}
- if( sName.getLength() )
+ if( !sName.isEmpty() )
{
m_aExtPathPrefix = OUString( RTL_CONSTASCII_USTRINGPARAM("../" ) );
@@ -481,7 +481,7 @@ void SAL_CALL XMLTransformerBase::initialize( const Sequence< Any >& aArguments
// additional '../'. If the rel path contains an ':', then it is
// an absolute URI (or invalid URI, because zip files don't
// permit ':'), and it will be ignored.
- if( sRelPath.getLength() )
+ if( !sRelPath.isEmpty() )
{
sal_Int32 nColPos = sRelPath.indexOf( ':' );
OSL_ENSURE( -1 == nColPos,
@@ -1293,7 +1293,7 @@ sal_Bool XMLTransformerBase::ConvertURIToOASIS( ::rtl::OUString& rURI,
sal_Bool bSupportPackage ) const
{
sal_Bool bRet = sal_False;
- if( m_aExtPathPrefix.getLength() && rURI.getLength() )
+ if( !m_aExtPathPrefix.isEmpty() && !rURI.isEmpty() )
{
sal_Bool bRel = sal_False;
switch( rURI[0] )
@@ -1363,7 +1363,7 @@ sal_Bool XMLTransformerBase::ConvertURIToOOo( ::rtl::OUString& rURI,
sal_Bool bSupportPackage ) const
{
sal_Bool bRet = sal_False;
- if( rURI.getLength() )
+ if( !rURI.isEmpty() )
{
sal_Bool bPackage = sal_False;
switch( rURI[0] )
@@ -1441,7 +1441,7 @@ sal_Bool XMLTransformerBase::RenameAttributeValue(
// static
bool XMLTransformerBase::ConvertRNGDateTimeToISO( ::rtl::OUString& rDateTime )
{
- if( rDateTime.getLength() > 0 &&
+ if( !rDateTime.isEmpty() &&
rDateTime.indexOf( sal_Unicode('.')) != -1 )
{
rDateTime = rDateTime.replace( sal_Unicode('.'), sal_Unicode(','));
diff --git a/xmloff/source/xforms/SchemaRestrictionContext.cxx b/xmloff/source/xforms/SchemaRestrictionContext.cxx
index 16104dcfd66e..b8c6027d2a13 100644
--- a/xmloff/source/xforms/SchemaRestrictionContext.cxx
+++ b/xmloff/source/xforms/SchemaRestrictionContext.cxx
@@ -117,7 +117,7 @@ void SchemaRestrictionContext::CreateDataType()
if( mxDataType.is() )
return;
- DBG_ASSERT( msBaseName.getLength() > 0, "no base name?" );
+ DBG_ASSERT( !msBaseName.isEmpty(), "no base name?" );
DBG_ASSERT( mxRepository.is(), "no repository?" );
try
@@ -364,7 +364,7 @@ SvXMLImportContext* SchemaRestrictionContext::HandleChild(
// finally, set the property
CreateDataType();
if( mxDataType.is()
- && sPropertyName.getLength() > 0
+ && !sPropertyName.isEmpty()
&& pConvert != NULL
&& mxDataType->getPropertySetInfo()->hasPropertyByName(sPropertyName) )
{
diff --git a/xmloff/source/xforms/XFormsBindContext.cxx b/xmloff/source/xforms/XFormsBindContext.cxx
index 94aef8ba84a1..1102cc44ec78 100644
--- a/xmloff/source/xforms/XFormsBindContext.cxx
+++ b/xmloff/source/xforms/XFormsBindContext.cxx
@@ -171,7 +171,7 @@ void lcl_fillNamespaceContainer(
const OUString& sNamespace = aMap.GetNameByKey( nKeyIter );
// as a hack, we will ignore our own 'default' namespaces
- DBG_ASSERT( sPrefix.getLength() > 0, "no prefix?" );
+ DBG_ASSERT( !sPrefix.isEmpty(), "no prefix?" );
if( sPrefix.getStr()[0] != sal_Unicode( '_' ) &&
nKeyIter >= XML_OLD_NAMESPACE_META_IDX )
{
diff --git a/xmloff/source/xforms/xformsexport.cxx b/xmloff/source/xforms/xformsexport.cxx
index 39f2b9b777e4..e0ce8ceec546 100644
--- a/xmloff/source/xforms/xformsexport.cxx
+++ b/xmloff/source/xforms/xformsexport.cxx
@@ -254,10 +254,10 @@ void exportXFormsInstance( SvXMLExport& rExport,
rAny >>= xDoc;
}
- if( sId.getLength() > 0 )
+ if( !sId.isEmpty() )
rExport.AddAttribute( XML_NAMESPACE_NONE, XML_ID, sId );
- if( sURL.getLength() > 0 )
+ if( !sURL.isEmpty() )
rExport.AddAttribute( XML_NAMESPACE_NONE, XML_SRC, sURL );
SvXMLElementExport aElem( rExport, XML_NAMESPACE_XFORMS, XML_INSTANCE,
@@ -295,7 +295,7 @@ void exportXFormsBinding( SvXMLExport& rExport,
{
OUString sName;
xBinding->getPropertyValue( OUSTRING("BindingID") ) >>= sName;
- if( sName.getLength() == 0 )
+ if( sName.isEmpty() )
{
// if we don't have a name yet, generate one on the fly
OUStringBuffer aBuffer;
@@ -343,7 +343,7 @@ void exportXFormsBinding( SvXMLExport& rExport,
}
// now that we have the proper type name, write out the attribute
- if( sTypeName.getLength() > 0 )
+ if( !sTypeName.isEmpty() )
{
rExport.AddAttribute( XML_NAMESPACE_NONE, XML_TYPE,
sTypeName );
@@ -471,7 +471,7 @@ void lcl_exportDataTypeFacets( SvXMLExport& rExport,
OUString sValue = (*pCurrent->aConverter)(
rPropertySet->getPropertyValue( sName ) );
- if( sValue.getLength() > 0 )
+ if( !sValue.isEmpty() )
{
rExport.AddAttribute( XML_NAMESPACE_NONE, XML_VALUE, sValue );
SvXMLElementExport aFacet(
@@ -632,7 +632,7 @@ void lcl_export( const Reference<XPropertySet>& rPropertySet,
OUString::createFromAscii( pCurrent->pPropertyName ) );
OUString sValue = (*pCurrent->aConverter)( aAny );
- if( sValue.getLength() > 0 )
+ if( !sValue.isEmpty() )
rExport.AddAttribute(
pCurrent->nNamespace,
static_cast<XMLTokenEnum>( pCurrent->nToken ),