Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Unified Diff: xfa/src/fxfa/src/app/xfa_fontmgr.cpp

Issue 1576033002: Merge to XFA: Use std::map as CPDF_Dictionary's underlying store. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fpdfsdk/src/javascript/Document.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/src/fxfa/src/app/xfa_fontmgr.cpp
diff --git a/xfa/src/fxfa/src/app/xfa_fontmgr.cpp b/xfa/src/fxfa/src/app/xfa_fontmgr.cpp
index d6a5677e854cbd725d9ce0154c93d02ce17242d1..5be4c8b426a773eca2f868ea90ea5cfa675e5d1b 100644
--- a/xfa/src/fxfa/src/app/xfa_fontmgr.cpp
+++ b/xfa/src/fxfa/src/app/xfa_fontmgr.cpp
@@ -1896,10 +1896,9 @@ IFX_Font* CXFA_PDFFontMgr::FindFont(CFX_ByteString strPsName,
}
strPsName.Remove(' ');
IFX_FontMgr* pFDEFontMgr = m_pDoc->GetApp()->GetFDEFontMgr();
- FX_POSITION pos = pFontSetDict->GetStartPos();
- while (pos) {
- CFX_ByteString key;
- CPDF_Object* pObj = pFontSetDict->GetNextElement(pos, key);
+ for (const auto& it : *pFontSetDict) {
+ const CFX_ByteString& key = it.first;
+ CPDF_Object* pObj = it.second;
if (!PsNameMatchDRFontName(strPsName, bBold, bItalic, key, bStrictMatch)) {
continue;
}
« no previous file with comments | « fpdfsdk/src/javascript/Document.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698