summaryrefslogtreecommitdiff
path: root/vcl/generic
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-01-01 19:58:59 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-01-02 16:14:36 +0000
commitfd1372ba8b1c3eb3c7fad6d9c623176c8071f31b (patch)
tree448f0d04f780007b3eeeb76b7c4c8c54cbfd6d9b /vcl/generic
parentc48b928acab9f226ad5ad816fe773c21051431e8 (diff)
boost::unordered_map->std::unordered_map
you can get debug stl this way Change-Id: Ia70a3e7c7c452390e8bee34975d296c9318e4a19
Diffstat (limited to 'vcl/generic')
-rw-r--r--vcl/generic/fontmanager/fontconfig.cxx10
-rw-r--r--vcl/generic/fontmanager/fontmanager.cxx66
-rw-r--r--vcl/generic/glyphs/gcach_ftyp.cxx2
-rw-r--r--vcl/generic/glyphs/gcach_ftyp.hxx6
-rw-r--r--vcl/generic/print/glyphset.hxx6
5 files changed, 45 insertions, 45 deletions
diff --git a/vcl/generic/fontmanager/fontconfig.cxx b/vcl/generic/fontmanager/fontconfig.cxx
index 128193c26889..839a722aeda3 100644
--- a/vcl/generic/fontmanager/fontconfig.cxx
+++ b/vcl/generic/fontmanager/fontconfig.cxx
@@ -85,8 +85,8 @@ public:
FcResult LocalizedElementFromPattern(FcPattern* pPattern, FcChar8 **family,
const char *elementtype, const char *elementlangtype);
//to-do, make private and add some cleanish accessor methods
- boost::unordered_map< OString, OString, OStringHash > m_aFontNameToLocalized;
- boost::unordered_map< OString, OString, OStringHash > m_aLocalizedToCanonical;
+ std::unordered_map< OString, OString, OStringHash > m_aFontNameToLocalized;
+ std::unordered_map< OString, OString, OStringHash > m_aLocalizedToCanonical;
private:
void cacheLocalizedFontNames(const FcChar8 *origfontname, const FcChar8 *bestfontname, const std::vector< lang_and_element > &lang_and_elements);
@@ -472,7 +472,7 @@ static void lcl_FcFontSetRemove(FcFontSet* pFSet, int i)
memmove(pFSet->fonts + i, pFSet->fonts + i + 1, nTail*sizeof(FcPattern*));
}
-void PrintFontManager::countFontconfigFonts( boost::unordered_map<OString, int, OStringHash>& o_rVisitedPaths )
+void PrintFontManager::countFontconfigFonts( std::unordered_map<OString, int, OStringHash>& o_rVisitedPaths )
{
#if OSL_DEBUG_LEVEL > 1
int nFonts = 0;
@@ -1052,7 +1052,7 @@ bool PrintFontManager::Substitute( FontSelectPattern &rPattern, OUString& rMissi
if( eFamilyRes == FcResultMatch )
{
OString sFamily((sal_Char*)family);
- boost::unordered_map< OString, OString, OStringHash >::const_iterator aI =
+ std::unordered_map< OString, OString, OStringHash >::const_iterator aI =
rWrapper.m_aFontNameToLocalized.find(sFamily);
if (aI != rWrapper.m_aFontNameToLocalized.end())
sFamily = aI->second;
@@ -1181,7 +1181,7 @@ ImplFontOptions* PrintFontManager::getFontOptions(
OString sFamily = OUStringToOString( rInfo.m_aFamilyName, RTL_TEXTENCODING_UTF8 );
- boost::unordered_map< OString, OString, OStringHash >::const_iterator aI = rWrapper.m_aLocalizedToCanonical.find(sFamily);
+ std::unordered_map< OString, OString, OStringHash >::const_iterator aI = rWrapper.m_aLocalizedToCanonical.find(sFamily);
if (aI != rWrapper.m_aLocalizedToCanonical.end())
sFamily = aI->second;
if( !sFamily.isEmpty() )
diff --git a/vcl/generic/fontmanager/fontmanager.cxx b/vcl/generic/fontmanager/fontmanager.cxx
index 94165b8f174e..142179fa1068 100644
--- a/vcl/generic/fontmanager/fontmanager.cxx
+++ b/vcl/generic/fontmanager/fontmanager.cxx
@@ -61,9 +61,9 @@
#include "sal/alloca.h"
-#include <set>
-#include <boost/unordered_set.hpp>
#include <algorithm>
+#include <set>
+#include <unordered_set>
#include "adobeenc.tab"
@@ -258,7 +258,7 @@ bool PrintFontManager::TrueTypeFontFile::queryMetricPage( int nPage, MultiAtomPr
*/
static bool familyNameOverride( const OUString& i_rPSname, OUString& o_rFamilyName )
{
- static boost::unordered_map< OUString, OUString, OUStringHash > aPSNameToFamily( 16 );
+ static std::unordered_map< OUString, OUString, OUStringHash > aPSNameToFamily( 16 );
if( aPSNameToFamily.empty() ) // initialization
{
aPSNameToFamily[ "Helvetica-Narrow" ] = "Helvetica Narrow";
@@ -266,7 +266,7 @@ static bool familyNameOverride( const OUString& i_rPSname, OUString& o_rFamilyNa
aPSNameToFamily[ "Helvetica-Narrow-BoldOblique" ] = "Helvetica Narrow";
aPSNameToFamily[ "Helvetica-Narrow-Oblique" ] = "Helvetica Narrow";
}
- boost::unordered_map<OUString,OUString,OUStringHash>::const_iterator it =
+ std::unordered_map<OUString,OUString,OUStringHash>::const_iterator it =
aPSNameToFamily.find( i_rPSname );
bool bReplaced = (it != aPSNameToFamily.end() );
if( bReplaced )
@@ -588,8 +588,8 @@ bool PrintFontManager::PrintFont::readAfmMetrics( MultiAtomProvider* pProvider,
}
else if( pChar->code != -1 )
{
- ::std::pair< ::boost::unordered_multimap< sal_uInt8, sal_Unicode >::const_iterator,
- ::boost::unordered_multimap< sal_uInt8, sal_Unicode >::const_iterator >
+ ::std::pair< std::unordered_multimap< sal_uInt8, sal_Unicode >::const_iterator,
+ std::unordered_multimap< sal_uInt8, sal_Unicode >::const_iterator >
aCodes = rManager.getUnicodeFromAdobeCode( pChar->code );
while( aCodes.first != aCodes.second )
{
@@ -648,12 +648,12 @@ PrintFontManager::PrintFontManager()
{
for( unsigned int i = 0; i < SAL_N_ELEMENTS( aAdobeCodes ); i++ )
{
- m_aUnicodeToAdobename.insert( ::boost::unordered_multimap< sal_Unicode, OString >::value_type( aAdobeCodes[i].aUnicode, aAdobeCodes[i].pAdobename ) );
- m_aAdobenameToUnicode.insert( ::boost::unordered_multimap< OString, sal_Unicode, OStringHash >::value_type( aAdobeCodes[i].pAdobename, aAdobeCodes[i].aUnicode ) );
+ m_aUnicodeToAdobename.insert( std::unordered_multimap< sal_Unicode, OString >::value_type( aAdobeCodes[i].aUnicode, aAdobeCodes[i].pAdobename ) );
+ m_aAdobenameToUnicode.insert( std::unordered_multimap< OString, sal_Unicode, OStringHash >::value_type( aAdobeCodes[i].pAdobename, aAdobeCodes[i].aUnicode ) );
if( aAdobeCodes[i].aAdobeStandardCode )
{
- m_aUnicodeToAdobecode.insert( ::boost::unordered_multimap< sal_Unicode, sal_uInt8 >::value_type( aAdobeCodes[i].aUnicode, aAdobeCodes[i].aAdobeStandardCode ) );
- m_aAdobecodeToUnicode.insert( ::boost::unordered_multimap< sal_uInt8, sal_Unicode >::value_type( aAdobeCodes[i].aAdobeStandardCode, aAdobeCodes[i].aUnicode ) );
+ m_aUnicodeToAdobecode.insert( std::unordered_multimap< sal_Unicode, sal_uInt8 >::value_type( aAdobeCodes[i].aUnicode, aAdobeCodes[i].aAdobeStandardCode ) );
+ m_aAdobecodeToUnicode.insert( std::unordered_multimap< sal_uInt8, sal_Unicode >::value_type( aAdobeCodes[i].aAdobeStandardCode, aAdobeCodes[i].aUnicode ) );
}
}
@@ -665,7 +665,7 @@ PrintFontManager::~PrintFontManager()
{
m_aFontInstallerTimer.Stop();
deinitFontconfig();
- for( ::boost::unordered_map< fontID, PrintFont* >::const_iterator it = m_aFonts.begin(); it != m_aFonts.end(); ++it )
+ for( std::unordered_map< fontID, PrintFont* >::const_iterator it = m_aFonts.begin(); it != m_aFonts.end(); ++it )
delete (*it).second;
delete m_pAtoms;
delete m_pFontCache;
@@ -673,14 +673,14 @@ PrintFontManager::~PrintFontManager()
OString PrintFontManager::getDirectory( int nAtom ) const
{
- ::boost::unordered_map< int, OString >::const_iterator it( m_aAtomToDir.find( nAtom ) );
+ std::unordered_map< int, OString >::const_iterator it( m_aAtomToDir.find( nAtom ) );
return it != m_aAtomToDir.end() ? it->second : OString();
}
int PrintFontManager::getDirectoryAtom( const OString& rDirectory, bool bCreate )
{
int nAtom = 0;
- ::boost::unordered_map< OString, int, OStringHash >::const_iterator it
+ std::unordered_map< OString, int, OStringHash >::const_iterator it
( m_aDirToAtom.find( rDirectory ) );
if( it != m_aDirToAtom.end() )
nAtom = it->second;
@@ -885,13 +885,13 @@ fontID PrintFontManager::findFontFileID( int nDirID, const OString& rFontFile, i
{
fontID nID = 0;
- ::boost::unordered_map< OString, ::std::set< fontID >, OStringHash >::const_iterator set_it = m_aFontFileToFontID.find( rFontFile );
+ std::unordered_map< OString, ::std::set< fontID >, OStringHash >::const_iterator set_it = m_aFontFileToFontID.find( rFontFile );
if( set_it == m_aFontFileToFontID.end() )
return nID;
for( ::std::set< fontID >::const_iterator font_it = set_it->second.begin(); font_it != set_it->second.end() && ! nID; ++font_it )
{
- ::boost::unordered_map< fontID, PrintFont* >::const_iterator it = m_aFonts.find( *font_it );
+ std::unordered_map< fontID, PrintFont* >::const_iterator it = m_aFonts.find( *font_it );
if( it == m_aFonts.end() )
continue;
switch( it->second->m_eType )
@@ -924,13 +924,13 @@ std::vector<fontID> PrintFontManager::findFontFileIDs( int nDirID, const OString
{
std::vector<fontID> aIds;
- ::boost::unordered_map< OString, ::std::set< fontID >, OStringHash >::const_iterator set_it = m_aFontFileToFontID.find( rFontFile );
+ std::unordered_map< OString, ::std::set< fontID >, OStringHash >::const_iterator set_it = m_aFontFileToFontID.find( rFontFile );
if( set_it == m_aFontFileToFontID.end() )
return aIds;
for( ::std::set< fontID >::const_iterator font_it = set_it->second.begin(); font_it != set_it->second.end(); ++font_it )
{
- ::boost::unordered_map< fontID, PrintFont* >::const_iterator it = m_aFonts.find( *font_it );
+ std::unordered_map< fontID, PrintFont* >::const_iterator it = m_aFonts.find( *font_it );
if( it == m_aFonts.end() )
continue;
switch( it->second->m_eType )
@@ -1358,7 +1358,7 @@ void PrintFontManager::initialize()
// gtk-fontconfig-timestamp changes to reflect new font installed and
// PrintFontManager::initialize called again
{
- for( ::boost::unordered_map< fontID, PrintFont* >::const_iterator it = m_aFonts.begin(); it != m_aFonts.end(); ++it )
+ for( std::unordered_map< fontID, PrintFont* >::const_iterator it = m_aFonts.begin(); it != m_aFonts.end(); ++it )
delete (*it).second;
m_nNextFontID = 1;
m_aFonts.clear();
@@ -1410,7 +1410,7 @@ void PrintFontManager::initialize()
}
// protect against duplicate paths
- boost::unordered_map< OString, int, OStringHash > visited_dirs;
+ std::unordered_map< OString, int, OStringHash > visited_dirs;
// Don't search directories that fontconfig already did
countFontconfigFonts( visited_dirs );
@@ -1463,10 +1463,10 @@ void PrintFontManager::initialize()
#endif
// part three - fill in family styles
- ::boost::unordered_map< fontID, PrintFont* >::iterator font_it;
+ std::unordered_map< fontID, PrintFont* >::iterator font_it;
for (font_it = m_aFonts.begin(); font_it != m_aFonts.end(); ++font_it)
{
- ::boost::unordered_map< int, FontFamily >::const_iterator it =
+ std::unordered_map< int, FontFamily >::const_iterator it =
m_aFamilyTypes.find( font_it->second->m_nFamilyName );
if (it != m_aFamilyTypes.end())
continue;
@@ -1495,7 +1495,7 @@ void PrintFontManager::initialize()
void PrintFontManager::getFontList( ::std::list< fontID >& rFontIDs )
{
rFontIDs.clear();
- boost::unordered_map< fontID, PrintFont* >::const_iterator it;
+ std::unordered_map< fontID, PrintFont* >::const_iterator it;
for( it = m_aFonts.begin(); it != m_aFonts.end(); ++it )
rFontIDs.push_back( it->first );
@@ -1503,7 +1503,7 @@ void PrintFontManager::getFontList( ::std::list< fontID >& rFontIDs )
void PrintFontManager::fillPrintFontInfo( PrintFont* pFont, FastPrintFontInfo& rInfo ) const
{
- ::boost::unordered_map< int, FontFamily >::const_iterator style_it =
+ std::unordered_map< int, FontFamily >::const_iterator style_it =
m_aFamilyTypes.find( pFont->m_nFamilyName );
rInfo.m_eType = pFont->m_eType;
rInfo.m_aFamilyName = m_pAtoms->getString( ATOM_FAMILYNAME, pFont->m_nFamilyName );
@@ -1693,7 +1693,7 @@ OString PrintFontManager::getFontFile( PrintFont* pFont ) const
if( pFont && pFont->m_eType == fonttype::Type1 )
{
Type1FontFile* pPSFont = static_cast< Type1FontFile* >(pFont);
- ::boost::unordered_map< int, OString >::const_iterator it = m_aAtomToDir.find( pPSFont->m_nDirectory );
+ std::unordered_map< int, OString >::const_iterator it = m_aAtomToDir.find( pPSFont->m_nDirectory );
aPath = it->second;
aPath += "/";
aPath += pPSFont->m_aFontFile;
@@ -1701,7 +1701,7 @@ OString PrintFontManager::getFontFile( PrintFont* pFont ) const
else if( pFont && pFont->m_eType == fonttype::TrueType )
{
TrueTypeFontFile* pTTFont = static_cast< TrueTypeFontFile* >(pFont);
- ::boost::unordered_map< int, OString >::const_iterator it = m_aAtomToDir.find( pTTFont->m_nDirectory );
+ std::unordered_map< int, OString >::const_iterator it = m_aAtomToDir.find( pTTFont->m_nDirectory );
aPath = it->second;
aPath += "/";
aPath += pTTFont->m_aFontFile;
@@ -1770,7 +1770,7 @@ void PrintFontManager::hasVerticalSubstitutions( fontID nFontID,
if( ! pFont->m_pMetrics ||
! ( pFont->m_pMetrics->m_aPages[ code >> 11 ] & ( 1 << ( ( code >> 8 ) & 7 ) ) ) )
pFont->queryMetricPage( code >> 8, m_pAtoms );
- ::boost::unordered_map< sal_Unicode, bool >::const_iterator it = pFont->m_pMetrics->m_bVerticalSubstitutions.find( code );
+ std::unordered_map< sal_Unicode, bool >::const_iterator it = pFont->m_pMetrics->m_bVerticalSubstitutions.find( code );
pHasSubst[i] = it != pFont->m_pMetrics->m_bVerticalSubstitutions.end();
}
}
@@ -1839,7 +1839,7 @@ bool PrintFontManager::getMetrics( fontID nFontID, const sal_Unicode* pString, i
{
int effectiveCode = pString[i];
effectiveCode |= bVertical ? 1 << 16 : 0;
- ::boost::unordered_map< int, CharacterMetric >::const_iterator it =
+ std::unordered_map< int, CharacterMetric >::const_iterator it =
pFont->m_pMetrics->m_aMetrics.find( effectiveCode );
// if no vertical metrics are available assume rotated horizontal metrics
if( bVertical && (it == pFont->m_pMetrics->m_aMetrics.end()) )
@@ -1886,7 +1886,7 @@ bool PrintFontManager::getMetrics( fontID nFontID, sal_Unicode minCharacter, sal
{
int effectiveCode = code;
effectiveCode |= bVertical ? 1 << 16 : 0;
- ::boost::unordered_map< int, CharacterMetric >::const_iterator it =
+ std::unordered_map< int, CharacterMetric >::const_iterator it =
pFont->m_pMetrics->m_aMetrics.find( effectiveCode );
// if no vertical metrics are available assume rotated horizontal metrics
if( bVertical && (it == pFont->m_pMetrics->m_aMetrics.end()) )
@@ -2124,7 +2124,7 @@ void PrintFontManager::getGlyphWidths( fontID nFont,
rUnicodeEnc.clear();
rWidths.clear();
rWidths.reserve( pFont->m_pMetrics->m_aMetrics.size() );
- for( boost::unordered_map< int, CharacterMetric >::const_iterator it =
+ for( std::unordered_map< int, CharacterMetric >::const_iterator it =
pFont->m_pMetrics->m_aMetrics.begin();
it != pFont->m_pMetrics->m_aMetrics.end(); ++it )
{
@@ -2155,8 +2155,8 @@ const std::map< sal_Unicode, sal_Int32 >* PrintFontManager::getEncodingMap( font
std::list< OString > PrintFontManager::getAdobeNameFromUnicode( sal_Unicode aChar ) const
{
- std::pair< boost::unordered_multimap< sal_Unicode, OString >::const_iterator,
- boost::unordered_multimap< sal_Unicode, OString >::const_iterator > range
+ std::pair< std::unordered_multimap< sal_Unicode, OString >::const_iterator,
+ std::unordered_multimap< sal_Unicode, OString >::const_iterator > range
= m_aUnicodeToAdobename.equal_range( aChar );
std::list< OString > aRet;
@@ -2175,8 +2175,8 @@ std::list< OString > PrintFontManager::getAdobeNameFromUnicode( sal_Unicode aCha
std::list< sal_Unicode > PrintFontManager::getUnicodeFromAdobeName( const OString& rName ) const
{
- std::pair< boost::unordered_multimap< OString, sal_Unicode, OStringHash >::const_iterator,
- boost::unordered_multimap< OString, sal_Unicode, OStringHash >::const_iterator > range
+ std::pair< std::unordered_multimap< OString, sal_Unicode, OStringHash >::const_iterator,
+ std::unordered_multimap< OString, sal_Unicode, OStringHash >::const_iterator > range
= m_aAdobenameToUnicode.equal_range( rName );
std::list< sal_Unicode > aRet;
diff --git a/vcl/generic/glyphs/gcach_ftyp.cxx b/vcl/generic/glyphs/gcach_ftyp.cxx
index 2db0f0d98d34..bdbc0b64146a 100644
--- a/vcl/generic/glyphs/gcach_ftyp.cxx
+++ b/vcl/generic/glyphs/gcach_ftyp.cxx
@@ -93,7 +93,7 @@ static FT_Library aLibFT = 0;
// enable linking with old FT versions
static int nFTVERSION = 0;
-typedef ::boost::unordered_map<const char*, boost::shared_ptr<FtFontFile>, rtl::CStringHash, rtl::CStringEqual> FontFileList;
+typedef std::unordered_map<const char*, boost::shared_ptr<FtFontFile>, rtl::CStringHash, rtl::CStringEqual> FontFileList;
namespace { struct vclFontFileList : public rtl::Static< FontFileList, vclFontFileList > {}; }
diff --git a/vcl/generic/glyphs/gcach_ftyp.hxx b/vcl/generic/glyphs/gcach_ftyp.hxx
index 21cd6538bcca..beee3328a867 100644
--- a/vcl/generic/glyphs/gcach_ftyp.hxx
+++ b/vcl/generic/glyphs/gcach_ftyp.hxx
@@ -102,8 +102,8 @@ private:
FontCharMapPtr mpFontCharMap;
// cache unicode->glyphid mapping because looking it up is expensive
- // TODO: change to boost::unordered_multimap when a use case requires a m:n mapping
- typedef ::boost::unordered_map<int,int> Int2IntMap;
+ // TODO: change to std::unordered_multimap when a use case requires a m:n mapping
+ typedef std::unordered_map<int,int> Int2IntMap;
mutable Int2IntMap* mpChar2Glyph;
mutable Int2IntMap* mpGlyph2Char;
void InitHashes() const;
@@ -143,7 +143,7 @@ public:
ServerFont* CreateFont( const FontSelectPattern& );
private:
- typedef ::boost::unordered_map<sal_IntPtr,FtFontInfo*> FontList;
+ typedef std::unordered_map<sal_IntPtr,FtFontInfo*> FontList;
FontList maFontList;
sal_IntPtr mnMaxFontId;
diff --git a/vcl/generic/print/glyphset.hxx b/vcl/generic/print/glyphset.hxx
index e6f8fa73c811..41cff1650311 100644
--- a/vcl/generic/print/glyphset.hxx
+++ b/vcl/generic/print/glyphset.hxx
@@ -27,7 +27,7 @@
#include "rtl/string.hxx"
#include <list>
-#include <boost/unordered_map.hpp>
+#include <unordered_map>
class Point;
@@ -47,9 +47,9 @@ private:
rtl_TextEncoding mnBaseEncoding;
bool mbUseFontEncoding;
- typedef boost::unordered_map< sal_Unicode, sal_uInt8 > char_map_t;
+ typedef std::unordered_map< sal_Unicode, sal_uInt8 > char_map_t;
typedef std::list< char_map_t > char_list_t;
- typedef boost::unordered_map< sal_GlyphId, sal_uInt8 > glyph_map_t;
+ typedef std::unordered_map< sal_GlyphId, sal_uInt8 > glyph_map_t;
typedef std::list< glyph_map_t > glyph_list_t;
char_list_t maCharList;