From 0be5d2b2f6366b295a47a3b9d4e87091b6fd446b Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sat, 3 Jan 2015 21:24:08 +0000 Subject: boost::unordered_map->std::unordered_map Change-Id: I82f668ef72e916d2ff11df5cda2a02653999f66f --- sdext/inc/pch/precompiled_PresentationMinimizer.hxx | 2 +- sdext/source/minimizer/pppoptimizertoken.cxx | 4 ++-- sdext/source/pdfimport/filterdet.cxx | 4 ++-- sdext/source/pdfimport/inc/pdfihelper.hxx | 4 ++-- sdext/source/pdfimport/inc/pdfparse.hxx | 4 ++-- sdext/source/pdfimport/pdfparse/pdfentries.cxx | 8 ++++---- sdext/source/pdfimport/sax/saxattrlist.cxx | 6 +++--- sdext/source/pdfimport/sax/saxattrlist.hxx | 6 +++--- sdext/source/pdfimport/test/pdfunzip.cxx | 4 ++-- sdext/source/pdfimport/test/tests.cxx | 6 +++--- sdext/source/pdfimport/tree/pdfiprocessor.hxx | 10 +++++----- sdext/source/pdfimport/tree/style.cxx | 14 +++++++------- sdext/source/pdfimport/tree/style.hxx | 14 +++++++------- sdext/source/pdfimport/wrapper/wrapper.cxx | 4 ++-- sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx | 2 +- sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx | 4 ++-- 16 files changed, 48 insertions(+), 48 deletions(-) (limited to 'sdext') diff --git a/sdext/inc/pch/precompiled_PresentationMinimizer.hxx b/sdext/inc/pch/precompiled_PresentationMinimizer.hxx index bfdc4f98e497..0a38add1b8a3 100644 --- a/sdext/inc/pch/precompiled_PresentationMinimizer.hxx +++ b/sdext/inc/pch/precompiled_PresentationMinimizer.hxx @@ -17,7 +17,6 @@ #include "com/sun/star/util/URL.hpp" #include "com/sun/star/util/URLTransformer.hpp" #include "com/sun/star/util/XURLTransformer.hpp" -#include #include #include #include @@ -107,6 +106,7 @@ #include #include #include +#include #include /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/minimizer/pppoptimizertoken.cxx b/sdext/source/minimizer/pppoptimizertoken.cxx index 874206cffe51..ecce84831151 100644 --- a/sdext/source/minimizer/pppoptimizertoken.cxx +++ b/sdext/source/minimizer/pppoptimizertoken.cxx @@ -21,10 +21,10 @@ #include "pppoptimizertoken.hxx" #include #include -#include #include +#include -typedef boost::unordered_map< const char*, PPPOptimizerTokenEnum, rtl::CStringHash, rtl::CStringEqual> TypeNameHashMap; +typedef std::unordered_map< const char*, PPPOptimizerTokenEnum, rtl::CStringHash, rtl::CStringEqual> TypeNameHashMap; static TypeNameHashMap* pHashMap = NULL; static ::osl::Mutex& getHashMapMutex() { diff --git a/sdext/source/pdfimport/filterdet.cxx b/sdext/source/pdfimport/filterdet.cxx index 511b7d69db6e..f0f6793975f0 100644 --- a/sdext/source/pdfimport/filterdet.cxx +++ b/sdext/source/pdfimport/filterdet.cxx @@ -492,7 +492,7 @@ uno::Reference< io::XStream > getAdditionalStream( const OUString& if( pTrailer && pTrailer->m_pDict ) { // search document checksum entry - boost::unordered_map< OString, + std::unordered_map< OString, pdfparse::PDFEntry*, OStringHash >::iterator chk; chk = pTrailer->m_pDict->m_aMap.find( "DocChecksum" ); @@ -509,7 +509,7 @@ uno::Reference< io::XStream > getAdditionalStream( const OUString& } // search for AdditionalStreams entry - boost::unordered_map< OString, + std::unordered_map< OString, pdfparse::PDFEntry*, OStringHash >::iterator add_stream; add_stream = pTrailer->m_pDict->m_aMap.find( "AdditionalStreams" ); diff --git a/sdext/source/pdfimport/inc/pdfihelper.hxx b/sdext/source/pdfimport/inc/pdfihelper.hxx index 69d8a8f18a24..e989279a32b7 100644 --- a/sdext/source/pdfimport/inc/pdfihelper.hxx +++ b/sdext/source/pdfimport/inc/pdfihelper.hxx @@ -31,9 +31,9 @@ #include "com/sun/star/rendering/PathCapType.hpp" #include "com/sun/star/rendering/PathJoinType.hpp" +#include #include #include -#include // virtual resolution of the PDF OutputDev in dpi #define PDFI_OUTDEV_RESOLUTION 7200 @@ -43,7 +43,7 @@ namespace com { namespace sun { namespace star { namespace task namespace pdfi { - typedef boost::unordered_map< OUString, OUString, OUStringHash > PropertyMap; + typedef std::unordered_map< OUString, OUString, OUStringHash > PropertyMap; typedef sal_Int32 ImageId; /// What to do with a polygon. values can be ORed together diff --git a/sdext/source/pdfimport/inc/pdfparse.hxx b/sdext/source/pdfimport/inc/pdfparse.hxx index f747e8c41177..b3f5653cf377 100644 --- a/sdext/source/pdfimport/inc/pdfparse.hxx +++ b/sdext/source/pdfimport/inc/pdfparse.hxx @@ -24,8 +24,8 @@ #include #include +#include #include -#include namespace pdfparse { @@ -180,7 +180,7 @@ struct PDFArray : public PDFContainer struct PDFDict : public PDFContainer { - typedef boost::unordered_map Map; + typedef std::unordered_map Map; Map m_aMap; PDFDict() {} diff --git a/sdext/source/pdfimport/pdfparse/pdfentries.cxx b/sdext/source/pdfimport/pdfparse/pdfentries.cxx index 7607058ddd9a..c4febf6cc32e 100644 --- a/sdext/source/pdfimport/pdfparse/pdfentries.cxx +++ b/sdext/source/pdfimport/pdfparse/pdfentries.cxx @@ -531,7 +531,7 @@ void PDFDict::insertValue( const OString& rName, PDFEntry* pValue ) if( ! pValue ) eraseValue( rName ); - boost::unordered_map::iterator it = m_aMap.find( rName ); + std::unordered_map::iterator it = m_aMap.find( rName ); if( it == m_aMap.end() ) { // new name/value, pair, append it @@ -625,7 +625,7 @@ unsigned int PDFStream::getDictLength( const PDFContainer* pContainer ) const if( ! m_pDict ) return 0; // find /Length entry, can either be a direct or indirect number object - boost::unordered_map::const_iterator it = + std::unordered_map::const_iterator it = m_pDict->m_aMap.find( "Length" ); if( it == m_pDict->m_aMap.end() ) return 0; @@ -675,7 +675,7 @@ bool PDFObject::getDeflatedStream( char** ppStream, unsigned int* pBytes, const return false; } // is there a filter entry ? - boost::unordered_map::const_iterator it = + std::unordered_map::const_iterator it = m_pStream->m_pDict->m_aMap.find( "Filter" ); if( it != m_pStream->m_pDict->m_aMap.end() ) { @@ -840,7 +840,7 @@ bool PDFObject::emit( EmitContext& rWriteContext ) const if( bDeflate && rWriteContext.m_bDeflate ) { // delete flatedecode filter - boost::unordered_map::const_iterator it = + std::unordered_map::const_iterator it = pClone->m_pStream->m_pDict->m_aMap.find( "Filter" ); if( it != pClone->m_pStream->m_pDict->m_aMap.end() ) { diff --git a/sdext/source/pdfimport/sax/saxattrlist.cxx b/sdext/source/pdfimport/sax/saxattrlist.cxx index 2ec4da5ff431..9d6d90063673 100644 --- a/sdext/source/pdfimport/sax/saxattrlist.cxx +++ b/sdext/source/pdfimport/sax/saxattrlist.cxx @@ -23,10 +23,10 @@ namespace pdfi { -SaxAttrList::SaxAttrList( const boost::unordered_map< OUString, OUString, OUStringHash >& rMap ) +SaxAttrList::SaxAttrList( const std::unordered_map< OUString, OUString, OUStringHash >& rMap ) { m_aAttributes.reserve(rMap.size()); - for( boost::unordered_map< OUString, + for( std::unordered_map< OUString, OUString, OUStringHash >::const_iterator it = rMap.begin(); it != rMap.end(); ++it ) @@ -80,7 +80,7 @@ OUString SAL_CALL SaxAttrList::getValueByIndex( sal_Int16 i_nIndex ) throw(std:: OUString SAL_CALL SaxAttrList::getValueByName(const OUString& i_rName) throw(std::exception) { - boost::unordered_map< OUString, size_t, OUStringHash >::const_iterator it = m_aIndexMap.find( i_rName ); + std::unordered_map< OUString, size_t, OUStringHash >::const_iterator it = m_aIndexMap.find( i_rName ); return (it != m_aIndexMap.end()) ? m_aAttributes[it->second].m_aValue : OUString(); } diff --git a/sdext/source/pdfimport/sax/saxattrlist.hxx b/sdext/source/pdfimport/sax/saxattrlist.hxx index eee4d95543cd..65def2195d63 100644 --- a/sdext/source/pdfimport/sax/saxattrlist.hxx +++ b/sdext/source/pdfimport/sax/saxattrlist.hxx @@ -21,8 +21,8 @@ #define INCLUDED_SDEXT_SOURCE_PDFIMPORT_SAX_SAXATTRLIST_HXX #include +#include #include -#include #include #include @@ -44,11 +44,11 @@ namespace pdfi : m_aName( i_rName ), m_aValue( i_rValue ) {} }; std::vector< AttrEntry > m_aAttributes; - boost::unordered_map< OUString, size_t, OUStringHash > m_aIndexMap; + std::unordered_map< OUString, size_t, OUStringHash > m_aIndexMap; public: SaxAttrList() {} - SaxAttrList( const boost::unordered_map< OUString, OUString, OUStringHash >& ); + SaxAttrList( const std::unordered_map< OUString, OUString, OUStringHash >& ); SaxAttrList( const SaxAttrList& ); virtual ~SaxAttrList(); diff --git a/sdext/source/pdfimport/test/pdfunzip.cxx b/sdext/source/pdfimport/test/pdfunzip.cxx index 7ea3aaadce81..f86ae2b2b373 100644 --- a/sdext/source/pdfimport/test/pdfunzip.cxx +++ b/sdext/source/pdfimport/test/pdfunzip.cxx @@ -296,7 +296,7 @@ int write_addStreams( const char* pInFile, const char* pOutFile, PDFFile* pPDFFi if( pTrailer && pTrailer->m_pDict ) { // search for AdditionalStreams entry - boost::unordered_map::iterator add_stream; + std::unordered_map::iterator add_stream; add_stream = pTrailer->m_pDict->m_aMap.find( "AdditionalStreams" ); if( add_stream != pTrailer->m_pDict->m_aMap.end() ) { @@ -323,7 +323,7 @@ int write_fonts( const char* i_pInFile, const char* i_pOutFile, PDFFile* i_pPDFF if( ! pDict ) continue; - boost::unordered_map::iterator map_it = + std::unordered_map::iterator map_it = pDict->m_aMap.find( "Type" ); if( map_it == pDict->m_aMap.end() ) continue; diff --git a/sdext/source/pdfimport/test/tests.cxx b/sdext/source/pdfimport/test/tests.cxx index 101757eb3506..8388377f8e7f 100644 --- a/sdext/source/pdfimport/test/tests.cxx +++ b/sdext/source/pdfimport/test/tests.cxx @@ -49,8 +49,8 @@ #include #include +#include #include -#include #include #include @@ -433,8 +433,8 @@ namespace { } - typedef boost::unordered_map IdToFontMap; - typedef boost::unordered_map FontToIdMap; + typedef std::unordered_map IdToFontMap; + typedef std::unordered_map FontToIdMap; typedef std::vector GraphicsContextStack; diff --git a/sdext/source/pdfimport/tree/pdfiprocessor.hxx b/sdext/source/pdfimport/tree/pdfiprocessor.hxx index 26f73f4bee7c..bfef980af937 100644 --- a/sdext/source/pdfimport/tree/pdfiprocessor.hxx +++ b/sdext/source/pdfimport/tree/pdfiprocessor.hxx @@ -39,7 +39,7 @@ #include #include -#include +#include #include "imagecontainer.hxx" #include "contentsink.hxx" @@ -174,11 +174,11 @@ namespace pdfi void setupImage(ImageId nImage); - typedef boost::unordered_map IdToFontMap; - typedef boost::unordered_map FontToIdMap; + typedef std::unordered_map IdToFontMap; + typedef std::unordered_map FontToIdMap; - typedef boost::unordered_map IdToGCMap; - typedef boost::unordered_map GCToIdMap; + typedef std::unordered_map IdToGCMap; + typedef std::unordered_map GCToIdMap; typedef std::vector GraphicsContextStack; diff --git a/sdext/source/pdfimport/tree/style.cxx b/sdext/source/pdfimport/tree/style.cxx index 4e91dcf26a8c..4df19425218b 100644 --- a/sdext/source/pdfimport/tree/style.cxx +++ b/sdext/source/pdfimport/tree/style.cxx @@ -47,7 +47,7 @@ sal_Int32 StyleContainer::impl_getStyleId( const Style& rStyle, bool bSubStyle ) for( unsigned int n = 0; n < rStyle.SubStyles.size(); ++n ) aSearchStyle.SubStyles.push_back( impl_getStyleId( *rStyle.SubStyles[n], true ) ); - boost::unordered_map< HashedStyle, sal_Int32, StyleHash >::iterator it = + std::unordered_map< HashedStyle, sal_Int32, StyleHash >::iterator it = m_aStyleToId.find( aSearchStyle ); if( it != m_aStyleToId.end() ) @@ -85,7 +85,7 @@ sal_Int32 StyleContainer::getStandardStyleId( const OString& rName ) const PropertyMap* StyleContainer::getProperties( sal_Int32 nStyleId ) const { - boost::unordered_map< sal_Int32, HashedStyle >::const_iterator it = + std::unordered_map< sal_Int32, HashedStyle >::const_iterator it = m_aIdToStyle.find( nStyleId ); return it != m_aIdToStyle.end() ? &(it->second.Properties) : NULL; } @@ -93,7 +93,7 @@ const PropertyMap* StyleContainer::getProperties( sal_Int32 nStyleId ) const sal_Int32 StyleContainer::setProperties( sal_Int32 nStyleId, const PropertyMap& rNewProps ) { sal_Int32 nRet = -1; - boost::unordered_map< sal_Int32, HashedStyle >::iterator it = + std::unordered_map< sal_Int32, HashedStyle >::iterator it = m_aIdToStyle.find( nStyleId ); if( it != m_aIdToStyle.end() ) { @@ -121,7 +121,7 @@ sal_Int32 StyleContainer::setProperties( sal_Int32 nStyleId, const PropertyMap& aSearchStyle.IsSubStyle = it->second.IsSubStyle; // find out whether this new style already exists - boost::unordered_map< HashedStyle, sal_Int32, StyleHash >::iterator new_it = + std::unordered_map< HashedStyle, sal_Int32, StyleHash >::iterator new_it = m_aStyleToId.find( aSearchStyle ); if( new_it != m_aStyleToId.end() ) { @@ -147,7 +147,7 @@ OUString StyleContainer::getStyleName( sal_Int32 nStyle ) const { OUStringBuffer aRet( 64 ); - boost::unordered_map< sal_Int32, HashedStyle >::const_iterator style_it = + std::unordered_map< sal_Int32, HashedStyle >::const_iterator style_it = m_aIdToStyle.find( nStyle ); if( style_it != m_aIdToStyle.end() ) { @@ -184,7 +184,7 @@ void StyleContainer::impl_emitStyle( sal_Int32 nStyleId, EmitContext& rContext, ElementTreeVisitor& rContainedElemVisitor ) { - boost::unordered_map< sal_Int32, HashedStyle >::const_iterator it = m_aIdToStyle.find( nStyleId ); + std::unordered_map< sal_Int32, HashedStyle >::const_iterator it = m_aIdToStyle.find( nStyleId ); if( it != m_aIdToStyle.end() ) { const HashedStyle& rStyle = it->second; @@ -210,7 +210,7 @@ void StyleContainer::emit( EmitContext& rContext, ElementTreeVisitor& rContainedElemVisitor ) { std::vector< sal_Int32 > aMasterPageSection, aAutomaticStyleSection, aOfficeStyleSection; - for( boost::unordered_map< sal_Int32, HashedStyle >::iterator it = m_aIdToStyle.begin(); + for( std::unordered_map< sal_Int32, HashedStyle >::iterator it = m_aIdToStyle.begin(); it != m_aIdToStyle.end(); ++it ) { if( ! it->second.IsSubStyle ) diff --git a/sdext/source/pdfimport/tree/style.hxx b/sdext/source/pdfimport/tree/style.hxx index 7dabe687d26c..8d1ce8af3ee9 100644 --- a/sdext/source/pdfimport/tree/style.hxx +++ b/sdext/source/pdfimport/tree/style.hxx @@ -21,7 +21,7 @@ #define INCLUDED_SDEXT_SOURCE_PDFIMPORT_TREE_STYLE_HXX #include "pdfihelper.hxx" -#include +#include #include #include #include @@ -124,16 +124,16 @@ namespace pdfi friend struct StyleIdNameSort; struct StyleIdNameSort { - const boost::unordered_map< sal_Int32, HashedStyle >* m_pMap; + const std::unordered_map< sal_Int32, HashedStyle >* m_pMap; - StyleIdNameSort( const boost::unordered_map< sal_Int32, HashedStyle >* pMap ) : + StyleIdNameSort( const std::unordered_map< sal_Int32, HashedStyle >* pMap ) : m_pMap(pMap) {} bool operator()( sal_Int32 nLeft, sal_Int32 nRight ) { - const boost::unordered_map< sal_Int32, HashedStyle >::const_iterator left_it = + const std::unordered_map< sal_Int32, HashedStyle >::const_iterator left_it = m_pMap->find( nLeft ); - const boost::unordered_map< sal_Int32, HashedStyle >::const_iterator right_it = + const std::unordered_map< sal_Int32, HashedStyle >::const_iterator right_it = m_pMap->find( nRight ); if( left_it == m_pMap->end() ) return false; @@ -145,8 +145,8 @@ namespace pdfi }; sal_Int32 m_nNextId; - boost::unordered_map< sal_Int32, HashedStyle > m_aIdToStyle; - boost::unordered_map< HashedStyle, sal_Int32, StyleHash > m_aStyleToId; + std::unordered_map< sal_Int32, HashedStyle > m_aIdToStyle; + std::unordered_map< HashedStyle, sal_Int32, StyleHash > m_aStyleToId; void impl_emitStyle( sal_Int32 nStyleId, EmitContext& rContext, diff --git a/sdext/source/pdfimport/wrapper/wrapper.cxx b/sdext/source/pdfimport/wrapper/wrapper.cxx index c393724543b4..331b7900dff1 100644 --- a/sdext/source/pdfimport/wrapper/wrapper.cxx +++ b/sdext/source/pdfimport/wrapper/wrapper.cxx @@ -61,7 +61,7 @@ #include #include -#include +#include #include #ifdef WNT #include @@ -134,7 +134,7 @@ enum parseKey { class Parser { - typedef boost::unordered_map< sal_Int64, + typedef std::unordered_map< sal_Int64, FontAttributes > FontMapType; const uno::Reference m_xContext; diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx index 4484e8f50961..946d3c48f4f4 100644 --- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx +++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx @@ -732,7 +732,7 @@ void PDFOutDev::updateFont(GfxState *state) Ref* pID = gfxFont->getID(); // TODO(Q3): Portability problem long long fontID = (long long)pID->gen << 32 | (long long)pID->num; - boost::unordered_map< long long, FontAttributes >::const_iterator it = + std::unordered_map< long long, FontAttributes >::const_iterator it = m_aFontMap.find( fontID ); if( it == m_aFontMap.end() ) { diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx index a1fe93121f2f..daba4454a4d8 100644 --- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx +++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx @@ -44,7 +44,7 @@ #pragma warning(pop) #endif -#include +#include #include class GfxPath; @@ -135,7 +135,7 @@ namespace pdfi { // not owned by this class PDFDoc* m_pDoc; - mutable boost::unordered_map< long long, + mutable std::unordered_map< long long, FontAttributes > m_aFontMap; UnicodeMap* m_pUtf8Map; -- cgit