diff options
Diffstat (limited to 'xfa')
-rw-r--r-- | xfa/src/fxfa/src/app/xfa_fontmgr.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/xfa/src/fxfa/src/app/xfa_fontmgr.cpp b/xfa/src/fxfa/src/app/xfa_fontmgr.cpp index d6a5677e85..5be4c8b426 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;
}
|