summaryrefslogtreecommitdiff
path: root/vcl/unx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/unx')
-rw-r--r--vcl/unx/generic/fontmanager/helper.cxx7
-rw-r--r--vcl/unx/generic/print/glyphset.cxx6
-rw-r--r--vcl/unx/generic/print/printerjob.cxx38
-rw-r--r--vcl/unx/generic/printer/jobdata.cxx55
-rw-r--r--vcl/unx/generic/printer/ppdparser.cxx18
-rw-r--r--vcl/unx/gtk3/gtkinst.cxx6
6 files changed, 50 insertions, 80 deletions
diff --git a/vcl/unx/generic/fontmanager/helper.cxx b/vcl/unx/generic/fontmanager/helper.cxx
index 6cea0998e771..0abbb812a610 100644
--- a/vcl/unx/generic/fontmanager/helper.cxx
+++ b/vcl/unx/generic/fontmanager/helper.cxx
@@ -207,13 +207,12 @@ OUString const & psp::getFontPath()
{
if( !aInstallationRootPath.isEmpty() )
{
- aPathBuffer.append( aInstallationRootPath );
- aPathBuffer.append( "/" LIBO_SHARE_FOLDER "/fonts/truetype;");
+ aPathBuffer.append( aInstallationRootPath
+ + "/" LIBO_SHARE_FOLDER "/fonts/truetype;");
}
if( !aUserPath.isEmpty() )
{
- aPathBuffer.append( aUserPath );
- aPathBuffer.append( "/user/fonts" );
+ aPathBuffer.append( aUserPath + "/user/fonts" );
}
}
diff --git a/vcl/unx/generic/print/glyphset.cxx b/vcl/unx/generic/print/glyphset.cxx
index e9355fce3d7c..283558ad7075 100644
--- a/vcl/unx/generic/print/glyphset.cxx
+++ b/vcl/unx/generic/print/glyphset.cxx
@@ -132,9 +132,9 @@ OString
GlyphSet::GetGlyphSetName (sal_Int32 nGlyphSetID)
{
OStringBuffer aSetName( maBaseName.getLength() + 32 );
- aSetName.append( maBaseName );
- aSetName.append( "FID" );
- aSetName.append( mnFontID );
+ aSetName.append( maBaseName
+ + "FID" +
+ OString::number( mnFontID ) );
aSetName.append( mbVertical ? "VGSet" : "HGSet" );
aSetName.append( nGlyphSetID );
return aSetName.makeStringAndClear();
diff --git a/vcl/unx/generic/print/printerjob.cxx b/vcl/unx/generic/print/printerjob.cxx
index 2355f34da4b5..5bfe6b735561 100644
--- a/vcl/unx/generic/print/printerjob.cxx
+++ b/vcl/unx/generic/print/printerjob.cxx
@@ -394,18 +394,18 @@ PrinterJob::EndJob()
// write document trailer according to Document Structuring Conventions (DSC)
OStringBuffer aTrailer(512);
- aTrailer.append( "%%Trailer\n" );
- aTrailer.append( "%%BoundingBox: 0 0 " );
- aTrailer.append( static_cast<sal_Int32>(mnMaxWidthPt) );
- aTrailer.append( " " );
- aTrailer.append( static_cast<sal_Int32>(mnMaxHeightPt) );
+ aTrailer.append( "%%Trailer\n"
+ "%%BoundingBox: 0 0 "
+ + OString::number( static_cast<sal_Int32>(mnMaxWidthPt) )
+ + " "
+ + OString::number( static_cast<sal_Int32>(mnMaxHeightPt) ) );
if( mnLandscapes > mnPortraits )
aTrailer.append("\n%%Orientation: Landscape");
else
aTrailer.append("\n%%Orientation: Portrait");
- aTrailer.append( "\n%%Pages: " );
- aTrailer.append( static_cast<sal_Int32>(maPageVector.size()) );
- aTrailer.append( "\n%%EOF\n" );
+ aTrailer.append( "\n%%Pages: "
+ + OString::number( static_cast<sal_Int32>(maPageVector.size()) )
+ + "\n%%EOF\n" );
WritePS (mpJobTrailer.get(), aTrailer.getStr());
/*
@@ -654,15 +654,15 @@ static bool writeFeature( osl::File* pFile, const PPDKey* pKey, const PPDValue*
aFeature.append( "%%IncludeFeature:" );
else
aFeature.append( "%%BeginFeature:" );
- aFeature.append( " *" );
- aFeature.append( OUStringToOString( pKey->getKey(), RTL_TEXTENCODING_ASCII_US ) );
- aFeature.append( ' ' );
- aFeature.append( OUStringToOString( pValue->m_aOption, RTL_TEXTENCODING_ASCII_US ) );
+ aFeature.append( " *"
+ + OUStringToOString( pKey->getKey(), RTL_TEXTENCODING_ASCII_US )
+ + " "
+ + OUStringToOString( pValue->m_aOption, RTL_TEXTENCODING_ASCII_US ) );
if( !bUseIncluseFeature )
{
- aFeature.append( '\n' );
- aFeature.append( OUStringToOString( pValue->m_aValue, RTL_TEXTENCODING_ASCII_US ) );
- aFeature.append( "\n%%EndFeature" );
+ aFeature.append( "\n"
+ + OUStringToOString( pValue->m_aValue, RTL_TEXTENCODING_ASCII_US )
+ + "\n%%EndFeature" );
}
aFeature.append( "\n} stopped cleartomark\n" );
sal_uInt64 nWritten = 0;
@@ -931,16 +931,12 @@ bool PrinterJob::writeSetup( osl::File* pFile, const JobData& rJob )
{
std::vector< OString >::const_iterator it = aFonts.begin();
OStringBuffer aLine( 256 );
- aLine.append( "%%DocumentSuppliedResources: font " );
- aLine.append( *it );
- aLine.append( "\n" );
+ aLine.append( "%%DocumentSuppliedResources: font " + (*it) + "\n" );
WritePS ( pFile, aLine.getStr() );
while( (++it) != aFonts.end() )
{
aLine.setLength(0);
- aLine.append( "%%+ font " );
- aLine.append( *it );
- aLine.append( "\n" );
+ aLine.append( "%%+ font " + (*it) + "\n" );
WritePS ( pFile, aLine.getStr() );
}
}
diff --git a/vcl/unx/generic/printer/jobdata.cxx b/vcl/unx/generic/printer/jobdata.cxx
index 9707a81096ed..4a4eec609a1d 100644
--- a/vcl/unx/generic/printer/jobdata.cxx
+++ b/vcl/unx/generic/printer/jobdata.cxx
@@ -124,10 +124,8 @@ bool JobData::getStreamBuffer( void*& pData, sal_uInt32& bytes )
// write header job data
aStream.WriteLine("JobData 1");
- OStringBuffer aLine;
-
- aLine.append("printer=");
- aLine.append(OUStringToOString(m_aPrinterName, RTL_TEXTENCODING_UTF8));
+ OStringBuffer aLine("printer="
+ + OUStringToOString(m_aPrinterName, RTL_TEXTENCODING_UTF8));
aStream.WriteLine(aLine);
aLine.setLength(0);
@@ -139,49 +137,30 @@ bool JobData::getStreamBuffer( void*& pData, sal_uInt32& bytes )
aStream.WriteLine(aLine);
aLine.setLength(0);
- aLine.append("copies=");
- aLine.append(static_cast<sal_Int32>(m_nCopies));
- aStream.WriteLine(aLine);
- aLine.setLength(0);
+ aStream.WriteLine(Concat2View("copies=" + OString::number(static_cast<sal_Int32>(m_nCopies))));
if (m_nPDFDevice > 0)
{
- aLine.append("collate=");
- aLine.append(OString::boolean(m_bCollate));
- aStream.WriteLine(aLine);
- aLine.setLength(0);
+ aStream.WriteLine(Concat2View("collate=" + OString::boolean(m_bCollate)));
}
- aLine.append("marginadjustment=");
- aLine.append(static_cast<sal_Int32>(m_nLeftMarginAdjust));
- aLine.append(',');
- aLine.append(static_cast<sal_Int32>(m_nRightMarginAdjust));
- aLine.append(',');
- aLine.append(static_cast<sal_Int32>(m_nTopMarginAdjust));
- aLine.append(',');
- aLine.append(static_cast<sal_Int32>(m_nBottomMarginAdjust));
- aStream.WriteLine(aLine);
- aLine.setLength(0);
+ aStream.WriteLine(Concat2View(
+ "marginadjustment="
+ + OString::number(static_cast<sal_Int32>(m_nLeftMarginAdjust))
+ + ","
+ + OString::number(static_cast<sal_Int32>(m_nRightMarginAdjust))
+ + ",'"
+ + OString::number(static_cast<sal_Int32>(m_nTopMarginAdjust))
+ + ","
+ + OString::number(static_cast<sal_Int32>(m_nBottomMarginAdjust))));
- aLine.append("colordepth=");
- aLine.append(static_cast<sal_Int32>(m_nColorDepth));
- aStream.WriteLine(aLine);
- aLine.setLength(0);
+ aStream.WriteLine(Concat2View("colordepth=" + OString::number(static_cast<sal_Int32>(m_nColorDepth))));
- aLine.append("pslevel=");
- aLine.append(static_cast<sal_Int32>(m_nPSLevel));
- aStream.WriteLine(aLine);
- aLine.setLength(0);
+ aStream.WriteLine(Concat2View("pslevel=" + OString::number(static_cast<sal_Int32>(m_nPSLevel))));
- aLine.append("pdfdevice=");
- aLine.append(static_cast<sal_Int32>(m_nPDFDevice));
- aStream.WriteLine(aLine);
- aLine.setLength(0);
+ aStream.WriteLine(Concat2View("pdfdevice=" + OString::number(static_cast<sal_Int32>(m_nPDFDevice))));
- aLine.append("colordevice=");
- aLine.append(static_cast<sal_Int32>(m_nColorDevice));
- aStream.WriteLine(aLine);
- aLine.setLength(0);
+ aStream.WriteLine(Concat2View("colordevice=" + OString::number(static_cast<sal_Int32>(m_nColorDevice))));
// now append the PPDContext stream buffer
aStream.WriteLine( "PPDContextData" );
diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx
index 42a2a2a50cd8..6563b55b56e0 100644
--- a/vcl/unx/generic/printer/ppdparser.cxx
+++ b/vcl/unx/generic/printer/ppdparser.cxx
@@ -178,13 +178,11 @@ namespace psp
aKey.append( i_rKey );
if( !i_rOption.empty() || !i_rValue.empty() )
{
- aKey.append( ':' );
- aKey.append( i_rOption );
+ aKey.append( OUString::Concat(":") + i_rOption );
}
if( !i_rValue.empty() )
{
- aKey.append( ':' );
- aKey.append( i_rValue );
+ aKey.append( OUString::Concat(":") + i_rValue );
}
if( !aKey.isEmpty() && !i_rTranslation.isEmpty() )
{
@@ -209,8 +207,7 @@ namespace psp
aKey.append( i_rKey );
if( !i_rOption.empty() )
{
- aKey.append( ':' );
- aKey.append( i_rOption );
+ aKey.append( OUString::Concat(":") + i_rOption );
}
if( !aKey.isEmpty() )
{
@@ -637,9 +634,9 @@ PPDParser::PPDParser(OUString aFile, const std::vector<PPDKey*>& keys)
OUString::number(PWG_TO_POINTS(pPWGMedia -> length));
if ( pImageableAreaValue )
pImageableAreaValue->m_aValue = aBuf.makeStringAndClear();
- aBuf.append( PWG_TO_POINTS(pPWGMedia -> width) );
- aBuf.append( " " );
- aBuf.append( PWG_TO_POINTS(pPWGMedia -> length) );
+ aBuf.append( OUString::number(PWG_TO_POINTS(pPWGMedia -> width))
+ + " "
+ + OUString::number(PWG_TO_POINTS(pPWGMedia -> length) ));
if ( pPaperDimensionValue )
pPaperDimensionValue->m_aValue = aBuf.makeStringAndClear();
if (aValueName.equals(pKey -> getDefaultValue() -> m_aOption)) {
@@ -1113,8 +1110,7 @@ void PPDParser::parse( ::std::vector< OString >& rLines )
while (line != rLines.end() && oddDoubleQuoteCount(aBuffer))
{
// copy the newlines also
- aBuffer.append('\n');
- aBuffer.append(*line);
+ aBuffer.append("\n" + *line);
++line;
}
aLine = aBuffer.makeStringAndClear();
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 575abd64d82e..c6b08487756c 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -9573,9 +9573,9 @@ IMPL_LINK_NOARG(GtkInstanceNotebook, SizeAllocateHdl, void*, void)
OUString vcl_font_to_css(const vcl::Font& rFont)
{
- OUStringBuffer sCSS;
- sCSS.append("font-family: \"" + rFont.GetFamilyName() + "\"; ");
- sCSS.append("font-size: " + OUString::number(rFont.GetFontSize().Height()) + "pt; ");
+ OUStringBuffer sCSS(
+ "font-family: \"" + rFont.GetFamilyName() + "\"; "
+ "font-size: " + OUString::number(rFont.GetFontSize().Height()) + "pt; ");
switch (rFont.GetItalic())
{
case ITALIC_NONE: