diff options
author | Lei Zhang <thestig@chromium.org> | 2017-12-13 14:34:12 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-12-13 14:34:12 +0000 |
commit | 753edfbfa7310241c51c61e2045f0f55971c142a (patch) | |
tree | a5af22388e425c089828f96865ab752ab9bc2eb4 /core/fxcrt/xml/cxml_element.h | |
parent | f85c43bc73740cc9887da7c790c79469610c9646 (diff) | |
download | pdfium-753edfbfa7310241c51c61e2045f0f55971c142a.tar.xz |
Remove dead CXML_Element code.
Move non-trivial implementations into the .cpp file as well.
Change-Id: Iebe7d7284e453c6405cddfe880e2c85aa0c804ab
Reviewed-on: https://pdfium-review.googlesource.com/21050
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fxcrt/xml/cxml_element.h')
-rw-r--r-- | core/fxcrt/xml/cxml_element.h | 66 |
1 files changed, 9 insertions, 57 deletions
diff --git a/core/fxcrt/xml/cxml_element.h b/core/fxcrt/xml/cxml_element.h index a851a86f1c..498a0708ad 100644 --- a/core/fxcrt/xml/cxml_element.h +++ b/core/fxcrt/xml/cxml_element.h @@ -28,7 +28,6 @@ class CXML_Element : public CXML_Object { const CXML_Element* AsElement() const override; ByteString GetTagName(bool bQualified = false) const; - ByteString GetNamespace(bool bQualified = false) const; ByteString GetNamespaceURI(const ByteString& qName) const; const CXML_Element* GetParent() const { return m_pParent.Get(); } uint32_t CountAttrs() const { return m_AttrMap.GetSize(); } @@ -36,57 +35,9 @@ class CXML_Element : public CXML_Object { ByteString* space, ByteString* name, WideString* value) const; - bool HasAttr(const ByteStringView& qName) const; - bool GetAttrValue(const ByteStringView& name, WideString& attribute) const; - WideString GetAttrValue(const ByteStringView& name) const { - WideString attr; - GetAttrValue(name, attr); - return attr; - } - - bool GetAttrValue(const ByteStringView& space, - const ByteStringView& name, - WideString& attribute) const; - WideString GetAttrValue(const ByteStringView& space, - const ByteStringView& name) const { - WideString attr; - GetAttrValue(space, name, attr); - return attr; - } - - bool GetAttrInteger(const ByteStringView& name, int& attribute) const; - int GetAttrInteger(const ByteStringView& name) const { - int attr = 0; - GetAttrInteger(name, attr); - return attr; - } + WideString GetAttrValue(const ByteStringView& name) const; - bool GetAttrInteger(const ByteStringView& space, - const ByteStringView& name, - int& attribute) const; - int GetAttrInteger(const ByteStringView& space, - const ByteStringView& name) const { - int attr = 0; - GetAttrInteger(space, name, attr); - return attr; - } - - bool GetAttrFloat(const ByteStringView& name, float& attribute) const; - float GetAttrFloat(const ByteStringView& name) const { - float attr = 0; - GetAttrFloat(name, attr); - return attr; - } - - bool GetAttrFloat(const ByteStringView& space, - const ByteStringView& name, - float& attribute) const; - float GetAttrFloat(const ByteStringView& space, - const ByteStringView& name) const { - float attr = 0; - GetAttrFloat(space, name, attr); - return attr; - } + int GetAttrInteger(const ByteStringView& name) const; void AppendChild(std::unique_ptr<CXML_Object> child) { m_Children.push_back(std::move(child)); @@ -99,17 +50,18 @@ class CXML_Element : public CXML_Object { CXML_Element* GetElement(const ByteStringView& space, const ByteStringView& tag, int nth) const; - uint32_t FindElement(CXML_Element* pElement) const; - void SetTag(const ByteStringView& qTagName); - void RemoveChild(uint32_t index); void SetAttribute(const ByteString& space, const ByteString& name, - const WideString& value) { - m_AttrMap.SetAt(space, name, value); - } + const WideString& value); private: + bool GetAttrValue(const ByteStringView& name, WideString& attribute) const; + bool GetAttrValue(const ByteStringView& space, + const ByteStringView& name, + WideString& attribute) const; + bool GetAttrInteger(const ByteStringView& name, int& attribute) const; + UnownedPtr<const CXML_Element> const m_pParent; ByteString m_QSpaceName; ByteString m_TagName; |