diff options
author | Jelle van der Waa <jelle@vdwaa.nl> | 2013-06-18 12:02:13 +0200 |
---|---|---|
committer | Noel Power <noel.power@suse.com> | 2013-06-18 17:27:52 +0000 |
commit | 5883e1926b80334cfdb7a3dd63d6391b1738c2a6 (patch) | |
tree | cc95f7746393c679dea82a94e055f3cb32410668 | |
parent | 733d88433c560af8f51f010fcaae9ce7a29b0325 (diff) |
fdo#43460 sw: use isEmpty()
Change-Id: Ia23f01ee28f1dfd8079abedda50bbef0a5a1beec
Reviewed-on: https://gerrit.libreoffice.org/4334
Reviewed-by: Noel Power <noel.power@suse.com>
Tested-by: Noel Power <noel.power@suse.com>
-rw-r--r-- | sw/source/core/crsr/crstrvl.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/html/css1atr.cxx | 12 | ||||
-rw-r--r-- | sw/source/filter/html/htmlatr.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/html/htmldraw.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/html/htmlfly.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/html/htmlforw.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/html/htmlnum.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/rtfattributeoutput.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/rtfsdrexport.cxx | 6 | ||||
-rw-r--r-- | sw/source/filter/xml/xmltexte.cxx | 6 |
10 files changed, 21 insertions, 21 deletions
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx index a206d0c0a485..0869c4614a3d 100644 --- a/sw/source/core/crsr/crstrvl.cxx +++ b/sw/source/core/crsr/crstrvl.cxx @@ -1793,7 +1793,7 @@ sal_Bool SwCrsrShell::SetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode ) comphelper::string::padToLength(sInsert, aFPos.nTabCnt, '\t'); if (aFPos.nSpaceCnt) comphelper::string::padToLength(sInsert, sInsert.getLength() + aFPos.nSpaceCnt, ' '); - if (sInsert.getLength()) + if (!sInsert.isEmpty()) GetDoc()->InsertString( *m_pCurCrsr, sInsert.makeStringAndClear()); } // no break - still need to set orientation diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx index 5a348e40d1d1..db343f0c26f3 100644 --- a/sw/source/filter/html/css1atr.cxx +++ b/sw/source/filter/html/css1atr.cxx @@ -281,7 +281,7 @@ void SwHTMLWriter::OutCSS1_Property( const sal_Char *pProp, sOut.append(OUStringToOString(*pSVal, eDestEnc)); } - if (sOut.getLength()) + if (!sOut.isEmpty()) Strm() << sOut.makeStringAndClear().getStr(); } @@ -524,7 +524,7 @@ void SwHTMLWriter::OutCSS1_SfxItemSet( const SfxItemSet& rItemSet, sOut.append(sCSS1_rule_end); break; } - if (sOut.getLength()) + if (!sOut.isEmpty()) Strm() << sOut.makeStringAndClear().getStr(); } } @@ -2503,26 +2503,26 @@ static Writer& OutCSS1_SvxTxtLn_SvxCrOut_SvxBlink( Writer& rWrt, if( pOStr ) { - if (sOut.getLength()) + if (!sOut.isEmpty()) sOut.append(' '); sOut.append(pOStr); } if( pCOStr ) { - if (sOut.getLength()) + if (!sOut.isEmpty()) sOut.append(' '); sOut.append(pCOStr); } if( pBStr ) { - if (sOut.getLength()) + if (!sOut.isEmpty()) sOut.append(' '); sOut.append(pBStr); } - if (sOut.getLength()) + if (!sOut.isEmpty()) rHTMLWrt.OutCSS1_PropertyAscii( sCSS1_P_text_decoration, sOut.makeStringAndClear() ); else if( bNone ) rHTMLWrt.OutCSS1_PropertyAscii( sCSS1_P_text_decoration, sCSS1_PV_none ); diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx index 34514eba3a91..2ce7beb49046 100644 --- a/sw/source/filter/html/htmlatr.cxx +++ b/sw/source/filter/html/htmlatr.cxx @@ -914,7 +914,7 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt, if( nDir != rHWrt.nDirection ) { - if( sOut.getLength() ) + if( !sOut.isEmpty() ) rWrt.Strm() << sOut.makeStringAndClear().getStr(); rHWrt.OutDirection( nDir ); } @@ -3022,7 +3022,7 @@ Writer& OutHTML_INetFmt( Writer& rWrt, const SwFmtINetFmt& rINetFmt, sal_Bool bO if( sRel.Len() ) sOut.append(OUStringToOString(sRel, RTL_TEXTENCODING_ASCII_US)); - if( sOut.getLength() ) + if( !sOut.isEmpty() ) rWrt.Strm() << sOut.makeStringAndClear().getStr(); if( bEvents ) diff --git a/sw/source/filter/html/htmldraw.cxx b/sw/source/filter/html/htmldraw.cxx index d098988d2ad8..7b950c5947d8 100644 --- a/sw/source/filter/html/htmldraw.cxx +++ b/sw/source/filter/html/htmldraw.cxx @@ -816,7 +816,7 @@ Writer& OutHTML_DrawFrmFmtAsMarquee( Writer& rWrt, HTMLOutFuncs::Out_Color( rWrt.Strm(), rFillColor, rHTMLWrt.eDestEnc ); } - if (sOut.getLength()) + if (!sOut.isEmpty()) rWrt.Strm() << sOut.makeStringAndClear().getStr(); // und nun noch ALIGN, HSPACE und VSPACE diff --git a/sw/source/filter/html/htmlfly.cxx b/sw/source/filter/html/htmlfly.cxx index b7fdd6f7d9e4..f17643b4e988 100644 --- a/sw/source/filter/html/htmlfly.cxx +++ b/sw/source/filter/html/htmlfly.cxx @@ -742,7 +742,7 @@ OString SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt, } } - if (sOut.getLength()) + if (!sOut.isEmpty()) Strm() << sOut.makeStringAndClear().getStr(); // Umlauf fuer absatzgeb. Grafiken als <BR CLEAR=...> in den String @@ -1039,7 +1039,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt, sOut.append('\"'); } - if (sOut.getLength()) + if (!sOut.isEmpty()) rWrt.Strm() << sOut.makeStringAndClear().getStr(); if( pMacItem ) diff --git a/sw/source/filter/html/htmlforw.cxx b/sw/source/filter/html/htmlforw.cxx index c9b1695ba089..79afa49ea834 100644 --- a/sw/source/filter/html/htmlforw.cxx +++ b/sw/source/filter/html/htmlforw.cxx @@ -1063,7 +1063,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, } } - if( sOut.getLength() ) + if( !sOut.isEmpty() ) rWrt.Strm() << sOut.makeStringAndClear().getStr(); OSL_ENSURE( !bInCntnr, "Container wird fuer Controls nicht unterstuertzt" ); diff --git a/sw/source/filter/html/htmlnum.cxx b/sw/source/filter/html/htmlnum.cxx index 3555f879ddc8..9d1620a7e3b3 100644 --- a/sw/source/filter/html/htmlnum.cxx +++ b/sw/source/filter/html/htmlnum.cxx @@ -873,7 +873,7 @@ Writer& OutHTML_NumBulListStart( SwHTMLWriter& rWrt, } } - if (sOut.getLength()) + if (!sOut.isEmpty()) rWrt.Strm() << sOut.makeStringAndClear().getStr(); if( rWrt.bCfgOutStyles ) diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index d726cb57f3ba..d93fdd22ea6d 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -977,7 +977,7 @@ void RtfAttributeOutput::EndTableRow( ) if ( m_nTableDepth > 1 ) { m_aAfterRuns.append("{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_NESTTABLEPROPRS); - if (m_aRowDefs.getLength() > 0) + if (!m_aRowDefs.isEmpty()) m_aAfterRuns.append(m_aRowDefs.makeStringAndClear()); else if (!m_aTables.empty()) { diff --git a/sw/source/filter/ww8/rtfsdrexport.cxx b/sw/source/filter/ww8/rtfsdrexport.cxx index 1b4cafd6b2fe..cb2f88540e8a 100644 --- a/sw/source/filter/ww8/rtfsdrexport.cxx +++ b/sw/source/filter/ww8/rtfsdrexport.cxx @@ -60,7 +60,7 @@ void RtfSdrExport::OpenContainer( sal_uInt16 nEscherContainer, int nRecInstance if ( nEscherContainer == ESCHER_SpContainer ) { m_nShapeType = ESCHER_ShpInst_Nil; - if ( m_pShapeStyle->getLength() ) + if ( !m_pShapeStyle->isEmpty() ) m_pShapeStyle->makeStringAndClear(); m_pShapeStyle->ensureCapacity( 200 ); m_aShapeProps.clear(); @@ -318,7 +318,7 @@ void RtfSdrExport::Commit( EscherPropertyContainer& rProps, const Rectangle& rRe } } - if (aVerticies.getLength() ) + if (!aVerticies.isEmpty() ) { // We know the number of vertices at the end only, so we have to prepend them here. OStringBuffer aBuf; @@ -326,7 +326,7 @@ void RtfSdrExport::Commit( EscherPropertyContainer& rProps, const Rectangle& rRe aBuf.append(aVerticies.makeStringAndClear()); m_aShapeProps.insert(std::pair<OString,OString>("pVerticies", aBuf.makeStringAndClear())); } - if ( aSegmentInfo.getLength() ) + if ( !aSegmentInfo.isEmpty() ) m_aShapeProps.insert(std::pair<OString,OString>("pSegmentInfo", aSegmentInfo.makeStringAndClear())); } else diff --git a/sw/source/filter/xml/xmltexte.cxx b/sw/source/filter/xml/xmltexte.cxx index fe7edfb84331..54217e8d2e4b 100644 --- a/sw/source/filter/xml/xmltexte.cxx +++ b/sw/source/filter/xml/xmltexte.cxx @@ -515,7 +515,7 @@ void SwXMLTextParagraphExport::_exportTextEmbedded( case '.': case '\'': case '\\': - if( !aBuffer.getLength() ) + if( aBuffer.isEmpty() ) { aBuffer.append( (sal_Unicode)'\'' ); aBuffer.append( sRange.copy( 0, i ) ); @@ -524,11 +524,11 @@ void SwXMLTextParagraphExport::_exportTextEmbedded( aBuffer.append( (sal_Unicode)'\\' ); // no break! default: - if( aBuffer.getLength() ) + if( !aBuffer.isEmpty() ) aBuffer.append( c ); } } - if( aBuffer.getLength() ) + if( !aBuffer.isEmpty() ) { aBuffer.append( (sal_Unicode)'\'' ); sRange = aBuffer.makeStringAndClear(); |