From 51daa4de4fbb86903aeb9cdfefbb089e8d00c001 Mon Sep 17 00:00:00 2001 From: Jelle van der Waa Date: Sat, 22 Jun 2013 12:52:31 +0200 Subject: fdo#43460 sd,rsc,ucb,sdext: use isEmpty() Change-Id: I7a7a77c26b74078f7fc160fbaa1c8d4e912b844e Reviewed-on: https://gerrit.libreoffice.org/4442 Reviewed-by: Michael Stahl Tested-by: Michael Stahl --- sdext/source/pdfimport/tree/drawtreevisiting.cxx | 6 +++--- sdext/source/pdfimport/tree/writertreevisiting.cxx | 10 +++++----- sdext/source/pdfimport/wrapper/wrapper.cxx | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) (limited to 'sdext') diff --git a/sdext/source/pdfimport/tree/drawtreevisiting.cxx b/sdext/source/pdfimport/tree/drawtreevisiting.cxx index 514401586fb2..e4f1d6631ffe 100644 --- a/sdext/source/pdfimport/tree/drawtreevisiting.cxx +++ b/sdext/source/pdfimport/tree/drawtreevisiting.cxx @@ -91,7 +91,7 @@ void DrawXmlEmitter::visit( HyperlinkElement& elem, const std::list< Element* >: void DrawXmlEmitter::visit( TextElement& elem, const std::list< Element* >::const_iterator& ) { - if( ! elem.Text.getLength() ) + if( elem.Text.isEmpty() ) return; OUString strSpace(32); @@ -229,14 +229,14 @@ void DrawXmlEmitter::fillFrameProps( DrawElement& rElem, } if( fRotate != 0.0 ) { - if( aBuf.getLength() > 0 ) + if( !aBuf.isEmpty() ) aBuf.append( sal_Unicode(' ') ); aBuf.appendAscii( "rotate( " ); aBuf.append( -fRotate ); aBuf.appendAscii( " )" ); } - if( aBuf.getLength() > 0 ) + if( !aBuf.isEmpty() ) aBuf.append( sal_Unicode(' ') ); aBuf.appendAscii( "translate( " ); aBuf.append( convertPixelToUnitString( rel_x ) ); diff --git a/sdext/source/pdfimport/tree/writertreevisiting.cxx b/sdext/source/pdfimport/tree/writertreevisiting.cxx index dcb863e0358a..b36a39bf0242 100644 --- a/sdext/source/pdfimport/tree/writertreevisiting.cxx +++ b/sdext/source/pdfimport/tree/writertreevisiting.cxx @@ -58,7 +58,7 @@ void WriterXmlEmitter::visit( HyperlinkElement& elem, const std::list< Element* void WriterXmlEmitter::visit( TextElement& elem, const std::list< Element* >::const_iterator& ) { - if( ! elem.Text.getLength() ) + if( elem.Text.isEmpty() ) return; PropertyMap aProps; @@ -169,7 +169,7 @@ void WriterXmlEmitter::fillFrameProps( DrawElement& rElem, } if( fRotate != 0.0 ) { - if( aBuf.getLength() > 0 ) + if( !aBuf.isEmpty() ) aBuf.append( sal_Unicode(' ') ); aBuf.appendAscii( "rotate( " ); aBuf.append( -fRotate ); @@ -178,7 +178,7 @@ void WriterXmlEmitter::fillFrameProps( DrawElement& rElem, } if( ! rElem.isCharacter ) { - if( aBuf.getLength() > 0 ) + if( !aBuf.isEmpty() ) aBuf.append( sal_Unicode(' ') ); aBuf.appendAscii( "translate( " ); aBuf.append( convertPixelToUnitString( rel_x ) ); @@ -750,9 +750,9 @@ void WriterXmlOptimizer::optimizeTextElements(Element& rParent) if( !bRotatedFrame && ! rCurGC.isRotatedOrSkewed() && ! rNextGC.isRotatedOrSkewed() - && pNext->Text.getLength() > 0 + && ! pNext->Text.isEmpty() && pNext->Text[0] != sal_Unicode(' ') - && pCur->Text.getLength() > 0 + && ! pCur->Text.isEmpty() && pCur->Text[pCur->Text.getLength() - 1] != sal_Unicode(' ') ) { diff --git a/sdext/source/pdfimport/wrapper/wrapper.cxx b/sdext/source/pdfimport/wrapper/wrapper.cxx index d091d6b58f31..2adae2043bad 100644 --- a/sdext/source/pdfimport/wrapper/wrapper.cxx +++ b/sdext/source/pdfimport/wrapper/wrapper.cxx @@ -1122,7 +1122,7 @@ bool xpdf_ImportFromFile( const OUString& rURL, // embedded fonts and bitmaps Parser aParser(rSink,pErr,xContext); OStringBuffer line; - while( osl_File_E_None == readLine(pOut, line) && line.getLength() ) + while( osl_File_E_None == readLine(pOut, line) && !line.isEmpty() ) aParser.parseLine(line.makeStringAndClear()); } } -- cgit