summaryrefslogtreecommitdiff
path: root/xmloff/source
diff options
context:
space:
mode:
Diffstat (limited to 'xmloff/source')
-rw-r--r--xmloff/source/forms/controlpropertyhdl.cxx6
-rw-r--r--xmloff/source/forms/elementexport.cxx24
-rw-r--r--xmloff/source/forms/elementimport.cxx48
-rw-r--r--xmloff/source/forms/eventexport.cxx4
-rw-r--r--xmloff/source/forms/eventimport.cxx2
-rw-r--r--xmloff/source/forms/formcellbinding.cxx4
-rw-r--r--xmloff/source/forms/layerexport.cxx4
-rw-r--r--xmloff/source/forms/layerimport.cxx10
-rw-r--r--xmloff/source/forms/property_meta_data.cxx10
-rw-r--r--xmloff/source/forms/propertyexport.cxx20
-rw-r--r--xmloff/source/forms/propertyimport.cxx10
-rw-r--r--xmloff/source/meta/xmlmetae.cxx14
-rw-r--r--xmloff/source/meta/xmlmetai.cxx4
-rw-r--r--xmloff/source/meta/xmlversion.cxx4
-rw-r--r--xmloff/source/script/XMLStarBasicExportHandler.cxx2
-rw-r--r--xmloff/source/script/xmlbasici.cxx2
-rw-r--r--xmloff/source/style/DashStyle.cxx4
-rw-r--r--xmloff/source/style/FillStyleContext.cxx4
-rw-r--r--xmloff/source/style/GradientStyle.cxx4
-rw-r--r--xmloff/source/style/HatchStyle.cxx4
-rw-r--r--xmloff/source/style/ImageStyle.cxx8
-rw-r--r--xmloff/source/style/MarkerStyle.cxx4
-rw-r--r--xmloff/source/style/PageMasterImportContext.cxx2
-rw-r--r--xmloff/source/style/PageMasterPropHdl.cxx12
-rw-r--r--xmloff/source/style/TransGradientStyle.cxx4
-rw-r--r--xmloff/source/style/XMLBackgroundImageContext.cxx6
-rw-r--r--xmloff/source/style/XMLBackgroundImageExport.cxx8
-rw-r--r--xmloff/source/style/XMLFontAutoStylePool.cxx4
-rw-r--r--xmloff/source/style/XMLPageExport.cxx4
-rw-r--r--xmloff/source/style/bordrhdl.cxx2
-rw-r--r--xmloff/source/style/cdouthdl.cxx2
-rw-r--r--xmloff/source/style/chrhghdl.cxx6
-rw-r--r--xmloff/source/style/chrlohdl.cxx4
-rw-r--r--xmloff/source/style/csmaphdl.cxx2
34 files changed, 126 insertions, 126 deletions
diff --git a/xmloff/source/forms/controlpropertyhdl.cxx b/xmloff/source/forms/controlpropertyhdl.cxx
index 3c8b0fc4f691..5442a559dfb4 100644
--- a/xmloff/source/forms/controlpropertyhdl.cxx
+++ b/xmloff/source/forms/controlpropertyhdl.cxx
@@ -245,7 +245,7 @@ namespace xmloff
sal_uInt16 nStyle = 1;
while ( aTokens.getNextToken(sToken) // have a new token
- && (0 != sToken.getLength()) // really have a new token
+ && (!sToken.isEmpty()) // really have a new token
)
{
// try interpreting the token as border style
@@ -304,7 +304,7 @@ namespace xmloff
if ( !bSuccess )
return sal_False;
- if ( _rStrExpValue.getLength() )
+ if ( !_rStrExpValue.isEmpty() )
_rStrExpValue += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( " " ) );
_rStrExpValue += aOut.makeStringAndClear();
@@ -343,7 +343,7 @@ namespace xmloff
}
_rStrExpValue = aResult.makeStringAndClear();
- return _rStrExpValue.getLength() != 0;
+ return !_rStrExpValue.isEmpty();
}
//=====================================================================
diff --git a/xmloff/source/forms/elementexport.cxx b/xmloff/source/forms/elementexport.cxx
index fcc3efaefa53..863d99a54511 100644
--- a/xmloff/source/forms/elementexport.cxx
+++ b/xmloff/source/forms/elementexport.cxx
@@ -316,7 +316,7 @@ namespace xmloff
// the control id
if (CCA_CONTROL_ID & m_nIncludeCommon)
{
- OSL_ENSURE(m_sControlId.getLength(), "OControlExport::exportInnerAttributes: have no control id for the control!");
+ OSL_ENSURE(!m_sControlId.isEmpty(), "OControlExport::exportInnerAttributes: have no control id for the control!");
m_rContext.getGlobalContext().AddAttributeIdLegacy(
XML_NAMESPACE_FORM, m_sControlId);
#if OSL_DEBUG_LEVEL > 0
@@ -799,7 +799,7 @@ namespace xmloff
// the target frame
if (m_nIncludeCommon & CCA_FOR)
{
- if (m_sReferringControls.getLength())
+ if (!m_sReferringControls.isEmpty())
{ // there is at least one control referring to the one we're handling currently
AddAttribute(
OAttributeMetaData::getCommonControlAttributeNamespace(CCA_FOR),
@@ -1095,7 +1095,7 @@ namespace xmloff
else
OSL_FAIL( "OControlExport::exportSpecialAttributes: not property which can be mapped to step-size attribute!" );
- if ( sPropertyName.getLength() )
+ if ( !sPropertyName.isEmpty() )
exportInt32PropertyAttribute(
OAttributeMetaData::getSpecialAttributeNamespace( SCA_STEP_SIZE ),
OAttributeMetaData::getSpecialAttributeName( SCA_STEP_SIZE ),
@@ -1306,7 +1306,7 @@ namespace xmloff
DBG_CHECK_PROPERTY_NO_TYPE( PROPERTY_LISTSOURCE );
::rtl::OUString sListSource = getScalarListSourceValue();
- if ( sListSource.getLength() )
+ if ( !sListSource.isEmpty() )
{ // the ListSource property needs to be exported as attribute, and it is not empty
AddAttribute(
OAttributeMetaData::getDatabaseAttributeNamespace(DA_LIST_SOURCE),
@@ -1811,19 +1811,19 @@ namespace xmloff
}
// is control bound to XForms?
- if( getXFormsBindName( m_xProps ).getLength() > 0 )
+ if( !getXFormsBindName( m_xProps ).isEmpty() )
{
m_nIncludeBindings |= BA_XFORMS_BIND;
}
// is (list-)control bound to XForms list?
- if( getXFormsListBindName( m_xProps ).getLength() > 0 )
+ if( !getXFormsListBindName( m_xProps ).isEmpty() )
{
m_nIncludeBindings |= BA_XFORMS_LISTBIND;
}
// does the control have an XForms submission?
- if( getXFormsSubmissionName( m_xProps ).getLength() > 0 )
+ if( !getXFormsSubmissionName( m_xProps ).isEmpty() )
{
m_nIncludeBindings |= BA_XFORMS_SUBMISSION;
}
@@ -2014,7 +2014,7 @@ namespace xmloff
// for every other type, the list entries are filled with some data obtained
// from a database - if and only if the ListSource property is not empty
- return ( 0 == getScalarListSourceValue().getLength() );
+ return getScalarListSourceValue().isEmpty();
}
}
catch( const Exception& )
@@ -2087,7 +2087,7 @@ namespace xmloff
// the style attribute
::rtl::OUString sStyleName = m_rContext.getObjectStyleName( m_xProps );
- if ( sStyleName.getLength() )
+ if ( !sStyleName.isEmpty() )
{
AddAttribute(
OAttributeMetaData::getSpecialAttributeNamespace( SCA_COLUMN_STYLE_NAME ),
@@ -2137,9 +2137,9 @@ namespace xmloff
m_rContext.getGlobalContext().ClearAttrList();
::rtl::OUString sPropValue;
m_xProps->getPropertyValue( PROPERTY_DATASOURCENAME ) >>= sPropValue; // if set it is a file url
- if ( !sPropValue.getLength() )
+ if ( sPropValue.isEmpty() )
m_xProps->getPropertyValue( PROPERTY_URL ) >>= sPropValue;
- if ( sPropValue.getLength() )
+ if ( !sPropValue.isEmpty() )
AddAttribute(
OAttributeMetaData::getCommonControlAttributeNamespace(CCA_TARGET_LOCATION),
OAttributeMetaData::getCommonControlAttributeName(CCA_TARGET_LOCATION),
@@ -2193,7 +2193,7 @@ namespace xmloff
// now export the data source name or databaselocation or connection resource
::rtl::OUString sPropValue;
m_xProps->getPropertyValue( PROPERTY_DATASOURCENAME ) >>= sPropValue;
- m_bCreateConnectionResourceElement = !sPropValue.getLength();
+ m_bCreateConnectionResourceElement = sPropValue.isEmpty();
if ( !m_bCreateConnectionResourceElement )
{
INetURLObject aURL(sPropValue);
diff --git a/xmloff/source/forms/elementimport.cxx b/xmloff/source/forms/elementimport.cxx
index 989214c0c623..a3044803bc22 100644
--- a/xmloff/source/forms/elementimport.cxx
+++ b/xmloff/source/forms/elementimport.cxx
@@ -187,14 +187,14 @@ namespace xmloff
const ::rtl::OUString sControlImplementation = _rxAttrList->getValueByName( sImplNameAttribute );
// retrieve the service name
- if ( sControlImplementation.getLength() > 0 )
+ if ( !sControlImplementation.isEmpty() )
{
::rtl::OUString sOOoImplementationName;
const sal_uInt16 nImplPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( sControlImplementation, &sOOoImplementationName );
m_sServiceName = ( nImplPrefix == XML_NAMESPACE_OOO ) ? sOOoImplementationName : sControlImplementation;
}
- if ( !m_sServiceName.getLength() )
+ if ( m_sServiceName.isEmpty() )
determineDefaultServiceName();
// create the object *now*. This allows setting properties in the various handleAttribute methods.
@@ -240,13 +240,13 @@ namespace xmloff
const_cast< XMLTextStyleContext* >( m_pStyleElement )->FillPropertySet( xPropTranslation );
const ::rtl::OUString sNumberStyleName = const_cast< XMLTextStyleContext* >( m_pStyleElement )->GetDataStyleName( );
- if ( sNumberStyleName.getLength() )
+ if ( !sNumberStyleName.isEmpty() )
// the style also has a number (sub) style
m_rContext.applyControlNumberStyle( m_xElement, sNumberStyleName );
}
// insert the element into the parent container
- if (!m_sName.getLength())
+ if (m_sName.isEmpty())
{
OSL_FAIL("OElementImport::EndElement: did not find a name attribute!");
m_sName = implGetDefaultName();
@@ -623,7 +623,7 @@ namespace xmloff
if ( token::IsXMLToken( _rLocalName, token::XML_NAME ) )
{
- if ( !m_sName.getLength() )
+ if ( m_sName.isEmpty() )
// remember the name for later use in EndElement
m_sName = _rValue;
return true;
@@ -651,7 +651,7 @@ namespace xmloff
Reference< XPropertySet > OElementImport::createElement()
{
Reference< XPropertySet > xReturn;
- if (m_sServiceName.getLength())
+ if (!m_sServiceName.isEmpty())
{
Reference< XInterface > xPure = m_rFormImport.getGlobalContext().getServiceFactory()->createInstance(m_sServiceName);
OSL_ENSURE(xPure.is(),
@@ -756,7 +756,7 @@ namespace xmloff
}
else if (XML_NAMESPACE_FORM == _nNamespaceKey)
{
- if (!m_sControlId.getLength())
+ if (m_sControlId.isEmpty())
{
m_sControlId = _rValue;
}
@@ -1017,7 +1017,7 @@ namespace xmloff
return;
// register our control with it's id
- if (m_sControlId.getLength())
+ if (!m_sControlId.isEmpty())
m_rFormImport.registerControlId(m_xElement, m_sControlId);
// it's allowed to have no control id. In this case we're importing a column
@@ -1099,19 +1099,19 @@ namespace xmloff
}
// the external cell binding, if applicable
- if ( m_xElement.is() && m_sBoundCellAddress.getLength() )
+ if ( m_xElement.is() && !m_sBoundCellAddress.isEmpty() )
doRegisterCellValueBinding( m_sBoundCellAddress );
// XForms binding, if applicable
- if ( m_xElement.is() && m_sBindingID.getLength() )
+ if ( m_xElement.is() && !m_sBindingID.isEmpty() )
doRegisterXFormsValueBinding( m_sBindingID );
// XForms list binding, if applicable
- if ( m_xElement.is() && m_sListBindingID.getLength() )
+ if ( m_xElement.is() && !m_sListBindingID.isEmpty() )
doRegisterXFormsListBinding( m_sListBindingID );
// XForms submission, if applicable
- if ( m_xElement.is() && m_sSubmissionID.getLength() )
+ if ( m_xElement.is() && !m_sSubmissionID.isEmpty() )
doRegisterXFormsSubmission( m_sSubmissionID );
}
@@ -1119,7 +1119,7 @@ namespace xmloff
void OControlImport::doRegisterCellValueBinding( const ::rtl::OUString& _rBoundCellAddress )
{
OSL_PRECOND( m_xElement.is(), "OControlImport::doRegisterCellValueBinding: invalid element!" );
- OSL_PRECOND( _rBoundCellAddress.getLength(),
+ OSL_PRECOND( !_rBoundCellAddress.isEmpty(),
"OControlImport::doRegisterCellValueBinding: invalid address!" );
m_rContext.registerCellValueBinding( m_xElement, _rBoundCellAddress );
@@ -1129,7 +1129,7 @@ namespace xmloff
void OControlImport::doRegisterXFormsValueBinding( const ::rtl::OUString& _rBindingID )
{
OSL_PRECOND( m_xElement.is(), "need element" );
- OSL_PRECOND( _rBindingID.getLength() > 0, "binding ID is not valid" );
+ OSL_PRECOND( !_rBindingID.isEmpty(), "binding ID is not valid" );
m_rContext.registerXFormsValueBinding( m_xElement, _rBindingID );
}
@@ -1138,7 +1138,7 @@ namespace xmloff
void OControlImport::doRegisterXFormsListBinding( const ::rtl::OUString& _rBindingID )
{
OSL_PRECOND( m_xElement.is(), "need element" );
- OSL_PRECOND( _rBindingID.getLength() > 0, "binding ID is not valid" );
+ OSL_PRECOND( !_rBindingID.isEmpty(), "binding ID is not valid" );
m_rContext.registerXFormsListBinding( m_xElement, _rBindingID );
}
@@ -1147,7 +1147,7 @@ namespace xmloff
void OControlImport::doRegisterXFormsSubmission( const ::rtl::OUString& _rSubmissionID )
{
OSL_PRECOND( m_xElement.is(), "need element" );
- OSL_PRECOND( _rSubmissionID.getLength() > 0, "binding ID is not valid" );
+ OSL_PRECOND( !_rSubmissionID.isEmpty(), "binding ID is not valid" );
m_rContext.registerXFormsSubmission( m_xElement, _rSubmissionID );
}
@@ -1249,7 +1249,7 @@ namespace xmloff
OControlImport::StartElement(_rxAttrList);
// the base class should have created the control, so we can register it
- if ( m_sReferringControls.getLength() )
+ if ( !m_sReferringControls.isEmpty() )
m_rFormImport.registerControlReferences(m_xElement, m_sReferringControls);
}
@@ -1363,7 +1363,7 @@ namespace xmloff
)
);
- if ( bMakeAbsolute && ( _rValue.getLength() > 0 ) )
+ if ( bMakeAbsolute && !_rValue.isEmpty() )
{
// make a global URL out of the local one
::rtl::OUString sAdjustedValue;
@@ -1723,7 +1723,7 @@ namespace xmloff
OControlImport::EndElement();
// the external list source, if applicable
- if ( m_xElement.is() && m_sCellListSource.getLength() )
+ if ( m_xElement.is() && !m_sCellListSource.isEmpty() )
m_rContext.registerCellRangeListSource( m_xElement, m_sCellListSource );
}
@@ -1876,8 +1876,8 @@ namespace xmloff
// the label attribute
::rtl::OUString sValue = _rxAttrList->getValueByName(sLabelAttribute);
sal_Bool bNonexistentAttribute = sal_False;
- if (!sValue.getLength())
- if (0 == _rxAttrList->getTypeByName(sLabelAttribute).getLength())
+ if (sValue.isEmpty())
+ if (_rxAttrList->getTypeByName(sLabelAttribute).isEmpty())
// this attribute does not really exist
bNonexistentAttribute = sal_True;
@@ -1890,8 +1890,8 @@ namespace xmloff
// the value attribute
sValue = _rxAttrList->getValueByName(sValueAttribute);
bNonexistentAttribute = sal_False;
- if (!sValue.getLength())
- if (0 == _rxAttrList->getTypeByName(sValueAttribute).getLength())
+ if (sValue.isEmpty())
+ if (_rxAttrList->getTypeByName(sValueAttribute).isEmpty())
// this attribute does not really exist
bNonexistentAttribute = sal_True;
@@ -2119,7 +2119,7 @@ namespace xmloff
Sequence< ::rtl::OUString > aList;
// split up the value string
- if (_rValue.getLength())
+ if (!_rValue.isEmpty())
{
// For the moment, we build a vector instead of a Sequence. It's easier to handle because of it's
// push_back method
diff --git a/xmloff/source/forms/eventexport.cxx b/xmloff/source/forms/eventexport.cxx
index fc529a0c2614..8a1f9e50026f 100644
--- a/xmloff/source/forms/eventexport.cxx
+++ b/xmloff/source/forms/eventexport.cxx
@@ -79,7 +79,7 @@ namespace xmloff
sLocalMacroName = sLocalMacroName.copy( nPrefixLen + 1 );
}
// tree property values to describe one event ...
- rMappedEvent.realloc( sLibrary.getLength() ? 3 : 2 );
+ rMappedEvent.realloc( sLibrary.isEmpty() ? 2 : 3 );
// ... the type
rMappedEvent[0] = PropertyValue(EVENT_TYPE, -1, makeAny(pEvents->ScriptType), PropertyState_DIRECT_VALUE);
@@ -88,7 +88,7 @@ namespace xmloff
rMappedEvent[1] = PropertyValue(EVENT_LOCALMACRONAME, -1, makeAny(sLocalMacroName), PropertyState_DIRECT_VALUE);
// the library
- if ( sLibrary.getLength() )
+ if ( !sLibrary.isEmpty() )
rMappedEvent[2] = PropertyValue(EVENT_LIBRARY, -1, makeAny(sLibrary), PropertyState_DIRECT_VALUE);
}
else
diff --git a/xmloff/source/forms/eventimport.cxx b/xmloff/source/forms/eventimport.cxx
index 23b234f7d479..725d34ae12e3 100644
--- a/xmloff/source/forms/eventimport.cxx
+++ b/xmloff/source/forms/eventimport.cxx
@@ -94,7 +94,7 @@ namespace xmloff
if ( 0 == sLibrary.compareToAscii( EVENT_STAROFFICE ) )
sLibrary = EVENT_APPLICATION;
- if ( sLibrary.getLength() )
+ if ( !sLibrary.isEmpty() )
{
// for StarBasic, the library is prepended
sal_Unicode cLibSeparator = ':';
diff --git a/xmloff/source/forms/formcellbinding.cxx b/xmloff/source/forms/formcellbinding.cxx
index 568f3ea32f85..335fc7cc9ec9 100644
--- a/xmloff/source/forms/formcellbinding.cxx
+++ b/xmloff/source/forms/formcellbinding.cxx
@@ -171,7 +171,7 @@ Reference< XValueBinding > FormCellBindingHelper::createCellBindingFromStringAdd
// get the UNO representation of the address
CellAddress aAddress;
- if ( !_rAddress.getLength() || !convertStringAddress( _rAddress, aAddress ) )
+ if ( _rAddress.isEmpty() || !convertStringAddress( _rAddress, aAddress ) )
return xBinding;
xBinding = xBinding.query( createDocumentDependentInstance(
@@ -428,7 +428,7 @@ Reference< XInterface > FormCellBindingHelper::createDocumentDependentInstance(
{
try
{
- if ( _rArgumentName.getLength() )
+ if ( !_rArgumentName.isEmpty() )
{
NamedValue aArg;
aArg.Name = _rArgumentName;
diff --git a/xmloff/source/forms/layerexport.cxx b/xmloff/source/forms/layerexport.cxx
index d5c42f19839a..887389056f31 100644
--- a/xmloff/source/forms/layerexport.cxx
+++ b/xmloff/source/forms/layerexport.cxx
@@ -566,7 +566,7 @@ namespace xmloff
if (xCurrentReference.is())
{
::rtl::OUString& sReferencedBy = m_aCurrentPageReferring->second[xCurrentReference];
- if (sReferencedBy.getLength())
+ if (!sReferencedBy.isEmpty())
// it's not the first _rxObject referring to the xCurrentReference
// -> separate the id
sReferencedBy += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(","));
@@ -642,7 +642,7 @@ namespace xmloff
if ( xColumnPropertiesMeta.is() && xColumnPropertiesMeta->hasPropertyByName( PROPERTY_FORMATKEY ) )
sColumnNumberStyle = getImmediateNumberStyle( xColumnProperties );
- if ( sColumnNumberStyle.getLength() )
+ if ( !sColumnNumberStyle.isEmpty() )
{ // the column indeed has a formatting
sal_Int32 nStyleMapIndex = m_xStyleExportMapper->getPropertySetMapper()->FindEntryIndex( CTF_FORMS_DATA_STYLE );
// TODO: move this to the ctor
diff --git a/xmloff/source/forms/layerimport.cxx b/xmloff/source/forms/layerimport.cxx
index c47ed0e93039..8a906e323fee 100644
--- a/xmloff/source/forms/layerimport.cxx
+++ b/xmloff/source/forms/layerimport.cxx
@@ -263,7 +263,7 @@ void OFormLayerXMLImport_Impl::setAutoStyleContext(SvXMLStylesContext* _pNewCont
//---------------------------------------------------------------------
void OFormLayerXMLImport_Impl::applyControlNumberStyle(const Reference< XPropertySet >& _rxControlModel, const ::rtl::OUString& _rControlNumerStyleName)
{
- OSL_ENSURE(_rxControlModel.is() && (0 != _rControlNumerStyleName.getLength()),
+ OSL_ENSURE(_rxControlModel.is() && (!_rControlNumerStyleName.isEmpty()),
"OFormLayerXMLImport_Impl::applyControlNumberStyle: invalid arguments (this will crash)!");
OSL_ENSURE(m_pAutoStyles, "OFormLayerXMLImport_Impl::applyControlNumberStyle: have no auto style context!");
@@ -315,7 +315,7 @@ void OFormLayerXMLImport_Impl::applyControlNumberStyle(const Reference< XPropert
//---------------------------------------------------------------------
void OFormLayerXMLImport_Impl::registerCellValueBinding( const Reference< XPropertySet >& _rxControlModel, const ::rtl::OUString& _rCellAddress )
{
- OSL_ENSURE( _rxControlModel.is() && _rCellAddress.getLength(),
+ OSL_ENSURE( _rxControlModel.is() && !_rCellAddress.isEmpty(),
"OFormLayerXMLImport_Impl::registerCellValueBinding: invalid arguments!" );
m_aCellValueBindings.push_back( ModelStringPair( _rxControlModel, _rCellAddress ) );
}
@@ -359,7 +359,7 @@ void OFormLayerXMLImport_Impl::registerXFormsSubmission(
//---------------------------------------------------------------------
void OFormLayerXMLImport_Impl::registerCellRangeListSource( const Reference< XPropertySet >& _rxControlModel, const ::rtl::OUString& _rCellRangeAddress )
{
- OSL_ENSURE( _rxControlModel.is() && _rCellRangeAddress.getLength(),
+ OSL_ENSURE( _rxControlModel.is() && !_rCellRangeAddress.isEmpty(),
"OFormLayerXMLImport_Impl::registerCellRangeListSource: invalid arguments!" );
m_aCellRangeListSources.push_back( ModelStringPair( _rxControlModel, _rCellRangeAddress ) );
}
@@ -395,7 +395,7 @@ void OFormLayerXMLImport_Impl::leaveEventContext()
void OFormLayerXMLImport_Impl::registerControlId(const Reference< XPropertySet >& _rxControl, const ::rtl::OUString& _rId)
{
OSL_ENSURE(m_aCurrentPageIds != m_aControlIds.end(), "OFormLayerXMLImport_Impl::registerControlId: no current page!");
- OSL_ENSURE(_rId.getLength(), "OFormLayerXMLImport_Impl::registerControlId: invalid (empty) control id!");
+ OSL_ENSURE(!_rId.isEmpty(), "OFormLayerXMLImport_Impl::registerControlId: invalid (empty) control id!");
OSL_ENSURE(m_aCurrentPageIds->second.end() == m_aCurrentPageIds->second.find(_rId), "OFormLayerXMLImport_Impl::registerControlId: control id already used!");
m_aCurrentPageIds->second[_rId] = _rxControl;
@@ -404,7 +404,7 @@ void OFormLayerXMLImport_Impl::registerControlId(const Reference< XPropertySet >
//---------------------------------------------------------------------
void OFormLayerXMLImport_Impl::registerControlReferences(const Reference< XPropertySet >& _rxControl, const ::rtl::OUString& _rReferringControls)
{
- OSL_ENSURE(_rReferringControls.getLength(), "OFormLayerXMLImport_Impl::registerControlReferences: invalid (empty) control id list!");
+ OSL_ENSURE(!_rReferringControls.isEmpty(), "OFormLayerXMLImport_Impl::registerControlReferences: invalid (empty) control id list!");
OSL_ENSURE(_rxControl.is(), "OFormLayerXMLImport_Impl::registerControlReferences: invalid (NULL) control!");
m_aControlReferences.push_back( ModelStringPair( _rxControl, _rReferringControls ) );
}
diff --git a/xmloff/source/forms/property_meta_data.cxx b/xmloff/source/forms/property_meta_data.cxx
index a45ddc97e7c0..8b0b260e74c3 100644
--- a/xmloff/source/forms/property_meta_data.cxx
+++ b/xmloff/source/forms/property_meta_data.cxx
@@ -92,7 +92,7 @@ namespace xmloff { namespace metadata
if ( s_propertyDescriptionsByName.empty() )
{
const PropertyDescription* desc = lcl_getPropertyMetaData();
- while ( desc->propertyName.getLength() != 0 )
+ while ( !desc->propertyName.isEmpty() )
{
s_propertyDescriptionsByName[ desc->propertyName ] = desc;
++desc;
@@ -112,7 +112,7 @@ namespace xmloff { namespace metadata
if ( s_indexedPropertyGroups.empty() )
{
const PropertyDescription* desc = lcl_getPropertyMetaData();
- while ( desc->propertyName.getLength() != 0 )
+ while ( !desc->propertyName.isEmpty() )
{
if ( desc->propertyGroup != NO_GROUP )
s_indexedPropertyGroups[ desc->propertyGroup ].push_back( desc );
@@ -133,7 +133,7 @@ namespace xmloff { namespace metadata
if ( s_reverseTokenLookup.empty() )
{
const PropertyDescription* desc = lcl_getPropertyMetaData();
- while ( desc->propertyName.getLength() != 0 )
+ while ( !desc->propertyName.isEmpty() )
{
s_reverseTokenLookup[ token::GetXMLToken( desc->attribute.attributeToken ) ] = desc->attribute.attributeToken;
++desc;
@@ -162,7 +162,7 @@ namespace xmloff { namespace metadata
if ( s_attributeGroups.empty() )
{
const PropertyDescription* desc = lcl_getPropertyMetaData();
- while ( desc->propertyName.getLength() != 0 )
+ while ( !desc->propertyName.isEmpty() )
{
if ( desc->propertyGroup != NO_GROUP )
s_attributeGroups.insert( AttributeGroups::value_type( desc->attribute, desc->propertyGroup ) );
@@ -183,7 +183,7 @@ namespace xmloff { namespace metadata
if ( s_attributesWithoutGroup.empty() )
{
const PropertyDescription* desc = lcl_getPropertyMetaData();
- while ( desc->propertyName.getLength() != 0 )
+ while ( !desc->propertyName.isEmpty() )
{
if ( desc->propertyGroup == NO_GROUP )
{
diff --git a/xmloff/source/forms/propertyexport.cxx b/xmloff/source/forms/propertyexport.cxx
index e01220a20cfc..ecd9276ffc90 100644
--- a/xmloff/source/forms/propertyexport.cxx
+++ b/xmloff/source/forms/propertyexport.cxx
@@ -280,7 +280,7 @@ namespace xmloff
m_xProps->getPropertyValue( _rPropertyName ) >>= sPropValue;
// add the attribute
- if ( sPropValue.getLength() )
+ if ( !sPropValue.isEmpty() )
AddAttribute( _nNamespaceKey, _pAttributeName, sPropValue );
// the property does not need to be handled anymore
@@ -432,7 +432,7 @@ namespace xmloff
DBG_CHECK_PROPERTY( _sPropertyName, ::rtl::OUString );
::rtl::OUString sTargetLocation = comphelper::getString(m_xProps->getPropertyValue(_sPropertyName));
- if ( sTargetLocation.getLength() )
+ if ( !sTargetLocation.isEmpty() )
// If this isn't a GraphicObject then GetRelativeReference
// will be called anyway ( in AddEmbeddedGraphic )
sTargetLocation = m_rContext.getGlobalContext().AddEmbeddedGraphicObject(sTargetLocation);
@@ -486,7 +486,7 @@ namespace xmloff
return;
::rtl::OUString sValue = implConvertAny(aCurrentValue);
- if (!sValue.getLength() && (TypeClass_STRING == aCurrentValue.getValueTypeClass()))
+ if (sValue.isEmpty() && (TypeClass_STRING == aCurrentValue.getValueTypeClass()))
{
// check whether or not the property is allowed to be VOID
Property aProperty = m_xPropertyInfo->getPropertyByName(sPropertyName);
@@ -516,7 +516,7 @@ namespace xmloff
// unfortunately the OUString can't append single sal_Unicode characters ...
const ::rtl::OUString sQuote(&_aQuoteCharacter, 1);
const ::rtl::OUString sSeparator(&_aListSeparator, 1);
- const sal_Bool bQuote = 0 != sQuote.getLength();
+ const sal_Bool bQuote = !sQuote.isEmpty();
// concatenate the string items
const ::rtl::OUString* pItems = aItems.getConstArray();
@@ -542,7 +542,7 @@ namespace xmloff
sFinalList += sSeparator;
}
- if (sFinalList.getLength())
+ if (!sFinalList.isEmpty())
AddAttribute(_nAttributeNamespaceKey, _pAttributeName, sFinalList);
exportedProperty( _rPropertyName );
@@ -658,7 +658,7 @@ namespace xmloff
//---------------------------------------------------------------------
void OPropertyExport::AddAttribute(sal_uInt16 _nPrefix, const sal_Char* _pName, const ::rtl::OUString& _rValue)
{
- OSL_ENSURE(0 == m_rContext.getGlobalContext().GetXAttrList()->getValueByName(::rtl::OUString::createFromAscii(_pName)).getLength(),
+ OSL_ENSURE(m_rContext.getGlobalContext().GetXAttrList()->getValueByName(::rtl::OUString::createFromAscii(_pName)).isEmpty(),
"OPropertyExport::AddAttribute: already have such an attribute");
m_rContext.getGlobalContext().AddAttribute(_nPrefix, _pName, _rValue);
@@ -667,7 +667,7 @@ namespace xmloff
//---------------------------------------------------------------------
void OPropertyExport::AddAttribute( sal_uInt16 _nPrefix, const ::rtl::OUString& _rName, const ::rtl::OUString& _rValue )
{
- OSL_ENSURE(0 == m_rContext.getGlobalContext().GetXAttrList()->getValueByName( _rName ).getLength(),
+ OSL_ENSURE(m_rContext.getGlobalContext().GetXAttrList()->getValueByName( _rName ).isEmpty(),
"OPropertyExport::AddAttribute: already have such an attribute");
m_rContext.getGlobalContext().AddAttribute( _nPrefix, _rName, _rValue );
@@ -676,7 +676,7 @@ namespace xmloff
//---------------------------------------------------------------------
void OPropertyExport::AddAttributeASCII(sal_uInt16 _nPrefix, const sal_Char* _pName, const sal_Char *pValue)
{
- OSL_ENSURE(0 == m_rContext.getGlobalContext().GetXAttrList()->getValueByName(::rtl::OUString::createFromAscii(_pName)).getLength(),
+ OSL_ENSURE(m_rContext.getGlobalContext().GetXAttrList()->getValueByName(::rtl::OUString::createFromAscii(_pName)).isEmpty(),
"OPropertyExport::AddAttributeASCII: already have such an attribute");
m_rContext.getGlobalContext().AddAttributeASCII(_nPrefix, _pName, pValue);
@@ -685,7 +685,7 @@ namespace xmloff
//---------------------------------------------------------------------
void OPropertyExport::AddAttribute(sal_uInt16 _nPrefix, ::xmloff::token::XMLTokenEnum _eName, const ::rtl::OUString& _rValue)
{
- OSL_ENSURE(0 == m_rContext.getGlobalContext().GetXAttrList()->getValueByName(::xmloff::token::GetXMLToken(_eName)).getLength(),
+ OSL_ENSURE(m_rContext.getGlobalContext().GetXAttrList()->getValueByName(::xmloff::token::GetXMLToken(_eName)).isEmpty(),
"OPropertyExport::AddAttribute: already have such an attribute");
m_rContext.getGlobalContext().AddAttribute(_nPrefix, _eName, _rValue);
@@ -694,7 +694,7 @@ namespace xmloff
//---------------------------------------------------------------------
void OPropertyExport::AddAttribute(sal_uInt16 _nPrefix, ::xmloff::token::XMLTokenEnum _eName, ::xmloff::token::XMLTokenEnum _eValue )
{
- OSL_ENSURE(0 == m_rContext.getGlobalContext().GetXAttrList()->getValueByName(::xmloff::token::GetXMLToken(_eName)).getLength(),
+ OSL_ENSURE(m_rContext.getGlobalContext().GetXAttrList()->getValueByName(::xmloff::token::GetXMLToken(_eName)).isEmpty(),
"OPropertyExport::AddAttribute: already have such an attribute");
m_rContext.getGlobalContext().AddAttribute(_nPrefix, _eName, _eValue);
diff --git a/xmloff/source/forms/propertyimport.cxx b/xmloff/source/forms/propertyimport.cxx
index 8d8734686bcc..632f691a43cc 100644
--- a/xmloff/source/forms/propertyimport.cxx
+++ b/xmloff/source/forms/propertyimport.cxx
@@ -347,7 +347,7 @@ _rChars
)
{
// ignore them (should be whitespaces only)
- OSL_ENSURE(0 == _rChars.trim().getLength(), "OPropertyImport::Characters: non-whitespace characters!");
+ OSL_ENSURE(_rChars.trim().isEmpty(), "OPropertyImport::Characters: non-whitespace characters!");
}
//---------------------------------------------------------------------
@@ -488,7 +488,7 @@ void OSinglePropertyContext::StartElement(const Reference< XAttributeList >& _rx
}
// the name of the property
- OSL_ENSURE(aPropValue.Name.getLength(), "OSinglePropertyContext::StartElement: invalid property name!");
+ OSL_ENSURE(!aPropValue.Name.isEmpty(), "OSinglePropertyContext::StartElement: invalid property name!");
// needs to be translated into a ::com::sun::star::uno::Type
aPropType = PropertyConversion::xmlTypeToUnoType( sType );
@@ -504,7 +504,7 @@ void OSinglePropertyContext::StartElement(const Reference< XAttributeList >& _rx
}
// now that we finally have our property value, add it to our parent object
- if( aPropValue.Name.getLength() )
+ if( !aPropValue.Name.isEmpty() )
m_xPropertyImporter->implPushBackGenericPropertyValue(aPropValue);
}
@@ -554,10 +554,10 @@ void OListPropertyContext::StartElement( const Reference< XAttributeList >& _rxA
//---------------------------------------------------------------------
void OListPropertyContext::EndElement()
{
- OSL_ENSURE( m_sPropertyName.getLength() && m_sPropertyType.getLength(),
+ OSL_ENSURE( !m_sPropertyName.isEmpty() && !m_sPropertyType.isEmpty(),
"OListPropertyContext::EndElement: no property name or type!" );
- if ( !m_sPropertyName.getLength() || !m_sPropertyType.getLength() )
+ if ( m_sPropertyName.isEmpty() || m_sPropertyType.isEmpty() )
return;
Sequence< Any > aListElements( m_aListValues.size() );
diff --git a/xmloff/source/meta/xmlmetae.cxx b/xmloff/source/meta/xmlmetae.cxx
index d7fdbf3f83dd..8a6a850cdee2 100644
--- a/xmloff/source/meta/xmlmetae.cxx
+++ b/xmloff/source/meta/xmlmetae.cxx
@@ -90,7 +90,7 @@ SvXMLMetaExport::GetISODateTimeString( const util::DateTime& rDateTime )
void SvXMLMetaExport::SimpleStringElement( const rtl::OUString& rText,
sal_uInt16 nNamespace, enum XMLTokenEnum eElementName )
{
- if ( rText.getLength() ) {
+ if ( !rText.isEmpty() ) {
SvXMLElementExport aElem( mrExport, nNamespace, eElementName,
sal_True, sal_False );
mrExport.Characters( rText );
@@ -102,7 +102,7 @@ void SvXMLMetaExport::SimpleDateTimeElement( const util::DateTime & rDate,
{
if (rDate.Month != 0) { // invalid dates are 0-0-0
rtl::OUString sValue = GetISODateTimeString( rDate );
- if ( sValue.getLength() ) {
+ if ( !sValue.isEmpty() ) {
SvXMLElementExport aElem( mrExport, nNamespace, eElementName,
sal_True, sal_False );
mrExport.Characters( sValue );
@@ -161,8 +161,8 @@ void SvXMLMetaExport::_MExport()
{
const lang::Locale aLocale = mxDocProps->getLanguage();
::rtl::OUString sValue = aLocale.Language;
- if (sValue.getLength()) {
- if ( aLocale.Country.getLength() )
+ if (!sValue.isEmpty()) {
+ if ( !aLocale.Country.isEmpty() )
{
sValue += rtl::OUString::valueOf((sal_Unicode)'-');
sValue += aLocale.Country;
@@ -197,7 +197,7 @@ void SvXMLMetaExport::_MExport()
// default target
const ::rtl::OUString sDefTarget = mxDocProps->getDefaultTarget();
- if ( sDefTarget.getLength() )
+ if ( !sDefTarget.isEmpty() )
{
mrExport.AddAttribute( XML_NAMESPACE_OFFICE, XML_TARGET_FRAME_NAME,
sDefTarget );
@@ -216,7 +216,7 @@ void SvXMLMetaExport::_MExport()
// auto-reload
const ::rtl::OUString sReloadURL = mxDocProps->getAutoloadURL();
const sal_Int32 sReloadDelay = mxDocProps->getAutoloadSecs();
- if (sReloadDelay != 0 || sReloadURL.getLength() != 0)
+ if (sReloadDelay != 0 || !sReloadURL.isEmpty())
{
mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_HREF,
mrExport.GetRelativeReference( sReloadURL ) );
@@ -233,7 +233,7 @@ void SvXMLMetaExport::_MExport()
// template
const rtl::OUString sTplPath = mxDocProps->getTemplateURL();
- if ( sTplPath.getLength() )
+ if ( !sTplPath.isEmpty() )
{
mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE );
mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_ACTUATE, XML_ONREQUEST );
diff --git a/xmloff/source/meta/xmlmetai.cxx b/xmloff/source/meta/xmlmetai.cxx
index 70e9712ccaa8..64a7f5883407 100644
--- a/xmloff/source/meta/xmlmetai.cxx
+++ b/xmloff/source/meta/xmlmetai.cxx
@@ -280,7 +280,7 @@ void SvXMLMetaDocumentContext::setBuildId(::rtl::OUString const& i_rBuildId, con
}
}
- if ( sBuildId.getLength() == 0 )
+ if ( sBuildId.isEmpty() )
{
if ((i_rBuildId.compareToAscii(
RTL_CONSTASCII_STRINGPARAM("StarOffice 7") ) == 0) ||
@@ -297,7 +297,7 @@ void SvXMLMetaDocumentContext::setBuildId(::rtl::OUString const& i_rBuildId, con
}
}
- if ( sBuildId.getLength() ) try
+ if ( !sBuildId.isEmpty() ) try
{
if( xImportInfo.is() )
{
diff --git a/xmloff/source/meta/xmlversion.cxx b/xmloff/source/meta/xmlversion.cxx
index fe01b41e8466..0610e7a7edbb 100644
--- a/xmloff/source/meta/xmlversion.cxx
+++ b/xmloff/source/meta/xmlversion.cxx
@@ -275,7 +275,7 @@ sal_Bool XMLVersionContext::ParseISODateTimeString(
nDateTokens++;
pStr++;
}
- if ( nDateTokens > 3 || aDateStr.getLength() == 0 )
+ if ( nDateTokens > 3 || aDateStr.isEmpty() )
bSuccess = sal_False;
else
{
@@ -297,7 +297,7 @@ sal_Bool XMLVersionContext::ParseISODateTimeString(
}
}
- if ( bSuccess && aTimeStr.getLength() > 0 ) // time is optional
+ if ( bSuccess && !aTimeStr.isEmpty() ) // time is optional
{
pStr = aTimeStr.getStr();
sal_Int32 nTimeTokens = 1;
diff --git a/xmloff/source/script/XMLStarBasicExportHandler.cxx b/xmloff/source/script/XMLStarBasicExportHandler.cxx
index 942314b3a5ee..d26cf5236a26 100644
--- a/xmloff/source/script/XMLStarBasicExportHandler.cxx
+++ b/xmloff/source/script/XMLStarBasicExportHandler.cxx
@@ -87,7 +87,7 @@ void XMLStarBasicExportHandler::Export(
// else: disregard
}
- if( sLocation.getLength() )
+ if( !sLocation.isEmpty() )
{
OUStringBuffer sTmp( sLocation.getLength() + sName.getLength() + 1 );
sTmp = sLocation;
diff --git a/xmloff/source/script/xmlbasici.cxx b/xmloff/source/script/xmlbasici.cxx
index 4ad0e9540af3..fc28c549a8ec 100644
--- a/xmloff/source/script/xmlbasici.cxx
+++ b/xmloff/source/script/xmlbasici.cxx
@@ -103,7 +103,7 @@ void XMLBasicImportContext::StartElement(
while ( nPos != USHRT_MAX )
{
::rtl::OUString aAttrName( rNamespaceMap.GetAttrNameByKey( nPos ) );
- if ( xAttrList->getValueByName( aAttrName ).getLength() == 0 )
+ if ( xAttrList->getValueByName( aAttrName ).isEmpty() )
pAttrList->AddAttribute( aAttrName, rNamespaceMap.GetNameByKey( nPos ) );
nPos = rNamespaceMap.GetNextKey( nPos );
}
diff --git a/xmloff/source/style/DashStyle.cxx b/xmloff/source/style/DashStyle.cxx
index f38e9dcaffdc..b2f24d6b9d3e 100644
--- a/xmloff/source/style/DashStyle.cxx
+++ b/xmloff/source/style/DashStyle.cxx
@@ -211,7 +211,7 @@ sal_Bool XMLDashStyleImport::importXML(
rValue <<= aLineDash;
- if( aDisplayName.getLength() )
+ if( !aDisplayName.isEmpty() )
{
rImport.AddStyleDisplayName( XML_STYLE_FAMILY_SD_STROKE_DASH_ID,
rStrName, aDisplayName );
@@ -245,7 +245,7 @@ sal_Bool XMLDashStyleExport::exportXML(
drawing::LineDash aLineDash;
- if( rStrName.getLength() )
+ if( !rStrName.isEmpty() )
{
if( rValue >>= aLineDash )
{
diff --git a/xmloff/source/style/FillStyleContext.cxx b/xmloff/source/style/FillStyleContext.cxx
index 9f1947ac992a..03f54e5328c3 100644
--- a/xmloff/source/style/FillStyleContext.cxx
+++ b/xmloff/source/style/FillStyleContext.cxx
@@ -164,7 +164,7 @@ SvXMLImportContext* XMLBitmapStyleContext::CreateChildContext( sal_uInt16 nPrefi
{
OUString sURL;
maAny >>= sURL;
- if( !sURL.getLength() && !mxBase64Stream.is() )
+ if( sURL.isEmpty() && !mxBase64Stream.is() )
{
mxBase64Stream = GetImport().GetStreamForGraphicObjectURLFromBase64();
if( mxBase64Stream.is() )
@@ -186,7 +186,7 @@ void XMLBitmapStyleContext::EndElement()
OUString sURL;
maAny >>= sURL;
- if( !sURL.getLength() && mxBase64Stream.is() )
+ if( sURL.isEmpty() && mxBase64Stream.is() )
{
sURL = GetImport().ResolveGraphicObjectURLFromBase64( mxBase64Stream );
mxBase64Stream = 0;
diff --git a/xmloff/source/style/GradientStyle.cxx b/xmloff/source/style/GradientStyle.cxx
index deb08203fb6d..0c347f4e85e6 100644
--- a/xmloff/source/style/GradientStyle.cxx
+++ b/xmloff/source/style/GradientStyle.cxx
@@ -215,7 +215,7 @@ sal_Bool XMLGradientStyleImport::importXML(
rValue <<= aGradient;
- if( aDisplayName.getLength() )
+ if( !aDisplayName.isEmpty() )
{
rImport.AddStyleDisplayName( XML_STYLE_FAMILY_SD_GRADIENT_ID, rStrName,
aDisplayName );
@@ -251,7 +251,7 @@ sal_Bool XMLGradientStyleExport::exportXML(
sal_Bool bRet = sal_False;
awt::Gradient aGradient;
- if( rStrName.getLength() )
+ if( !rStrName.isEmpty() )
{
if( rValue >>= aGradient )
{
diff --git a/xmloff/source/style/HatchStyle.cxx b/xmloff/source/style/HatchStyle.cxx
index ea8e51b3ed22..e7b94d78a708 100644
--- a/xmloff/source/style/HatchStyle.cxx
+++ b/xmloff/source/style/HatchStyle.cxx
@@ -172,7 +172,7 @@ sal_Bool XMLHatchStyleImport::importXML(
rValue <<= aHatch;
- if( aDisplayName.getLength() )
+ if( !aDisplayName.isEmpty() )
{
rImport.AddStyleDisplayName( XML_STYLE_FAMILY_SD_HATCH_ID, rStrName,
aDisplayName );
@@ -207,7 +207,7 @@ sal_Bool XMLHatchStyleExport::exportXML(
sal_Bool bRet = sal_False;
drawing::Hatch aHatch;
- if( rStrName.getLength() )
+ if( !rStrName.isEmpty() )
{
if( rValue >>= aHatch )
{
diff --git a/xmloff/source/style/ImageStyle.cxx b/xmloff/source/style/ImageStyle.cxx
index 4bea489aef25..29b9d5222cb3 100644
--- a/xmloff/source/style/ImageStyle.cxx
+++ b/xmloff/source/style/ImageStyle.cxx
@@ -77,7 +77,7 @@ sal_Bool XMLImageStyle::ImpExportXML( const OUString& rStrName, const uno::Any&
OUString sImageURL;
- if( rStrName.getLength() )
+ if( !rStrName.isEmpty() )
{
if( rValue >>= sImageURL )
{
@@ -95,7 +95,7 @@ sal_Bool XMLImageStyle::ImpExportXML( const OUString& rStrName, const uno::Any&
// uri
const OUString aStr( rExport.AddEmbeddedGraphicObject( sImageURL ) );
- if( aStr.getLength() )
+ if( !aStr.isEmpty() )
{
rExport.AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, aStr );
rExport.AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE );
@@ -106,7 +106,7 @@ sal_Bool XMLImageStyle::ImpExportXML( const OUString& rStrName, const uno::Any&
// Do Write
SvXMLElementExport aElem( rExport, XML_NAMESPACE_DRAW, XML_FILL_IMAGE, sal_True, sal_True );
- if( sImageURL.getLength() )
+ if( !sImageURL.isEmpty() )
{
// optional office:binary-data
rExport.AddEmbeddedGraphicObjectAsBase64( sImageURL );
@@ -190,7 +190,7 @@ sal_Bool XMLImageStyle::ImpImportXML( const uno::Reference< xml::sax::XAttribute
rValue <<= aStrURL;
- if( aDisplayName.getLength() )
+ if( !aDisplayName.isEmpty() )
{
rImport.AddStyleDisplayName( XML_STYLE_FAMILY_SD_FILL_IMAGE_ID,
rStrName, aDisplayName );
diff --git a/xmloff/source/style/MarkerStyle.cxx b/xmloff/source/style/MarkerStyle.cxx
index ff806f77e371..05a57e6ef093 100644
--- a/xmloff/source/style/MarkerStyle.cxx
+++ b/xmloff/source/style/MarkerStyle.cxx
@@ -143,7 +143,7 @@ sal_Bool XMLMarkerStyleImport::importXML(
rValue <<= aSourcePolyPolygon;
}
- if( aDisplayName.getLength() )
+ if( !aDisplayName.isEmpty() )
{
rImport.AddStyleDisplayName( XML_STYLE_FAMILY_SD_MARKER_ID, rStrName,
aDisplayName );
@@ -178,7 +178,7 @@ sal_Bool XMLMarkerStyleExport::exportXML(
{
sal_Bool bRet(sal_False);
- if(rStrName.getLength())
+ if(!rStrName.isEmpty())
{
drawing::PolyPolygonBezierCoords aBezier;
diff --git a/xmloff/source/style/PageMasterImportContext.cxx b/xmloff/source/style/PageMasterImportContext.cxx
index cdb0052b3859..cc7fdb23fdb0 100644
--- a/xmloff/source/style/PageMasterImportContext.cxx
+++ b/xmloff/source/style/PageMasterImportContext.cxx
@@ -168,7 +168,7 @@ void PageStyleContext::FillPropertySet(
const uno::Reference<beans::XPropertySet > & rPropSet )
{
XMLPropStyleContext::FillPropertySet(rPropSet);
- if (sPageUsage.getLength())
+ if (!sPageUsage.isEmpty())
{
uno::Any aPageUsage;
XMLPMPropHdl_PageStyleLayout aPageUsageHdl;
diff --git a/xmloff/source/style/PageMasterPropHdl.cxx b/xmloff/source/style/PageMasterPropHdl.cxx
index 80d399f527a1..be7e5a0c13e9 100644
--- a/xmloff/source/style/PageMasterPropHdl.cxx
+++ b/xmloff/source/style/PageMasterPropHdl.cxx
@@ -233,7 +233,7 @@ sal_Bool XMLPMPropHdl_NumLetterSync::exportXML(
OUStringBuffer aBuffer( 5 );
rUnitConverter.convertNumLetterSync( aBuffer, nNumType );
rStrExpValue = aBuffer.makeStringAndClear();
- bRet = rStrExpValue.getLength() > 0;
+ bRet = !rStrExpValue.isEmpty();
}
return bRet;
}
@@ -333,7 +333,7 @@ sal_Bool XMLPMPropHdl_Print::exportXML(
{
if( getBOOL( rValue ) )
{
- if( rStrExpValue.getLength() )
+ if( !rStrExpValue.isEmpty() )
rStrExpValue += OUString( RTL_CONSTASCII_USTRINGPARAM( " " ) );
rStrExpValue += sAttrValue;
}
@@ -355,7 +355,7 @@ sal_Bool XMLPMPropHdl_CenterHorizontal::importXML(
{
sal_Bool bRet = sal_False;
- if (rStrImpValue.getLength())
+ if (!rStrImpValue.isEmpty())
if (IsXMLToken( rStrImpValue, XML_BOTH) ||
IsXMLToken( rStrImpValue, XML_HORIZONTAL))
{
@@ -377,7 +377,7 @@ sal_Bool XMLPMPropHdl_CenterHorizontal::exportXML(
if ( ::cppu::any2bool( rValue ) )
{
bRet = sal_True;
- if (rStrExpValue.getLength())
+ if (!rStrExpValue.isEmpty())
rStrExpValue = GetXMLToken(XML_BOTH);
else
rStrExpValue = GetXMLToken(XML_HORIZONTAL);
@@ -397,7 +397,7 @@ sal_Bool XMLPMPropHdl_CenterVertical::importXML(
{
sal_Bool bRet = sal_False;
- if (rStrImpValue.getLength())
+ if (!rStrImpValue.isEmpty())
if (IsXMLToken(rStrImpValue, XML_BOTH) ||
IsXMLToken(rStrImpValue, XML_VERTICAL) )
{
@@ -418,7 +418,7 @@ sal_Bool XMLPMPropHdl_CenterVertical::exportXML(
if ( ::cppu::any2bool( rValue ) )
{
bRet = sal_True;
- if (rStrExpValue.getLength())
+ if (!rStrExpValue.isEmpty())
rStrExpValue = GetXMLToken(XML_BOTH);
else
rStrExpValue = GetXMLToken(XML_VERTICAL);
diff --git a/xmloff/source/style/TransGradientStyle.cxx b/xmloff/source/style/TransGradientStyle.cxx
index 967d5a71afce..aea7cd3793c3 100644
--- a/xmloff/source/style/TransGradientStyle.cxx
+++ b/xmloff/source/style/TransGradientStyle.cxx
@@ -213,7 +213,7 @@ sal_Bool XMLTransGradientStyleImport::importXML(
rValue <<= aGradient;
- if( aDisplayName.getLength() )
+ if( !aDisplayName.isEmpty() )
{
rImport.AddStyleDisplayName( XML_STYLE_FAMILY_SD_GRADIENT_ID, rStrName,
aDisplayName );
@@ -249,7 +249,7 @@ sal_Bool XMLTransGradientStyleExport::exportXML(
sal_Bool bRet = sal_False;
awt::Gradient aGradient;
- if( rStrName.getLength() )
+ if( !rStrName.isEmpty() )
{
if( rValue >>= aGradient )
{
diff --git a/xmloff/source/style/XMLBackgroundImageContext.cxx b/xmloff/source/style/XMLBackgroundImageContext.cxx
index a8a5e0bb4baa..3c466000bd3c 100644
--- a/xmloff/source/style/XMLBackgroundImageContext.cxx
+++ b/xmloff/source/style/XMLBackgroundImageContext.cxx
@@ -367,7 +367,7 @@ SvXMLImportContext *XMLBackgroundImageContext::CreateChildContext(
xmloff::token::IsXMLToken( rLocalName,
xmloff::token::XML_BINARY_DATA ) )
{
- if( !sURL.getLength() && !xBase64Stream.is() )
+ if( sURL.isEmpty() && !xBase64Stream.is() )
{
xBase64Stream = GetImport().GetStreamForGraphicObjectURLFromBase64();
if( xBase64Stream.is() )
@@ -386,7 +386,7 @@ SvXMLImportContext *XMLBackgroundImageContext::CreateChildContext(
void XMLBackgroundImageContext::EndElement()
{
- if( sURL.getLength() )
+ if( !sURL.isEmpty() )
{
sURL = GetImport().ResolveGraphicObjectURL( sURL, sal_False );
}
@@ -396,7 +396,7 @@ void XMLBackgroundImageContext::EndElement()
xBase64Stream = 0;
}
- if( !sURL.getLength() )
+ if( sURL.isEmpty() )
ePos = GraphicLocation_NONE;
else if( GraphicLocation_NONE == ePos )
ePos = GraphicLocation_TILED;
diff --git a/xmloff/source/style/XMLBackgroundImageExport.cxx b/xmloff/source/style/XMLBackgroundImageExport.cxx
index 5465098cd78b..0db36cab8147 100644
--- a/xmloff/source/style/XMLBackgroundImageExport.cxx
+++ b/xmloff/source/style/XMLBackgroundImageExport.cxx
@@ -67,10 +67,10 @@ void XMLBackgroundImageExport::exportXML( const Any& rURL,
OUString sURL;
rURL >>= sURL;
- if( sURL.getLength() && GraphicLocation_NONE != ePos )
+ if( !sURL.isEmpty() && GraphicLocation_NONE != ePos )
{
OUString sTempURL( GetExport().AddEmbeddedGraphicObject( sURL ) );
- if( sTempURL.getLength() )
+ if( !sTempURL.isEmpty() )
{
GetExport().AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, sTempURL );
GetExport().AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE,
@@ -146,7 +146,7 @@ void XMLBackgroundImageExport::exportXML( const Any& rURL,
{
OUString sFilter;
(*pFilter) >>= sFilter;
- if( sFilter.getLength() )
+ if( !sFilter.isEmpty() )
GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_FILTER_NAME,
sFilter );
}
@@ -166,7 +166,7 @@ void XMLBackgroundImageExport::exportXML( const Any& rURL,
{
SvXMLElementExport aElem( GetExport(), nPrefix, rLocalName, sal_True, sal_True );
- if( sURL.getLength() && GraphicLocation_NONE != ePos )
+ if( !sURL.isEmpty() && GraphicLocation_NONE != ePos )
{
// optional office:binary-data
GetExport().AddEmbeddedGraphicObjectAsBase64( sURL );
diff --git a/xmloff/source/style/XMLFontAutoStylePool.cxx b/xmloff/source/style/XMLFontAutoStylePool.cxx
index 68b87d0925f8..e5e3323e8e7c 100644
--- a/xmloff/source/style/XMLFontAutoStylePool.cxx
+++ b/xmloff/source/style/XMLFontAutoStylePool.cxx
@@ -189,7 +189,7 @@ OUString XMLFontAutoStylePool::Add(
sName.trim();
}
- if( !sName.getLength() )
+ if( sName.isEmpty() )
sName = OUString::valueOf( sal_Unicode( 'F' ) );
if( pNames->Seek_Entry( &sName, 0 ) )
@@ -261,7 +261,7 @@ void XMLFontAutoStylePool::exportXML()
XML_FONT_FAMILY, sTmp );
const OUString& rStyleName = pEntry->GetStyleName();
- if( rStyleName.getLength() )
+ if( !rStyleName.isEmpty() )
GetExport().AddAttribute( XML_NAMESPACE_STYLE,
XML_FONT_ADORNMENTS,
rStyleName );
diff --git a/xmloff/source/style/XMLPageExport.cxx b/xmloff/source/style/XMLPageExport.cxx
index 41eccc2e25ed..d98d8d7bdc85 100644
--- a/xmloff/source/style/XMLPageExport.cxx
+++ b/xmloff/source/style/XMLPageExport.cxx
@@ -82,7 +82,7 @@ void XMLPageExport::collectPageMasterAutoStyle(
{
OUString sParent;
rPageMasterName = rExport.GetAutoStylePool()->Find( XML_STYLE_FAMILY_PAGE_MASTER, sParent, xPropStates );
- if (!rPageMasterName.getLength())
+ if (rPageMasterName.isEmpty())
rPageMasterName = rExport.GetAutoStylePool()->Add(XML_STYLE_FAMILY_PAGE_MASTER, sParent, xPropStates);
}
}
@@ -141,7 +141,7 @@ sal_Bool XMLPageExport::exportStyle(
OUString sNextName;
xPropSet->getPropertyValue( sFollowStyle ) >>= sNextName;
- if( sName != sNextName && sNextName.getLength() )
+ if( sName != sNextName && !sNextName.isEmpty() )
{
GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_NEXT_STYLE_NAME,
GetExport().EncodeStyleName( sNextName ) );
diff --git a/xmloff/source/style/bordrhdl.cxx b/xmloff/source/style/bordrhdl.cxx
index ab6acfd3b3c6..385f82447951 100644
--- a/xmloff/source/style/bordrhdl.cxx
+++ b/xmloff/source/style/bordrhdl.cxx
@@ -220,7 +220,7 @@ sal_Bool XMLBorderHdl::importXML( const OUString& rStrImpValue, uno::Any& rValue
sal_Int32 nColor = 0;
sal_Int32 nTemp;
- while( aTokens.getNextToken( aToken ) && aToken.getLength() != 0 )
+ while( aTokens.getNextToken( aToken ) && !aToken.isEmpty() )
{
if( !bHasWidth &&
rUnitConverter.convertEnum( nNamedWidth, aToken,
diff --git a/xmloff/source/style/cdouthdl.cxx b/xmloff/source/style/cdouthdl.cxx
index 347ef8dc5180..bf98639bf128 100644
--- a/xmloff/source/style/cdouthdl.cxx
+++ b/xmloff/source/style/cdouthdl.cxx
@@ -298,7 +298,7 @@ sal_Bool XMLCrossedOutTextPropHdl::importXML( const OUString& rStrImpValue, uno:
{
sal_Bool bRet = sal_False;
- if( rStrImpValue.getLength() )
+ if( !rStrImpValue.isEmpty() )
{
sal_Int16 eStrikeout = ('/' == rStrImpValue[0]
? FontStrikeout::SLASH
diff --git a/xmloff/source/style/chrhghdl.cxx b/xmloff/source/style/chrhghdl.cxx
index 584acf928064..8b8f842ec7f7 100644
--- a/xmloff/source/style/chrhghdl.cxx
+++ b/xmloff/source/style/chrhghdl.cxx
@@ -89,7 +89,7 @@ sal_Bool XMLCharHeightHdl::exportXML( OUString& rStrExpValue, const uno::Any& rV
}
rStrExpValue = aOut.makeStringAndClear();
- return rStrExpValue.getLength() != 0;
+ return !rStrExpValue.isEmpty();
}
///////////////////////////////////////////////////////////////////////////////
@@ -128,7 +128,7 @@ sal_Bool XMLCharHeightPropHdl::exportXML( OUString& rStrExpValue, const uno::Any
}
rStrExpValue = aOut.makeStringAndClear();
- return rStrExpValue.getLength() != 0;
+ return !rStrExpValue.isEmpty();
}
///////////////////////////////////////////////////////////////////////////////
@@ -167,7 +167,7 @@ sal_Bool XMLCharHeightDiffHdl::exportXML( OUString& rStrExpValue, const uno::Any
rStrExpValue = aOut.makeStringAndClear();
}
- return rStrExpValue.getLength() != 0;
+ return !rStrExpValue.isEmpty();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/style/chrlohdl.cxx b/xmloff/source/style/chrlohdl.cxx
index 33b3dfafe872..36710a7df1d8 100644
--- a/xmloff/source/style/chrlohdl.cxx
+++ b/xmloff/source/style/chrlohdl.cxx
@@ -88,7 +88,7 @@ sal_Bool XMLCharLanguageHdl::exportXML( OUString& rStrExpValue, const uno::Any&
rStrExpValue = aLocale.Language;
- if( !rStrExpValue.getLength() )
+ if( rStrExpValue.isEmpty() )
rStrExpValue = GetXMLToken( XML_NONE );
return sal_True;
@@ -136,7 +136,7 @@ sal_Bool XMLCharCountryHdl::exportXML( OUString& rStrExpValue, const uno::Any& r
rStrExpValue = aLocale.Country;
- if( !rStrExpValue.getLength() )
+ if( rStrExpValue.isEmpty() )
rStrExpValue = GetXMLToken( XML_NONE );
return sal_True;
diff --git a/xmloff/source/style/csmaphdl.cxx b/xmloff/source/style/csmaphdl.cxx
index b877e106ce4f..e6bda045a0be 100644
--- a/xmloff/source/style/csmaphdl.cxx
+++ b/xmloff/source/style/csmaphdl.cxx
@@ -133,7 +133,7 @@ sal_Bool XMLCaseMapVariantHdl::exportXML( OUString& rStrExpValue, const uno::Any
}
rStrExpValue = aOut.makeStringAndClear();
- return rStrExpValue.getLength() != 0;
+ return !rStrExpValue.isEmpty();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */