summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorOlivier Hallot <olivier.hallot@alta.org.br>2012-01-23 17:15:58 -0200
committerOlivier Hallot <olivier.hallot@alta.org.br>2012-01-23 19:17:18 -0200
commitf94399ef8023ad3b21528ecdc00e44366d4c3fe5 (patch)
tree2f560eefe134f3dfe49f7e35dcb1c3345750bf26 /writerfilter
parent558112542348bcbd754853847c968e2203abf269 (diff)
Fix for fdo43460 Part XLV getLength() to isEmpty()
Part XLV Modules writerfilter, writerperfect
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/DomainMapper.cxx4
-rw-r--r--writerfilter/source/dmapper/DomainMapperTableHandler.cxx2
-rw-r--r--writerfilter/source/dmapper/DomainMapperTableManager.cxx2
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx52
-rw-r--r--writerfilter/source/dmapper/FormControlHelper.cxx6
-rw-r--r--writerfilter/source/dmapper/GraphicImport.cxx2
-rw-r--r--writerfilter/source/dmapper/NumberingManager.cxx2
-rw-r--r--writerfilter/source/dmapper/PropertyMap.cxx12
-rw-r--r--writerfilter/source/dmapper/StyleSheetTable.cxx20
-rw-r--r--writerfilter/source/dmapper/ThemeTable.cxx2
-rw-r--r--writerfilter/source/filter/WriterFilterDetection.cxx2
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx10
-rw-r--r--writerfilter/source/rtftok/rtfvalue.cxx6
-rw-r--r--writerfilter/unocomponent/debugservices/doctok/DocTokAnalyzeService.cxx2
-rw-r--r--writerfilter/unocomponent/debugservices/ooxml/OOXMLAnalyzeService.cxx2
15 files changed, 63 insertions, 63 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 62a4e4acdc56..0f01af2206d0 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -3152,7 +3152,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType
if ( pOLEHandler->isOLEObject( ) )
{
::rtl::OUString sStreamName = pOLEHandler->copyOLEOStream( m_pImpl->GetTextDocument() );
- if( sStreamName.getLength() )
+ if( !sStreamName.isEmpty() )
{
m_pImpl->appendOLE( sStreamName, pOLEHandler );
}
@@ -3296,7 +3296,7 @@ void DomainMapper::lcl_startCharacterGroup()
{
m_pImpl->PushProperties(CONTEXT_CHARACTER);
DomainMapperTableManager& rTableManager = m_pImpl->getTableManager();
- if( rTableManager.getTableStyleName().getLength() )
+ if( !rTableManager.getTableStyleName().isEmpty() )
{
PropertyMapPtr pTopContext = m_pImpl->GetTopContext();
rTableManager.CopyTextProperties(pTopContext, m_pImpl->GetStyleSheetTable());
diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
index f9acfaa6165d..87bb754b8928 100644
--- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
@@ -119,7 +119,7 @@ void DomainMapperTableHandler::startTable(unsigned int nRows,
PropertyMapPtr lcl_SearchParentStyleSheetAndMergeProperties(const StyleSheetEntryPtr pStyleSheet, StyleSheetTablePtr pStyleSheetTable)
{
PropertyMapPtr pRet;
- if( pStyleSheet->sBaseStyleIdentifier.getLength())
+ if(!pStyleSheet->sBaseStyleIdentifier.isEmpty())
{
const StyleSheetEntryPtr pParentStyleSheet = pStyleSheetTable->FindStyleSheetByISTD( pStyleSheet->sBaseStyleIdentifier );
pRet = lcl_SearchParentStyleSheetAndMergeProperties( pParentStyleSheet, pStyleSheetTable );
diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
index a430fc2c0e34..d7060b4018d4 100644
--- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
@@ -530,7 +530,7 @@ void lcl_CopyTextProperties(PropertyMapPtr pToFill,
if( !pStyleSheetEntry )
return;
//fill base style properties first, recursively
- if( pStyleSheetEntry->sBaseStyleIdentifier.getLength())
+ if( !pStyleSheetEntry->sBaseStyleIdentifier.isEmpty())
{
const StyleSheetEntryPtr pParentStyleSheet =
pStyleSheetTable->FindStyleSheetByISTD(pStyleSheetEntry->sBaseStyleIdentifier);
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 3137be1e7dbd..7fa134293912 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -123,7 +123,7 @@ void lcl_handleDropdownField( const uno::Reference< beans::XPropertySet >& rxFie
{
if ( rxFieldProps.is() )
{
- if ( pFFDataHandler->getName().getLength() )
+ if ( !pFFDataHandler->getName().isEmpty() )
rxFieldProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Name") ), uno::makeAny( pFFDataHandler->getName() ) );
const FFDataHandler::DropDownEntries_t& rEntries = pFFDataHandler->getDropDownEntries();
@@ -135,7 +135,7 @@ void lcl_handleDropdownField( const uno::Reference< beans::XPropertySet >& rxFie
sal_Int32 nResult = pFFDataHandler->getDropDownResult().toInt32();
if ( nResult )
rxFieldProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("SelectedItem") ), uno::makeAny( sItems[ nResult ] ) );
- if ( pFFDataHandler->getHelpText().getLength() )
+ if ( !pFFDataHandler->getHelpText().isEmpty() )
rxFieldProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Help") ), uno::makeAny( pFFDataHandler->getHelpText() ) );
}
}
@@ -1404,7 +1404,7 @@ void DomainMapper_Impl::PushFootOrEndnote( bool bIsFootnote )
aFontProps->Insert(PROP_CHAR_FONT_PITCH, true, uno::makeAny( pFontEntry->nPitchRequest ));
aFontProperties = aFontProps->GetPropertyValues();
}
- else if(pTopContext->GetFootnoteFontName().getLength())
+ else if(!pTopContext->GetFootnoteFontName().isEmpty())
{
PropertyMapPtr aFontProps( new PropertyMap );
aFontProps->Insert(PROP_CHAR_FONT_NAME, true, uno::makeAny( pTopContext->GetFootnoteFontName() ));
@@ -1623,7 +1623,7 @@ sal_Int16 lcl_ParseNumberingType( const ::rtl::OUString& rCommand )
// The command looks like: " PAGE \* Arabic "
::rtl::OUString sNumber = lcl_FindQuotedText(rCommand, "\\* ", ' ');
- if( sNumber.getLength() )
+ if( !sNumber.isEmpty() )
{
//todo: might make sense to hash this list, too
struct NumberingPairs
@@ -1771,7 +1771,7 @@ extract a parameter (with or without quotes) between the command and the followi
::rtl::OUString sRet = sShortCommand.getToken( 0, ' ', nIndex);
if( nIndex > 0)
rHint = sShortCommand.copy( nIndex );
- if( !rHint.getLength() )
+ if( rHint.isEmpty() )
rHint = sRet;
return sRet;
}
@@ -1963,7 +1963,7 @@ void FieldContext::AppendCommand(const ::rtl::OUString& rPart)
OUString sToken = GetCommand().getToken(0, ' ', nIndex);
bool bInStringNext = bInString;
- if (sToken.getLength() == 0)
+ if (sToken.isEmpty())
continue;
if (sToken.getStr()[0] == '"')
@@ -2155,7 +2155,7 @@ void DomainMapper_Impl::handleFieldAsk
sVariable = lcl_ExctractAskVariableAndHint( pContext->GetCommand(),
sHint );
- if(sVariable.getLength())
+ if(!sVariable.isEmpty())
{
// determine field master name
uno::Reference< beans::XPropertySet > xMaster =
@@ -2231,7 +2231,7 @@ void DomainMapper_Impl::handleAuthor
::rtl::OUString sParam =
lcl_ExtractParameter(pContext->GetCommand(), nLen );
- if(sParam.getLength())
+ if(!sParam.isEmpty())
{
xFieldProperties->setPropertyValue(
rPropNameSupplier.GetName( PROP_IS_FIXED ),
@@ -2251,7 +2251,7 @@ void DomainMapper_Impl::handleAuthor
::rtl::OUString sParam =
lcl_ExtractParameter(pContext->GetCommand(), sizeof(" DOCPROPERTY") );
- if(sParam.getLength())
+ if(!sParam.isEmpty())
{
#define SET_ARABIC 0x01
#define SET_FULL_NAME 0x02
@@ -2302,7 +2302,7 @@ void DomainMapper_Impl::handleAuthor
::rtl::OUString sServiceName(RTL_CONSTASCII_USTRINGPARAM
("com.sun.star.text.TextField."));
bool bIsCustomField = false;
- if(!sFieldServiceName.getLength())
+ if(sFieldServiceName.isEmpty())
{
//create a custom property field
sServiceName +=
@@ -2424,7 +2424,7 @@ void DomainMapper_Impl::handleToc
{
sal_Int32 nPos = 0;
::rtl::OUString sToken = sValue.getToken( 1, '"', nPos);
- sTemplate = sToken.getLength() ? sToken : sValue;
+ sTemplate = sToken.isEmpty() ? sValue : sToken;
}
// \u Builds a table of contents by using the applied paragraph outline level
if( lcl_FindInCommand( pContext->GetCommand(), 'u', sValue ))
@@ -2447,7 +2447,7 @@ void DomainMapper_Impl::handleToc
// { //todo: unsupported feature }
//if there's no option then it should be created from outline
- if( !bFromOutline && !bFromEntries && !sTemplate.getLength() )
+ if( !bFromOutline && !bFromEntries && sTemplate.isEmpty() )
bFromOutline = true;
uno::Reference< beans::XPropertySet > xTOC;
@@ -2466,7 +2466,7 @@ void DomainMapper_Impl::handleToc
xTOC->setPropertyValue( rPropNameSupplier.GetName( PROP_LEVEL ), uno::makeAny( nMaxLevel ) );
xTOC->setPropertyValue( rPropNameSupplier.GetName( PROP_CREATE_FROM_OUTLINE ), uno::makeAny( bFromOutline ));
xTOC->setPropertyValue( rPropNameSupplier.GetName( PROP_CREATE_FROM_MARKS ), uno::makeAny( bFromEntries ));
- if( sTemplate.getLength() )
+ if( !sTemplate.isEmpty() )
{
//the string contains comma separated the names and related levels
//like: "Heading 1,1,Heading 2,2"
@@ -2477,12 +2477,12 @@ void DomainMapper_Impl::handleToc
{
::rtl::OUString sStyleName = sTemplate.getToken( 0, ',', nPosition );
//empty tokens should be skipped
- while( !sStyleName.getLength() && nPosition > 0 )
+ while( sStyleName.isEmpty() && nPosition > 0 )
sStyleName = sTemplate.getToken( 0, ',', nPosition );
nLevel = sTemplate.getToken( 0, ',', nPosition ).toInt32();
if( !nLevel )
nLevel = 1;
- if( sStyleName.getLength() )
+ if( !sStyleName.isEmpty() )
aMap.insert( TOCStyleMap::value_type(nLevel, sStyleName) );
}
uno::Reference< container::XIndexReplace> xParaStyles;
@@ -2505,7 +2505,7 @@ void DomainMapper_Impl::handleToc
xTOC->setPropertyValue(rPropNameSupplier.GetName(PROP_CREATE_FROM_LEVEL_PARAGRAPH_STYLES), uno::makeAny( true ));
}
- if(bHyperlinks || sChapterNoSeparator.getLength())
+ if(bHyperlinks || !sChapterNoSeparator.isEmpty())
{
uno::Reference< container::XIndexReplace> xLevelFormats;
xTOC->getPropertyValue(rPropNameSupplier.GetName(PROP_LEVEL_FORMAT)) >>= xLevelFormats;
@@ -2516,7 +2516,7 @@ void DomainMapper_Impl::handleToc
uno::Sequence< beans::PropertyValues > aLevel;
xLevelFormats->getByIndex( nLevel ) >>= aLevel;
//create a copy of the level and add two new entries - hyperlink start and end
- bool bChapterNoSeparator = sChapterNoSeparator.getLength() > 0;
+ bool bChapterNoSeparator = !sChapterNoSeparator.isEmpty();
sal_Int32 nAdd = (bHyperlinks && bChapterNoSeparator) ? 4 : 2;
uno::Sequence< beans::PropertyValues > aNewLevel( aLevel.getLength() + nAdd);
beans::PropertyValues* pNewLevel = aNewLevel.getArray();
@@ -2761,7 +2761,7 @@ void DomainMapper_Impl::CloseFieldCommand()
uno::Reference< container::XNamed > xNamed( xFormField, uno::UNO_QUERY );
if ( xNamed.is() )
{
- if ( pFFDataHandler && pFFDataHandler->getName().getLength() )
+ if ( pFFDataHandler && !pFFDataHandler->getName().isEmpty() )
xNamed->setName( pFFDataHandler->getName() );
pContext->SetFormField( xFormField );
}
@@ -2816,7 +2816,7 @@ void DomainMapper_Impl::CloseFieldCommand()
++aPartIt;
}
- if (sURL.getLength() > 0)
+ if (!sURL.isEmpty())
{
pContext->SetHyperlinkURL(sURL);
}
@@ -2828,7 +2828,7 @@ void DomainMapper_Impl::CloseFieldCommand()
case FIELD_KEYWORDS :
{
::rtl::OUString sParam = lcl_ExtractParameter(pContext->GetCommand(), sizeof(" KEYWORDS") );
- if(sParam.getLength())
+ if(!sParam.isEmpty())
{
xFieldProperties->setPropertyValue(
rPropNameSupplier.GetName( PROP_IS_FIXED ), uno::makeAny( true ));
@@ -2939,7 +2939,7 @@ void DomainMapper_Impl::CloseFieldCommand()
case FIELD_SUBJECT :
{
::rtl::OUString sParam = lcl_ExtractParameter(pContext->GetCommand(), sizeof(" SUBJECT") );
- if(sParam.getLength())
+ if(!sParam.isEmpty())
{
xFieldProperties->setPropertyValue(
rPropNameSupplier.GetName( PROP_IS_FIXED ), uno::makeAny( true ));
@@ -2955,7 +2955,7 @@ void DomainMapper_Impl::CloseFieldCommand()
case FIELD_TITLE :
{
::rtl::OUString sParam = lcl_ExtractParameter(pContext->GetCommand(), sizeof(" TITLE") );
- if(sParam.getLength())
+ if(!sParam.isEmpty())
{
xFieldProperties->setPropertyValue(
rPropNameSupplier.GetName( PROP_IS_FIXED ), uno::makeAny( true ));
@@ -2976,7 +2976,7 @@ void DomainMapper_Impl::CloseFieldCommand()
::rtl::OUString::createFromAscii(aIt->second.cFieldServiceName)),
uno::UNO_QUERY_THROW);
::rtl::OUString sTCText = lcl_ExtractParameter(pContext->GetCommand(), sizeof(" TC") );
- if( sTCText.getLength())
+ if( !sTCText.isEmpty())
xTC->setPropertyValue(rPropNameSupplier.GetName(PROP_ALTERNATIVE_TEXT),
uno::makeAny(sTCText));
::rtl::OUString sValue;
@@ -2989,7 +2989,7 @@ void DomainMapper_Impl::CloseFieldCommand()
// \l Outline Level
{
sal_Int32 nLevel = sValue.toInt32();
- if( sValue.getLength() && nLevel >= 0 && nLevel <= 10 )
+ if( !sValue.isEmpty() && nLevel >= 0 && nLevel <= 10 )
xTC->setPropertyValue(rPropNameSupplier.GetName(PROP_LEVEL), uno::makeAny( (sal_Int16)nLevel ));
}
// if( lcl_FindInCommand( pContext->GetCommand(), 'n', sValue ))
@@ -3173,7 +3173,7 @@ void DomainMapper_Impl::PopFieldContext()
pFormControlHelper->insertControl(xTxtRange);
}
}
- else if(pContext->GetHyperlinkURL().getLength())
+ else if(!pContext->GetHyperlinkURL().isEmpty())
{
PropertyNameSupplier& rPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
xCrsr->gotoEnd( true );
@@ -3231,7 +3231,7 @@ void DomainMapper_Impl::AddBookmark( const ::rtl::OUString& rBookmarkName, const
xCursor->gotoRange( xTextAppend->getEnd(), true );
uno::Reference< container::XNamed > xBkmNamed( xBookmark, uno::UNO_QUERY_THROW );
//todo: make sure the name is not used already!
- if ( aBookmarkIter->second.m_sBookmarkName.getLength() > 0 )
+ if ( !aBookmarkIter->second.m_sBookmarkName.isEmpty() )
xBkmNamed->setName( aBookmarkIter->second.m_sBookmarkName );
else
xBkmNamed->setName( rBookmarkName );
diff --git a/writerfilter/source/dmapper/FormControlHelper.cxx b/writerfilter/source/dmapper/FormControlHelper.cxx
index 9852a39cfad9..94b0d2772c5e 100644
--- a/writerfilter/source/dmapper/FormControlHelper.cxx
+++ b/writerfilter/source/dmapper/FormControlHelper.cxx
@@ -202,7 +202,7 @@ bool FormControlHelper::createCheckbox(uno::Reference<text::XTextRange> xTextRan
m_pImpl->aSize.Height = m_pImpl->aSize.Width;
uno::Any aAny;
- if (m_pFFData->getStatusText().getLength())
+ if (!m_pFFData->getStatusText().isEmpty())
{
aAny <<= m_pFFData->getStatusText();
@@ -212,7 +212,7 @@ bool FormControlHelper::createCheckbox(uno::Reference<text::XTextRange> xTextRan
aAny <<= m_pFFData->getCheckboxChecked();
xPropSet->setPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultState")), aAny);
- if (m_pFFData->getHelpText().getLength())
+ if (!m_pFFData->getHelpText().isEmpty())
{
aAny <<= m_pFFData->getHelpText();
xPropSet->setPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HelpF1Text")), aAny);
@@ -235,7 +235,7 @@ bool FormControlHelper::processField(uno::Reference<text::XFormField> xFormField
if (m_pImpl->m_eFieldId == FIELD_FORMTEXT )
{
xFormField->setFieldType( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ODF_FORMTEXT)));
- if ( m_pFFData->getName().getLength() )
+ if ( !m_pFFData->getName().isEmpty() )
{
xNamed->setName( m_pFFData->getName() );
}
diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx
index 8aa0cb17da1a..959f521d7530 100644
--- a/writerfilter/source/dmapper/GraphicImport.cxx
+++ b/writerfilter/source/dmapper/GraphicImport.cxx
@@ -1497,7 +1497,7 @@ uno::Reference< text::XTextContent > GraphicImport::createGraphicObject( const b
uno::makeAny( awt::Size( m_pImpl->getXSize(), m_pImpl->getYSize() )));
try
{
- if( m_pImpl->sName.getLength() )
+ if( !m_pImpl->sName.isEmpty() )
{
uno::Reference< container::XNamed > xNamed( xGraphicObjectProperties, uno::UNO_QUERY_THROW );
xNamed->setName( m_pImpl->sName );
diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx
index 831db8c97823..a3b0e7ee8ac1 100644
--- a/writerfilter/source/dmapper/NumberingManager.cxx
+++ b/writerfilter/source/dmapper/NumberingManager.cxx
@@ -265,7 +265,7 @@ uno::Sequence< beans::PropertyValue > ListLevel::GetLevelProperties( )
aNumberingProperties.push_back( MAKE_PROPVAL(PROP_ADJUST, aWWToUnoAdjust[m_nJC]));
// todo: this is not the bullet char
- if( nNumberFormat == style::NumberingType::CHAR_SPECIAL && m_sBulletChar.getLength() )
+ if( nNumberFormat == style::NumberingType::CHAR_SPECIAL && !m_sBulletChar.isEmpty() )
aNumberingProperties.push_back( MAKE_PROPVAL(PROP_BULLET_CHAR, m_sBulletChar.copy(0,1)));
aNumberingProperties.push_back( MAKE_PROPVAL( PROP_LISTTAB_STOP_POSITION, m_nTabstop ) );
diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx
index d72059470886..6230d1b8f812 100644
--- a/writerfilter/source/dmapper/PropertyMap.cxx
+++ b/writerfilter/source/dmapper/PropertyMap.cxx
@@ -369,7 +369,7 @@ uno::Reference< beans::XPropertySet > SectionPropertyMap::GetPageStyle(
{
if( bFirst )
{
- if( !m_sFirstPageStyleName.getLength() && xPageStyles.is() )
+ if( m_sFirstPageStyleName.isEmpty() && xPageStyles.is() )
{
uno::Sequence< ::rtl::OUString > aPageStyleNames = xPageStyles->getElementNames();
m_sFirstPageStyleName = lcl_FindUnusedPageStyleName(aPageStyleNames);
@@ -387,7 +387,7 @@ uno::Reference< beans::XPropertySet > SectionPropertyMap::GetPageStyle(
}
else
{
- if( !m_sFollowPageStyleName.getLength() && xPageStyles.is() )
+ if( m_sFollowPageStyleName.isEmpty() && xPageStyles.is() )
{
uno::Sequence< ::rtl::OUString > aPageStyleNames = xPageStyles->getElementNames();
m_sFollowPageStyleName = lcl_FindUnusedPageStyleName(aPageStyleNames);
@@ -445,17 +445,17 @@ void SectionPropertyMap::ApplyBorderToPageStyles(
switch( nValue & 0x07)
{
case 0: /*all styles*/
- if ( m_sFollowPageStyleName.getLength( ) > 0 )
+ if ( !m_sFollowPageStyleName.isEmpty() )
xFirst = GetPageStyle( xPageStyles, xTextFactory, false );
- if ( m_sFirstPageStyleName.getLength( ) > 0 )
+ if ( !m_sFirstPageStyleName.isEmpty() )
xSecond = GetPageStyle( xPageStyles, xTextFactory, true );
break;
case 1: /*first page*/
- if ( m_sFirstPageStyleName.getLength( ) > 0 )
+ if ( !m_sFirstPageStyleName.isEmpty() )
xFirst = GetPageStyle( xPageStyles, xTextFactory, true );
break;
case 2: /*left and right*/
- if ( m_sFollowPageStyleName.getLength( ) > 0 )
+ if ( !m_sFollowPageStyleName.isEmpty() )
xFirst = GetPageStyle( xPageStyles, xTextFactory, false );
break;
case 3: //whole document?
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx
index a187379a32d6..b79ce6b18c13 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -387,7 +387,7 @@ void StyleSheetTable::lcl_attribute(Id Name, Value & val)
case NS_rtf::LN_STI:
{
::rtl::OUString tempStyleIdentifier = GetStyleIdFromIndex(static_cast<sal_uInt32>(nIntValue));
- if (tempStyleIdentifier.getLength())
+ if (!tempStyleIdentifier.isEmpty())
m_pImpl->m_pCurrentEntry->sStyleIdentifierI = tempStyleIdentifier;
if (nIntValue == 0 || nIntValue == 65)
m_pImpl->m_pCurrentEntry->bIsDefaultStyle = true;
@@ -417,12 +417,12 @@ void StyleSheetTable::lcl_attribute(Id Name, Value & val)
break;
case NS_rtf::LN_XSTZNAME:
m_pImpl->m_pCurrentEntry->sStyleName1 = sValue;
- if (m_pImpl->m_pCurrentEntry->sStyleIdentifierI.getLength())
+ if (!m_pImpl->m_pCurrentEntry->sStyleIdentifierI.isEmpty())
m_pImpl->m_pCurrentEntry->sStyleIdentifierI = sValue;
break;
case NS_rtf::LN_XSTZNAME1:
m_pImpl->m_pCurrentEntry->sStyleName = sValue;
- if (m_pImpl->m_pCurrentEntry->sStyleIdentifierI.getLength())
+ if (!m_pImpl->m_pCurrentEntry->sStyleIdentifierI.isEmpty())
m_pImpl->m_pCurrentEntry->sStyleIdentifierI = sValue;
break;
case NS_rtf::LN_UPX:
@@ -620,7 +620,7 @@ void StyleSheetTable::lcl_entry(int /*pos*/, writerfilter::Reference<Properties>
ref->resolve(*this);
//append it to the table
m_pImpl->m_rDMapper.PopStyleSheetProperties();
- if( !m_pImpl->m_rDMapper.IsOOXMLImport() || m_pImpl->m_pCurrentEntry->sStyleName.getLength() >0)
+ if( !m_pImpl->m_rDMapper.IsOOXMLImport() || !m_pImpl->m_pCurrentEntry->sStyleName.isEmpty())
{
m_pImpl->m_pCurrentEntry->sConvertedStyleName = ConvertStyleName( m_pImpl->m_pCurrentEntry->sStyleName );
m_pImpl->m_aStyleSheetEntries.push_back( m_pImpl->m_pCurrentEntry );
@@ -725,7 +725,7 @@ void StyleSheetTable::ApplyStyleSheets( FontTablePtr rFontTable )
rPropNameSupplier.GetName( PROP_SERVICE_CHAR_STYLE )),
uno::UNO_QUERY_THROW);
}
- if( pEntry->sBaseStyleIdentifier.getLength() )
+ if( !pEntry->sBaseStyleIdentifier.isEmpty() )
{
try
{
@@ -781,7 +781,7 @@ void StyleSheetTable::ApplyStyleSheets( FontTablePtr rFontTable )
uno::Sequence< beans::PropertyValue > aPropValues = pEntry->pProperties->GetPropertyValues();
bool bAddFollowStyle = false;
- if(bParaStyle && !pEntry->sNextStyleIdentifier.getLength() )
+ if(bParaStyle && pEntry->sNextStyleIdentifier.isEmpty() )
{
bAddFollowStyle = true;
}
@@ -862,7 +862,7 @@ void StyleSheetTable::ApplyStyleSheets( FontTablePtr rFontTable )
std::vector< StyleSheetEntryPtr >::iterator aNextStyleIt = m_pImpl->m_aStyleSheetEntries.begin();
for( ; aNextStyleIt != m_pImpl->m_aStyleSheetEntries.end(); ++aNextStyleIt )
{
- if( ( *aNextStyleIt )->sStyleName.getLength() &&
+ if( !( *aNextStyleIt )->sStyleName.isEmpty() &&
( *aNextStyleIt )->sStyleName == pEntry->sNextStyleIdentifier)
{
beans::PropertyValue aNew;
@@ -966,7 +966,7 @@ const StyleSheetEntryPtr StyleSheetTable::FindStyleSheetByConvertedStyleName(con
const StyleSheetEntryPtr StyleSheetTable::FindParentStyleSheet(::rtl::OUString sBaseStyle)
{
- if( !sBaseStyle.getLength() )
+ if( sBaseStyle.isEmpty() )
{
StyleSheetEntryPtr pEmptyPtr;
return pEmptyPtr;
@@ -1150,7 +1150,7 @@ static const sal_Char* const aStyleNamePairs[] =
}
}
StringPairMap_t::iterator aIt = m_pImpl->m_aStyleNameMap.find( sRet );
- if(aIt != m_pImpl->m_aStyleNameMap.end() && aIt->second.getLength())
+ if(aIt != m_pImpl->m_aStyleNameMap.end() && !aIt->second.isEmpty())
sRet = aIt->second;
return sRet;
}
@@ -1224,7 +1224,7 @@ void StyleSheetTable::applyDefaults(bool bParaProperties)
{
//find out if any of the styles already has the required properties then return it's name
::rtl::OUString sListLabel = m_pImpl->HasListCharStyle(rCharProperties);
- if( sListLabel.getLength() )
+ if( !sListLabel.isEmpty() )
return sListLabel;
const char cListLabel[] = "ListLabel ";
uno::Reference< style::XStyleFamiliesSupplier > xStylesSupplier( m_pImpl->m_xTextDocument, uno::UNO_QUERY_THROW );
diff --git a/writerfilter/source/dmapper/ThemeTable.cxx b/writerfilter/source/dmapper/ThemeTable.cxx
index c3e2790882c3..e2d1228684b1 100644
--- a/writerfilter/source/dmapper/ThemeTable.cxx
+++ b/writerfilter/source/dmapper/ThemeTable.cxx
@@ -75,7 +75,7 @@ void ThemeTable::lcl_attribute(Id Name, Value & val)
switch(Name)
{
case NS_ooxml::LN_CT_TextFont_typeface:
- if (sValue.getLength())
+ if (!sValue.isEmpty())
m_pImpl->m_currentFontThemeEntry[m_pImpl->m_currentThemeFontId] = sValue;
break;
default:
diff --git a/writerfilter/source/filter/WriterFilterDetection.cxx b/writerfilter/source/filter/WriterFilterDetection.cxx
index 994ac218f221..ff2e22e00bd1 100644
--- a/writerfilter/source/filter/WriterFilterDetection.cxx
+++ b/writerfilter/source/filter/WriterFilterDetection.cxx
@@ -127,7 +127,7 @@ OUString WriterFilterDetection::detect( uno::Sequence< beans::PropertyValue >& r
if(pNames[nName].equalsAsciiL(RTL_CONSTASCII_STRINGPARAM ( "word" )))
{
bWord = true;
- if( !sTypeName.getLength() )
+ if( sTypeName.isEmpty() )
sTypeName = ::rtl::OUString(
RTL_CONSTASCII_STRINGPARAM( "writer_MS_Word_2007" ), RTL_TEXTENCODING_ASCII_US);
break;
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index aab8952c7f1a..805dd204eb54 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -213,7 +213,7 @@ static writerfilter::Reference<Properties>::Pointer_t lcl_getBookmarkProperties(
{
RTFSprms aAttributes;
RTFValue::Pointer_t pPos(new RTFValue(nPos));
- if (rString.getLength())
+ if (!rString.isEmpty())
{
// If present, this should be sent first.
RTFValue::Pointer_t pString(new RTFValue(rString));
@@ -368,7 +368,7 @@ void RTFDocumentImpl::resolveSubstream(sal_uInt32 nPos, Id nId, OUString& rIgnor
RTFDocumentImpl::Pointer_t pImpl(new RTFDocumentImpl(m_xContext, m_xInputStream, m_xDstDoc, m_xFrame, m_xStatusIndicator));
pImpl->setSubstream(true);
pImpl->setIgnoreFirst(rIgnoreFirst);
- if (m_aAuthor.getLength())
+ if (!m_aAuthor.isEmpty())
{
pImpl->setAuthor(m_aAuthor);
m_aAuthor = OUString();
@@ -849,7 +849,7 @@ void RTFDocumentImpl::text(OUString& rString)
if (bRet)
return;
- if (m_aIgnoreFirst.getLength() && m_aIgnoreFirst.equals(rString))
+ if (!m_aIgnoreFirst.isEmpty() && m_aIgnoreFirst.equals(rString))
{
m_aIgnoreFirst = OUString();
return;
@@ -1170,7 +1170,7 @@ int RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
else
{
// If there is an author set, emit it now.
- if (m_aAuthor.getLength())
+ if (!m_aAuthor.isEmpty())
{
RTFValue::Pointer_t pValue(new RTFValue(m_aAuthor));
RTFSprms aAttributes;
@@ -2504,7 +2504,7 @@ int RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
case RTF_NOFCHARSWS: aName = OUString(RTL_CONSTASCII_USTRINGPARAM("NonWhitespaceCharacterCount")); break;
default: break;
}
- if (aName.getLength())
+ if (!aName.isEmpty())
{
bool bFound = false;
int nLen = aSet.getLength();
diff --git a/writerfilter/source/rtftok/rtfvalue.cxx b/writerfilter/source/rtftok/rtfvalue.cxx
index 1d1017d020f7..661781ea2243 100644
--- a/writerfilter/source/rtftok/rtfvalue.cxx
+++ b/writerfilter/source/rtftok/rtfvalue.cxx
@@ -123,7 +123,7 @@ int RTFValue::getInt() const
OUString RTFValue::getString() const
{
- if (m_sValue.getLength() > 0 || m_bForceString)
+ if (!m_sValue.isEmpty() || m_bForceString)
return m_sValue;
else
return OUString::valueOf(sal_Int32(m_nValue));
@@ -137,7 +137,7 @@ void RTFValue::setString(OUString sValue)
uno::Any RTFValue::getAny() const
{
uno::Any ret;
- if (m_sValue.getLength() > 0 || m_bForceString)
+ if (!m_sValue.isEmpty() || m_bForceString)
ret <<= m_sValue;
else if (m_rShape.is())
ret <<= m_rShape;
@@ -168,7 +168,7 @@ writerfilter::Reference<BinaryObj>::Pointer_t RTFValue::getBinary()
std::string RTFValue::toString() const
{
- if (m_sValue.getLength() > 0 || m_bForceString)
+ if (!m_sValue.isEmpty() || m_bForceString)
return OUStringToOString(m_sValue, RTL_TEXTENCODING_UTF8).getStr();
else
return OString::valueOf(static_cast<sal_Int32>(m_nValue)).getStr();
diff --git a/writerfilter/unocomponent/debugservices/doctok/DocTokAnalyzeService.cxx b/writerfilter/unocomponent/debugservices/doctok/DocTokAnalyzeService.cxx
index c1b67e84dae0..3a74e57bb351 100644
--- a/writerfilter/unocomponent/debugservices/doctok/DocTokAnalyzeService.cxx
+++ b/writerfilter/unocomponent/debugservices/doctok/DocTokAnalyzeService.cxx
@@ -182,7 +182,7 @@ sal_Int32 SAL_CALL AnalyzeService::run
rtl::OUString aURL = aLister.getURL();
- while (aURL.getLength() > 0)
+ while (!aURL.isEmpty())
{
uno::Reference<com::sun::star::ucb::XSimpleFileAccess> xFileAccess
(xFactory->createInstanceWithContext
diff --git a/writerfilter/unocomponent/debugservices/ooxml/OOXMLAnalyzeService.cxx b/writerfilter/unocomponent/debugservices/ooxml/OOXMLAnalyzeService.cxx
index d002ff39ddad..c149a2b4e244 100644
--- a/writerfilter/unocomponent/debugservices/ooxml/OOXMLAnalyzeService.cxx
+++ b/writerfilter/unocomponent/debugservices/ooxml/OOXMLAnalyzeService.cxx
@@ -187,7 +187,7 @@ sal_Int32 SAL_CALL AnalyzeService::run
rtl::OUString aURL = aLister.getURL();
- while (aURL.getLength() > 0)
+ while (!aURL.isEmpty())
{
uno::Reference<com::sun::star::ucb::XSimpleFileAccess> xFileAccess
(xFactory->createInstanceWithContext