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

Unified Diff: xfa/fxfa/app/xfa_textlayout.h

Issue 1911843002: Remove IFDE_CSSTagProvider. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 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 | « xfa/fde/css/fde_cssstyleselector.cpp ('k') | xfa/fxfa/app/xfa_textlayout.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxfa/app/xfa_textlayout.h
diff --git a/xfa/fxfa/app/xfa_textlayout.h b/xfa/fxfa/app/xfa_textlayout.h
index 9c3184b48bef9b8aeda7e2d832284130989820c3..9cced6a65afee1db0e1e43589d43920d12ad967d 100644
--- a/xfa/fxfa/app/xfa_textlayout.h
+++ b/xfa/fxfa/app/xfa_textlayout.h
@@ -7,6 +7,8 @@
#ifndef XFA_FXFA_APP_XFA_TEXTLAYOUT_H_
#define XFA_FXFA_APP_XFA_TEXTLAYOUT_H_
+#include <map>
+
#include "xfa/fde/css/fde_css.h"
#include "xfa/fde/fde_gedevice.h"
#include "xfa/fgas/layout/fgas_rtfbreak.h"
@@ -20,28 +22,31 @@ class CXFA_Font;
class CXFA_TextProvider;
class CXFA_TextTabstopsContext;
-class CXFA_CSSTagProvider : public IFDE_CSSTagProvider {
+class CXFA_CSSTagProvider {
public:
CXFA_CSSTagProvider() : m_bTagAviliable(FALSE), m_bContent(FALSE) {}
- virtual ~CXFA_CSSTagProvider();
+ ~CXFA_CSSTagProvider() {}
+
+ CFX_WideString GetTagName() { return m_wsTagName; }
+
+ using AttributeMap = std::map<CFX_WideString, CFX_WideString>;
+ AttributeMap::iterator begin() { return m_Attributes.begin(); }
+ AttributeMap::iterator end() { return m_Attributes.end(); }
+
+ bool empty() const { return m_Attributes.empty(); }
- // Note: |this| must outlive the use of GetTagName()'s result.
- virtual CFX_WideStringC GetTagName() { return m_wsTagName.AsStringC(); }
- virtual FX_POSITION GetFirstAttribute() {
- return m_Attributes.GetStartPosition();
- }
- virtual void GetNextAttribute(FX_POSITION& pos,
- CFX_WideStringC& wsAttr,
- CFX_WideStringC& wsValue);
void SetTagNameObj(const CFX_WideString& wsName) { m_wsTagName = wsName; }
void SetAttribute(const CFX_WideString& wsAttr,
- const CFX_WideString& wsValue);
+ const CFX_WideString& wsValue) {
+ m_Attributes.insert({wsAttr, wsValue});
+ }
+
FX_BOOL m_bTagAviliable;
FX_BOOL m_bContent;
protected:
CFX_WideString m_wsTagName;
- CFX_MapPtrToPtr m_Attributes;
+ AttributeMap m_Attributes;
};
class CXFA_TextParseContext : public CFX_Target {
« no previous file with comments | « xfa/fde/css/fde_cssstyleselector.cpp ('k') | xfa/fxfa/app/xfa_textlayout.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698