diff options
author | Oliver Bolte <obo@openoffice.org> | 2008-02-26 13:40:24 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2008-02-26 13:40:24 +0000 |
commit | c2802407eae613505cd4cd67e3fcf411b3edd4fe (patch) | |
tree | 20de4d9d0bb3849b3429d5a826f2c1bf91ab7de1 /sax/source | |
parent | ca4d39e5fba87a6eecd2d31850f280df98c2afcb (diff) |
INTEGRATION: CWS custommeta (1.6.30); FILE MERGED
2007/12/07 13:40:14 mst 1.6.30.1: - sax/source/expatwrap/attrlistimpl.{hxx,cxx}:
rename class AttributeListImpl to AttributeList, in preparation for export
Diffstat (limited to 'sax/source')
-rw-r--r-- | sax/source/expatwrap/attrlistimpl.cxx | 48 |
1 files changed, 23 insertions, 25 deletions
diff --git a/sax/source/expatwrap/attrlistimpl.cxx b/sax/source/expatwrap/attrlistimpl.cxx index 5976cb372ba1..7ee61f2c3df4 100644 --- a/sax/source/expatwrap/attrlistimpl.cxx +++ b/sax/source/expatwrap/attrlistimpl.cxx @@ -4,9 +4,9 @@ * * $RCSfile: attrlistimpl.cxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: hr $ $Date: 2006-06-19 23:07:15 $ + * last change: $Author: obo $ $Date: 2008-02-26 14:40:24 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -33,6 +33,8 @@ * ************************************************************************/ +#include "attrlistimpl.hxx" + #include <vector> #if OSL_DEBUG_LEVEL == 0 @@ -44,9 +46,6 @@ #include <cppuhelper/weak.hxx> -#include <com/sun/star/xml/sax/XAttributeList.hpp> -#include <com/sun/star/util/XCloneable.hpp> - using namespace ::std; using namespace ::rtl; using namespace ::cppu; @@ -54,7 +53,6 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::util; using namespace ::com::sun::star::xml::sax; -#include "attrlistimpl.hxx" namespace sax_expatwrap { struct TagAttribute @@ -73,9 +71,9 @@ struct TagAttribute OUString sValue; }; -struct AttributeListImpl_impl +struct AttributeList_impl { - AttributeListImpl_impl() + AttributeList_impl() { // performance improvement during adding vecAttribute.reserve(20); @@ -85,20 +83,20 @@ struct AttributeListImpl_impl -sal_Int16 AttributeListImpl::getLength(void) throw (RuntimeException) +sal_Int16 AttributeList::getLength(void) throw (RuntimeException) { return static_cast<sal_Int16>(m_pImpl->vecAttribute.size()); } -AttributeListImpl::AttributeListImpl( const AttributeListImpl &r ) : +AttributeList::AttributeList( const AttributeList &r ) : cppu::WeakImplHelper2<XAttributeList, XCloneable>() { - m_pImpl = new AttributeListImpl_impl; + m_pImpl = new AttributeList_impl; *m_pImpl = *(r.m_pImpl); } -OUString AttributeListImpl::getNameByIndex(sal_Int16 i) throw (RuntimeException) +OUString AttributeList::getNameByIndex(sal_Int16 i) throw (RuntimeException) { if( std::vector< TagAttribute >::size_type(i) < m_pImpl->vecAttribute.size() ) { return m_pImpl->vecAttribute[i].sName; @@ -107,7 +105,7 @@ OUString AttributeListImpl::getNameByIndex(sal_Int16 i) throw (RuntimeException) } -OUString AttributeListImpl::getTypeByIndex(sal_Int16 i) throw (RuntimeException) +OUString AttributeList::getTypeByIndex(sal_Int16 i) throw (RuntimeException) { if( std::vector< TagAttribute >::size_type(i) < m_pImpl->vecAttribute.size() ) { return m_pImpl->vecAttribute[i].sType; @@ -115,7 +113,7 @@ OUString AttributeListImpl::getTypeByIndex(sal_Int16 i) throw (RuntimeException) return OUString(); } -OUString AttributeListImpl::getValueByIndex(sal_Int16 i) throw (RuntimeException) +OUString AttributeList::getValueByIndex(sal_Int16 i) throw (RuntimeException) { if( std::vector< TagAttribute >::size_type(i) < m_pImpl->vecAttribute.size() ) { return m_pImpl->vecAttribute[i].sValue; @@ -124,7 +122,7 @@ OUString AttributeListImpl::getValueByIndex(sal_Int16 i) throw (RuntimeException } -OUString AttributeListImpl::getTypeByName( const OUString& sName ) throw (RuntimeException) +OUString AttributeList::getTypeByName( const OUString& sName ) throw (RuntimeException) { vector<struct TagAttribute>::iterator ii = m_pImpl->vecAttribute.begin(); @@ -136,7 +134,7 @@ OUString AttributeListImpl::getTypeByName( const OUString& sName ) throw (Runtim return OUString(); } -OUString AttributeListImpl::getValueByName(const OUString& sName) throw (RuntimeException) +OUString AttributeList::getValueByName(const OUString& sName) throw (RuntimeException) { vector<struct TagAttribute>::iterator ii = m_pImpl->vecAttribute.begin(); @@ -149,40 +147,40 @@ OUString AttributeListImpl::getValueByName(const OUString& sName) throw (Runtime } -Reference< XCloneable > AttributeListImpl::createClone() throw (RuntimeException) +Reference< XCloneable > AttributeList::createClone() throw (RuntimeException) { - AttributeListImpl *p = new AttributeListImpl( *this ); + AttributeList *p = new AttributeList( *this ); return Reference< XCloneable > ( (XCloneable * ) p ); } -AttributeListImpl::AttributeListImpl() +AttributeList::AttributeList() { - m_pImpl = new AttributeListImpl_impl; + m_pImpl = new AttributeList_impl; } -AttributeListImpl::~AttributeListImpl() +AttributeList::~AttributeList() { delete m_pImpl; } -void AttributeListImpl::addAttribute( const OUString &sName , +void AttributeList::addAttribute( const OUString &sName , const OUString &sType , const OUString &sValue ) { m_pImpl->vecAttribute.push_back( TagAttribute( sName , sType , sValue ) ); } -void AttributeListImpl::clear() +void AttributeList::clear() { m_pImpl->vecAttribute.clear(); } -void AttributeListImpl::removeAttribute( const OUString &sName ) +void AttributeList::removeAttribute( const OUString &sName ) { vector<struct TagAttribute>::iterator ii = m_pImpl->vecAttribute.begin(); @@ -195,7 +193,7 @@ void AttributeListImpl::removeAttribute( const OUString &sName ) } -void AttributeListImpl::setAttributeList( const Reference< XAttributeList > &r ) +void AttributeList::setAttributeList( const Reference< XAttributeList > &r ) { assert( r.is() ); |