diff options
author | Olivier Hallot <olivier.hallot@alta.org.br> | 2012-01-26 17:05:51 -0200 |
---|---|---|
committer | Olivier Hallot <olivier.hallot@alta.org.br> | 2012-01-26 19:19:41 -0200 |
commit | 596469d4183ff451833348cb4454ad0d02e0138f (patch) | |
tree | 74bdef7370f3d0be408487ebeacab00e7dafa4fe /xmloff/source/table | |
parent | dfa8287f8bbb6c523266237ff67eb4b3d07b5c8b (diff) |
Fix for fdo43460 Part LI getLength() to isEmpty()
Part LI
Modules
xmloff (part 4)
Diffstat (limited to 'xmloff/source/table')
-rw-r--r-- | xmloff/source/table/XMLTableExport.cxx | 14 | ||||
-rw-r--r-- | xmloff/source/table/XMLTableImport.cxx | 10 |
2 files changed, 12 insertions, 12 deletions
diff --git a/xmloff/source/table/XMLTableExport.cxx b/xmloff/source/table/XMLTableExport.cxx index 1a0934a0c7ad..992a7c4355b3 100644 --- a/xmloff/source/table/XMLTableExport.cxx +++ b/xmloff/source/table/XMLTableExport.cxx @@ -287,7 +287,7 @@ static bool has_states( const std::vector< XMLPropertyState >& xPropStates ) else sStyleName = sParentStyleName; - if( sStyleName.getLength() ) + if( !sStyleName.isEmpty() ) { Reference< XInterface > xKey( xCellSet, UNO_QUERY ); pTableInfo->maCellStyleMap[xKey] = sStyleName; @@ -295,7 +295,7 @@ static bool has_states( const std::vector< XMLPropertyState >& xPropStates ) // create auto style for text Reference< XText > xText(xCellSet, UNO_QUERY); - if(xText.is() && xText->getString().getLength()) + if(xText.is() && !xText->getString().isEmpty()) GetExport().GetTextParagraphExport()->collectTextAutoStyles( xText ); aStringStatistic.add( sStyleName ); @@ -354,11 +354,11 @@ static bool has_states( const std::vector< XMLPropertyState >& xPropStates ) { Reference< XInterface > xKey( xCellRange, UNO_QUERY ); const OUString sStyleName( pTableInfo->maRowStyleMap[xKey] ); - if( sStyleName.getLength() ) + if( !sStyleName.isEmpty() ) mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_STYLE_NAME, sStyleName ); sDefaultCellStyle = pTableInfo->maDefaultRowCellStyles[rowIndex]; - if( sDefaultCellStyle.getLength() ) + if( !sDefaultCellStyle.isEmpty() ) mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_DEFAULT_CELL_STYLE_NAME, sDefaultCellStyle ); } @@ -401,7 +401,7 @@ static bool has_states( const std::vector< XMLPropertyState >& xPropStates ) { Reference< XInterface > xKey( xColumnProperties, UNO_QUERY ); const OUString sStyleName( pTableInfo->maColumnStyleMap[xKey] ); - if( sStyleName.getLength() ) + if( !sStyleName.isEmpty() ) mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_STYLE_NAME, sStyleName ); } @@ -430,7 +430,7 @@ static bool has_states( const std::vector< XMLPropertyState >& xPropStates ) // table:style-name Reference< XInterface > xKey( xCell, UNO_QUERY ); const OUString sStyleName( pTableInfo->maCellStyleMap[xKey] ); - if( sStyleName.getLength() && (sStyleName != rDefaultCellStyle) ) + if( !sStyleName.isEmpty() && (sStyleName != rDefaultCellStyle) ) mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_STYLE_NAME, sStyleName ); } @@ -475,7 +475,7 @@ static bool has_states( const std::vector< XMLPropertyState >& xPropStates ) void XMLTableExport::ImpExportText( const Reference< XCell >& xCell ) { Reference< XText > xText( xCell, UNO_QUERY ); - if( xText.is() && xText->getString().getLength()) + if( xText.is() && !xText->getString().isEmpty()) mrExport.GetTextParagraphExport()->exportText( xText ); } diff --git a/xmloff/source/table/XMLTableImport.cxx b/xmloff/source/table/XMLTableImport.cxx index c84520c77900..399d2147dd02 100644 --- a/xmloff/source/table/XMLTableImport.cxx +++ b/xmloff/source/table/XMLTableImport.cxx @@ -410,7 +410,7 @@ void XMLTableImportContext::InitColumns() { boost::shared_ptr< ColumnInfo > xInfo( maColumnInfos[nCol] ); - if( pAutoStyles && xInfo->msStyleName.getLength() ) + if( pAutoStyles && !xInfo->msStyleName.isEmpty() ) { const XMLPropStyleContext* pStyle = dynamic_cast< const XMLPropStyleContext* >( @@ -492,7 +492,7 @@ SvXMLImportContext * XMLTableImportContext::ImportRow( sal_uInt16 nPrefix, const } } - if( sStyleName.getLength() ) + if( !sStyleName.isEmpty() ) { SvXMLStylesContext * pAutoStyles = GetImport().GetShapeImport()->GetAutoStylesContext(); if( pAutoStyles ) @@ -608,7 +608,7 @@ OUString XMLTableImportContext::GetDefaultCellStyleName() const OUString sStyleName( msDefaultCellStyleName ); // if there is still no style name, try default style name from column - if( (sStyleName.getLength() == 0) && (mnCurrentColumn < sal::static_int_cast<sal_Int32>(maColumnInfos.size())) ) + if( (sStyleName.isEmpty()) && (mnCurrentColumn < sal::static_int_cast<sal_Int32>(maColumnInfos.size())) ) sStyleName = maColumnInfos[mnCurrentColumn]->msDefaultCellStyleName; return sStyleName; @@ -666,10 +666,10 @@ XMLCellImportContext::XMLCellImportContext( SvXMLImport& rImport, const Referenc } // if there is no style name at the cell, try default style name from row - if( sStyleName.getLength() == 0 ) + if( sStyleName.isEmpty() ) sStyleName = sDefaultCellStyleName; - if( sStyleName.getLength() ) + if( !sStyleName.isEmpty() ) { SvXMLStylesContext * pAutoStyles = GetImport().GetShapeImport()->GetAutoStylesContext(); if( pAutoStyles ) |