diff options
author | Noel Grandin <noel@peralex.com> | 2016-09-01 10:23:26 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-09-01 11:05:21 +0200 |
commit | 1f7f8ab442917acad935cea1d30c2d3acf506320 (patch) | |
tree | 8795e7b2f6563aae9e8053d963482170148960ec /vcl | |
parent | f1ea2177ce53ac873f3306d3ade7d23371df8cbf (diff) |
std::list<sal_Int32> to vector
Change-Id: I991fba4593665035df26a0e13f0219029f2eb917
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/unx/printergfx.hxx | 3 | ||||
-rw-r--r-- | vcl/unx/generic/print/text_gfx.cxx | 14 |
2 files changed, 8 insertions, 9 deletions
diff --git a/vcl/inc/unx/printergfx.hxx b/vcl/inc/unx/printergfx.hxx index efa6b61b1800..c254ef6ace16 100644 --- a/vcl/inc/unx/printergfx.hxx +++ b/vcl/inc/unx/printergfx.hxx @@ -27,6 +27,7 @@ #include "vclpluginapi.h" #include <list> +#include <vector> namespace psp { @@ -181,7 +182,7 @@ private: glyph in one of the subfonts, the mapping from unicode to the glyph has to be remembered */ - std::list< sal_Int32 > maPS1Font; + std::vector< sal_Int32 > maPS1Font; std::list< GlyphSet > maPS3Font; sal_Int32 mnFontID; diff --git a/vcl/unx/generic/print/text_gfx.cxx b/vcl/unx/generic/print/text_gfx.cxx index c21cb75acf9e..723fd46e2fa7 100644 --- a/vcl/unx/generic/print/text_gfx.cxx +++ b/vcl/unx/generic/print/text_gfx.cxx @@ -85,13 +85,12 @@ static int getVerticalDeltaAngle( sal_Unicode nChar ) void PrinterGfx::PSUploadPS1Font (sal_Int32 nFontID) { - std::list< sal_Int32 >::iterator aFont; // already in the document header ? - for (aFont = maPS1Font.begin(); aFont != maPS1Font.end(); ++aFont ) - if( nFontID == *aFont ) + for ( int i : maPS1Font ) + if( nFontID == i ) return; - // no occurrenc yet, mark for download + // no occurrence yet, mark for download // add the fontid to the list maPS1Font.push_back (nFontID); } @@ -664,18 +663,17 @@ void PrinterGfx::writeResources( osl::File* pFile, std::list< OString >& rSuppliedFonts ) { // write all type 1 fonts - std::list< sal_Int32 >::iterator aFont; // already in the document header ? - for (aFont = maPS1Font.begin(); aFont != maPS1Font.end(); ++aFont) + for (int aFont : maPS1Font) { - const OString& rSysPath (mrFontMgr.getFontFileSysPath(*aFont) ); + const OString& rSysPath (mrFontMgr.getFontFileSysPath(aFont) ); OUString aUNCPath; osl::File::getFileURLFromSystemPath (OStringToOUString (rSysPath, osl_getThreadTextEncoding()), aUNCPath); osl::File aFontFile (aUNCPath); // provide the pfb or pfa font as a (pfa-)font resource OString aPostScriptName = - OUStringToOString ( mrFontMgr.getPSName(*aFont), + OUStringToOString ( mrFontMgr.getPSName(aFont), RTL_TEXTENCODING_ASCII_US ); WritePS (pFile, "%%BeginResource: font "); |