Kaydet (Commit) c71c419c authored tarafından Stephan Bergmann's avatar Stephan Bergmann

loplugin:stringconstant: OUStringBuffer: appendAscii -> append

Change-Id: I82330271362a428b2850d0f561770d35de1ee6b0
üst ec27e71f
......@@ -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();
}
......
......@@ -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());
}
......
......@@ -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;
......
......@@ -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)
......
......@@ -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 );
}
......
......@@ -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();
}
}
......
......@@ -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();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment