fdo#43460 oox: use isEmpty()
Change-Id: If291a72d87001932c605755d628cecc088d50275 Reviewed-on: https://gerrit.libreoffice.org/4324 Reviewed-by: Noel Power <noel.power@suse.com> Tested-by: Noel Power <noel.power@suse.com>
This commit is contained in:
committed by
Noel Power
parent
af7cfa0071
commit
50e6713e40
@@ -167,7 +167,7 @@ void ContextHandler2Helper::processCollectedChars()
|
|||||||
{
|
{
|
||||||
OSL_ENSURE( !mxContextStack->empty(), "ContextHandler2Helper::processCollectedChars - no context info" );
|
OSL_ENSURE( !mxContextStack->empty(), "ContextHandler2Helper::processCollectedChars - no context info" );
|
||||||
ElementInfo& rInfo = mxContextStack->back();
|
ElementInfo& rInfo = mxContextStack->back();
|
||||||
if( rInfo.maChars.getLength() > 0 )
|
if( !rInfo.maChars.isEmpty() )
|
||||||
{
|
{
|
||||||
OUString aChars = rInfo.maChars.makeStringAndClear();
|
OUString aChars = rInfo.maChars.makeStringAndClear();
|
||||||
if( mbEnableTrimSpace && rInfo.mbTrimSpaces )
|
if( mbEnableTrimSpace && rInfo.mbTrimSpaces )
|
||||||
|
@@ -203,7 +203,7 @@ void lclPushMarkerProperties( ShapePropertyMap& rPropMap,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( aBuffer.getLength() > 0 )
|
if( !aBuffer.isEmpty() )
|
||||||
{
|
{
|
||||||
sal_Int32 nLength = lclGetArrowSize( rArrowProps.moArrowLength.get( XML_med ) );
|
sal_Int32 nLength = lclGetArrowSize( rArrowProps.moArrowLength.get( XML_med ) );
|
||||||
sal_Int32 nWidth = lclGetArrowSize( rArrowProps.moArrowWidth.get( XML_med ) );
|
sal_Int32 nWidth = lclGetArrowSize( rArrowProps.moArrowWidth.get( XML_med ) );
|
||||||
|
@@ -780,7 +780,7 @@ void DrawingML::WriteRunProperties( Reference< XPropertySet > rRun, sal_Bool bIs
|
|||||||
usLanguageBuffer.append( eLocale.Country );
|
usLanguageBuffer.append( eLocale.Country );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( usLanguageBuffer.getLength() )
|
if( !usLanguageBuffer.isEmpty() )
|
||||||
usLanguage = usLanguageBuffer.makeStringAndClear();
|
usLanguage = usLanguageBuffer.makeStringAndClear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -86,7 +86,7 @@ void VMLExport::OpenContainer( sal_uInt16 nEscherContainer, int nRecInstance )
|
|||||||
m_nShapeType = ESCHER_ShpInst_Nil;
|
m_nShapeType = ESCHER_ShpInst_Nil;
|
||||||
m_pShapeAttrList = m_pSerializer->createAttrList();
|
m_pShapeAttrList = m_pSerializer->createAttrList();
|
||||||
|
|
||||||
if ( m_pShapeStyle->getLength() )
|
if ( !m_pShapeStyle->isEmpty() )
|
||||||
m_pShapeStyle->makeStringAndClear();
|
m_pShapeStyle->makeStringAndClear();
|
||||||
|
|
||||||
m_pShapeStyle->ensureCapacity( 200 );
|
m_pShapeStyle->ensureCapacity( 200 );
|
||||||
@@ -132,7 +132,7 @@ sal_uInt32 VMLExport::EnterGroup( const OUString& rShapeName, const Rectangle* p
|
|||||||
if ( pRect )
|
if ( pRect )
|
||||||
AddRectangleDimensions( aStyle, *pRect );
|
AddRectangleDimensions( aStyle, *pRect );
|
||||||
|
|
||||||
if ( aStyle.getLength() )
|
if ( !aStyle.isEmpty() )
|
||||||
pAttrList->add( XML_style, aStyle.makeStringAndClear() );
|
pAttrList->add( XML_style, aStyle.makeStringAndClear() );
|
||||||
|
|
||||||
// coordorigin/coordsize
|
// coordorigin/coordsize
|
||||||
@@ -499,7 +499,7 @@ void VMLExport::Commit( EscherPropertyContainer& rProps, const Rectangle& rRect
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( aPath.getLength() )
|
if ( !aPath.isEmpty() )
|
||||||
m_pShapeAttrList->add( XML_path, aPath.getStr() );
|
m_pShapeAttrList->add( XML_path, aPath.getStr() );
|
||||||
}
|
}
|
||||||
#if OSL_DEBUG_LEVEL > 0
|
#if OSL_DEBUG_LEVEL > 0
|
||||||
@@ -796,7 +796,7 @@ OString VMLExport::ShapeIdString( sal_uInt32 nId )
|
|||||||
void VMLExport::AddLineDimensions( const Rectangle& rRectangle )
|
void VMLExport::AddLineDimensions( const Rectangle& rRectangle )
|
||||||
{
|
{
|
||||||
// style
|
// style
|
||||||
if ( m_pShapeStyle->getLength() )
|
if ( !m_pShapeStyle->isEmpty() )
|
||||||
m_pShapeStyle->append( ";" );
|
m_pShapeStyle->append( ";" );
|
||||||
|
|
||||||
m_pShapeStyle->append( "position:absolute" );
|
m_pShapeStyle->append( "position:absolute" );
|
||||||
@@ -840,7 +840,7 @@ void VMLExport::AddLineDimensions( const Rectangle& rRectangle )
|
|||||||
|
|
||||||
void VMLExport::AddRectangleDimensions( OStringBuffer& rBuffer, const Rectangle& rRectangle )
|
void VMLExport::AddRectangleDimensions( OStringBuffer& rBuffer, const Rectangle& rRectangle )
|
||||||
{
|
{
|
||||||
if ( rBuffer.getLength() )
|
if ( !rBuffer.isEmpty() )
|
||||||
rBuffer.append( ";" );
|
rBuffer.append( ";" );
|
||||||
|
|
||||||
rBuffer.append( "position:absolute;" );
|
rBuffer.append( "position:absolute;" );
|
||||||
|
@@ -119,7 +119,7 @@ const OUString& StorageBase::getName() const
|
|||||||
OUString StorageBase::getPath() const
|
OUString StorageBase::getPath() const
|
||||||
{
|
{
|
||||||
OUStringBuffer aBuffer( maParentPath );
|
OUStringBuffer aBuffer( maParentPath );
|
||||||
if( aBuffer.getLength() > 0 )
|
if( !aBuffer.isEmpty() )
|
||||||
aBuffer.append( sal_Unicode( '/' ) );
|
aBuffer.append( sal_Unicode( '/' ) );
|
||||||
aBuffer.append( maStorageName );
|
aBuffer.append( maStorageName );
|
||||||
return aBuffer.makeStringAndClear();
|
return aBuffer.makeStringAndClear();
|
||||||
|
@@ -69,7 +69,7 @@ namespace oox { namespace ppt {
|
|||||||
std::list< Attribute >::const_iterator iter;
|
std::list< Attribute >::const_iterator iter;
|
||||||
for(iter = maAttributes.begin(); iter != maAttributes.end(); ++iter)
|
for(iter = maAttributes.begin(); iter != maAttributes.end(); ++iter)
|
||||||
{
|
{
|
||||||
if( sAttributes.getLength() )
|
if( !sAttributes.isEmpty() )
|
||||||
{
|
{
|
||||||
sAttributes.appendAscii( ";" );
|
sAttributes.appendAscii( ";" );
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user