summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Hallot <olivier.hallot@alta.org.br>2012-01-25 17:00:07 -0200
committerOlivier Hallot <olivier.hallot@alta.org.br>2012-01-25 19:30:07 -0200
commit4228c5542b57b43064bbefb3cc79c4eb51e059d6 (patch)
treeddf65f77ca447f2063e958002aeacb6a4f320912
parent3e82bf0e5e6a1d5dcbe6b7ebbbe124912e8e8700 (diff)
Fix for fdo43460 Part XLVII getLength() to isEmpty()
Part XLVII Modules xmloff (part 1)
-rw-r--r--xmloff/source/chart/PropertyMaps.cxx6
-rw-r--r--xmloff/source/chart/SchXMLAutoStylePoolP.cxx2
-rw-r--r--xmloff/source/chart/SchXMLAxisContext.cxx8
-rw-r--r--xmloff/source/chart/SchXMLChartContext.cxx31
-rw-r--r--xmloff/source/chart/SchXMLExport.cxx53
-rw-r--r--xmloff/source/chart/SchXMLPlotAreaContext.cxx18
-rw-r--r--xmloff/source/chart/SchXMLSeries2Context.cxx31
-rw-r--r--xmloff/source/chart/SchXMLTableContext.cxx14
-rw-r--r--xmloff/source/chart/SchXMLTools.cxx14
-rw-r--r--xmloff/source/chart/XMLAxisPositionPropertyHdl.cxx2
-rw-r--r--xmloff/source/chart/XMLChartStyleContext.cxx2
-rw-r--r--xmloff/source/chart/XMLLabelSeparatorContext.cxx2
-rw-r--r--xmloff/source/chart/XMLSymbolImageContext.cxx6
-rw-r--r--xmloff/source/core/DocumentSettingsContext.cxx4
-rw-r--r--xmloff/source/core/DomExport.cxx2
-rw-r--r--xmloff/source/core/RDFaExportHelper.cxx6
-rw-r--r--xmloff/source/core/RDFaImportHelper.cxx16
-rw-r--r--xmloff/source/core/SettingsExportHelper.cxx30
-rw-r--r--xmloff/source/core/XMLBase64ImportContext.cxx4
-rw-r--r--xmloff/source/core/XMLEmbeddedObjectImportContext.cxx6
-rw-r--r--xmloff/source/core/nmspmap.cxx6
-rw-r--r--xmloff/source/core/unoatrcn.cxx10
-rw-r--r--xmloff/source/core/xmlexp.cxx16
-rw-r--r--xmloff/source/core/xmlimp.cxx22
-rw-r--r--xmloff/source/core/xmluconv.cxx2
-rw-r--r--xmloff/source/draw/XMLImageMapExport.cxx10
-rw-r--r--xmloff/source/draw/XMLNumberStyles.cxx2
-rw-r--r--xmloff/source/draw/XMLReplacementImageContext.cxx4
-rw-r--r--xmloff/source/draw/XMLShapeStyleContext.cxx10
-rw-r--r--xmloff/source/draw/animationexport.cxx18
-rw-r--r--xmloff/source/draw/animationimport.cxx22
-rw-r--r--xmloff/source/draw/animexp.cxx2
-rw-r--r--xmloff/source/draw/animimp.cxx6
-rw-r--r--xmloff/source/draw/descriptionimp.cxx2
-rw-r--r--xmloff/source/draw/eventimp.cxx2
-rw-r--r--xmloff/source/draw/layerexp.cxx6
-rw-r--r--xmloff/source/draw/layerimp.cxx4
-rw-r--r--xmloff/source/draw/sdpropls.cxx8
-rw-r--r--xmloff/source/draw/sdxmlexp.cxx50
-rw-r--r--xmloff/source/draw/sdxmlimp.cxx6
-rw-r--r--xmloff/source/draw/shapeexport.cxx24
-rw-r--r--xmloff/source/draw/shapeexport2.cxx30
-rw-r--r--xmloff/source/draw/shapeexport4.cxx10
-rw-r--r--xmloff/source/draw/xexptran.cxx6
-rw-r--r--xmloff/source/draw/ximp3dobject.cxx2
-rw-r--r--xmloff/source/draw/ximpbody.cxx11
-rw-r--r--xmloff/source/draw/ximpcustomshape.cxx2
-rw-r--r--xmloff/source/draw/ximpnote.cxx2
-rw-r--r--xmloff/source/draw/ximppage.cxx16
-rw-r--r--xmloff/source/draw/ximpshap.cxx84
-rw-r--r--xmloff/source/draw/ximpshow.cxx4
-rw-r--r--xmloff/source/draw/ximpstyl.cxx10
52 files changed, 331 insertions, 335 deletions
diff --git a/xmloff/source/chart/PropertyMaps.cxx b/xmloff/source/chart/PropertyMaps.cxx
index d8eb9aab9644..0856f0cdc288 100644
--- a/xmloff/source/chart/PropertyMaps.cxx
+++ b/xmloff/source/chart/PropertyMaps.cxx
@@ -302,7 +302,7 @@ void XMLChartExportPropertyMapper::handleElementItem(
// export as XLink reference into the package
// if embedding is off
::rtl::OUString sTempURL( mrExport.AddEmbeddedGraphicObject( aURLStr ));
- if( sTempURL.getLength() )
+ if( !sTempURL.isEmpty() )
{
mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, sTempURL );
mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE,
@@ -321,7 +321,7 @@ void XMLChartExportPropertyMapper::handleElementItem(
// export as Base64 embedded graphic
// if embedding is on
- if( aURLStr.getLength())
+ if( !aURLStr.isEmpty())
mrExport.AddEmbeddedGraphicObjectAsBase64( aURLStr );
}
}
@@ -332,7 +332,7 @@ void XMLChartExportPropertyMapper::handleElementItem(
::rtl::OUString aSeparator;
rProperty.maValue >>= aSeparator;
- if( aSeparator.getLength() )
+ if( !aSeparator.isEmpty() )
{
sal_uInt32 nPropIndex = rProperty.mnIndex;
SvXMLElementExport aElem( mrExport,
diff --git a/xmloff/source/chart/SchXMLAutoStylePoolP.cxx b/xmloff/source/chart/SchXMLAutoStylePoolP.cxx
index 969e8125e586..5f59c346ca96 100644
--- a/xmloff/source/chart/SchXMLAutoStylePoolP.cxx
+++ b/xmloff/source/chart/SchXMLAutoStylePoolP.cxx
@@ -76,7 +76,7 @@ void SchXMLAutoStylePoolP::exportStyleAttributes(
( nNumberFormat != -1 ))
{
rtl::OUString sAttrValue = mrSchXMLExport.getDataStyleName( nNumberFormat );
- if( sAttrValue.getLength() )
+ if( !sAttrValue.isEmpty() )
{
mrSchXMLExport.AddAttribute(
aPropMapper->GetEntryNameSpace( iter->mnIndex ),
diff --git a/xmloff/source/chart/SchXMLAxisContext.cxx b/xmloff/source/chart/SchXMLAxisContext.cxx
index e95fec4033af..35807f828c69 100644
--- a/xmloff/source/chart/SchXMLAxisContext.cxx
+++ b/xmloff/source/chart/SchXMLAxisContext.cxx
@@ -247,7 +247,7 @@ void SchXMLAxisContext::CreateGrid( OUString sAutoStyleName, bool bIsMajor )
// the line color is black as default, in the model it is a light gray
xGridProp->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "LineColor" )),
uno::makeAny( COL_BLACK ));
- if( sAutoStyleName.getLength())
+ if( !sAutoStyleName.isEmpty())
{
const SvXMLStylesContext* pStylesCtxt = m_rImportHelper.GetAutoStylesContext();
if( pStylesCtxt )
@@ -495,7 +495,7 @@ void SchXMLAxisContext::CreateAxis()
if( m_bAxisTypeImported )
m_xAxisProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM( "AxisType" )), uno::makeAny(m_nAxisType) );
- if( m_aAutoStyleName.getLength())
+ if( !m_aAutoStyleName.isEmpty())
{
const SvXMLStylesContext* pStylesCtxt = m_rImportHelper.GetAutoStylesContext();
if( pStylesCtxt )
@@ -599,7 +599,7 @@ void SchXMLAxisContext::CreateAxis()
void SchXMLAxisContext::SetAxisTitle()
{
- if( !m_aCurrentAxis.aTitle.getLength() )
+ if( m_aCurrentAxis.aTitle.isEmpty() )
return;
Reference< chart::XAxis > xAxis( lcl_getChartAxis( m_aCurrentAxis, m_xDiagram ) );
@@ -766,7 +766,7 @@ void SchXMLAxisContext::CorrectAxisPositions( const Reference< chart2::XChartDoc
const OUString& rODFVersionOfFile,
bool bAxisPositionAttributeImported )
{
- if( ( !rODFVersionOfFile.getLength() || rODFVersionOfFile.equalsAscii("1.0")
+ if( ( rODFVersionOfFile.isEmpty() || rODFVersionOfFile.equalsAscii("1.0")
|| rODFVersionOfFile.equalsAscii("1.1")
|| ( rODFVersionOfFile.equalsAscii("1.2") && !bAxisPositionAttributeImported ) ) )
{
diff --git a/xmloff/source/chart/SchXMLChartContext.cxx b/xmloff/source/chart/SchXMLChartContext.cxx
index 7e38b3ead97f..20f11839676d 100644
--- a/xmloff/source/chart/SchXMLChartContext.cxx
+++ b/xmloff/source/chart/SchXMLChartContext.cxx
@@ -339,7 +339,7 @@ void SchXMLChartContext::StartElement( const uno::Reference< xml::sax::XAttribut
}
}
- if( aOldChartTypeName.getLength()<= 0 )
+ if( aOldChartTypeName.isEmpty() )
{
OSL_FAIL( "need a charttype to create a diagram" );
//set a fallback value:
@@ -445,8 +445,8 @@ struct NewDonutSeries
{
aPointStyle.msSeriesStyleNameForDonuts = m_aSeriesStyles[nPointIndex];
}
- if( aPointStyle.msSeriesStyleNameForDonuts.getLength()
- || aPointStyle.msStyleName.getLength() )
+ if( !aPointStyle.msSeriesStyleNameForDonuts.isEmpty()
+ || !aPointStyle.msStyleName.isEmpty() )
aRet.push_back( aPointStyle );
++aPointIt;
++nPointIndex;
@@ -634,12 +634,12 @@ void lcl_ApplyDataFromRectangularRangeToDiagram(
-1, uno::makeAny( bFirstCellAsLabel ),
beans::PropertyState_DIRECT_VALUE );
- if( sColTrans.getLength() || sRowTrans.getLength() )
+ if( !sColTrans.isEmpty() || !sRowTrans.isEmpty() )
{
aArgs.realloc( aArgs.getLength() + 1 );
aArgs[ aArgs.getLength() - 1 ] = beans::PropertyValue(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "SequenceMapping" )),
- -1, uno::makeAny( sColTrans.getLength()
+ -1, uno::makeAny( !sColTrans.isEmpty()
? lcl_getNumberSequenceFromString( sColTrans, bHasCateories && !xNewDoc->hasInternalDataProvider() )
: lcl_getNumberSequenceFromString( sRowTrans, bHasCateories && !xNewDoc->hasInternalDataProvider() ) ),
beans::PropertyState_DIRECT_VALUE );
@@ -660,7 +660,7 @@ void lcl_ApplyDataFromRectangularRangeToDiagram(
aChartOleObjectName = (*aIt).second.get< ::rtl::OUString >();
}
}
- if( aChartOleObjectName.getLength() )
+ if( !aChartOleObjectName.isEmpty() )
{
aArgs.realloc( aArgs.getLength() + 1 );
aArgs[ aArgs.getLength() - 1 ] = beans::PropertyValue(
@@ -695,7 +695,7 @@ void SchXMLChartContext::EndElement()
if( xProp.is())
{
- if( maMainTitle.getLength())
+ if( !maMainTitle.isEmpty())
{
uno::Reference< beans::XPropertySet > xTitleProp( xDoc->getTitle(), uno::UNO_QUERY );
if( xTitleProp.is())
@@ -712,7 +712,7 @@ void SchXMLChartContext::EndElement()
}
}
}
- if( maSubTitle.getLength())
+ if( !maSubTitle.isEmpty())
{
uno::Reference< beans::XPropertySet > xTitleProp( xDoc->getSubTitle(), uno::UNO_QUERY );
if( xTitleProp.is())
@@ -762,7 +762,7 @@ void SchXMLChartContext::EndElement()
bHasOwnData = true;
else if( m_aXLinkHRefAttributeToIndicateDataProvider.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".." ) ) ) //data comes from the parent application
bHasOwnData = false;
- else if( m_aXLinkHRefAttributeToIndicateDataProvider.getLength() ) //not supported so far to get the data by sibling objects -> fall back to chart itself if data are available
+ else if( !m_aXLinkHRefAttributeToIndicateDataProvider.isEmpty() ) //not supported so far to get the data by sibling objects -> fall back to chart itself if data are available
bHasOwnData = m_bHasTableElement;
else
bHasOwnData = !m_bHasRangeAtPlotArea;
@@ -792,7 +792,7 @@ void SchXMLChartContext::EndElement()
if( mbIsStockChart )
MergeSeriesForStockChart();
}
- else if( msChartAddress.getLength() )
+ else if( !msChartAddress.isEmpty() )
{
//own data or only rectangular range available
@@ -1066,17 +1066,17 @@ SvXMLImportContext* SchXMLChartContext::CreateChildContext(
// (which is required in the ODF spec)
// Note: For stock charts and donut charts with special handling
// the mapping must not be applied!
- if( !msChartAddress.getLength() && !mbIsStockChart &&
+ if( msChartAddress.isEmpty() && !mbIsStockChart &&
!lcl_SpecialHandlingForDonutChartNeeded(
maChartTypeServiceName, GetImport()))
{
- if( msColTrans.getLength() > 0 )
+ if( !msColTrans.isEmpty() )
{
- OSL_ASSERT( msRowTrans.getLength() == 0 );
+ OSL_ASSERT( msRowTrans.isEmpty() );
pTableContext->setColumnPermutation( lcl_getNumberSequenceFromString( msColTrans, true ));
msColTrans = OUString();
}
- else if( msRowTrans.getLength() > 0 )
+ else if( !msRowTrans.isEmpty() )
{
pTableContext->setRowPermutation( lcl_getNumberSequenceFromString( msRowTrans, true ));
msRowTrans = OUString();
@@ -1135,8 +1135,7 @@ void SchXMLChartContext::InitChart(
}
// Set the chart type via setting the diagram.
- if( rChartTypeServiceName.getLength() &&
- xDoc.is())
+ if( !rChartTypeServiceName.isEmpty() && xDoc.is())
{
uno::Reference< lang::XMultiServiceFactory > xFact( xDoc, uno::UNO_QUERY );
if( xFact.is())
diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx
index 9059210d05ab..7d84fc53e48f 100644
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -572,7 +572,7 @@ OUString lcl_flattenStringSequence( const Sequence< OUString > & rSequence )
bool bPrecedeWithSpace = false;
for( sal_Int32 nIndex=0; nIndex<rSequence.getLength(); ++nIndex )
{
- if( rSequence[nIndex].getLength())
+ if( !rSequence[nIndex].isEmpty())
{
if( bPrecedeWithSpace )
aResult.append( static_cast< sal_Unicode >( ' ' ));
@@ -689,7 +689,7 @@ uno::Sequence< rtl::OUString > lcl_DataSequenceToStringSequence(
sal_Int32 nTextCount = aStrings.getLength();
for( sal_Int32 j = 0; j < nTextCount; ++j )
{
- if( aStrings[j].getLength() )
+ if( !aStrings[j].isEmpty() )
{
bHasText=true;
break;
@@ -874,7 +874,7 @@ lcl_TableData lcl_getDataForLocalTable(
//categories
lcl_SequenceToVector( aSimpleCategories, rCategories );
- if( rCategoriesRange.getLength() )
+ if( !rCategoriesRange.isEmpty() )
{
OUString aRange(rCategoriesRange);
if( xRangeConversion.is())
@@ -1018,14 +1018,14 @@ bool lcl_exportDomainForThisSequence( const Reference< chart2::data::XDataSequen
OUString aRange( lcl_ConvertRange( xValues->getSourceRangeRepresentation(), xNewDoc ) );
//work around error in OOo 2.0 (problems with multiple series having a domain element)
- if( !rFirstRangeForThisDomainIndex.getLength() || !aRange.equals(rFirstRangeForThisDomainIndex) )
+ if( rFirstRangeForThisDomainIndex.isEmpty() || !aRange.equals(rFirstRangeForThisDomainIndex) )
{
rExport.AddAttribute( XML_NAMESPACE_TABLE, XML_CELL_RANGE_ADDRESS, aRange);
SvXMLElementExport aDomain( rExport, XML_NAMESPACE_CHART, XML_DOMAIN, sal_True, sal_True );
bDomainExported = true;
}
- if( !rFirstRangeForThisDomainIndex.getLength() )
+ if( rFirstRangeForThisDomainIndex.isEmpty() )
rFirstRangeForThisDomainIndex = aRange;
}
return bDomainExported;
@@ -1319,7 +1319,7 @@ void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument >&
// attributes
// determine class
- if( sChartType.getLength())
+ if( !sChartType.isEmpty())
{
enum XMLTokenEnum eXMLChartType = SchXMLTools::getTokenByChartType( sChartType, true /* bUseOldNames */ );
@@ -1794,7 +1794,7 @@ void SchXMLExportHelper_Impl::exportTable()
if( !bHasOwnData && aColumnDescriptions_RangeIter != aColumnDescriptions_RangeEnd )
{
// remind the original range to allow a correct re-association when copying via clipboard
- if ((*aColumnDescriptions_RangeIter).getLength())
+ if (!(*aColumnDescriptions_RangeIter).isEmpty())
SchXMLTools::exportRangeToSomewhere( mrExport, *aColumnDescriptions_RangeIter );
++aColumnDescriptions_RangeIter;
}
@@ -1871,7 +1871,7 @@ void SchXMLExportHelper_Impl::exportTable()
( mbRowSourceColumns || (aColIt == aRowIt->begin()) ) )
{
// remind the original range to allow a correct re-association when copying via clipboard
- if ((*aDataRangeIter).getLength())
+ if (!(*aDataRangeIter).isEmpty())
SchXMLTools::exportRangeToSomewhere( mrExport, *aDataRangeIter );
++aDataRangeIter;
}
@@ -1973,7 +1973,7 @@ void SchXMLExportHelper_Impl::exportPlotArea(
// write style name
AddAutoStyleAttribute( aPropertyStates );
- if( msChartAddress.getLength() )
+ if( !msChartAddress.isEmpty() )
{
if( !bIncludeTable )
mrExport.AddAttribute( XML_NAMESPACE_TABLE, XML_CELL_RANGE_ADDRESS, msChartAddress );
@@ -2017,8 +2017,7 @@ void SchXMLExportHelper_Impl::exportPlotArea(
// #i72973#, #144135# only export table-number-list in OOo format (also for binary)
Reference< beans::XPropertySet > xExportInfo( mrExport.getExportInfo());
- if( msTableNumberList.getLength() &&
- xExportInfo.is())
+ if( !msTableNumberList.isEmpty() && xExportInfo.is())
{
try
{
@@ -2435,7 +2434,7 @@ void SchXMLExportHelper_Impl::exportAxis(
mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_DIMENSION, eDimension );
mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_NAME, eAxisName );
AddAutoStyleAttribute( aPropertyStates ); // write style name
- if( rCategoriesRange.getLength() )
+ if( !rCategoriesRange.isEmpty() )
bExportDateScale = lcl_exportAxisType( xChart2Axis, mrExport );
// open axis element
@@ -2466,7 +2465,7 @@ void SchXMLExportHelper_Impl::exportAxis(
exportAxisTitle( xTitleProps , bExportContent );
// categories if we have a categories chart
- if( bExportContent && rCategoriesRange.getLength() )
+ if( bExportContent && !rCategoriesRange.isEmpty() )
{
mrExport.AddAttribute( XML_NAMESPACE_TABLE, XML_CELL_RANGE_ADDRESS, rCategoriesRange );
SvXMLElementExport aCategories( mrExport, XML_NAMESPACE_CHART, XML_CATEGORIES, sal_True, sal_True );
@@ -2664,7 +2663,7 @@ namespace
sal_Int32 nCount = aStrings.getLength();
for( sal_Int32 i = 0; i < nCount; ++i )
{
- if( aStrings[i].getLength() )
+ if( !aStrings[i].isEmpty() )
return true;//have text
}
}
@@ -2677,7 +2676,7 @@ namespace
sal_Int32 nCount = aData.getLength();
for( sal_Int32 i = 0; i < nCount; ++i )
{
- if( (aData[i]>>=aString) && aString.getLength() )
+ if( (aData[i]>>=aString) && !aString.isEmpty() )
return true;//have text
}
}
@@ -3213,9 +3212,9 @@ void SchXMLExportHelper_Impl::exportCandleStickSeries(
{
tLabelAndValueRange aRanges( lcl_getLabelAndValueRangeByRole(
aSeqCnt, OUString(RTL_CONSTASCII_USTRINGPARAM( "values-first" )), xNewDoc, m_aDataSequencesToExport ));
- if( aRanges.second.getLength())
+ if( !aRanges.second.isEmpty())
mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_VALUES_CELL_RANGE_ADDRESS, aRanges.second );
- if( aRanges.first.getLength())
+ if( !aRanges.first.isEmpty())
mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_LABEL_CELL_ADDRESS, aRanges.first );
if( nAttachedAxis == chart::ChartAxisAssign::SECONDARY_Y )
mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_ATTACHED_AXIS, XML_SECONDARY_Y );
@@ -3230,9 +3229,9 @@ void SchXMLExportHelper_Impl::exportCandleStickSeries(
{
tLabelAndValueRange aRanges( lcl_getLabelAndValueRangeByRole(
aSeqCnt, OUString(RTL_CONSTASCII_USTRINGPARAM( "values-min" )), xNewDoc, m_aDataSequencesToExport ));
- if( aRanges.second.getLength())
+ if( !aRanges.second.isEmpty())
mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_VALUES_CELL_RANGE_ADDRESS, aRanges.second );
- if( aRanges.first.getLength())
+ if( !aRanges.first.isEmpty())
mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_LABEL_CELL_ADDRESS, aRanges.first );
if( nAttachedAxis == chart::ChartAxisAssign::SECONDARY_Y )
mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_ATTACHED_AXIS, XML_SECONDARY_Y );
@@ -3247,9 +3246,9 @@ void SchXMLExportHelper_Impl::exportCandleStickSeries(
{
tLabelAndValueRange aRanges( lcl_getLabelAndValueRangeByRole(
aSeqCnt, OUString(RTL_CONSTASCII_USTRINGPARAM( "values-max" )), xNewDoc, m_aDataSequencesToExport ));
- if( aRanges.second.getLength())
+ if( !aRanges.second.isEmpty())
mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_VALUES_CELL_RANGE_ADDRESS, aRanges.second );
- if( aRanges.first.getLength())
+ if( !aRanges.first.isEmpty())
mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_LABEL_CELL_ADDRESS, aRanges.first );
if( nAttachedAxis == chart::ChartAxisAssign::SECONDARY_Y )
mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_ATTACHED_AXIS, XML_SECONDARY_Y );
@@ -3264,9 +3263,9 @@ void SchXMLExportHelper_Impl::exportCandleStickSeries(
{
tLabelAndValueRange aRanges( lcl_getLabelAndValueRangeByRole(
aSeqCnt, OUString(RTL_CONSTASCII_USTRINGPARAM( "values-last" )), xNewDoc, m_aDataSequencesToExport ));
- if( aRanges.second.getLength())
+ if( !aRanges.second.isEmpty())
mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_VALUES_CELL_RANGE_ADDRESS, aRanges.second );
- if( aRanges.first.getLength())
+ if( !aRanges.first.isEmpty())
mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_LABEL_CELL_ADDRESS, aRanges.first );
if( nAttachedAxis == chart::ChartAxisAssign::SECONDARY_Y )
mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_ATTACHED_AXIS, XML_SECONDARY_Y );
@@ -3507,7 +3506,7 @@ void SchXMLExportHelper_Impl::exportDataPoints(
else if( aLastPoint.mnRepeat > 0 )
{
// write last element
- if( aLastPoint.maStyleName.getLength() )
+ if( !aLastPoint.maStyleName.isEmpty() )
mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_STYLE_NAME, aLastPoint.maStyleName );
if( aLastPoint.mnRepeat > 1 )
@@ -3521,7 +3520,7 @@ void SchXMLExportHelper_Impl::exportDataPoints(
// write last element if it hasn't been written in last iteration
if( aPoint.maStyleName == aLastPoint.maStyleName )
{
- if( aLastPoint.maStyleName.getLength() )
+ if( !aLastPoint.maStyleName.isEmpty() )
mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_STYLE_NAME, aLastPoint.maStyleName );
if( aLastPoint.mnRepeat > 1 )
@@ -3740,7 +3739,7 @@ void SchXMLExport::_ExportContent()
maExportHelper.m_pImpl->SetTableNumberList( sTableNumberList );
// do not include own table if there are external addresses
- bIncludeTable = (sChartAddress.getLength() == 0);
+ bIncludeTable = sChartAddress.isEmpty();
}
catch( const beans::UnknownPropertyException & )
{
@@ -3810,7 +3809,7 @@ void SchXMLExportHelper_Impl::InitRangeSegmentationProperties( const Reference<
// range, where every row number is noe too large, so that older
// version can correctly read those files.
msChartAddress = (bBrokenRangeAvailable ? sBrokenRange : sCellRange);
- if( msChartAddress.getLength() > 0 )
+ if( !msChartAddress.isEmpty() )
{
// convert format to XML-conform one
Reference< chart2::data::XRangeXMLConversion > xConversion( xDataProvider, uno::UNO_QUERY );
diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
index ae1a274981c8..5f8eae4fcc4b 100644
--- a/xmloff/source/chart/SchXMLPlotAreaContext.cxx
+++ b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
@@ -329,7 +329,7 @@ void SchXMLPlotAreaContext::StartElement( const uno::Reference< xml::sax::XAttri
// set properties
uno::Reference< beans::XPropertySet > xProp( mxDiagram, uno::UNO_QUERY );
- if( msAutoStyleName.getLength())
+ if( !msAutoStyleName.isEmpty())
{
if( xProp.is())
{
@@ -444,7 +444,7 @@ void SchXMLPlotAreaContext::StartElement( const uno::Reference< xml::sax::XAttri
bCreateInternalDataProvider = true;
else if( m_rXLinkHRefAttributeToIndicateDataProvider.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".." ) ) ) //data comes from the parent application
bCreateInternalDataProvider = false;
- else if( m_rXLinkHRefAttributeToIndicateDataProvider.getLength() ) //not supported so far to get the data by sibling objects -> fall back to chart itself
+ else if( !m_rXLinkHRefAttributeToIndicateDataProvider.isEmpty() ) //not supported so far to get the data by sibling objects -> fall back to chart itself
bCreateInternalDataProvider = true;
else if( !m_rbHasRangeAtPlotArea )
bCreateInternalDataProvider = true;
@@ -564,7 +564,7 @@ SvXMLImportContext* SchXMLPlotAreaContext::CreateChildContext(
void SchXMLPlotAreaContext::EndElement()
{
// set categories
- if( mrCategoriesAddress.getLength() && mxNewDoc.is())
+ if( !mrCategoriesAddress.isEmpty() && mxNewDoc.is())
{
uno::Reference< chart2::data::XDataProvider > xDataProvider(
mxNewDoc->getDataProvider() );
@@ -703,7 +703,7 @@ void SchXMLDataPointContext::StartElement( const uno::Reference< xml::sax::XAttr
}
}
- if( sAutoStyleName.getLength())
+ if( !sAutoStyleName.isEmpty())
{
DataRowPointStyle aStyle(
DataRowPointStyle::DATA_POINT,
@@ -893,7 +893,7 @@ void SchXMLWallFloorContext::StartElement( const uno::Reference< xml::sax::XAttr
uno::UNO_QUERY );
if( xProp.is())
{
- if( sAutoStyleName.getLength())
+ if( !sAutoStyleName.isEmpty())
{
const SvXMLStylesContext* pStylesCtxt = mrImportHelper.GetAutoStylesContext();
if( pStylesCtxt )
@@ -949,7 +949,7 @@ void SchXMLStockContext::StartElement( const uno::Reference< xml::sax::XAttribut
}
}
- if( sAutoStyleName.getLength())
+ if( !sAutoStyleName.isEmpty())
{
// set properties
uno::Reference< beans::XPropertySet > xProp;
@@ -1028,7 +1028,7 @@ void SchXMLStatisticsObjectContext::StartElement( const uno::Reference< xml::sax
// note: regression-curves must get a style-object even if there is no
// auto-style set, because they can contain an equation
- if( sAutoStyleName.getLength() || meContextType == CONTEXT_TYPE_REGRESSION_CURVE )
+ if( !sAutoStyleName.isEmpty() || meContextType == CONTEXT_TYPE_REGRESSION_CURVE )
{
DataRowPointStyle::StyleType eType = DataRowPointStyle::MEAN_VALUE;
switch( meContextType )
@@ -1136,7 +1136,7 @@ void SchXMLEquationContext::StartElement( const uno::Reference< xml::sax::XAttri
}
}
- if( sAutoStyleName.getLength() || bShowEquation || bShowRSquare )
+ if( !sAutoStyleName.isEmpty() || bShowEquation || bShowRSquare )
{
uno::Reference< beans::XPropertySet > xEqProp;
uno::Reference< lang::XMultiServiceFactory > xFact( comphelper::getProcessServiceFactory(), uno::UNO_QUERY );
@@ -1145,7 +1145,7 @@ void SchXMLEquationContext::StartElement( const uno::Reference< xml::sax::XAttri
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart2.RegressionEquation" ))), uno::UNO_QUERY );
if( xEqProp.is())
{
- if( sAutoStyleName.getLength() )
+ if( !sAutoStyleName.isEmpty() )
{
const SvXMLStylesContext* pStylesCtxt = mrImportHelper.GetAutoStylesContext();
if( pStylesCtxt )
diff --git a/xmloff/source/chart/SchXMLSeries2Context.cxx b/xmloff/source/chart/SchXMLSeries2Context.cxx
index cdacb258204c..8aad9438c715 100644
--- a/xmloff/source/chart/SchXMLSeries2Context.cxx
+++ b/xmloff/source/chart/SchXMLSeries2Context.cxx
@@ -227,7 +227,7 @@ Reference< chart2::data::XLabeledDataSequence > lcl_createAndAddSequenceToSeries
Reference< chart2::data::XDataSource > xSeriesSource( xSeries,uno::UNO_QUERY );
Reference< chart2::data::XDataSink > xSeriesSink( xSeries, uno::UNO_QUERY );
- if( !(rRange.getLength() && xChartDoc.is() && xSeriesSource.is() && xSeriesSink.is()) )
+ if( !(!rRange.isEmpty() && xChartDoc.is() && xSeriesSource.is() && xSeriesSink.is()) )
return xLabeledSeq;
// create a new sequence
@@ -352,7 +352,7 @@ void SchXMLSeries2Context::StartElement( const uno::Reference< xml::sax::XAttrib
if( XML_NAMESPACE_CHART == nClassPrefix )
maSeriesChartTypeName = SchXMLTools::GetChartTypeByClassName( aClassName, false /* bUseOldNames */ );
- if( ! maSeriesChartTypeName.getLength())
+ if( maSeriesChartTypeName.isEmpty())
maSeriesChartTypeName = aClassName;
}
break;
@@ -375,7 +375,7 @@ void SchXMLSeries2Context::StartElement( const uno::Reference< xml::sax::XAttrib
m_rGlobalSeriesImportInfo.rbAllRangeAddressesAvailable = sal_False;
bool bIsCandleStick = maGlobalChartTypeName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.chart2.CandleStickChartType"));
- if( maSeriesChartTypeName.getLength() )
+ if( !maSeriesChartTypeName.isEmpty() )
{
bIsCandleStick = maSeriesChartTypeName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.chart2.CandleStickChartType"));
}
@@ -420,7 +420,7 @@ void SchXMLSeries2Context::StartElement( const uno::Reference< xml::sax::XAttrib
// values
Reference< chart2::data::XDataSequence > xSeq;
- if( bHasRange && m_aSeriesRange.getLength() )
+ if( bHasRange && !m_aSeriesRange.isEmpty() )
xSeq = SchXMLTools::CreateDataSequence( m_aSeriesRange, mxNewDoc );
Reference< beans::XPropertySet > xSeqProp( xSeq, uno::UNO_QUERY );
@@ -439,7 +439,7 @@ void SchXMLSeries2Context::StartElement( const uno::Reference< xml::sax::XAttrib
tSchXMLIndexWithPart( m_rGlobalSeriesImportInfo.nCurrentDataIndex, SCH_XML_PART_VALUES ), xLabeledSeq ));
// label
- if( bHasLabelRange && m_aSeriesLabelRange.getLength() )
+ if( bHasLabelRange && !m_aSeriesLabelRange.isEmpty() )
{
Reference< chart2::data::XDataSequence > xLabelSequence =
SchXMLTools::CreateDataSequence( m_aSeriesLabelRange, mxNewDoc );
@@ -472,7 +472,7 @@ void SchXMLSeries2Context::StartElement( const uno::Reference< xml::sax::XAttrib
//init mbSymbolSizeIsMissingInFile:
try
{
- if( msAutoStyleName.getLength() )
+ if( !msAutoStyleName.isEmpty() )
{
const SvXMLStylesContext* pStylesCtxt = mrImportHelper.GetAutoStylesContext();
if( pStylesCtxt )
@@ -521,7 +521,7 @@ void SchXMLSeries2Context::EndElement()
bool bCreateXValues = true;
if( !maDomainAddresses.empty() )
{
- if( !m_rGlobalSeriesImportInfo.aFirstFirstDomainAddress.getLength() )
+ if( m_rGlobalSeriesImportInfo.aFirstFirstDomainAddress.isEmpty() )
{
m_rGlobalSeriesImportInfo.aFirstFirstDomainAddress = maDomainAddresses.front();
m_rGlobalSeriesImportInfo.nFirstFirstDomainIndex = m_rGlobalSeriesImportInfo.nCurrentDataIndex;
@@ -530,7 +530,7 @@ void SchXMLSeries2Context::EndElement()
aDomainInfo.nIndexForLocalData = m_rGlobalSeriesImportInfo.nCurrentDataIndex;
m_rGlobalSeriesImportInfo.nCurrentDataIndex++;
}
- else if( !m_rGlobalSeriesImportInfo.aFirstFirstDomainAddress.getLength() && !m_bHasDomainContext && mnSeriesIndex==0 )
+ else if( m_rGlobalSeriesImportInfo.aFirstFirstDomainAddress.isEmpty() && !m_bHasDomainContext && mnSeriesIndex==0 )
{
if( SchXMLTools::isDocumentGeneratedWithOpenOfficeOlderThan2_3( GetImport().GetModel() ) ) //wrong old chart files:
{
@@ -551,7 +551,7 @@ void SchXMLSeries2Context::EndElement()
if( nDomainCount>1 )
{
DomainInfo aDomainInfo( OUString(RTL_CONSTASCII_USTRINGPARAM( "values-x" )), maDomainAddresses[1], m_rGlobalSeriesImportInfo.nCurrentDataIndex ) ;
- if( !m_rGlobalSeriesImportInfo.aFirstSecondDomainAddress.getLength() )
+ if( m_rGlobalSeriesImportInfo.aFirstSecondDomainAddress.isEmpty() )
{
//for bubble chart the second domain contains the x values which should become an index smaller than y values for own data table
//->so second first
@@ -561,7 +561,7 @@ void SchXMLSeries2Context::EndElement()
aDomainInfos.push_back( aDomainInfo );
m_rGlobalSeriesImportInfo.nCurrentDataIndex++;
}
- else if( m_rGlobalSeriesImportInfo.aFirstSecondDomainAddress.getLength() )
+ else if( !m_rGlobalSeriesImportInfo.aFirstSecondDomainAddress.isEmpty() )
{
DomainInfo aDomainInfo( OUString(RTL_CONSTASCII_USTRINGPARAM( "values-x" )), m_rGlobalSeriesImportInfo.aFirstSecondDomainAddress, m_rGlobalSeriesImportInfo.nFirstSecondDomainIndex ) ;
aDomainInfos.push_back( aDomainInfo );
@@ -569,7 +569,7 @@ void SchXMLSeries2Context::EndElement()
if( nDomainCount>0)
{
DomainInfo aDomainInfo( OUString(RTL_CONSTASCII_USTRINGPARAM( "values-y" )), maDomainAddresses.front(), m_rGlobalSeriesImportInfo.nCurrentDataIndex ) ;
- if( !m_rGlobalSeriesImportInfo.aFirstFirstDomainAddress.getLength() )
+ if( m_rGlobalSeriesImportInfo.aFirstFirstDomainAddress.isEmpty() )
{
m_rGlobalSeriesImportInfo.aFirstFirstDomainAddress = maDomainAddresses.front();
m_rGlobalSeriesImportInfo.nFirstFirstDomainIndex = m_rGlobalSeriesImportInfo.nCurrentDataIndex;
@@ -577,7 +577,7 @@ void SchXMLSeries2Context::EndElement()
aDomainInfos.push_back( aDomainInfo );
m_rGlobalSeriesImportInfo.nCurrentDataIndex++;
}
- else if( m_rGlobalSeriesImportInfo.aFirstFirstDomainAddress.getLength() )
+ else if( !m_rGlobalSeriesImportInfo.aFirstFirstDomainAddress.isEmpty() )
{
DomainInfo aDomainInfo( OUString(RTL_CONSTASCII_USTRINGPARAM("values-y")), m_rGlobalSeriesImportInfo.aFirstFirstDomainAddress, m_rGlobalSeriesImportInfo.nFirstFirstDomainIndex ) ;
aDomainInfos.push_back( aDomainInfo );
@@ -593,8 +593,7 @@ void SchXMLSeries2Context::EndElement()
else
{
//add style
- if( msAutoStyleName.getLength() ||
- mnAttachedAxis != 1 )
+ if( !msAutoStyleName.isEmpty() || mnAttachedAxis != 1 )
{
DataRowPointStyle aStyle(
DataRowPointStyle::DATA_SERIES,
@@ -800,7 +799,7 @@ void SchXMLSeries2Context::setStylesToSeries( SeriesDefaultsAndStyles& rSeriesDe
, uno::makeAny(chart::ChartAxisAssign::SECONDARY_Y) );
}
- if( (iStyle->msStyleName).getLength())
+ if( !(iStyle->msStyleName).isEmpty())
{
if( ! rCurrStyleName.equals( iStyle->msStyleName ))
{
@@ -885,7 +884,7 @@ void SchXMLSeries2Context::setStylesToStatisticsObjects( SeriesDefaultsAndStyles
if( !xSeriesProp.is() )
continue;
- if( (iStyle->msStyleName).getLength())
+ if( !(iStyle->msStyleName).isEmpty())
{
if( ! rCurrStyleName.equals( iStyle->msStyleName ))
{
diff --git a/xmloff/source/chart/SchXMLTableContext.cxx b/xmloff/source/chart/SchXMLTableContext.cxx
index bce21c7e63ea..6b2e98879034 100644
--- a/xmloff/source/chart/SchXMLTableContext.cxx
+++ b/xmloff/source/chart/SchXMLTableContext.cxx
@@ -125,7 +125,7 @@ void lcl_fillRangeMapping(
for( size_t nCol = 0; nCol < nTableColCount; ++nCol )
{
OUString aRangeId( rRow[nCol].aRangeId );
- if( aRangeId.getLength())
+ if( !aRangeId.isEmpty())
{
if( eDataRowSource == chart::ChartDataRowSource_COLUMNS )
{
@@ -203,8 +203,8 @@ bool lcl_tableOfRangeMatches(
const ::rtl::OUString & rTableName )
{
// both strings are non-empty and the table name is part of the range
- return ( (rRange.getLength() > 0) &&
- (rTableName.getLength() > 0) &&
+ return ( !rRange.isEmpty() &&
+ !rTableName.isEmpty() &&
(rRange.indexOf( rTableName ) != -1 ));
}
@@ -491,7 +491,7 @@ void SchXMLTableColumnContext::StartElement( const uno::Reference< xml::sax::XAt
IsXMLToken( aLocalName, XML_NUMBER_COLUMNS_REPEATED ) )
{
rtl::OUString aValue = xAttrList->getValueByIndex( i );
- if( aValue.getLength())
+ if( !aValue.isEmpty())
nRepeated = aValue.toInt32();
}
else if( nPrefix == XML_NAMESPACE_TABLE &&
@@ -756,9 +756,9 @@ SvXMLImportContext* SchXMLTableCellContext::CreateChildContext(
void SchXMLTableCellContext::EndElement()
{
- if( mbReadText && maCellContent.getLength() ) //apply text from <text:p> element
+ if( mbReadText && !maCellContent.isEmpty() ) //apply text from <text:p> element
mrTable.aData[ mrTable.nRowIndex ][ mrTable.nColumnIndex ].aString = maCellContent;
- if( maRangeId.getLength())
+ if( !maRangeId.isEmpty())
mrTable.aData[ mrTable.nRowIndex ][ mrTable.nColumnIndex ].aRangeId = maRangeId;
}
@@ -1097,7 +1097,7 @@ void SchXMLTableHelper::switchRangesFromOuterToInternalIfNecessary(
aRange = xLabel->getSourceRangeRepresentation();
sal_Int32 nSearchIndex = 0;
OUString aSecondToken = aRange.getToken( 1, ' ', nSearchIndex );
- if( aSecondToken.getLength() )
+ if( !aSecondToken.isEmpty() )
aUsageMap[aSecondToken.toInt32()] = true;
}
}
diff --git a/xmloff/source/chart/SchXMLTools.cxx b/xmloff/source/chart/SchXMLTools.cxx
index ee7cf462dd97..106afea65947 100644
--- a/xmloff/source/chart/SchXMLTools.cxx
+++ b/xmloff/source/chart/SchXMLTools.cxx
@@ -104,7 +104,7 @@ rtl::OUString lcl_getGeneratorFromModel( const uno::Reference< frame::XModel >&
rtl::OUString lcl_getGeneratorFromModelOrItsParent( const uno::Reference< frame::XModel >& xChartModel )
{
::rtl::OUString aGenerator( lcl_getGeneratorFromModel(xChartModel) );
- if( !aGenerator.getLength() ) //try to get the missing info from the parent document
+ if( aGenerator.isEmpty() ) //try to get the missing info from the parent document
{
uno::Reference< container::XChild > xChild( xChartModel, uno::UNO_QUERY );
if( xChild.is() )
@@ -367,7 +367,7 @@ XMLTokenEnum getTokenByChartType(
}
}
- if( eResult == XML_TOKEN_INVALID && rChartTypeService.getLength() > 0 )
+ if( eResult == XML_TOKEN_INVALID && !rChartTypeService.isEmpty() )
eResult = XML_ADD_IN;
return eResult;
@@ -414,7 +414,7 @@ Reference< chart2::data::XDataSequence > CreateDataSequence(
OSL_FAIL( "could not create data sequence" );
}
- if( !xRet.is() && !xChartDoc->hasInternalDataProvider() && rRange.getLength() )
+ if( !xRet.is() && !xChartDoc->hasInternalDataProvider() && !rRange.isEmpty() )
{
//#i103911# switch to internal data in case the parent cannot provide the requested data
xChartDoc->createInternalDataProvider( sal_True /* bCloneExistingData */ );
@@ -442,7 +442,7 @@ void CreateCategories(
{
try
{
- if( xNewDoc.is() && rRangeAddress.getLength())
+ if( xNewDoc.is() && !rRangeAddress.isEmpty())
{
if( xDataProvider.is())
{
@@ -690,7 +690,7 @@ bool getXMLRangePropertyFromDataSequence(
bResult =
( xInfo.is() && xInfo->hasPropertyByName( aXMLRangePropName ) &&
( xProp->getPropertyValue( aXMLRangePropName ) >>= rOutXMLRange ) &&
- rOutXMLRange.getLength());
+ !rOutXMLRange.isEmpty());
// clear the property after usage
if( bClearProp && bResult )
xProp->setPropertyValue( aXMLRangePropName, uno::Any( OUString()));
@@ -771,7 +771,7 @@ bool switchBackToDataProviderFromParent( const Reference< chart2::XChartDocument
void setBuildIDAtImportInfo( uno::Reference< frame::XModel > xModel, Reference< beans::XPropertySet > xImportInfo )
{
::rtl::OUString aGenerator( lcl_getGeneratorFromModelOrItsParent(xModel) );
- if( aGenerator.getLength() )
+ if( !aGenerator.isEmpty() )
SvXMLMetaDocumentContext::setBuildId( aGenerator, xImportInfo );
}
@@ -829,7 +829,7 @@ bool isDocumentGeneratedWithOpenOfficeOlderThan2_3( const uno::Reference< frame:
bool bResult = false;
::rtl::OUString aGenerator( lcl_getGeneratorFromModel(xChartModel) );
//if there is a meta stream at the chart object it was not written with an older OpenOffice version < 2.3
- if( !aGenerator.getLength() )
+ if( aGenerator.isEmpty() )
{
//if there is no meta stream at the chart object we need to check whether the parent document is OpenOffice at all
uno::Reference< container::XChild > xChild( xChartModel, uno::UNO_QUERY );
diff --git a/xmloff/source/chart/XMLAxisPositionPropertyHdl.cxx b/xmloff/source/chart/XMLAxisPositionPropertyHdl.cxx
index 13852c086136..4e26b890c053 100644
--- a/xmloff/source/chart/XMLAxisPositionPropertyHdl.cxx
+++ b/xmloff/source/chart/XMLAxisPositionPropertyHdl.cxx
@@ -99,7 +99,7 @@ sal_Bool XMLAxisPositionPropertyHdl::exportXML( OUString& rStrExpValue,
rtl::OUStringBuffer sValueBuffer;
if( m_bCrossingValue )
{
- if(rStrExpValue.getLength() == 0)
+ if(rStrExpValue.isEmpty())
{
double fValue = 0.0;
rValue >>= fValue;
diff --git a/xmloff/source/chart/XMLChartStyleContext.cxx b/xmloff/source/chart/XMLChartStyleContext.cxx
index a1a7b2660ad0..a9675a28c16b 100644
--- a/xmloff/source/chart/XMLChartStyleContext.cxx
+++ b/xmloff/source/chart/XMLChartStyleContext.cxx
@@ -91,7 +91,7 @@ namespace
const SvXMLStylesContext& rStylesContext,
const uno::Reference< beans::XPropertySet >& rPropSet )
{
- if( rStyleName.getLength())
+ if( !rStyleName.isEmpty())
{
SvXMLNumFormatContext* pStyle = (SvXMLNumFormatContext *)rStylesContext.FindStyleChildContext(
XML_STYLE_FAMILY_DATA_STYLE, rStyleName, sal_True );
diff --git a/xmloff/source/chart/XMLLabelSeparatorContext.cxx b/xmloff/source/chart/XMLLabelSeparatorContext.cxx
index 8011a136aa00..eab51674c26b 100644
--- a/xmloff/source/chart/XMLLabelSeparatorContext.cxx
+++ b/xmloff/source/chart/XMLLabelSeparatorContext.cxx
@@ -75,7 +75,7 @@ SvXMLImportContext* XMLLabelSeparatorContext::CreateChildContext(
void XMLLabelSeparatorContext::EndElement()
{
- if( m_aSeparator.getLength() )
+ if( !m_aSeparator.isEmpty() )
{
// aProp is a member of XMLElementPropertyContext
aProp.maValue <<= m_aSeparator;
diff --git a/xmloff/source/chart/XMLSymbolImageContext.cxx b/xmloff/source/chart/XMLSymbolImageContext.cxx
index 7148c49173ac..dc9b042f397b 100644
--- a/xmloff/source/chart/XMLSymbolImageContext.cxx
+++ b/xmloff/source/chart/XMLSymbolImageContext.cxx
@@ -107,7 +107,7 @@ SvXMLImportContext* XMLSymbolImageContext::CreateChildContext(
if( xmloff::token::IsXMLToken( rLocalName,
xmloff::token::XML_BINARY_DATA ) )
{
- if( ! msURL.getLength() && ! mxBase64Stream.is() )
+ if( msURL.isEmpty() && ! mxBase64Stream.is() )
{
mxBase64Stream = GetImport().GetStreamForGraphicObjectURLFromBase64();
if( mxBase64Stream.is() )
@@ -128,7 +128,7 @@ void XMLSymbolImageContext::EndElement()
{
::rtl::OUString sResolvedURL;
- if( msURL.getLength() )
+ if( !msURL.isEmpty() )
{
sResolvedURL = GetImport().ResolveGraphicObjectURL( msURL, sal_False );
}
@@ -138,7 +138,7 @@ void XMLSymbolImageContext::EndElement()
mxBase64Stream = 0;
}
- if( sResolvedURL.getLength())
+ if( !sResolvedURL.isEmpty())
{
// aProp is a member of XMLElementPropertyContext
aProp.maValue <<= sResolvedURL;
diff --git a/xmloff/source/core/DocumentSettingsContext.cxx b/xmloff/source/core/DocumentSettingsContext.cxx
index cfc3015ae69f..c8b78d577ebe 100644
--- a/xmloff/source/core/DocumentSettingsContext.cxx
+++ b/xmloff/source/core/DocumentSettingsContext.cxx
@@ -603,10 +603,10 @@ void XMLConfigItemContext::Characters( const ::rtl::OUString& rChars )
if (IsXMLToken(msType, XML_BASE64BINARY))
{
rtl::OUString sTrimmedChars( rChars.trim() );
- if( sTrimmedChars.getLength() )
+ if( !sTrimmedChars.isEmpty() )
{
rtl::OUString sChars;
- if( msValue.getLength() )
+ if( !msValue.isEmpty() )
{
sChars = msValue;
sChars += sTrimmedChars;
diff --git a/xmloff/source/core/DomExport.cxx b/xmloff/source/core/DomExport.cxx
index cb9a4c9848e7..eff5c49269a1 100644
--- a/xmloff/source/core/DomExport.cxx
+++ b/xmloff/source/core/DomExport.cxx
@@ -227,7 +227,7 @@ OUString DomExport::qualifiedName( const OUString& sPrefix,
const OUString& sLocalName )
{
OUStringBuffer sBuffer;
- if( ( sPrefix.getLength() > 0 ) && ( sURI.getLength() > 0 ) )
+ if( !sPrefix.isEmpty() && !sURI.isEmpty() )
{
addNamespace( sPrefix, sURI );
sBuffer.append( sPrefix );
diff --git a/xmloff/source/core/RDFaExportHelper.cxx b/xmloff/source/core/RDFaExportHelper.cxx
index b8873afc9c85..4527dab12b27 100644
--- a/xmloff/source/core/RDFaExportHelper.cxx
+++ b/xmloff/source/core/RDFaExportHelper.cxx
@@ -75,8 +75,8 @@ makeCURIE(SvXMLExport * i_pExport,
if (!i_xURI.is()) throw uno::RuntimeException();
const ::rtl::OUString Namespace( i_xURI->getNamespace() );
- OSL_ENSURE(Namespace.getLength(), "makeCURIE: no namespace");
- if (!Namespace.getLength()) throw uno::RuntimeException();
+ OSL_ENSURE(!Namespace.isEmpty(), "makeCURIE: no namespace");
+ if (Namespace.isEmpty()) throw uno::RuntimeException();
::rtl::OUStringBuffer buf;
buf.append( i_pExport->EnsureNamespace(Namespace) );
@@ -140,7 +140,7 @@ RDFaExportHelper::LookupBlankNode(
if (!i_xBlankNode.is()) throw uno::RuntimeException();
::rtl::OUString & rEntry(
m_BlankNodeMap[ i_xBlankNode->getStringValue() ] );
- if (!rEntry.getLength())
+ if (rEntry.isEmpty())
{
::rtl::OUStringBuffer buf;
buf.appendAscii(s_prefix);
diff --git a/xmloff/source/core/RDFaImportHelper.cxx b/xmloff/source/core/RDFaImportHelper.cxx
index 028782e6f3e4..ff625d8fb071 100644
--- a/xmloff/source/core/RDFaImportHelper.cxx
+++ b/xmloff/source/core/RDFaImportHelper.cxx
@@ -71,7 +71,7 @@ class SAL_DLLPRIVATE RDFaReader
//FIXME: this is an ugly hack to workaround buggy SvXMLImport::GetAbsolute
::rtl::OUString GetAbsoluteReference(::rtl::OUString const & i_rURI) const
{
- if (!i_rURI.getLength() || i_rURI[0] == '#')
+ if (i_rURI.isEmpty() || i_rURI[0] == '#')
{
return GetImport().GetBaseURL() + i_rURI;
}
@@ -228,16 +228,16 @@ RDFaReader::ReadCURIEs(::rtl::OUString const & i_rCURIEs) const
::rtl::OUString CURIEs(i_rCURIEs);
do {
::rtl::OUString curie( splitAtWS(CURIEs) );
- if (curie.getLength())
+ if (!curie.isEmpty())
{
const ::rtl::OUString uri(ReadCURIE(curie));
- if (uri.getLength())
+ if (!uri.isEmpty())
{
vec.push_back(uri);
}
}
}
- while (CURIEs.getLength());
+ while (!CURIEs.isEmpty());
if (!vec.size())
{
OSL_TRACE( "ReadCURIEs: invalid CURIEs" );
@@ -383,7 +383,7 @@ void RDFaInserter::InsertRDFaEntry(
}
uno::Reference<rdf::XURI> xDatatype;
- if (i_rEntry.m_pRDFaAttributes->m_Datatype.getLength())
+ if (!i_rEntry.m_pRDFaAttributes->m_Datatype.isEmpty())
{
xDatatype = MakeURI( i_rEntry.m_pRDFaAttributes->m_Datatype );
}
@@ -421,7 +421,7 @@ RDFaImportHelper::ParseRDFa(
::rtl::OUString const & i_rContent,
::rtl::OUString const & i_rDatatype)
{
- if (!i_rProperty.getLength())
+ if (i_rProperty.isEmpty())
{
OSL_TRACE("AddRDFa: invalid input: xhtml:property empty");
return ::boost::shared_ptr<ParsedRDFaAttributes>();
@@ -429,7 +429,7 @@ RDFaImportHelper::ParseRDFa(
// must parse CURIEs here: need namespace declaration context
RDFaReader reader(GetImport());
const ::rtl::OUString about( reader.ReadURIOrSafeCURIE(i_rAbout) );
- if (!about.getLength()) {
+ if (about.isEmpty()) {
return ::boost::shared_ptr<ParsedRDFaAttributes>();
}
const ::std::vector< ::rtl::OUString > properties(
@@ -437,7 +437,7 @@ RDFaImportHelper::ParseRDFa(
if (!properties.size()) {
return ::boost::shared_ptr<ParsedRDFaAttributes>();
}
- const ::rtl::OUString datatype( i_rDatatype.getLength()
+ const ::rtl::OUString datatype( !i_rDatatype.isEmpty()
? reader.ReadCURIE(i_rDatatype)
: ::rtl::OUString() );
return ::boost::shared_ptr<ParsedRDFaAttributes>(
diff --git a/xmloff/source/core/SettingsExportHelper.cxx b/xmloff/source/core/SettingsExportHelper.cxx
index a99d6e43147d..27182d3ac0ab 100644
--- a/xmloff/source/core/SettingsExportHelper.cxx
+++ b/xmloff/source/core/SettingsExportHelper.cxx
@@ -189,7 +189,7 @@ void XMLSettingsExportHelper::CallTypeFunction(const uno::Any& rAny,
void XMLSettingsExportHelper::exportBool(const sal_Bool bValue, const rtl::OUString& rName) const
{
- DBG_ASSERT(rName.getLength(), "no name");
+ DBG_ASSERT(!rName.isEmpty(), "no name");
m_rContext.AddAttribute( XML_NAME, rName );
m_rContext.AddAttribute( XML_TYPE, XML_BOOLEAN );
m_rContext.StartElement( XML_CONFIG_ITEM, sal_True );
@@ -205,7 +205,7 @@ void XMLSettingsExportHelper::exportBool(const sal_Bool bValue, const rtl::OUStr
void XMLSettingsExportHelper::exportByte(const sal_Int8 nValue, const rtl::OUString& rName) const
{
#if 0
- DBG_ASSERT(rName.getLength(), "no name");
+ DBG_ASSERT(!rName.isEmpty(), "no name");
m_rContext.AddAttribute( XML_NAME, rName );
m_rContext.AddAttribute( XML_TYPE, XML_BYTE );
m_rContext.StartElement( XML_CONFIG_ITEM, sal_True );
@@ -223,7 +223,7 @@ void XMLSettingsExportHelper::exportByte(const sal_Int8 nValue, const rtl::OUStr
}
void XMLSettingsExportHelper::exportShort(const sal_Int16 nValue, const rtl::OUString& rName) const
{
- DBG_ASSERT(rName.getLength(), "no name");
+ DBG_ASSERT(!rName.isEmpty(), "no name");
m_rContext.AddAttribute( XML_NAME, rName );
m_rContext.AddAttribute( XML_TYPE, XML_SHORT );
m_rContext.StartElement( XML_CONFIG_ITEM, sal_True );
@@ -235,7 +235,7 @@ void XMLSettingsExportHelper::exportShort(const sal_Int16 nValue, const rtl::OUS
void XMLSettingsExportHelper::exportInt(const sal_Int32 nValue, const rtl::OUString& rName) const
{
- DBG_ASSERT(rName.getLength(), "no name");
+ DBG_ASSERT(!rName.isEmpty(), "no name");
m_rContext.AddAttribute( XML_NAME, rName );
m_rContext.AddAttribute( XML_TYPE, XML_INT );
m_rContext.StartElement( XML_CONFIG_ITEM, sal_True );
@@ -247,7 +247,7 @@ void XMLSettingsExportHelper::exportInt(const sal_Int32 nValue, const rtl::OUStr
void XMLSettingsExportHelper::exportLong(const sal_Int64 nValue, const rtl::OUString& rName) const
{
- DBG_ASSERT(rName.getLength(), "no name");
+ DBG_ASSERT(!rName.isEmpty(), "no name");
m_rContext.AddAttribute( XML_NAME, rName );
m_rContext.AddAttribute( XML_TYPE, XML_LONG );
m_rContext.StartElement( XML_CONFIG_ITEM, sal_True );
@@ -258,7 +258,7 @@ void XMLSettingsExportHelper::exportLong(const sal_Int64 nValue, const rtl::OUSt
void XMLSettingsExportHelper::exportDouble(const double fValue, const rtl::OUString& rName) const
{
- DBG_ASSERT(rName.getLength(), "no name");
+ DBG_ASSERT(!rName.isEmpty(), "no name");
m_rContext.AddAttribute( XML_NAME, rName );
m_rContext.AddAttribute( XML_TYPE, XML_DOUBLE );
m_rContext.StartElement( XML_CONFIG_ITEM, sal_True );
@@ -270,18 +270,18 @@ void XMLSettingsExportHelper::exportDouble(const double fValue, const rtl::OUStr
void XMLSettingsExportHelper::exportString(const rtl::OUString& sValue, const rtl::OUString& rName) const
{
- DBG_ASSERT(rName.getLength(), "no name");
+ DBG_ASSERT(!rName.isEmpty(), "no name");
m_rContext.AddAttribute( XML_NAME, rName );
m_rContext.AddAttribute( XML_TYPE, XML_STRING );
m_rContext.StartElement( XML_CONFIG_ITEM, sal_True );
- if (sValue.getLength())
+ if (!sValue.isEmpty())
m_rContext.Characters( sValue );
m_rContext.EndElement( sal_False );
}
void XMLSettingsExportHelper::exportDateTime(const util::DateTime& aValue, const rtl::OUString& rName) const
{
- DBG_ASSERT(rName.getLength(), "no name");
+ DBG_ASSERT(!rName.isEmpty(), "no name");
m_rContext.AddAttribute( XML_NAME, rName );
m_rContext.AddAttribute( XML_TYPE, XML_DATETIME );
rtl::OUStringBuffer sBuffer;
@@ -295,7 +295,7 @@ void XMLSettingsExportHelper::exportSequencePropertyValue(
const uno::Sequence<beans::PropertyValue>& aProps,
const rtl::OUString& rName) const
{
- DBG_ASSERT(rName.getLength(), "no name");
+ DBG_ASSERT(!rName.isEmpty(), "no name");
sal_Int32 nLength(aProps.getLength());
if(nLength)
{
@@ -372,7 +372,7 @@ void XMLSettingsExportHelper::exportbase64Binary(
const uno::Sequence<sal_Int8>& aProps,
const rtl::OUString& rName) const
{
- DBG_ASSERT(rName.getLength(), "no name");
+ DBG_ASSERT(!rName.isEmpty(), "no name");
sal_Int32 nLength(aProps.getLength());
m_rContext.AddAttribute( XML_NAME, rName );
m_rContext.AddAttribute( XML_TYPE, XML_BASE64BINARY );
@@ -390,7 +390,7 @@ void XMLSettingsExportHelper::exportMapEntry(const uno::Any& rAny,
const rtl::OUString& rName,
const sal_Bool bNameAccess) const
{
- DBG_ASSERT((bNameAccess && rName.getLength()) || !bNameAccess, "no name");
+ DBG_ASSERT((bNameAccess && !rName.isEmpty()) || !bNameAccess, "no name");
uno::Sequence<beans::PropertyValue> aProps;
rAny >>= aProps;
sal_Int32 nLength = aProps.getLength();
@@ -409,7 +409,7 @@ void XMLSettingsExportHelper::exportNameAccess(
const uno::Reference<container::XNameAccess>& aNamed,
const rtl::OUString& rName) const
{
- DBG_ASSERT(rName.getLength(), "no name");
+ DBG_ASSERT(!rName.isEmpty(), "no name");
DBG_ASSERT(aNamed->getElementType().equals(getCppuType( (uno::Sequence<beans::PropertyValue> *)0 ) ),
"wrong NameAccess" );
if(aNamed->hasElements())
@@ -427,7 +427,7 @@ void XMLSettingsExportHelper::exportIndexAccess(
const uno::Reference<container::XIndexAccess> aIndexed,
const rtl::OUString rName) const
{
- DBG_ASSERT(rName.getLength(), "no name");
+ DBG_ASSERT(!rName.isEmpty(), "no name");
DBG_ASSERT(aIndexed->getElementType().equals(getCppuType( (uno::Sequence<beans::PropertyValue> *)0 ) ),
"wrong IndexAccess" );
rtl::OUString sEmpty;
@@ -515,7 +515,7 @@ void XMLSettingsExportHelper::exportAllSettings(
const uno::Sequence<beans::PropertyValue>& aProps,
const rtl::OUString& rName) const
{
- DBG_ASSERT(rName.getLength(), "no name");
+ DBG_ASSERT(!rName.isEmpty(), "no name");
exportSequencePropertyValue(aProps, rName);
}
diff --git a/xmloff/source/core/XMLBase64ImportContext.cxx b/xmloff/source/core/XMLBase64ImportContext.cxx
index e8bffff1d0a7..41f17ae89d0b 100644
--- a/xmloff/source/core/XMLBase64ImportContext.cxx
+++ b/xmloff/source/core/XMLBase64ImportContext.cxx
@@ -68,10 +68,10 @@ void XMLBase64ImportContext::EndElement()
void XMLBase64ImportContext::Characters( const ::rtl::OUString& rChars )
{
OUString sTrimmedChars( rChars. trim() );
- if( sTrimmedChars.getLength() )
+ if( !sTrimmedChars.isEmpty() )
{
OUString sChars;
- if( sBase64CharsLeft.getLength() )
+ if( !sBase64CharsLeft.isEmpty() )
{
sChars = sBase64CharsLeft;
sChars += sTrimmedChars;
diff --git a/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx b/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx
index 65432b8df4e9..a7db987cdf11 100644
--- a/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx
+++ b/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx
@@ -155,7 +155,7 @@ TYPEINIT1( XMLEmbeddedObjectImportContext, SvXMLImportContext );
sal_Bool XMLEmbeddedObjectImportContext::SetComponent(
Reference< XComponent >& rComp )
{
- if( !rComp.is() || !sFilterService.getLength() )
+ if( !rComp.is() || sFilterService.isEmpty() )
return sal_False;
@@ -238,7 +238,7 @@ XMLEmbeddedObjectImportContext::XMLEmbeddedObjectImportContext(
}
}
- if( sClass.getLength() )
+ if( !sClass.isEmpty() )
{
const XMLServiceMapEntry_Impl *pEntry = aServiceMap;
while( pEntry->eClass != XML_TOKEN_INVALID )
@@ -303,7 +303,7 @@ void XMLEmbeddedObjectImportContext::StartElement(
while( USHRT_MAX != nPos )
{
OUString aAttrName( rNamespaceMap.GetAttrNameByKey( nPos ) );
- if( 0 == xAttrList->getValueByName( aAttrName ).getLength() )
+ if( xAttrList->getValueByName( aAttrName ).isEmpty() )
{
pAttrList->AddAttribute( aAttrName,
rNamespaceMap.GetNameByKey( nPos ) );
diff --git a/xmloff/source/core/nmspmap.cxx b/xmloff/source/core/nmspmap.cxx
index 24605cedb849..383df82b8b62 100644
--- a/xmloff/source/core/nmspmap.cxx
+++ b/xmloff/source/core/nmspmap.cxx
@@ -194,7 +194,7 @@ OUString SvXMLNamespaceMap::GetAttrNameByKey( sal_uInt16 nKey ) const
{
sAttrName.append( sXMLNS );
const ::rtl::OUString & prefix( (*aIter).second->sPrefix );
- if (prefix.getLength()) // not default namespace
+ if (!prefix.isEmpty()) // not default namespace
{
sAttrName.append( sal_Unicode(':') );
sAttrName.append( prefix );
@@ -223,7 +223,7 @@ OUString SvXMLNamespaceMap::GetQNameByKey( sal_uInt16 nKey,
// don't bother caching this, it rarely happens
OUStringBuffer sQName;
sQName.append ( sXMLNS );
- if (rLocalName.getLength()) // not default namespace
+ if (!rLocalName.isEmpty()) // not default namespace
{
sQName.append ( sal_Unicode(':') );
sQName.append ( rLocalName );
@@ -256,7 +256,7 @@ OUString SvXMLNamespaceMap::GetQNameByKey( sal_uInt16 nKey,
OUStringBuffer sQName;
// ...if it's in our map, make the prefix
const OUString & prefix( (*aIter).second->sPrefix );
- if (prefix.getLength()) // not default namespace
+ if (!prefix.isEmpty()) // not default namespace
{
sQName.append( prefix );
sQName.append( sal_Unicode(':') );
diff --git a/xmloff/source/core/unoatrcn.cxx b/xmloff/source/core/unoatrcn.cxx
index b3f62c2d6394..8fe03e48e517 100644
--- a/xmloff/source/core/unoatrcn.cxx
+++ b/xmloff/source/core/unoatrcn.cxx
@@ -87,7 +87,7 @@ sal_uInt16 SvUnoAttributeContainer::getIndexByName(const OUString& aName ) const
for( sal_uInt16 nAttr = 0; nAttr < nAttrCount; nAttr++ )
{
if( mpContainer->GetAttrLName(nAttr) == aName &&
- mpContainer->GetAttrPrefix(nAttr).getLength() == 0L )
+ mpContainer->GetAttrPrefix(nAttr).isEmpty() )
return nAttr;
}
}
@@ -202,7 +202,7 @@ void SAL_CALL SvUnoAttributeContainer::replaceByName(const OUString& aName, cons
const OUString aPrefix( aName.copy( 0L, nPos ));
const OUString aLName( aName.copy( nPos+1L ));
- if( pData->Namespace.getLength() == 0L )
+ if( pData->Namespace.isEmpty() )
{
if( mpContainer->SetAt( nAttr, aPrefix, aLName, pData->Value ) )
return;
@@ -215,7 +215,7 @@ void SAL_CALL SvUnoAttributeContainer::replaceByName(const OUString& aName, cons
}
else
{
- if( pData->Namespace.getLength() == 0L )
+ if( pData->Namespace.isEmpty() )
{
if( mpContainer->SetAt( nAttr, aName, pData->Value ) )
return;
@@ -245,7 +245,7 @@ throw( lang::IllegalArgumentException, container::ElementExistException, lang::W
const OUString aPrefix( aName.copy( 0L, nPos ));
const OUString aLName( aName.copy( nPos+1L ));
- if( pData->Namespace.getLength() == 0L )
+ if( pData->Namespace.isEmpty() )
{
if( mpContainer->AddAttr( aPrefix, aLName, pData->Value ) )
return;
@@ -258,7 +258,7 @@ throw( lang::IllegalArgumentException, container::ElementExistException, lang::W
}
else
{
- if( pData->Namespace.getLength() == 0L )
+ if( pData->Namespace.isEmpty() )
{
if( mpContainer->AddAttr( aName, pData->Value ) )
return;
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index 10d8dcc65e4e..ce0430241d05 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -827,10 +827,10 @@ void SAL_CALL SvXMLExport::initialize( const uno::Sequence< uno::Any >& aArgumen
uno::Any aAny = mxExportInfo->getPropertyValue(sPropName);
aAny >>= sName;
}
- if( msOrigFileName.getLength() && sName.getLength() )
+ if( !msOrigFileName.isEmpty() && !sName.isEmpty() )
{
INetURLObject aBaseURL( msOrigFileName );
- if( sRelPath.getLength() )
+ if( !sRelPath.isEmpty() )
aBaseURL.insertName( sRelPath );
aBaseURL.insertName( sName );
msOrigFileName = aBaseURL.GetMainURL(INetURLObject::DECODE_TO_IURI);
@@ -875,7 +875,7 @@ sal_Bool SAL_CALL SvXMLExport::filter( const uno::Sequence< beans::PropertyValue
{
const sal_uInt32 nTest =
EXPORT_META|EXPORT_STYLES|EXPORT_CONTENT|EXPORT_SETTINGS;
- if( (mnExportFlags & nTest) == nTest && !msOrigFileName.getLength() )
+ if( (mnExportFlags & nTest) == nTest && msOrigFileName.isEmpty() )
{
// evaluate descriptor only for flat files and if a base URI
// has not been provided already
@@ -2180,7 +2180,7 @@ sal_Bool SvXMLExport::ExportEmbeddedOwnObject( Reference< XComponent >& rComp )
OSL_ENSURE( sFilterService.getLength(), "no export filter for own object" );
- if( !sFilterService.getLength() )
+ if( sFilterService.isEmpty() )
return sal_False;
Reference < XDocumentHandler > xHdl =
@@ -2239,7 +2239,7 @@ OUString SvXMLExport::GetRelativeReference(const OUString& rValue)
// #i65474# handling of fragment URLs ("#....") is undefined
// they are stored 'as is'
uno::Reference< uri::XUriReference > xUriRef;
- if(sValue.getLength() && sValue.getStr()[0] != '#')
+ if(!sValue.isEmpty() && sValue.getStr()[0] != '#')
{
try
{
@@ -2514,10 +2514,10 @@ SvXMLExport::AddAttributeXmlId(uno::Reference<uno::XInterface> const & i_xIfc)
if ( xMeta.is() )
{
const beans::StringPair mdref( xMeta->getMetadataReference() );
- if ( mdref.Second.getLength() )
+ if ( !mdref.Second.isEmpty() )
{
const ::rtl::OUString streamName( GetStreamName() );
- if ( streamName.getLength() )
+ if ( !streamName.isEmpty() )
{
if ( streamName.equals(mdref.First) )
{
@@ -2564,7 +2564,7 @@ SvXMLExport::AddAttributesRDFa(
const uno::Reference<rdf::XMetadatable> xMeta(
i_xTextContent, uno::UNO_QUERY);
- if (!xMeta.is() || !xMeta->getMetadataReference().Second.getLength())
+ if (!xMeta.is() || xMeta->getMetadataReference().Second.isEmpty())
{
return; // no xml:id => no RDFa
}
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index 2af9a831c162..6213ad9b69df 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -905,9 +905,9 @@ void SAL_CALL SvXMLImport::initialize( const uno::Sequence< uno::Any >& aArgumen
uno::Any aAny = mxImportInfo->getPropertyValue(sPropName);
aAny >>= sName;
}
- if( sBaseURI.getLength() && sName.getLength() )
+ if( !sBaseURI.isEmpty() && !sName.isEmpty() )
{
- if( sRelPath.getLength() )
+ if( !sRelPath.isEmpty() )
mpImpl->aBaseURL.insertName( sRelPath );
mpImpl->aBaseURL.insertName( sName );
}
@@ -1191,14 +1191,14 @@ sal_Bool SvXMLImport::IsPackageURL( const ::rtl::OUString& rURL ) const
sRet = mxGraphicResolver->resolveGraphicObjectURL( aTmp );
}
- if( !sRet.getLength() )
+ if( sRet.isEmpty() )
{
sRet = msPackageProtocol;
sRet += rURL;
}
}
- if( !sRet.getLength() )
+ if( sRet.isEmpty() )
sRet = GetAbsoluteReference( rURL );
return sRet;
@@ -1237,7 +1237,7 @@ Reference< XOutputStream > SvXMLImport::GetStreamForGraphicObjectURLFromBase64()
if ( mxEmbeddedResolver.is() )
{
OUString sURL( rURL );
- if( rClassId.getLength() )
+ if( !rClassId.isEmpty() )
{
sURL += OUString( sal_Unicode('!') );
sURL += rClassId;
@@ -1325,7 +1325,7 @@ OUString SvXMLImport::GetStyleDisplayName( sal_uInt16 nFamily,
const OUString& rName ) const
{
OUString sName( rName );
- if( mpStyleMap && rName.getLength() )
+ if( mpStyleMap && !rName.isEmpty() )
{
StyleMap::key_type aKey( nFamily, rName );
StyleMap::const_iterator aIter = mpStyleMap->find( aKey );
@@ -1526,7 +1526,7 @@ const SvXMLStylesContext *SvXMLImport::GetAutoStyles() const
OUString SvXMLImport::GetAbsoluteReference(const OUString& rValue) const
{
- if( rValue.getLength() == 0 || rValue[0] == '#' )
+ if( rValue.isEmpty() || rValue[0] == '#' )
return rValue;
INetURLObject aAbsURL;
@@ -1541,7 +1541,7 @@ sal_Bool SvXMLImport::IsODFVersionConsistent( const ::rtl::OUString& aODFVersion
// the check returns sal_False only if the storage version could be retrieved
sal_Bool bResult = sal_True;
- if ( aODFVersion.getLength() && aODFVersion.compareTo( ODFVER_012_TEXT ) >= 0 )
+ if ( !aODFVersion.isEmpty() && aODFVersion.compareTo( ODFVER_012_TEXT ) >= 0 )
{
// check the consistency only for the ODF1.2 and later ( according to content.xml )
// manifest.xml might have no version, it should be checked here and the correct version should be set
@@ -1575,7 +1575,7 @@ sal_Bool SvXMLImport::IsODFVersionConsistent( const ::rtl::OUString& aODFVersion
// if not, set it explicitly to be used further ( it will work even for readonly storage )
// This workaround is not nice, but I see no other way to handle it, since there are
// ODF1.2 documents without version in manifest.xml
- if ( aStorVersion.getLength() )
+ if ( !aStorVersion.isEmpty() )
bResult = aODFVersion.equals( aStorVersion );
else
xStorProps->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Version" ) ),
@@ -1821,7 +1821,7 @@ bool SvXMLImport::getBuildIds( sal_Int32& rUPD, sal_Int32& rBuild ) const
{
OUString aBuildId;
mxImportInfo->getPropertyValue( aPropName ) >>= aBuildId;
- if( aBuildId.getLength() )
+ if( !aBuildId.isEmpty() )
{
sal_Int32 nIndex = aBuildId.indexOf('$');
if( nIndex != -1 )
@@ -1869,7 +1869,7 @@ bool SvXMLImport::isGraphicLoadOnDemandSupported() const
void SvXMLImport::SetXmlId(uno::Reference<uno::XInterface> const & i_xIfc,
::rtl::OUString const & i_rXmlId)
{
- if (i_rXmlId.getLength() > 0) {
+ if (!i_rXmlId.isEmpty()) {
try {
const uno::Reference<rdf::XMetadatable> xMeta(i_xIfc,
uno::UNO_QUERY);
diff --git a/xmloff/source/core/xmluconv.cxx b/xmloff/source/core/xmluconv.cxx
index 3ec1a49febeb..1109eb5be0ea 100644
--- a/xmloff/source/core/xmluconv.cxx
+++ b/xmloff/source/core/xmluconv.cxx
@@ -543,7 +543,7 @@ sal_Bool SvXMLTokenEnumerator::getNextToken( OUString& rToken )
bool lcl_getPositions(const OUString& _sValue,OUString& _rContentX,OUString& _rContentY,OUString& _rContentZ)
{
- if(!_sValue.getLength() || _sValue[0] != '(')
+ if(_sValue.isEmpty() || _sValue[0] != '(')
return false;
sal_Int32 nPos(1L);
diff --git a/xmloff/source/draw/XMLImageMapExport.cxx b/xmloff/source/draw/XMLImageMapExport.cxx
index 9c8347b0ab7c..0f90d8840ec0 100644
--- a/xmloff/source/draw/XMLImageMapExport.cxx
+++ b/xmloff/source/draw/XMLImageMapExport.cxx
@@ -188,7 +188,7 @@ void XMLImageMapExport::ExportMapEntry(
Any aAny = rPropertySet->getPropertyValue(msURL);
OUString sHref;
aAny >>= sHref;
- if (sHref.getLength() > 0)
+ if (!sHref.isEmpty())
{
mrExport.AddAttribute(XML_NAMESPACE_XLINK, XML_HREF, mrExport.GetRelativeReference(sHref));
}
@@ -198,7 +198,7 @@ void XMLImageMapExport::ExportMapEntry(
aAny = rPropertySet->getPropertyValue(msTarget);
OUString sTargt;
aAny >>= sTargt;
- if (sTargt.getLength() > 0)
+ if (!sTargt.isEmpty())
{
mrExport.AddAttribute(
XML_NAMESPACE_OFFICE, XML_TARGET_FRAME_NAME, sTargt);
@@ -213,7 +213,7 @@ void XMLImageMapExport::ExportMapEntry(
aAny = rPropertySet->getPropertyValue(msName);
OUString sItemName;
aAny >>= sItemName;
- if (sItemName.getLength() > 0)
+ if (!sItemName.isEmpty())
{
mrExport.AddAttribute(XML_NAMESPACE_OFFICE, XML_NAME, sItemName);
}
@@ -251,7 +251,7 @@ void XMLImageMapExport::ExportMapEntry(
// title property (as <svg:title> element)
OUString sTitle;
rPropertySet->getPropertyValue(msTitle) >>= sTitle;
- if(sTitle.getLength())
+ if(!sTitle.isEmpty())
{
SvXMLElementExport aEventElemt(mrExport, XML_NAMESPACE_SVG, XML_TITLE, mbWhiteSpace, sal_False);
mrExport.Characters(sTitle);
@@ -260,7 +260,7 @@ void XMLImageMapExport::ExportMapEntry(
// description property (as <svg:desc> element)
OUString sDescription;
rPropertySet->getPropertyValue(msDescription) >>= sDescription;
- if (sDescription.getLength() > 0)
+ if (!sDescription.isEmpty())
{
SvXMLElementExport aDesc(mrExport, XML_NAMESPACE_SVG, XML_DESC, mbWhiteSpace, sal_False);
mrExport.Characters(sDescription);
diff --git a/xmloff/source/draw/XMLNumberStyles.cxx b/xmloff/source/draw/XMLNumberStyles.cxx
index 6f9b3b56cdd3..6ef4815fb6d1 100644
--- a/xmloff/source/draw/XMLNumberStyles.cxx
+++ b/xmloff/source/draw/XMLNumberStyles.cxx
@@ -644,7 +644,7 @@ void SdXMLNumberFormatImportContext::add( OUString& rNumberStyle, sal_Bool bLong
(pStyleMember->mbLong == bLong) &&
(pStyleMember->mbTextual == bTextual) &&
(pStyleMember->mbDecimal02 == bDecimal02) &&
- ( ( (pStyleMember->mpText == NULL) && (rText.getLength() == 0) ) ||
+ ( ( (pStyleMember->mpText == NULL) && (rText.isEmpty()) ) ||
( pStyleMember->mpText && (rText.compareToAscii( pStyleMember->mpText ) == 0 )) ) ) )
{
mnElements[mnIndex++] = nIndex + 1;
diff --git a/xmloff/source/draw/XMLReplacementImageContext.cxx b/xmloff/source/draw/XMLReplacementImageContext.cxx
index 0043beeffda8..1486554b0c48 100644
--- a/xmloff/source/draw/XMLReplacementImageContext.cxx
+++ b/xmloff/source/draw/XMLReplacementImageContext.cxx
@@ -82,12 +82,12 @@ XMLReplacementImageContext::~XMLReplacementImageContext()
void XMLReplacementImageContext::EndElement()
{
- OSL_ENSURE( m_sHRef.getLength() > 0 || m_xBase64Stream.is(),
+ OSL_ENSURE( !m_sHRef.isEmpty() || m_xBase64Stream.is(),
"neither URL nor base64 image data given" );
UniReference < XMLTextImportHelper > xTxtImport =
GetImport().GetTextImport();
OUString sHRef;
- if( m_sHRef.getLength() )
+ if( !m_sHRef.isEmpty() )
{
sal_Bool bForceLoad = xTxtImport->IsInsertMode() ||
xTxtImport->IsBlockMode() ||
diff --git a/xmloff/source/draw/XMLShapeStyleContext.cxx b/xmloff/source/draw/XMLShapeStyleContext.cxx
index 6a8c84783a4b..200f67fd0566 100644
--- a/xmloff/source/draw/XMLShapeStyleContext.cxx
+++ b/xmloff/source/draw/XMLShapeStyleContext.cxx
@@ -76,7 +76,7 @@ XMLShapeStyleContext::~XMLShapeStyleContext()
void XMLShapeStyleContext::SetAttribute( sal_uInt16 nPrefixKey, const ::rtl::OUString& rLocalName, const ::rtl::OUString& rValue )
{
- if ((0 == m_sControlDataStyleName.getLength()) && (::xmloff::token::GetXMLToken(::xmloff::token::XML_DATA_STYLE_NAME) == rLocalName))
+ if (m_sControlDataStyleName.isEmpty() && (::xmloff::token::GetXMLToken(::xmloff::token::XML_DATA_STYLE_NAME) == rLocalName))
{
m_sControlDataStyleName = rValue;
}
@@ -91,7 +91,7 @@ void XMLShapeStyleContext::SetAttribute( sal_uInt16 nPrefixKey, const ::rtl::OUS
if( (XML_NAMESPACE_STYLE == nPrefixKey) &&
( IsXMLToken( rLocalName, ::xmloff::token::XML_NAME ) || IsXMLToken( rLocalName, ::xmloff::token::XML_DISPLAY_NAME ) ) )
{
- if( GetName().getLength() && GetDisplayName().getLength() && GetName() != GetDisplayName() )
+ if( !GetName().isEmpty() && !GetDisplayName().isEmpty() && GetName() != GetDisplayName() )
{
const_cast< SvXMLImport&>( GetImport() ).
AddStyleDisplayName( GetFamily(), GetName(), GetDisplayName() );
@@ -162,7 +162,7 @@ void XMLShapeStyleContext::FillPropertySet( const Reference< beans::XPropertySet
// if we did not find an old list-style-name in the properties, and we need one
// because we got a style:list-style attribute in the style-style element
// we generate one
- if( (property == end) && ( 0 != m_sListStyleName.getLength() ) )
+ if( (property == end) && ( !m_sListStyleName.isEmpty() ) )
{
sal_Int32 nIndex = rMapper->FindEntryIndex( CTF_SD_NUMBERINGRULES_NAME );
DBG_ASSERT( -1 != nIndex, "can't find numbering rules property entry, can't set numbering rule!" );
@@ -177,7 +177,7 @@ void XMLShapeStyleContext::FillPropertySet( const Reference< beans::XPropertySet
// a numbering rule
if( property != end )
{
- if( 0 == m_sListStyleName.getLength() )
+ if( m_sListStyleName.isEmpty() )
{
property->maValue >>= m_sListStyleName;
}
@@ -301,7 +301,7 @@ void XMLShapeStyleContext::FillPropertySet( const Reference< beans::XPropertySet
}
}
- if (m_sControlDataStyleName.getLength())
+ if (!m_sControlDataStyleName.isEmpty())
{ // we had a data-style-name attribute
// set the formatting on the control model of the control shape
diff --git a/xmloff/source/draw/animationexport.cxx b/xmloff/source/draw/animationexport.cxx
index 36bb889c141b..8d893d0b04e6 100644
--- a/xmloff/source/draw/animationexport.cxx
+++ b/xmloff/source/draw/animationexport.cxx
@@ -594,7 +594,7 @@ void AnimationsExporterImpl::exportTransitionNode()
OUStringBuffer sTmp;
- if( (nTransition != 0) || (sSoundURL.getLength() != 0) || bStopSound )
+ if( (nTransition != 0) || !sSoundURL.isEmpty() || bStopSound )
{
Reference< XInterface > xSource( mxPageProps.get() );
Event aEvent;
@@ -647,7 +647,7 @@ void AnimationsExporterImpl::exportTransitionNode()
mrExport.AddAttribute( XML_NAMESPACE_ANIMATION, XML_COMMAND, XML_STOP_AUDIO );
SvXMLElementExport aElement2( mrExport, XML_NAMESPACE_ANIMATION, XML_COMMAND, sal_True, sal_True );
}
- else if( sSoundURL.getLength() != 0)
+ else if( !sSoundURL.isEmpty())
{
mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, mrExport.GetRelativeReference( sSoundURL ) );
@@ -681,7 +681,7 @@ void AnimationsExporterImpl::prepareTransitionNode()
bStopSound = sal_False;
}
- if( (nTransition != 0) || (sSoundURL.getLength() != 0) || bStopSound )
+ if( (nTransition != 0) || !sSoundURL.isEmpty() || bStopSound )
{
mbHasTransition = true;
Reference< XInterface > xInt( mxPageProps.get() );
@@ -782,7 +782,7 @@ void AnimationsExporterImpl::exportNode( const Reference< XAnimationNode >& xNod
OUStringBuffer sTmp;
const OUString& rExportIdentifier = mrExport.getInterfaceToIdentifierMapper().getIdentifier( xNode );
- if( rExportIdentifier.getLength() )
+ if( !rExportIdentifier.isEmpty() )
{
mrExport.AddAttributeIdLegacy(
XML_NAMESPACE_ANIMATION, rExportIdentifier);
@@ -958,7 +958,7 @@ void AnimationsExporterImpl::exportNode( const Reference< XAnimationNode >& xNod
if( xMaster.is() )
{
const OUString& rIdentifier = mrExport.getInterfaceToIdentifierMapper().getIdentifier(xMaster);
- if( rIdentifier.getLength() )
+ if( !rIdentifier.isEmpty() )
mrExport.AddAttribute( XML_NAMESPACE_PRESENTATION, XML_MASTER_ELEMENT, rIdentifier );
}
}
@@ -1147,7 +1147,7 @@ void AnimationsExporterImpl::exportAnimate( const Reference< XAnimate >& xAnimat
else
{
OUString sTemp( xAnimate->getAttributeName() );
- if( sTemp.getLength() )
+ if( !sTemp.isEmpty() )
{
ImplAttributeNameConversion* p = getAnimationAttributeNamesConversionList();
while( p->mpAPIName )
@@ -1221,7 +1221,7 @@ void AnimationsExporterImpl::exportAnimate( const Reference< XAnimate >& xAnimat
}
OUString sTemp( xAnimate->getFormula() );
- if( sTemp.getLength() )
+ if( !sTemp.isEmpty() )
mrExport.AddAttribute( XML_NAMESPACE_ANIMATION, XML_FORMULA, sTemp );
if( (nNodeType != AnimationNodeType::TRANSITIONFILTER) &&
@@ -1376,7 +1376,7 @@ void AnimationsExporterImpl::exportAudio( const Reference< XAudio >& xAudio )
{
OUString aSourceURL;
xAudio->getSource() >>= aSourceURL;
- if( aSourceURL.getLength() )
+ if( !aSourceURL.isEmpty() )
mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, mrExport.GetRelativeReference( aSourceURL ) );
const double fVolume = xAudio->getVolume();
@@ -1645,7 +1645,7 @@ void AnimationsExporterImpl::convertTarget( OUStringBuffer& sTmp, const Any& rTa
if( xRef.is() )
{
const OUString& rIdentifier = mrExport.getInterfaceToIdentifierMapper().getIdentifier(xRef);
- if( rIdentifier.getLength() )
+ if( !rIdentifier.isEmpty() )
sTmp.append( rIdentifier );
}
}
diff --git a/xmloff/source/draw/animationimport.cxx b/xmloff/source/draw/animationimport.cxx
index 90387a43456b..929d8ad2e186 100644
--- a/xmloff/source/draw/animationimport.cxx
+++ b/xmloff/source/draw/animationimport.cxx
@@ -470,7 +470,7 @@ Any AnimationsImportHelperImpl::convertValue( XMLTokenEnum eAttributeName, const
case XML_VISIBILITY: nType = XML_SD_TYPE_PRESPAGE_VISIBILITY; break;
default:
- if( rValue.getLength() )
+ if( !rValue.isEmpty() )
aAny <<= rValue;
return aAny;
}
@@ -488,7 +488,7 @@ Sequence< Any > AnimationsImportHelperImpl::convertValueSequence( XMLTokenEnum e
Sequence< Any > aValues;
// do we have any value at all?
- if( rValue.getLength() )
+ if( !rValue.isEmpty() )
{
sal_Int32 nElements = count_codes( rValue, (sal_Unicode)';') + 1; // a non empty string has at least one value
@@ -512,7 +512,7 @@ Any AnimationsImportHelperImpl::convertTiming( const OUString& rValue )
Any aAny;
// do we have any value at all?
- if( rValue.getLength() )
+ if( !rValue.isEmpty() )
{
// count the values
sal_Int32 nElements = count_codes( rValue, (sal_Unicode)';' ) + 1; // a non empty string has at least one value
@@ -591,7 +591,7 @@ Sequence< double > AnimationsImportHelperImpl::convertKeyTimes( const OUString&
{
sal_Int32 nElements = 0;
- if( rValue.getLength() )
+ if( !rValue.isEmpty() )
nElements = count_codes( rValue, (sal_Unicode)';' ) + 1; // a non empty string has at least one value
Sequence< double > aKeyTimes( nElements );
@@ -611,7 +611,7 @@ Sequence< TimeFilterPair > AnimationsImportHelperImpl::convertTimeFilter( const
{
sal_Int32 nElements = 0;
- if( rValue.getLength() )
+ if( !rValue.isEmpty() )
nElements = count_codes( rValue, (sal_Unicode)';' ) + 1; // a non empty string has at least one value
Sequence< TimeFilterPair > aTimeFilter( nElements );
@@ -1221,7 +1221,7 @@ void AnimationNodeContext::init_node( const ::com::sun::star::uno::Reference< :
}
}
- if (sXmlId.getLength())
+ if (!sXmlId.isEmpty())
{
Reference< XInterface > const xRef( mxNode, UNO_QUERY );
GetImport().getInterfaceToIdentifierMapper().registerReference(
@@ -1244,16 +1244,16 @@ void AnimationNodeContext::init_node( const ::com::sun::star::uno::Reference< :
// convert values
if( xAnimate.is() )
{
- if( aFrom.getLength() )
+ if( !aFrom.isEmpty() )
xAnimate->setFrom( mpHelper->convertValue( meAttributeName, aFrom ) );
- if( aBy.getLength() )
+ if( !aBy.isEmpty() )
xAnimate->setBy( mpHelper->convertValue( meAttributeName, aBy ) );
- if( aTo.getLength() )
+ if( !aTo.isEmpty() )
xAnimate->setTo( mpHelper->convertValue( meAttributeName, aTo ) );
- if( aValues.getLength() )
+ if( !aValues.isEmpty() )
xAnimate->setValues( mpHelper->convertValueSequence( meAttributeName, aValues ) );
}
}
@@ -1424,7 +1424,7 @@ void AnimationNodeContext::postProcessRootNode( SvXMLImport& /*rImport*/, const
{
Reference< XAudio > xAudio( xChildNode, UNO_QUERY_THROW );
OUString sSoundURL;
- if( (xAudio->getSource() >>= sSoundURL) && (sSoundURL.getLength() != 0) )
+ if( (xAudio->getSource() >>= sSoundURL) && !sSoundURL.isEmpty() )
{
xPageProps->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "Sound" ) ), Any(sSoundURL) );
diff --git a/xmloff/source/draw/animexp.cxx b/xmloff/source/draw/animexp.cxx
index f0c2bc30961e..86ae42ce1290 100644
--- a/xmloff/source/draw/animexp.cxx
+++ b/xmloff/source/draw/animexp.cxx
@@ -527,7 +527,7 @@ void XMLAnimationsExporter::exportAnimations( SvXMLExport& rExport )
}
SvXMLElementExport aEle( rExport, XML_NAMESPACE_PRESENTATION, eLocalName, sal_True, sal_True );
- if( rEffect.maSoundURL.getLength() != 0 )
+ if( !rEffect.maSoundURL.isEmpty() )
{
rExport.AddAttribute(XML_NAMESPACE_XLINK, XML_HREF, rExport.GetRelativeReference(rEffect.maSoundURL) );
rExport.AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE );
diff --git a/xmloff/source/draw/animimp.cxx b/xmloff/source/draw/animimp.cxx
index 7ba3002e4c5d..141101750a7b 100644
--- a/xmloff/source/draw/animimp.cxx
+++ b/xmloff/source/draw/animimp.cxx
@@ -579,7 +579,7 @@ void XMLAnimationsEffectContext::EndElement()
UniReference< XMLShapeImportHelper > xShapeImport( GetImport().GetShapeImport() );
Any aAny;
- if( maShapeId.getLength() )
+ if( !maShapeId.isEmpty() )
{
Reference< XPropertySet > xSet;
if( mpImpl->maLastShapeId != maShapeId )
@@ -635,7 +635,7 @@ void XMLAnimationsEffectContext::EndElement()
xSet->setPropertyValue( mbTextEffect ? mpImpl->msTextEffect : mpImpl->msEffect, makeAny( eEffect ) );
xSet->setPropertyValue( mpImpl->msSpeed, makeAny( meSpeed ) );
- if( eEffect == AnimationEffect_PATH && maPathShapeId.getLength() )
+ if( eEffect == AnimationEffect_PATH && !maPathShapeId.isEmpty() )
{
Reference< XShape > xPath( GetImport().getInterfaceToIdentifierMapper().getReference( maPathShapeId ), UNO_QUERY );
if( xPath.is() )
@@ -644,7 +644,7 @@ void XMLAnimationsEffectContext::EndElement()
}
}
}
- if( maSoundURL.getLength() != 0 )
+ if( !maSoundURL.isEmpty() )
{
if( xSet.is() )
{
diff --git a/xmloff/source/draw/descriptionimp.cxx b/xmloff/source/draw/descriptionimp.cxx
index de7f866944ce..7b263157f8eb 100644
--- a/xmloff/source/draw/descriptionimp.cxx
+++ b/xmloff/source/draw/descriptionimp.cxx
@@ -65,7 +65,7 @@ SdXMLDescriptionContext::~SdXMLDescriptionContext()
void SdXMLDescriptionContext::EndElement()
{
- if( msText.getLength() ) try
+ if( !msText.isEmpty() ) try
{
uno::Reference< beans::XPropertySet > xPropSet(mxShape, uno::UNO_QUERY_THROW);
if(IsXMLToken(GetLocalName(),XML_TITLE))
diff --git a/xmloff/source/draw/eventimp.cxx b/xmloff/source/draw/eventimp.cxx
index 423e223f48b5..202b5c73097a 100644
--- a/xmloff/source/draw/eventimp.cxx
+++ b/xmloff/source/draw/eventimp.cxx
@@ -286,7 +286,7 @@ SdXMLEventContext::SdXMLEventContext( SvXMLImport& rImp, sal_uInt16 nPrfx, cons
}
if( mbValid )
- mbValid = sEventName.getLength() != 0;
+ mbValid = !sEventName.isEmpty();
}
SdXMLEventContext::~SdXMLEventContext()
diff --git a/xmloff/source/draw/layerexp.cxx b/xmloff/source/draw/layerexp.cxx
index d768624d6a1b..c049de918b06 100644
--- a/xmloff/source/draw/layerexp.cxx
+++ b/xmloff/source/draw/layerexp.cxx
@@ -78,14 +78,14 @@ void SdXMLayerExporter::exportLayer( SvXMLExport& rExport )
{
Reference< XPropertySet> xLayer( xLayerManager->getByIndex( nIndex ), UNO_QUERY_THROW );
xLayer->getPropertyValue( strName ) >>= sTmp;
- if(sTmp.getLength())
+ if(!sTmp.isEmpty())
rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_NAME, sTmp );
SvXMLElementExport aEle( rExport, XML_NAMESPACE_DRAW, XML_LAYER, sal_True, sal_True );
// title property (as <svg:title> element)
xLayer->getPropertyValue(strTitle) >>= sTmp;
- if(sTmp.getLength())
+ if(!sTmp.isEmpty())
{
SvXMLElementExport aEventElemt(rExport, XML_NAMESPACE_SVG, XML_TITLE, sal_True, sal_False);
rExport.Characters(sTmp);
@@ -93,7 +93,7 @@ void SdXMLayerExporter::exportLayer( SvXMLExport& rExport )
// description property (as <svg:desc> element)
xLayer->getPropertyValue(strDescription) >>= sTmp;
- if(sTmp.getLength() > 0)
+ if(!sTmp.isEmpty())
{
SvXMLElementExport aDesc(rExport, XML_NAMESPACE_SVG, XML_DESC, sal_True, sal_False);
rExport.Characters(sTmp);
diff --git a/xmloff/source/draw/layerimp.cxx b/xmloff/source/draw/layerimp.cxx
index 7b6feb51fb23..1ab2901f22e3 100644
--- a/xmloff/source/draw/layerimp.cxx
+++ b/xmloff/source/draw/layerimp.cxx
@@ -122,8 +122,8 @@ SvXMLImportContext * SdXMLLayerContext::CreateChildContext( sal_uInt16 nPrefix,
void SdXMLLayerContext::EndElement()
{
- DBG_ASSERT( msName.getLength(), "xmloff::SdXMLLayerContext::EndElement(), draw:layer element without draw:name!" );
- if( msName.getLength() ) try
+ DBG_ASSERT( !msName.isEmpty(), "xmloff::SdXMLLayerContext::EndElement(), draw:layer element without draw:name!" );
+ if( !msName.isEmpty() ) try
{
Reference< XPropertySet > xLayer;
diff --git a/xmloff/source/draw/sdpropls.cxx b/xmloff/source/draw/sdpropls.cxx
index 88ffa2ee9986..448d92133ecb 100644
--- a/xmloff/source/draw/sdpropls.cxx
+++ b/xmloff/source/draw/sdpropls.cxx
@@ -797,7 +797,7 @@ sal_Bool XMLMoveSizeProtectHdl::exportXML( OUString& rStrExpValue, const Any& rV
if( bValue )
{
- if( rStrExpValue.getLength() )
+ if( !rStrExpValue.isEmpty() )
rStrExpValue += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( " " ) );
rStrExpValue += GetXMLToken( mnType == XML_SD_TYPE_MOVE_PROTECT ? XML_POSITION : XML_SIZE );
@@ -1288,7 +1288,7 @@ void XMLShapeExportPropertyMapper::ContextFilter(
case CTF_FILLBITMAPNAME:
{
OUString aStr;
- if( (property->maValue >>= aStr) && 0 == aStr.getLength() )
+ if( (property->maValue >>= aStr) && aStr.isEmpty() )
property->mnIndex = -1;
}
break;
@@ -1671,7 +1671,7 @@ void XMLPageExportPropertyMapper::ContextFilter(
{
OUString aValue;
(*property).maValue >>= aValue;
- if( aValue.getLength() == 0 )
+ if( aValue.isEmpty() )
(*property).mnIndex = -1;
}
break;
@@ -1735,7 +1735,7 @@ void XMLPageExportPropertyMapper::handleElementItem(
case CTF_PAGE_SOUND_URL:
{
OUString aSoundURL;
- if( (rProperty.maValue >>= aSoundURL) && aSoundURL.getLength() != 0 )
+ if( (rProperty.maValue >>= aSoundURL) && !aSoundURL.isEmpty() )
{
mrExport.AddAttribute(XML_NAMESPACE_XLINK, XML_HREF, mrExport.GetRelativeReference(aSoundURL) );
mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE );
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index 9a79cf76f7f6..9768c5d0ba74 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -1432,14 +1432,14 @@ void SdXMLExport::ImpWritePageMasterInfos()
ImpXMLEXPPageMasterInfo* SdXMLExport::ImpGetPageMasterInfoByName(const OUString& rName)
{
- if(rName.getLength() && !mpPageMasterInfoList->empty())
+ if(!rName.isEmpty() && !mpPageMasterInfoList->empty())
{
for( size_t nCnt = 0; nCnt < mpPageMasterInfoList->size(); nCnt++)
{
ImpXMLEXPPageMasterInfo* pInfo = mpPageMasterInfoList->at(nCnt);
if(pInfo)
{
- if(pInfo->GetMasterPageName().getLength() && rName.equals(pInfo->GetMasterPageName()))
+ if(!pInfo->GetMasterPageName().isEmpty() && rName.equals(pInfo->GetMasterPageName()))
{
return pInfo;
}
@@ -1550,7 +1550,7 @@ HeaderFooterPageSettingsImpl SdXMLExport::ImpPrepDrawPageHeaderFooterDecls( cons
if( xInfo->hasPropertyByName( aStrHeaderTextProp ) )
{
xSet->getPropertyValue( aStrHeaderTextProp ) >>= aStrText;
- if( aStrText.getLength() )
+ if( !aStrText.isEmpty() )
aSettings.maStrHeaderDeclName = findOrAppendImpl( maHeaderDeclsVector, aStrText, gpStrHeaderTextPrefix );
}
@@ -1558,7 +1558,7 @@ HeaderFooterPageSettingsImpl SdXMLExport::ImpPrepDrawPageHeaderFooterDecls( cons
if( xInfo->hasPropertyByName( aStrFooterTextProp ) )
{
xSet->getPropertyValue( aStrFooterTextProp ) >>= aStrText;
- if( aStrText.getLength() )
+ if( !aStrText.isEmpty() )
aSettings.maStrFooterDeclName = findOrAppendImpl( maFooterDeclsVector, aStrText, gpStrFooterTextPrefix );
}
@@ -1571,7 +1571,7 @@ HeaderFooterPageSettingsImpl SdXMLExport::ImpPrepDrawPageHeaderFooterDecls( cons
xSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "IsDateTimeFixed" ) ) ) >>= bFixed;
xSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "DateTimeFormat" ) ) ) >>= nFormat;
- if( !bFixed || aStrText.getLength() )
+ if( !bFixed || !aStrText.isEmpty() )
{
aSettings.maStrDateTimeDeclName = findOrAppendImpl( maDateTimeDeclsVector, aStrText, bFixed, nFormat, gpStrDateTimeTextPrefix );
if( !bFixed )
@@ -1655,13 +1655,13 @@ void SdXMLExport::ImpWriteHeaderFooterDecls()
void SdXMLExport::ImplExportHeaderFooterDeclAttributes( const HeaderFooterPageSettingsImpl& aSettings )
{
- if( aSettings.maStrHeaderDeclName.getLength() )
+ if( !aSettings.maStrHeaderDeclName.isEmpty() )
AddAttribute( XML_NAMESPACE_PRESENTATION, XML_USE_HEADER_NAME, aSettings.maStrHeaderDeclName );
- if( aSettings.maStrFooterDeclName.getLength() )
+ if( !aSettings.maStrFooterDeclName.isEmpty() )
AddAttribute( XML_NAMESPACE_PRESENTATION, XML_USE_FOOTER_NAME, aSettings.maStrFooterDeclName );
- if( aSettings.maStrDateTimeDeclName.getLength() )
+ if( !aSettings.maStrDateTimeDeclName.isEmpty() )
AddAttribute( XML_NAMESPACE_PRESENTATION, XML_USE_DATE_TIME_NAME, aSettings.maStrDateTimeDeclName );
}
@@ -1714,7 +1714,7 @@ OUString SdXMLExport::ImpCreatePresPageStyleName( Reference<XDrawPage> xDrawPage
// try to find this style in AutoStylePool
sStyleName = GetAutoStylePool()->Find(XML_STYLE_FAMILY_SD_DRAWINGPAGE_ID, sStyleName, xPropStates);
- if(!sStyleName.getLength())
+ if(sStyleName.isEmpty())
{
// Style did not exist, add it to AutoStalePool
sStyleName = GetAutoStylePool()->Add(XML_STYLE_FAMILY_SD_DRAWINGPAGE_ID, sStyleName, xPropStates);
@@ -1840,7 +1840,7 @@ void SdXMLExport::_ExportContent()
AddAttribute(XML_NAMESPACE_DRAW, XML_NAME, xNamed->getName());
// draw:style-name (presentation page attributes AND background attributes)
- if( maDrawPagesStyleNames[nPageInd].getLength() )
+ if( !maDrawPagesStyleNames[nPageInd].isEmpty() )
AddAttribute(XML_NAMESPACE_DRAW, XML_STYLE_NAME,
maDrawPagesStyleNames[nPageInd]);
@@ -1861,7 +1861,7 @@ void SdXMLExport::_ExportContent()
}
// presentation:page-layout-name
- if( IsImpress() && maDrawPagesAutoLayoutNames[nPageInd+1].getLength())
+ if( IsImpress() && !maDrawPagesAutoLayoutNames[nPageInd+1].isEmpty())
{
AddAttribute(XML_NAMESPACE_PRESENTATION, XML_PRESENTATION_PAGE_LAYOUT_NAME, maDrawPagesAutoLayoutNames[nPageInd+1] );
}
@@ -1874,7 +1874,7 @@ void SdXMLExport::_ExportContent()
OUString aBookmarkURL;
xProps->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "BookmarkURL" ) ) ) >>= aBookmarkURL;
- if( aBookmarkURL.getLength() )
+ if( !aBookmarkURL.isEmpty() )
{
sal_Int32 nIndex = aBookmarkURL.lastIndexOf( (sal_Unicode)'#' );
if( nIndex != -1 )
@@ -1904,7 +1904,7 @@ void SdXMLExport::_ExportContent()
OUString sNavigationOrder( getNavigationOrder( xDrawPage ) );
- if( sNavigationOrder.getLength() != 0 )
+ if( !sNavigationOrder.isEmpty() )
AddAttribute ( XML_NAMESPACE_DRAW, XML_NAV_ORDER, sNavigationOrder );
UniReference< xmloff::AnimationsExporter > xAnimationsExporter;
@@ -1935,7 +1935,7 @@ void SdXMLExport::_ExportContent()
// write draw:id
const OUString aPageId = getInterfaceToIdentifierMapper().getIdentifier( xDrawPage );
- if( aPageId.getLength() != 0 )
+ if( !aPageId.isEmpty() )
{
AddAttributeIdLegacy(XML_NAMESPACE_DRAW, aPageId);
}
@@ -1979,7 +1979,7 @@ void SdXMLExport::_ExportContent()
Reference< drawing::XShapes > xShapes(xNotesPage, UNO_QUERY);
if(xShapes.is())
{
- if( maDrawNotesPagesStyleNames[nPageInd].getLength() )
+ if( !maDrawNotesPagesStyleNames[nPageInd].isEmpty() )
AddAttribute(XML_NAMESPACE_DRAW, XML_STYLE_NAME, maDrawNotesPagesStyleNames[nPageInd]);
ImplExportHeaderFooterDeclAttributes( maDrawNotesPagesHeaderFooterSettings[nPageInd] );
@@ -2029,7 +2029,7 @@ void SdXMLExport::exportPresentationSettings()
{
OUString aFirstPage;
xPresProps->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "FirstPage" ) ) ) >>= aFirstPage;
- if( aFirstPage.getLength() )
+ if( !aFirstPage.isEmpty() )
{
AddAttribute(XML_NAMESPACE_PRESENTATION, XML_START_PAGE, aFirstPage );
bHasAttr = sal_True;
@@ -2038,7 +2038,7 @@ void SdXMLExport::exportPresentationSettings()
{
OUString aCustomShow;
xPresProps->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "CustomShow" ) ) ) >>= aCustomShow;
- if( aCustomShow.getLength() )
+ if( !aCustomShow.isEmpty() )
{
AddAttribute(XML_NAMESPACE_PRESENTATION, XML_SHOW, aCustomShow );
bHasAttr = sal_True;
@@ -2310,7 +2310,7 @@ void SdXMLExport::_ExportAutoStyles()
{
aMasterPageNamePrefix = xNamed->getName();
}
- if(aMasterPageNamePrefix.getLength())
+ if(!aMasterPageNamePrefix.isEmpty())
{
aMasterPageNamePrefix += OUString(RTL_CONSTASCII_USTRINGPARAM("-"));
}
@@ -2375,7 +2375,7 @@ void SdXMLExport::_ExportAutoStyles()
}
}
}
- if(aMasterPageNamePrefix.getLength())
+ if(!aMasterPageNamePrefix.isEmpty())
{
aMasterPageNamePrefix += OUString(RTL_CONSTASCII_USTRINGPARAM("-"));
}
@@ -2445,7 +2445,7 @@ void SdXMLExport::_ExportMasterStyles()
if( xHandoutPage.is() )
{
// presentation:page-layout-name
- if( IsImpress() && maDrawPagesAutoLayoutNames[0].getLength())
+ if( IsImpress() && !maDrawPagesAutoLayoutNames[0].isEmpty())
{
AddAttribute(XML_NAMESPACE_PRESENTATION, XML_PRESENTATION_PAGE_LAYOUT_NAME, EncodeStyleName( maDrawPagesAutoLayoutNames[0] ));
}
@@ -2458,7 +2458,7 @@ void SdXMLExport::_ExportMasterStyles()
}
// draw:style-name
- if( maHandoutMasterStyleName.getLength() )
+ if( !maHandoutMasterStyleName.isEmpty() )
AddAttribute(XML_NAMESPACE_DRAW, XML_STYLE_NAME, maHandoutMasterStyleName);
ImplExportHeaderFooterDeclAttributes( maHandoutPageHeaderFooterSettings );
@@ -2503,7 +2503,7 @@ void SdXMLExport::_ExportMasterStyles()
}
// draw:style-name (background attributes)
- if( maMasterPagesStyleNames[nMPageId].getLength() )
+ if( !maMasterPagesStyleNames[nMPageId].isEmpty() )
AddAttribute(XML_NAMESPACE_DRAW, XML_STYLE_NAME,
maMasterPagesStyleNames[nMPageId]);
@@ -2691,7 +2691,7 @@ OUString SdXMLExport::getNavigationOrder( const Reference< XDrawPage >& xDrawPag
for( nIndex = 0; nIndex < nCount; ++nIndex )
{
OUString sId( getInterfaceToIdentifierMapper().registerReference( Reference< XInterface >( xNavOrder->getByIndex( nIndex ), UNO_QUERY ) ) );
- if( sId.getLength() != 0 )
+ if( !sId.isEmpty() )
{
if( sNavOrder.getLength() != 0 )
sNavOrder.append( (sal_Unicode)' ' );
@@ -2720,7 +2720,7 @@ void SdXMLExport::collectAnnotationAutoStyles( const Reference<XDrawPage>& xDraw
{
Reference< XAnnotation > xAnnotation( xAnnotationEnumeration->nextElement(), UNO_QUERY_THROW );
Reference< XText > xText( xAnnotation->getTextRange() );
- if(xText.is() && xText->getString().getLength())
+ if(xText.is() && !xText->getString().isEmpty())
GetTextParagraphExport()->collectTextAutoStyles( xText );
}
}
@@ -2775,7 +2775,7 @@ void SdXMLExport::exportAnnotations( const Reference<XDrawPage>& xDrawPage )
// author
OUString aAuthor( xAnnotation->getAuthor() );
- if( aAuthor.getLength() )
+ if( !aAuthor.isEmpty() )
{
SvXMLElementExport aCreatorElem( *this, XML_NAMESPACE_DC, XML_CREATOR, sal_True, sal_False );
this->Characters(aAuthor);
diff --git a/xmloff/source/draw/sdxmlimp.cxx b/xmloff/source/draw/sdxmlimp.cxx
index ad6362fc2730..c39d3eef80a1 100644
--- a/xmloff/source/draw/sdxmlimp.cxx
+++ b/xmloff/source/draw/sdxmlimp.cxx
@@ -1035,19 +1035,19 @@ OUString SAL_CALL SdXMLImport::getImplementationName() throw( uno::RuntimeExcept
void SdXMLImport::AddHeaderDecl( const ::rtl::OUString& rName, const ::rtl::OUString& rText )
{
- if( rName.getLength() && rText.getLength() )
+ if( !rName.isEmpty() && !rText.isEmpty() )
maHeaderDeclsMap[rName] = rText;
}
void SdXMLImport::AddFooterDecl( const ::rtl::OUString& rName, const ::rtl::OUString& rText )
{
- if( rName.getLength() && rText.getLength() )
+ if( !rName.isEmpty() && !rText.isEmpty() )
maFooterDeclsMap[rName] = rText;
}
void SdXMLImport::AddDateTimeDecl( const ::rtl::OUString& rName, const ::rtl::OUString& rText, sal_Bool bFixed, const ::rtl::OUString& rDateTimeFormat )
{
- if( rName.getLength() && (rText.getLength() || !bFixed) )
+ if( !rName.isEmpty() && (!rText.isEmpty() || !bFixed) )
{
DateTimeDeclContextImpl aDecl;
aDecl.maStrText = rText;
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index bda22dd3a285..e48bf8823572 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -158,12 +158,12 @@ uno::Reference< drawing::XShape > XMLShapeExport::checkForCustomShapeReplacement
{
rtl::OUString aEngine;
xSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "CustomShapeEngine" ) ) ) >>= aEngine;
- if ( !aEngine.getLength() )
+ if ( aEngine.isEmpty() )
aEngine = OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.EnhancedCustomShapeEngine" ) );
uno::Reference< lang::XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() );
- if ( aEngine.getLength() && xFactory.is() )
+ if ( !aEngine.isEmpty() && xFactory.is() )
{
uno::Sequence< uno::Any > aArgument( 1 );
uno::Sequence< beans::PropertyValue > aPropValues( 2 );
@@ -251,7 +251,7 @@ void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShap
if( xPropSet.is() && bObjSupportsText )
{
uno::Reference< text::XText > xText(xShape, uno::UNO_QUERY);
- if(xText.is() && xText->getString().getLength())
+ if(xText.is() && !xText->getString().isEmpty())
{
uno::Reference< beans::XPropertySetInfo > xPropSetInfo( xPropSet->getPropertySetInfo() );
@@ -294,7 +294,7 @@ void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShap
{
OUString aFamilyName;
xStylePropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("Family"))) >>= aFamilyName;
- if(aFamilyName.getLength() && !aFamilyName.equals(OUString(RTL_CONSTASCII_USTRINGPARAM("graphics"))))
+ if(!aFamilyName.isEmpty() && !aFamilyName.equals(OUString(RTL_CONSTASCII_USTRINGPARAM("graphics"))))
aShapeInfo.mnFamily = XML_STYLE_FAMILY_SD_PRESENTATION_ID;
}
}
@@ -334,7 +334,7 @@ void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShap
DBG_ASSERT(xControlModel.is(), "XMLShapeExport::collectShapeAutoStyles: no control model on the control shape!");
::rtl::OUString sNumberStyle = mrExport.GetFormExport()->getControlNumberStyle(xControlModel);
- if (0 != sNumberStyle.getLength())
+ if (!sNumberStyle.isEmpty())
{
sal_Int32 nIndex = GetPropertySetMapper()->getPropertySetMapper()->FindEntryIndex(CTF_SD_CONTROL_SHAPE_DATA_STYLE);
// TODO : this retrieval of the index could be moved into the ctor, holding the index
@@ -368,7 +368,7 @@ void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShap
// try to find this style in AutoStylePool
aShapeInfo.msStyleName = mrExport.GetAutoStylePool()->Find(aShapeInfo.mnFamily, aParentName, xPropStates);
- if(!aShapeInfo.msStyleName.getLength())
+ if(aShapeInfo.msStyleName.isEmpty())
{
// Style did not exist, add it to AutoStalePool
aShapeInfo.msStyleName = mrExport.GetAutoStylePool()->Add(aShapeInfo.mnFamily, aParentName, xPropStates);
@@ -428,7 +428,7 @@ void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShap
{
const OUString aEmpty;
aShapeInfo.msTextStyleName = mrExport.GetAutoStylePool()->Find( XML_STYLE_FAMILY_TEXT_PARAGRAPH, aEmpty, xPropStates );
- if(!aShapeInfo.msTextStyleName.getLength())
+ if(aShapeInfo.msTextStyleName.isEmpty())
{
// Style did not exist, add it to AutoStalePool
aShapeInfo.msTextStyleName = mrExport.GetAutoStylePool()->Add(XML_STYLE_FAMILY_TEXT_PARAGRAPH, aEmpty, xPropStates);
@@ -549,7 +549,7 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape
OUString sURL;
xSet->getPropertyValue(msBookmark) >>= sURL;
- if( sURL.getLength() )
+ if( !sURL.isEmpty() )
{
mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, sURL );
mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE );
@@ -627,7 +627,7 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape
if( xNamed.is() )
{
const OUString aName( xNamed->getName() );
- if( aName.getLength() )
+ if( !aName.isEmpty() )
mrExport.AddAttribute(XML_NAMESPACE_DRAW, XML_NAME, aName );
}
}
@@ -636,7 +636,7 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape
// ------------------
// export style name
// ------------------
- if( aShapeInfo.msStyleName.getLength() != 0 )
+ if( !aShapeInfo.msStyleName.isEmpty() )
{
if(XML_STYLE_FAMILY_SD_GRAPHICS_ID == aShapeInfo.mnFamily)
mrExport.AddAttribute(XML_NAMESPACE_DRAW, XML_STYLE_NAME, mrExport.EncodeStyleName( aShapeInfo.msStyleName) );
@@ -647,7 +647,7 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape
// ------------------
// export text style name
// ------------------
- if( aShapeInfo.msTextStyleName.getLength() != 0 )
+ if( !aShapeInfo.msTextStyleName.isEmpty() )
{
mrExport.AddAttribute(XML_NAMESPACE_DRAW, XML_TEXT_STYLE_NAME, aShapeInfo.msTextStyleName );
}
@@ -658,7 +658,7 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape
{
uno::Reference< uno::XInterface > xRef( xShape, uno::UNO_QUERY );
const OUString& rShapeId = mrExport.getInterfaceToIdentifierMapper().getIdentifier( xRef );
- if( rShapeId.getLength() )
+ if( !rShapeId.isEmpty() )
{
mrExport.AddAttributeIdLegacy(XML_NAMESPACE_DRAW, rShapeId);
}
diff --git a/xmloff/source/draw/shapeexport2.cxx b/xmloff/source/draw/shapeexport2.cxx
index 1469bde45469..3629e3687911 100644
--- a/xmloff/source/draw/shapeexport2.cxx
+++ b/xmloff/source/draw/shapeexport2.cxx
@@ -491,7 +491,7 @@ void XMLShapeExport::ImpExportEvents( const uno::Reference< drawing::XShape >& x
if( eClickAction == presentation::ClickAction_VANISH || eClickAction == presentation::ClickAction_SOUND )
{
- if( ( nFound & FOUND_SOUNDURL ) && aStrSoundURL.getLength() != 0 )
+ if( ( nFound & FOUND_SOUNDURL ) && !aStrSoundURL.isEmpty() )
{
mrExport.AddAttribute(XML_NAMESPACE_XLINK, XML_HREF, GetExport().GetRelativeReference(aStrSoundURL) );
mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE );
@@ -576,13 +576,13 @@ void XMLShapeExport::ImpExportDescription( const uno::Reference< drawing::XShape
xProps->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM( "Title" )) ) >>= aTitle;
xProps->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM( "Description" )) ) >>= aDescription;
- if(aTitle.getLength())
+ if(!aTitle.isEmpty())
{
SvXMLElementExport aEventElemt(mrExport, XML_NAMESPACE_SVG, XML_TITLE, sal_True, sal_False);
mrExport.Characters( aTitle );
}
- if(aDescription.getLength())
+ if(!aDescription.isEmpty())
{
SvXMLElementExport aEventElemt(mrExport, XML_NAMESPACE_SVG, XML_DESC, sal_True, sal_False );
mrExport.Characters( aDescription );
@@ -1145,7 +1145,7 @@ void XMLShapeExport::ImpExportGraphicObjectShape(
nLastIndex = sRequestedName.lastIndexOf( '.' );
if ( nLastIndex >= 0 )
sRequestedName = sRequestedName.copy( 0, nLastIndex );
- if ( sRequestedName.getLength() )
+ if ( !sRequestedName.isEmpty() )
{
aResolveURL = aResolveURL.concat( OUString(RTL_CONSTASCII_USTRINGPARAM("?requestedName=")));
aResolveURL = aResolveURL.concat( sRequestedName );
@@ -1155,7 +1155,7 @@ void XMLShapeExport::ImpExportGraphicObjectShape(
aStr = mrExport.AddEmbeddedGraphicObject( aResolveURL );
mrExport.AddAttribute(XML_NAMESPACE_XLINK, XML_HREF, aStr );
- if( aStr.getLength() )
+ if( !aStr.isEmpty() )
{
if( aStr[ 0 ] == '#' )
{
@@ -1185,7 +1185,7 @@ void XMLShapeExport::ImpExportGraphicObjectShape(
{
SvXMLElementExport aOBJ(mrExport, XML_NAMESPACE_DRAW, XML_IMAGE, sal_True, sal_True);
- if( sImageURL.getLength() )
+ if( !sImageURL.isEmpty() )
{
// optional office:binary-data
mrExport.AddEmbeddedGraphicObjectAsBase64( sImageURL );
@@ -1619,9 +1619,9 @@ void XMLShapeExport::ImpExportOLE2Shape(
}
xPropSet->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM( "PersistName" ) ) ) >>= sPersistName;
- if ( !sURL.getLength() )
+ if ( sURL.isEmpty() )
{
- if( sPersistName.getLength() )
+ if( !sPersistName.isEmpty() )
{
sURL = OUString( RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.EmbeddedObject:" ) );
sURL += sPersistName;
@@ -1631,12 +1631,12 @@ void XMLShapeExport::ImpExportOLE2Shape(
if( !bInternal )
xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("CLSID"))) >>= sClassId;
- if( sClassId.getLength() )
+ if( !sClassId.isEmpty() )
mrExport.AddAttribute(XML_NAMESPACE_DRAW, XML_CLASS_ID, sClassId );
if(!bExportEmbedded)
{
// xlink:href
- if( sURL.getLength() )
+ if( !sURL.isEmpty() )
{
// #96717# in theorie, if we don't have a url we shouldn't even
// export this ole shape. But practical its to risky right now
@@ -1661,7 +1661,7 @@ void XMLShapeExport::ImpExportOLE2Shape(
mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_ACTUATE, XML_ONLOAD );
}
- enum XMLTokenEnum eElem = sClassId.getLength() ? XML_OBJECT_OLE : XML_OBJECT;
+ enum XMLTokenEnum eElem = sClassId.isEmpty() ? XML_OBJECT : XML_OBJECT_OLE ;
SvXMLElementExport aElem( mrExport, XML_NAMESPACE_DRAW, eElem, sal_True, sal_True );
if(bExportEmbedded && !bIsEmptyPresObj)
@@ -1830,7 +1830,7 @@ void XMLShapeExport::ImpExportFrameShape(
// export name
xPropSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "FrameName" ) ) ) >>= aStr;
- if( aStr.getLength() )
+ if( !aStr.isEmpty() )
mrExport.AddAttribute( XML_NAMESPACE_DRAW, XML_FRAME_NAME, aStr );
// write floating frame
@@ -1866,7 +1866,7 @@ void XMLShapeExport::ImpExportAppletShape(
// export draw:applet-name
xPropSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "AppletName" ) ) ) >>= aStr;
- if( aStr.getLength() )
+ if( !aStr.isEmpty() )
mrExport.AddAttribute( XML_NAMESPACE_DRAW, XML_APPLET_NAME, aStr );
// export draw:code
@@ -1924,7 +1924,7 @@ void XMLShapeExport::ImpExportPluginShape(
// export mime-type
xPropSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "PluginMimeType" ) ) ) >>= aStr;
- if(aStr.getLength())
+ if(!aStr.isEmpty())
mrExport.AddAttribute( XML_NAMESPACE_DRAW, XML_MIME_TYPE, aStr );
{
@@ -2105,7 +2105,7 @@ void XMLShapeExport::ImpExportMediaShape(
break;
}
- if( aZoomValue.getLength() )
+ if( !aZoomValue.isEmpty() )
{
mrExport.AddAttribute( XML_NAMESPACE_DRAW, XML_NAME, aZoomStr );
mrExport.AddAttribute( XML_NAMESPACE_DRAW, XML_VALUE, aZoomValue );
diff --git a/xmloff/source/draw/shapeexport4.cxx b/xmloff/source/draw/shapeexport4.cxx
index 16dc36b58670..173f88f14c37 100644
--- a/xmloff/source/draw/shapeexport4.cxx
+++ b/xmloff/source/draw/shapeexport4.cxx
@@ -868,7 +868,7 @@ void ImpExportEnhancedGeometry( SvXMLExport& rExport, const uno::Reference< bean
default:
break;
}
- if ( aStr.getLength() )
+ if ( !aStr.isEmpty() )
rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_TEXT_PATH_MODE, aStr );
}
}
@@ -963,7 +963,7 @@ void ImpExportEnhancedGeometry( SvXMLExport& rExport, const uno::Reference< bean
case com::sun::star::drawing::EnhancedCustomShapeGluePointType::SEGMENTS : aStr = GetXMLToken( XML_SEGMENTS ); break;
case com::sun::star::drawing::EnhancedCustomShapeGluePointType::RECT : aStr = GetXMLToken( XML_RECTANGLE ); break;
}
- if ( aStr.getLength() )
+ if ( !aStr.isEmpty() )
rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_GLUE_POINT_TYPE, aStr );
}
}
@@ -1105,14 +1105,14 @@ void XMLShapeExport::ImpExportCustomShape(
if ( xPropSetInfo->hasPropertyByName( sCustomShapeEngine ) )
{
uno::Any aEngine( xPropSet->getPropertyValue( sCustomShapeEngine ) );
- if ( ( aEngine >>= aStr ) && aStr.getLength() )
+ if ( ( aEngine >>= aStr ) && !aStr.isEmpty() )
mrExport.AddAttribute( XML_NAMESPACE_DRAW, XML_ENGINE, aStr );
}
const rtl::OUString sCustomShapeData( RTL_CONSTASCII_USTRINGPARAM( "CustomShapeData" ) );
if ( xPropSetInfo->hasPropertyByName( sCustomShapeData ) )
{
uno::Any aData( xPropSet->getPropertyValue( sCustomShapeData ) );
- if ( ( aData >>= aStr ) && aStr.getLength() )
+ if ( ( aData >>= aStr ) && !aStr.isEmpty() )
mrExport.AddAttribute( XML_NAMESPACE_DRAW, XML_DATA, aStr );
}
}
@@ -1157,7 +1157,7 @@ void XMLShapeExport::ImpExportTableShape( const uno::Reference< drawing::XShape
if( xTemplate.is() )
{
const OUString sTemplate( xTemplate->getName() );
- if( sTemplate.getLength() )
+ if( !sTemplate.isEmpty() )
{
mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_TEMPLATE_NAME, sTemplate );
diff --git a/xmloff/source/draw/xexptran.cxx b/xmloff/source/draw/xexptran.cxx
index 98fb45afc741..6c4bd633f75c 100644
--- a/xmloff/source/draw/xexptran.cxx
+++ b/xmloff/source/draw/xexptran.cxx
@@ -512,7 +512,7 @@ void SdXMLImExTransform2D::SetString(const OUString& rNew, const SvXMLUnitConver
msString = rNew;
EmptyList();
- if(msString.getLength())
+ if(!msString.isEmpty())
{
const OUString aStr(msString.getStr(), (sal_uInt16)msString.getLength());
const sal_Int32 nLen(aStr.getLength());
@@ -986,7 +986,7 @@ void SdXMLImExTransform3D::SetString(const OUString& rNew, const SvXMLUnitConver
msString = rNew;
EmptyList();
- if(msString.getLength())
+ if(!msString.isEmpty())
{
const OUString aStr(msString.getStr(), (sal_uInt16)msString.getLength());
const sal_Int32 nLen(aStr.getLength());
@@ -1250,7 +1250,7 @@ SdXMLImExViewBox::SdXMLImExViewBox(const OUString& rNew, const SvXMLUnitConverte
mnW( 1000L ),
mnH( 1000L )
{
- if(msString.getLength())
+ if(!msString.isEmpty())
{
const OUString aStr(msString.getStr(), (sal_uInt16)msString.getLength());
const sal_Int32 nLen(aStr.getLength());
diff --git a/xmloff/source/draw/ximp3dobject.cxx b/xmloff/source/draw/ximp3dobject.cxx
index 3051578ea9be..1d84030851e2 100644
--- a/xmloff/source/draw/ximp3dobject.cxx
+++ b/xmloff/source/draw/ximp3dobject.cxx
@@ -394,7 +394,7 @@ void SdXML3DPolygonBasedShapeContext::StartElement(const uno::Reference< xml::sa
if(xPropSet.is())
{
// set parameters
- if(maPoints.getLength() && maViewBox.getLength())
+ if(!maPoints.isEmpty() && !maViewBox.isEmpty())
{
SdXMLImExViewBox aViewBox(maViewBox, GetImport().GetMM100UnitConverter());
awt::Point aMinPoint(aViewBox.GetX(), aViewBox.GetY());
diff --git a/xmloff/source/draw/ximpbody.cxx b/xmloff/source/draw/ximpbody.cxx
index 9fd0078a37e4..43c877e2217c 100644
--- a/xmloff/source/draw/ximpbody.cxx
+++ b/xmloff/source/draw/ximpbody.cxx
@@ -130,7 +130,7 @@ SdXMLDrawPageContext::SdXMLDrawPageContext( SdXMLImport& rImport,
}
}
- if (sXmlId.getLength())
+ if (!sXmlId.isEmpty())
{
uno::Reference< uno::XInterface > const xRef( rShapes.get() );
GetImport().getInterfaceToIdentifierMapper().registerReference(
@@ -141,7 +141,7 @@ SdXMLDrawPageContext::SdXMLDrawPageContext( SdXMLImport& rImport,
uno::Reference< drawing::XDrawPage > xShapeDrawPage(rShapes, uno::UNO_QUERY);
// set PageName?
- if(maName.getLength())
+ if(!maName.isEmpty())
{
if(xShapeDrawPage.is())
{
@@ -152,7 +152,7 @@ SdXMLDrawPageContext::SdXMLDrawPageContext( SdXMLImport& rImport,
}
// set MasterPage?
- if(maMasterPageName.getLength())
+ if(!maMasterPageName.isEmpty())
{
// #85906# Code for setting masterpage needs complete rework
// since GetSdImport().GetMasterStylesContext() gives always ZERO
@@ -181,8 +181,7 @@ SdXMLDrawPageContext::SdXMLDrawPageContext( SdXMLImport& rImport,
{
OUString sMasterPageName = xMasterNamed->getName();
- if(sMasterPageName.getLength() &&
- sMasterPageName.equals(sDisplayName))
+ if(!sMasterPageName.isEmpty() && sMasterPageName.equals(sDisplayName))
{
xDrawPage->setMasterPage(xMasterPage);
bDone = sal_True;
@@ -197,7 +196,7 @@ SdXMLDrawPageContext::SdXMLDrawPageContext( SdXMLImport& rImport,
SetStyle( maStyleName );
- if( maHREF.getLength() )
+ if( !maHREF.isEmpty() )
{
uno::Reference< beans::XPropertySet > xProps( xShapeDrawPage, uno::UNO_QUERY );
if( xProps.is() )
diff --git a/xmloff/source/draw/ximpcustomshape.cxx b/xmloff/source/draw/ximpcustomshape.cxx
index adf19c3fc054..0736fe30a2be 100644
--- a/xmloff/source/draw/ximpcustomshape.cxx
+++ b/xmloff/source/draw/ximpcustomshape.cxx
@@ -1331,7 +1331,7 @@ SvXMLImportContext* XMLEnhancedCustomShapeContext::CreateChildContext( sal_uInt1
break;
}
}
- if ( aFormulaName.getLength() || aFormula.getLength() )
+ if ( !aFormulaName.isEmpty() || !aFormula.isEmpty() )
{
maEquations.push_back( aFormula );
maEquationNames.push_back( aFormulaName );
diff --git a/xmloff/source/draw/ximpnote.cxx b/xmloff/source/draw/ximpnote.cxx
index 5649d021e1ff..bc89a74dacd7 100644
--- a/xmloff/source/draw/ximpnote.cxx
+++ b/xmloff/source/draw/ximpnote.cxx
@@ -96,7 +96,7 @@ SdXMLNotesContext::SdXMLNotesContext( SdXMLImport& rImport,
}
// set page-master?
- if(msPageMasterName.getLength())
+ if(!msPageMasterName.isEmpty())
{
SetPageMaster( msPageMasterName );
}
diff --git a/xmloff/source/draw/ximppage.cxx b/xmloff/source/draw/ximppage.cxx
index 03975fd35c2d..f0b17972c5ec 100644
--- a/xmloff/source/draw/ximppage.cxx
+++ b/xmloff/source/draw/ximppage.cxx
@@ -302,14 +302,14 @@ void SdXMLGenericPageContext::EndElement()
if( GetImport().IsFormsSupported() )
GetImport().GetFormImport()->endPage();
- if( maUseHeaderDeclName.getLength() || maUseFooterDeclName.getLength() || maUseDateTimeDeclName.getLength() )
+ if( !maUseHeaderDeclName.isEmpty() || !maUseFooterDeclName.isEmpty() || !maUseDateTimeDeclName.isEmpty() )
{
try
{
Reference <beans::XPropertySet> xSet(mxShapes, uno::UNO_QUERY_THROW );
Reference< beans::XPropertySetInfo > xInfo( xSet->getPropertySetInfo() );
- if( maUseHeaderDeclName.getLength() )
+ if( !maUseHeaderDeclName.isEmpty() )
{
const OUString aStrHeaderTextProp( RTL_CONSTASCII_USTRINGPARAM( "HeaderText" ) );
if( xInfo->hasPropertyByName( aStrHeaderTextProp ) )
@@ -317,7 +317,7 @@ void SdXMLGenericPageContext::EndElement()
makeAny( GetSdImport().GetHeaderDecl( maUseHeaderDeclName ) ) );
}
- if( maUseFooterDeclName.getLength() )
+ if( !maUseFooterDeclName.isEmpty() )
{
const OUString aStrFooterTextProp( RTL_CONSTASCII_USTRINGPARAM( "FooterText" ) );
if( xInfo->hasPropertyByName( aStrFooterTextProp ) )
@@ -325,7 +325,7 @@ void SdXMLGenericPageContext::EndElement()
makeAny( GetSdImport().GetFooterDecl( maUseFooterDeclName ) ) );
}
- if( maUseDateTimeDeclName.getLength() )
+ if( !maUseDateTimeDeclName.isEmpty() )
{
const OUString aStrDateTimeTextProp( RTL_CONSTASCII_USTRINGPARAM( "DateTimeText" ) );
if( xInfo->hasPropertyByName( aStrDateTimeTextProp ) )
@@ -341,7 +341,7 @@ void SdXMLGenericPageContext::EndElement()
{
xSet->setPropertyValue( aStrDateTimeTextProp, makeAny( aText ) );
}
- else if( aDateTimeFormat.getLength() )
+ else if( !aDateTimeFormat.isEmpty() )
{
const SdXMLStylesContext* pStyles = dynamic_cast< const SdXMLStylesContext* >( GetSdImport().GetShapeImport()->GetStylesContext() );
if( !pStyles )
@@ -374,7 +374,7 @@ void SdXMLGenericPageContext::EndElement()
void SdXMLGenericPageContext::SetStyle( rtl::OUString& rStyleName )
{
// set PageProperties?
- if(rStyleName.getLength())
+ if(!rStyleName.isEmpty())
{
try
{
@@ -439,7 +439,7 @@ void SdXMLGenericPageContext::SetStyle( rtl::OUString& rStyleName )
void SdXMLGenericPageContext::SetLayout()
{
// set PresentationPageLayout?
- if(GetSdImport().IsImpress() && maPageLayoutName.getLength())
+ if(GetSdImport().IsImpress() && !maPageLayoutName.isEmpty())
{
sal_Int32 nType = -1;
@@ -614,7 +614,7 @@ sal_Bool SAL_CALL NavigationOrderAccess::hasElements( ) throw (RuntimeException
void SdXMLGenericPageContext::SetNavigationOrder()
{
- if( msNavOrder.getLength() != 0 ) try
+ if( !msNavOrder.isEmpty() ) try
{
sal_uInt32 nIndex;
const sal_uInt32 nCount = static_cast< sal_uInt32 >( mxShapes->getCount() );
diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index 24824d91ec7c..c41dab4e3fd4 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -132,7 +132,7 @@ SvXMLEnumMapEntry aXML_GlueEscapeDirection_EnumMap[] =
static bool ImpIsEmptyURL( const ::rtl::OUString& rURL )
{
- if( rURL.getLength() == 0 )
+ if( rURL.isEmpty() )
return true;
// #i13140# Also compare against 'toplevel' URLs. which also
@@ -373,7 +373,7 @@ void SdXMLShapeContext::EndElement()
GetImport().GetTextImport()->PopListContext();
}
- if( msHyperlink.getLength() != 0 ) try
+ if( !msHyperlink.isEmpty() ) try
{
uno::Reference< beans::XPropertySet > xProp( mxShape, uno::UNO_QUERY );
@@ -435,7 +435,7 @@ void SdXMLShapeContext::AddShape(uno::Reference< drawing::XShape >& xShape)
// set shape local
mxShape = xShape;
- if(maShapeName.getLength())
+ if(!maShapeName.isEmpty())
{
uno::Reference< container::XNamed > xNamed( mxShape, uno::UNO_QUERY );
if( xNamed.is() )
@@ -473,7 +473,7 @@ void SdXMLShapeContext::AddShape(uno::Reference< drawing::XShape >& xShape)
xImp->shapeWithZIndexAdded( xShape, mnZOrder );
}
- if( maShapeId.getLength() )
+ if( !maShapeId.isEmpty() )
{
uno::Reference< uno::XInterface > xRef( xShape, uno::UNO_QUERY );
GetImport().getInterfaceToIdentifierMapper().registerReference( maShapeId, xRef );
@@ -614,7 +614,7 @@ void SdXMLShapeContext::SetStyle( bool bSupportsStyle /* = true */)
XMLPropStyleContext* pDocStyle = NULL;
// set style on shape
- if(maDrawStyleName.getLength() == 0)
+ if(maDrawStyleName.isEmpty())
break;
const SvXMLStyleContext* pStyle = 0L;
@@ -646,7 +646,7 @@ void SdXMLShapeContext::SetStyle( bool bSupportsStyle /* = true */)
}
}
- if( !xStyle.is() && aStyleName.getLength() )
+ if( !xStyle.is() && !aStyleName.isEmpty() )
{
try
{
@@ -723,7 +723,7 @@ void SdXMLShapeContext::SetStyle( bool bSupportsStyle /* = true */)
do
{
// set style on shape
- if( 0 == maTextStyleName.getLength() )
+ if( maTextStyleName.isEmpty() )
break;
if( NULL == GetImport().GetShapeImport()->GetAutoStylesContext())
@@ -746,7 +746,7 @@ void SdXMLShapeContext::SetStyle( bool bSupportsStyle /* = true */)
void SdXMLShapeContext::SetLayer()
{
- if( maLayerName.getLength() )
+ if( !maLayerName.isEmpty() )
{
try
{
@@ -768,7 +768,7 @@ void SdXMLShapeContext::SetLayer()
void SdXMLShapeContext::SetThumbnail()
{
- if( 0 == maThumbnailURL.getLength() )
+ if( maThumbnailURL.isEmpty() )
return;
try
@@ -915,7 +915,7 @@ void SdXMLShapeContext::processAttribute( sal_uInt16 nPrefix, const ::rtl::OUStr
sal_Bool SdXMLShapeContext::isPresentationShape() const
{
- if( maPresentationClass.getLength() && (const_cast<SdXMLShapeContext*>(this))->GetImport().GetShapeImport()->IsPresentationShapesSupported() )
+ if( !maPresentationClass.isEmpty() && (const_cast<SdXMLShapeContext*>(this))->GetImport().GetShapeImport()->IsPresentationShapesSupported() )
{
if(XML_STYLE_FAMILY_SD_PRESENTATION_ID == mnStyleFamily)
{
@@ -1335,7 +1335,7 @@ void SdXMLPolygonShapeContext::StartElement(const uno::Reference< xml::sax::XAtt
if(xPropSet.is())
{
// set polygon
- if(maPoints.getLength() && maViewBox.getLength())
+ if(!maPoints.isEmpty() && !maViewBox.isEmpty())
{
SdXMLImExViewBox aViewBox(maViewBox, GetImport().GetMM100UnitConverter());
awt::Size aSize(aViewBox.GetWidth(), aViewBox.GetHeight());
@@ -1411,7 +1411,7 @@ void SdXMLPathShapeContext::processAttribute( sal_uInt16 nPrefix, const ::rtl::O
void SdXMLPathShapeContext::StartElement(const uno::Reference< xml::sax::XAttributeList>& xAttrList)
{
// create polygon shape
- if(maD.getLength())
+ if(!maD.isEmpty())
{
// prepare some of the parameters
SdXMLImExViewBox aViewBox(maViewBox, GetImport().GetMM100UnitConverter());
@@ -1467,7 +1467,7 @@ void SdXMLPathShapeContext::StartElement(const uno::Reference< xml::sax::XAttrib
uno::Any aAny;
// set svg:d
- if(maD.getLength())
+ if(!maD.isEmpty())
{
if(aPoints.IsCurve())
{
@@ -1717,8 +1717,8 @@ void SdXMLControlShapeContext::StartElement(const uno::Reference< xml::sax::XAtt
AddShape("com.sun.star.drawing.ControlShape");
if( mxShape.is() )
{
- DBG_ASSERT( maFormId.getLength(), "draw:control without a form:id attribute!" );
- if( maFormId.getLength() )
+ DBG_ASSERT( !maFormId.isEmpty(), "draw:control without a form:id attribute!" );
+ if( !maFormId.isEmpty() )
{
if( GetImport().IsFormsSupported() )
{
@@ -1900,8 +1900,8 @@ void SdXMLConnectorShapeContext::StartElement(const uno::Reference< xml::sax::XA
// is not guaranteed, but it's definitely safe to not add empty connectors.
sal_Bool bDoAdd(sal_True);
- if( 0 == maStartShapeId.getLength()
- && 0 == maEndShapeId.getLength()
+ if( maStartShapeId.isEmpty()
+ && maEndShapeId.isEmpty()
&& maStart.X == maEnd.X
&& maStart.Y == maEnd.Y
&& 0 == mnDelta1
@@ -1920,9 +1920,9 @@ void SdXMLConnectorShapeContext::StartElement(const uno::Reference< xml::sax::XA
if(mxShape.is())
{
// add connection ids
- if( maStartShapeId.getLength() )
+ if( !maStartShapeId.isEmpty() )
GetImport().GetShapeImport()->addShapeConnection( mxShape, sal_True, maStartShapeId, mnStartGlueId );
- if( maEndShapeId.getLength() )
+ if( !maEndShapeId.isEmpty() )
GetImport().GetShapeImport()->addShapeConnection( mxShape, sal_False, maEndShapeId, mnEndGlueId );
uno::Reference< beans::XPropertySet > xProps( mxShape, uno::UNO_QUERY );
@@ -2153,7 +2153,7 @@ void SdXMLPageShapeContext::StartElement(const uno::Reference< xml::sax::XAttrib
// #86163# take into account which type of PageShape needs to
// be constructed. It's an pres shape if presentation:XML_CLASS == XML_PRESENTATION_PAGE.
- sal_Bool bIsPresentation = maPresentationClass.getLength() &&
+ sal_Bool bIsPresentation = !maPresentationClass.isEmpty() &&
GetImport().GetShapeImport()->IsPresentationShapesSupported();
uno::Reference< lang::XServiceInfo > xInfo( mxShapes, uno::UNO_QUERY );
@@ -2387,7 +2387,7 @@ void SdXMLGraphicObjectShapeContext::StartElement( const ::com::sun::star::uno::
if( !mbIsPlaceholder )
{
- if( maURL.getLength() )
+ if( !maURL.isEmpty() )
{
uno::Any aAny;
aAny <<= GetImport().ResolveGraphicObjectURL( maURL, GetImport().isGraphicLoadOnDemandSupported() );
@@ -2429,7 +2429,7 @@ void SdXMLGraphicObjectShapeContext::EndElement()
if( mxBase64Stream.is() )
{
OUString sURL( GetImport().ResolveGraphicObjectURLFromBase64( mxBase64Stream ) );
- if( sURL.getLength() )
+ if( !sURL.isEmpty() )
{
try
{
@@ -2462,7 +2462,7 @@ SvXMLImportContext* SdXMLGraphicObjectShapeContext::CreateChildContext(
if( (XML_NAMESPACE_OFFICE == nPrefix) &&
xmloff::token::IsXMLToken( rLocalName, xmloff::token::XML_BINARY_DATA ) )
{
- if( !maURL.getLength() && !mxBase64Stream.is() )
+ if( maURL.isEmpty() && !mxBase64Stream.is() )
{
mxBase64Stream = GetImport().GetStreamForGraphicObjectURLFromBase64();
if( mxBase64Stream.is() )
@@ -2633,7 +2633,7 @@ void SdXMLObjectShapeContext::StartElement( const ::com::sun::star::uno::Referen
const char* pService = "com.sun.star.drawing.OLE2Shape";
- sal_Bool bIsPresShape = maPresentationClass.getLength() && GetImport().GetShapeImport()->IsPresentationShapesSupported();
+ sal_Bool bIsPresShape = !maPresentationClass.isEmpty() && GetImport().GetShapeImport()->IsPresentationShapesSupported();
if( bIsPresShape )
{
@@ -2674,7 +2674,7 @@ void SdXMLObjectShapeContext::StartElement( const ::com::sun::star::uno::Referen
}
}
- if( !mbIsPlaceholder && maHref.getLength() )
+ if( !mbIsPlaceholder && !maHref.isEmpty() )
{
uno::Reference< beans::XPropertySet > xProps( mxShape, uno::UNO_QUERY );
@@ -2774,7 +2774,7 @@ SvXMLImportContext* SdXMLObjectShapeContext::CreateChildContext(
new XMLEmbeddedObjectImportContext( GetImport(), nPrefix,
rLocalName, xAttrList );
maCLSID = pEContext->GetFilterCLSID();
- if( maCLSID.getLength() != 0 )
+ if( !maCLSID.isEmpty() )
{
uno::Reference< beans::XPropertySet > xPropSet(mxShape, uno::UNO_QUERY);
if( xPropSet.is() )
@@ -2885,13 +2885,13 @@ void SdXMLAppletShapeContext::EndElement()
xProps->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "AppletCommands" ) ), aAny );
}
- if( maHref.getLength() )
+ if( !maHref.isEmpty() )
{
aAny <<= maHref;
xProps->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "AppletCodeBase" ) ), aAny );
}
- if( maAppletName.getLength() )
+ if( !maAppletName.isEmpty() )
{
aAny <<= maAppletName;
xProps->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "AppletName" ) ), aAny );
@@ -2904,7 +2904,7 @@ void SdXMLAppletShapeContext::EndElement()
}
- if( maAppletCode.getLength() )
+ if( !maAppletCode.isEmpty() )
{
aAny <<= maAppletCode;
xProps->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "AppletCode" ) ), aAny );
@@ -2946,7 +2946,7 @@ SvXMLImportContext * SdXMLAppletShapeContext::CreateChildContext( sal_uInt16 p_n
}
}
- if( aParamName.getLength() )
+ if( !aParamName.isEmpty() )
{
sal_Int32 nIndex = maParams.getLength();
maParams.realloc( nIndex + 1 );
@@ -3006,7 +3006,7 @@ void SdXMLPluginShapeContext::StartElement( const ::com::sun::star::uno::Referen
{
pService = "com.sun.star.drawing.MediaShape";
- bIsPresShape = maPresentationClass.getLength() && GetImport().GetShapeImport()->IsPresentationShapesSupported();
+ bIsPresShape = !maPresentationClass.isEmpty() && GetImport().GetShapeImport()->IsPresentationShapesSupported();
if( bIsPresShape )
{
if( IsXMLToken( maPresentationClass, XML_PRESENTATION_OBJECT ) )
@@ -3115,13 +3115,13 @@ void SdXMLPluginShapeContext::EndElement()
xProps->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "PluginCommands" ) ), aAny );
}
- if( maMimeType.getLength() )
+ if( !maMimeType.isEmpty() )
{
aAny <<= maMimeType;
xProps->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "PluginMimeType" ) ), aAny );
}
- if( maHref.getLength() )
+ if( !maHref.isEmpty() )
{
aAny <<= maHref;
xProps->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "PluginURL" ) ), aAny );
@@ -3222,7 +3222,7 @@ SvXMLImportContext * SdXMLPluginShapeContext::CreateChildContext( sal_uInt16 p_n
}
}
- if( aParamName.getLength() )
+ if( !aParamName.isEmpty() )
{
sal_Int32 nIndex = maParams.getLength();
maParams.realloc( nIndex + 1 );
@@ -3273,13 +3273,13 @@ void SdXMLFloatingFrameShapeContext::StartElement( const ::com::sun::star::uno::
{
uno::Any aAny;
- if( maFrameName.getLength() )
+ if( !maFrameName.isEmpty() )
{
aAny <<= maFrameName;
xProps->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "FrameName" ) ), aAny );
}
- if( maHref.getLength() )
+ if( !maHref.isEmpty() )
{
aAny <<= maHref;
xProps->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "FrameURL" ) ), aAny );
@@ -3375,7 +3375,7 @@ SvXMLImportContext *SdXMLFrameShapeContext::CreateChildContext( sal_uInt16 nPref
pContext = pShapeContext;
// propagate the hyperlink to child context
- if ( msHyperlink.getLength() > 0 )
+ if ( !msHyperlink.isEmpty() )
pShapeContext->setHyperlink( msHyperlink );
mxImplContext = pContext;
@@ -3462,7 +3462,7 @@ void SdXMLFrameShapeContext::EndElement()
}
}
- if( (maPresentationClass.getLength() != 0) && mbIsPlaceholder )
+ if( (!maPresentationClass.isEmpty()) && mbIsPlaceholder )
{
uno::Reference< xml::sax::XAttributeList> xEmpty;
@@ -3565,13 +3565,13 @@ void SdXMLCustomShapeContext::StartElement( const uno::Reference< xml::sax::XAtt
uno::Reference< beans::XPropertySet > xPropSet( mxShape, uno::UNO_QUERY );
if( xPropSet.is() )
{
- if ( maCustomShapeEngine.getLength() )
+ if ( !maCustomShapeEngine.isEmpty() )
{
uno::Any aAny;
aAny <<= maCustomShapeEngine;
xPropSet->setPropertyValue( EASGet( EAS_CustomShapeEngine ), aAny );
}
- if ( maCustomShapeData.getLength() )
+ if ( !maCustomShapeData.isEmpty() )
{
uno::Any aAny;
aAny <<= maCustomShapeData;
@@ -3676,7 +3676,7 @@ void SdXMLTableShapeContext::StartElement( const ::com::sun::star::uno::Referenc
{
const char* pService = "com.sun.star.drawing.TableShape";
- sal_Bool bIsPresShape = maPresentationClass.getLength() && GetImport().GetShapeImport()->IsPresentationShapesSupported();
+ sal_Bool bIsPresShape = !maPresentationClass.isEmpty() && GetImport().GetShapeImport()->IsPresentationShapesSupported();
if( bIsPresShape )
{
if( IsXMLToken( maPresentationClass, XML_PRESENTATION_TABLE ) )
@@ -3713,7 +3713,7 @@ void SdXMLTableShapeContext::StartElement( const ::com::sun::star::uno::Referenc
if( xProps.is() )
{
- if( msTemplateStyleName.getLength() ) try
+ if( !msTemplateStyleName.isEmpty() ) try
{
Reference< XStyleFamiliesSupplier > xFamiliesSupp( GetImport().GetModel(), UNO_QUERY_THROW );
Reference< XNameAccess > xFamilies( xFamiliesSupp->getStyleFamilies() );
diff --git a/xmloff/source/draw/ximpshow.cxx b/xmloff/source/draw/ximpshow.cxx
index 47b2a56243ad..2018867540b6 100644
--- a/xmloff/source/draw/ximpshow.cxx
+++ b/xmloff/source/draw/ximpshow.cxx
@@ -200,7 +200,7 @@ SdXMLShowsContext::SdXMLShowsContext( SdXMLImport& rImport, sal_uInt16 nPrfx, c
SdXMLShowsContext::~SdXMLShowsContext()
{
- if( mpImpl && mpImpl->maCustomShowName.getLength() )
+ if( mpImpl && !mpImpl->maCustomShowName.isEmpty() )
{
uno::Any aAny;
aAny <<= mpImpl->maCustomShowName;
@@ -240,7 +240,7 @@ SvXMLImportContext * SdXMLShowsContext::CreateChildContext( sal_uInt16 p_nPrefix
}
}
- if( aName.getLength() != 0 && aPages.getLength() != 0 )
+ if( !aName.isEmpty() && !aPages.isEmpty() )
{
Reference< XIndexContainer > xShow( mpImpl->mxShowFactory->createInstance(), UNO_QUERY );
if( xShow.is() )
diff --git a/xmloff/source/draw/ximpstyl.cxx b/xmloff/source/draw/ximpstyl.cxx
index 74a96359ff64..2d65bbb46b66 100644
--- a/xmloff/source/draw/ximpstyl.cxx
+++ b/xmloff/source/draw/ximpstyl.cxx
@@ -901,7 +901,7 @@ SdXMLMasterPageContext::SdXMLMasterPageContext(
}
}
- if( !msDisplayName.getLength() )
+ if( msDisplayName.isEmpty() )
msDisplayName = msName;
else if( msDisplayName != msName )
GetImport().AddStyleDisplayName( XML_STYLE_FAMILY_MASTER_PAGE, msName, msDisplayName );
@@ -909,7 +909,7 @@ SdXMLMasterPageContext::SdXMLMasterPageContext(
GetImport().GetShapeImport()->startPage( GetLocalShapesContext() );
// set page name?
- if(!bHandoutMaster && msDisplayName.getLength() && GetLocalShapesContext().is())
+ if(!bHandoutMaster && !msDisplayName.isEmpty() && GetLocalShapesContext().is())
{
uno::Reference < container::XNamed > xNamed(GetLocalShapesContext(), uno::UNO_QUERY);
if(xNamed.is())
@@ -917,7 +917,7 @@ SdXMLMasterPageContext::SdXMLMasterPageContext(
}
// set page-master?
- if(msPageMasterName.getLength())
+ if(!msPageMasterName.isEmpty())
{
SetPageMaster( msPageMasterName );
}
@@ -940,7 +940,7 @@ SdXMLMasterPageContext::~SdXMLMasterPageContext()
void SdXMLMasterPageContext::EndElement()
{
// set styles on master-page
- if(msName.getLength() && GetSdImport().GetShapeImport()->GetStylesContext())
+ if(!msName.isEmpty() && GetSdImport().GetShapeImport()->GetStylesContext())
{
SvXMLImportContext* pContext = GetSdImport().GetShapeImport()->GetStylesContext();
if( pContext && pContext->ISA( SvXMLStyleContext ) )
@@ -1453,7 +1453,7 @@ void SdXMLStylesContext::ImpSetGraphicStyles( uno::Reference< container::XNameAc
{
const SvXMLStyleContext* pStyle = GetStyle(a);
- if(pStyle && pStyle->GetDisplayName().getLength() && (nFamily == pStyle->GetFamily())) try
+ if(pStyle && !pStyle->GetDisplayName().isEmpty() && (nFamily == pStyle->GetFamily())) try
{
OUString aStyleName(pStyle->GetDisplayName());
if( nPrefLen )