diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-08-31 08:02:03 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-08-31 08:02:03 +0200 |
commit | c71c419c63bb0a238cbc25a5ae8bcf71a4af31d1 (patch) | |
tree | 27578dde359c588faadc10c1b9ddd79eac024146 /sdext | |
parent | ec27e71ff0142341f346edfd91b21ad30ddfd8fd (diff) |
loplugin:stringconstant: OUStringBuffer: appendAscii -> append
Change-Id: I82330271362a428b2850d0f561770d35de1ee6b0
Diffstat (limited to 'sdext')
-rw-r--r-- | sdext/source/pdfimport/misc/pdfihelper.cxx | 6 | ||||
-rw-r--r-- | sdext/source/pdfimport/odf/odfemitter.cxx | 16 | ||||
-rw-r--r-- | sdext/source/pdfimport/tree/drawtreevisiting.cxx | 8 | ||||
-rw-r--r-- | sdext/source/pdfimport/tree/imagecontainer.cxx | 4 | ||||
-rw-r--r-- | sdext/source/pdfimport/tree/style.cxx | 2 | ||||
-rw-r--r-- | sdext/source/pdfimport/tree/writertreevisiting.cxx | 20 | ||||
-rw-r--r-- | sdext/source/pdfimport/wrapper/wrapper.cxx | 2 |
7 files changed, 29 insertions, 29 deletions
diff --git a/sdext/source/pdfimport/misc/pdfihelper.cxx b/sdext/source/pdfimport/misc/pdfihelper.cxx index 692ba8731b01..c1f7c41fa112 100644 --- a/sdext/source/pdfimport/misc/pdfihelper.cxx +++ b/sdext/source/pdfimport/misc/pdfihelper.cxx @@ -103,7 +103,7 @@ OUString pdfi::getPercentString(double value) { OUStringBuffer buf(32); buf.append(value); - buf.appendAscii("%"); + buf.append("%"); return buf.makeStringAndClear(); } @@ -111,7 +111,7 @@ OUString pdfi::unitMMString( double fMM ) { OUStringBuffer aBuf( 32 ); aBuf.append( rtl_math_round( fMM, 2, rtl_math_RoundingMode_Floor ) ); - aBuf.appendAscii( "mm" ); + aBuf.append( "mm" ); return aBuf.makeStringAndClear(); } @@ -120,7 +120,7 @@ OUString pdfi::convertPixelToUnitString( double fPix ) { OUStringBuffer aBuf( 32 ); aBuf.append( rtl_math_round( convPx2mm( fPix ), 2, rtl_math_RoundingMode_Floor ) ); - aBuf.appendAscii( "mm" ); + aBuf.append( "mm" ); return aBuf.makeStringAndClear(); } diff --git a/sdext/source/pdfimport/odf/odfemitter.cxx b/sdext/source/pdfimport/odf/odfemitter.cxx index f99a50fd9c80..4f90a8227b57 100644 --- a/sdext/source/pdfimport/odf/odfemitter.cxx +++ b/sdext/source/pdfimport/odf/odfemitter.cxx @@ -56,7 +56,7 @@ OdfEmitter::OdfEmitter( const uno::Reference<io::XOutputStream>& xOutput ) : m_aLineFeed[0] = '\n'; OUStringBuffer aElement; - aElement.appendAscii("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"); + aElement.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"); write(aElement.makeStringAndClear()); } @@ -65,9 +65,9 @@ void OdfEmitter::beginTag( const char* pTag, const PropertyMap& rProperties ) OSL_PRECOND(pTag,"Invalid tag string"); OUStringBuffer aElement; - aElement.appendAscii("<"); + aElement.append("<"); aElement.appendAscii(pTag); - aElement.appendAscii(" "); + aElement.append(" "); std::vector<OUString> aAttributes; PropertyMap::const_iterator aCurr(rProperties.begin()); @@ -76,9 +76,9 @@ void OdfEmitter::beginTag( const char* pTag, const PropertyMap& rProperties ) { OUStringBuffer aAttribute; aAttribute.append(aCurr->first); - aAttribute.appendAscii("=\""); + aAttribute.append("=\""); aAttribute.append(aCurr->second); - aAttribute.appendAscii("\" "); + aAttribute.append("\" "); aAttributes.push_back(aAttribute.makeStringAndClear()); ++aCurr; } @@ -93,7 +93,7 @@ void OdfEmitter::beginTag( const char* pTag, const PropertyMap& rProperties ) (&OUStringBuffer::append), boost::ref(aElement), _1 )); - aElement.appendAscii(">"); + aElement.append(">"); write(aElement.makeStringAndClear()); } @@ -113,9 +113,9 @@ void OdfEmitter::write( const OUString& rText ) void OdfEmitter::endTag( const char* pTag ) { OUStringBuffer aElement; - aElement.appendAscii("</"); + aElement.append("</"); aElement.appendAscii(pTag); - aElement.appendAscii(">"); + aElement.append(">"); write(aElement.makeStringAndClear()); } diff --git a/sdext/source/pdfimport/tree/drawtreevisiting.cxx b/sdext/source/pdfimport/tree/drawtreevisiting.cxx index eb9780d55b77..b2f8b16ea7ef 100644 --- a/sdext/source/pdfimport/tree/drawtreevisiting.cxx +++ b/sdext/source/pdfimport/tree/drawtreevisiting.cxx @@ -224,7 +224,7 @@ void DrawXmlEmitter::fillFrameProps( DrawElement& rElem, double scale = convPx2mm(100); mat.scale(scale, scale); - aBuf.appendAscii("matrix("); + aBuf.append("matrix("); aBuf.append(mat.get(0, 0)); aBuf.append(' '); aBuf.append(mat.get(1, 0)); @@ -236,7 +236,7 @@ void DrawXmlEmitter::fillFrameProps( DrawElement& rElem, aBuf.append(mat.get(0, 2)); aBuf.append(' '); aBuf.append(mat.get(1, 2)); - aBuf.appendAscii(")"); + aBuf.append(")"); rProps["draw:transform"] = aBuf.makeStringAndClear(); } @@ -324,7 +324,7 @@ void DrawXmlEmitter::visit( PolyPolyElement& elem, const std::list< Element* >:: // a PolyPolyElement was already applied (aside form translation) fillFrameProps( elem, aProps, m_rEmitContext, true ); OUStringBuffer aBuf( 64 ); - aBuf.appendAscii( "0 0 " ); + aBuf.append( "0 0 " ); aBuf.append( convPx2mmPrec2(elem.w)*100.0 ); aBuf.append( ' ' ); aBuf.append( convPx2mmPrec2(elem.h)*100.0 ); @@ -831,7 +831,7 @@ void SetFontsizeProperties(PropertyMap& props, double fontSize) { OUStringBuffer aBuf(32); aBuf.append(fontSize * 72 / PDFI_OUTDEV_RESOLUTION); - aBuf.appendAscii("pt"); + aBuf.append("pt"); OUString aFSize = aBuf.makeStringAndClear(); props["fo:font-size"] = aFSize; props["style:font-size-asian"] = aFSize; diff --git a/sdext/source/pdfimport/tree/imagecontainer.cxx b/sdext/source/pdfimport/tree/imagecontainer.cxx index 847d7e995edb..b8b9e1835a6f 100644 --- a/sdext/source/pdfimport/tree/imagecontainer.cxx +++ b/sdext/source/pdfimport/tree/imagecontainer.cxx @@ -62,7 +62,7 @@ OUString encodeBase64( const sal_Int8* i_pBuffer, const sal_uInt32 i_nBufferLeng (((sal_uInt8)i_pBuffer[i + 1]) << 8) + ((sal_uInt8)i_pBuffer[i + 2]); - aBuf.appendAscii("===="); + aBuf.append("===="); sal_uInt8 nIndex (static_cast<sal_uInt8>((nBinary & 0xFC0000) >> 18)); aBuf[nBufPos] = aBase64EncodeTable [nIndex]; @@ -78,7 +78,7 @@ OUString encodeBase64( const sal_Int8* i_pBuffer, const sal_uInt32 i_nBufferLeng } if( nRemain > 0 ) { - aBuf.appendAscii("===="); + aBuf.append("===="); sal_Int32 nBinary( 0 ); const sal_Int32 nStart(i_nBufferLength-nRemain); switch(nRemain) diff --git a/sdext/source/pdfimport/tree/style.cxx b/sdext/source/pdfimport/tree/style.cxx index fe0e31a05927..0eba65d46d91 100644 --- a/sdext/source/pdfimport/tree/style.cxx +++ b/sdext/source/pdfimport/tree/style.cxx @@ -173,7 +173,7 @@ OUString StyleContainer::getStyleName( sal_Int32 nStyle ) const } else { - aRet.appendAscii( "invalid style id " ); + aRet.append( "invalid style id " ); aRet.append( nStyle ); } diff --git a/sdext/source/pdfimport/tree/writertreevisiting.cxx b/sdext/source/pdfimport/tree/writertreevisiting.cxx index 09ac95135f7b..4091bf254e9b 100644 --- a/sdext/source/pdfimport/tree/writertreevisiting.cxx +++ b/sdext/source/pdfimport/tree/writertreevisiting.cxx @@ -166,28 +166,28 @@ void WriterXmlEmitter::fillFrameProps( DrawElement& rElem, // build transformation string if( fShearX != 0.0 ) { - aBuf.appendAscii( "skewX( " ); + aBuf.append( "skewX( " ); aBuf.append( fShearX ); - aBuf.appendAscii( " )" ); + aBuf.append( " )" ); } if( fRotate != 0.0 ) { if( !aBuf.isEmpty() ) aBuf.append( ' ' ); - aBuf.appendAscii( "rotate( " ); + aBuf.append( "rotate( " ); aBuf.append( -fRotate ); - aBuf.appendAscii( " )" ); + aBuf.append( " )" ); } if( ! rElem.isCharacter ) { if( !aBuf.isEmpty() ) aBuf.append( ' ' ); - aBuf.appendAscii( "translate( " ); + aBuf.append( "translate( " ); aBuf.append( convertPixelToUnitString( rel_x ) ); aBuf.append( ' ' ); aBuf.append( convertPixelToUnitString( rel_y ) ); - aBuf.appendAscii( " )" ); + aBuf.append( " )" ); } rProps[ "draw:transform" ] = aBuf.makeStringAndClear(); @@ -273,7 +273,7 @@ void WriterXmlEmitter::visit( PolyPolyElement& elem, const std::list< Element* > PropertyMap aProps; fillFrameProps( elem, aProps, m_rEmitContext ); OUStringBuffer aBuf( 64 ); - aBuf.appendAscii( "0 0 " ); + aBuf.append( "0 0 " ); aBuf.append( convPx2mmPrec2(elem.w)*100.0 ); aBuf.append( ' ' ); aBuf.append( convPx2mmPrec2(elem.h)*100.0 ); @@ -937,7 +937,7 @@ void WriterXmlFinalizer::visit( TextElement& elem, const std::list< Element* >:: // size OUStringBuffer aBuf( 32 ); aBuf.append( rFont.size*72/PDFI_OUTDEV_RESOLUTION ); - aBuf.appendAscii( "pt" ); + aBuf.append( "pt" ); OUString aFSize = aBuf.makeStringAndClear(); aFontProps[ "fo:font-size" ] = aFSize; aFontProps[ "style:font-size-asian" ] = aFSize; @@ -989,7 +989,7 @@ void WriterXmlFinalizer::visit( ParagraphElement& elem, const std::list< Element // indent OUStringBuffer aBuf( 32 ); aBuf.append( convPx2mm( elem.x - p_x ) ); - aBuf.appendAscii( "mm" ); + aBuf.append( "mm" ); aParaProps[ "fo:margin-left" ] = aBuf.makeStringAndClear(); } @@ -1005,7 +1005,7 @@ void WriterXmlFinalizer::visit( ParagraphElement& elem, const std::list< Element { OUStringBuffer aBuf( 32 ); aBuf.append( convPx2mm( pNextPara->y - (elem.y+elem.h) ) ); - aBuf.appendAscii( "mm" ); + aBuf.append( "mm" ); aParaProps[ "fo:margin-bottom" ] = aBuf.makeStringAndClear(); } } diff --git a/sdext/source/pdfimport/wrapper/wrapper.cxx b/sdext/source/pdfimport/wrapper/wrapper.cxx index 197b39f2ac26..93eb2daa5510 100644 --- a/sdext/source/pdfimport/wrapper/wrapper.cxx +++ b/sdext/source/pdfimport/wrapper/wrapper.cxx @@ -959,7 +959,7 @@ static bool checkEncryption( const OUString& i_rPa if( bAuthenticated ) { OUStringBuffer aBuf( 128 ); - aBuf.appendAscii( "_OOO_pdfi_Credentials_" ); + aBuf.append( "_OOO_pdfi_Credentials_" ); aBuf.append( pPDFFile->getDecryptionKey() ); io_rPwd = aBuf.makeStringAndClear(); } |