20#ifndef INCLUDED_COMPHELPER_ATTRIBUTELIST_HXX
21#define INCLUDED_COMPHELPER_ATTRIBUTELIST_HXX
27#include <com/sun/star/util/XCloneable.hpp>
28#include <com/sun/star/xml/sax/XAttributeList.hpp>
36 public ::cppu::WeakImplHelper<css::xml::sax::XAttributeList, css::util::XCloneable>
47 AttributeList(
const css::uno::Reference<css::xml::sax::XAttributeList>& rAttrList);
53 void AddAttribute(
const OUString &sName,
const OUString &sValue);
58 void RemoveAttribute(
const OUString& sName);
59 void AppendAttributeList(
const css::uno::Reference< css::xml::sax::XAttributeList >&);
60 void SetValueByIndex(sal_Int16 i,
const OUString& rValue);
61 void RemoveAttributeByIndex(sal_Int16 i);
62 void RenameAttributeByIndex(sal_Int16 i,
const OUString& rNewName);
63 sal_Int16 GetIndexByName(
const OUString& rName)
const;
68 return static_cast<sal_Int16
>(mAttributes.size());
72 return mAttributes[
i].sName;
74 virtual OUString SAL_CALL
getTypeByIndex(sal_Int16)
override {
return "CDATA"; }
75 virtual OUString SAL_CALL
getTypeByName(
const OUString&)
override {
return "CDATA"; }
78 return mAttributes[
i].sValue;
80 virtual OUString SAL_CALL getValueByName(
const OUString& aName)
override;
83 virtual css::uno::Reference< XCloneable > SAL_CALL
84 createClone()
override;
virtual OUString SAL_CALL getValueByIndex(sal_Int16 i) override
AttributeList(const css::uno::Reference< css::xml::sax::XAttributeList > &rAttrList)
AttributeList(const AttributeList &r)=default
virtual OUString SAL_CALL getTypeByIndex(sal_Int16) override
virtual OUString SAL_CALL getTypeByName(const OUString &) override
virtual OUString SAL_CALL getNameByIndex(sal_Int16 i) override
virtual sal_Int16 SAL_CALL getLength() override
AttributeList(AttributeList &&)=delete
std::vector< TagAttribute > mAttributes
#define COMPHELPER_DLLPUBLIC