summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@gmail.com>2013-09-09 17:11:03 +0200
committerMatúš Kukan <matus.kukan@gmail.com>2013-09-10 00:54:44 +0200
commitbe4d2cdc23c20a11a195cab8fb6a45312a814341 (patch)
tree07783a6bbd88804d89b7985162bbede9b5d1068f /unotools
parent18ac4a1bc7925712cc63ccb692cf854a040261c6 (diff)
unusedcode: remove AttributeListImpl
Change-Id: I9c3c0d742bc2941fcf40ad69bfb744a57b3e7be6
Diffstat (limited to 'unotools')
-rw-r--r--unotools/source/config/xmlaccelcfg.cxx140
1 files changed, 0 insertions, 140 deletions
diff --git a/unotools/source/config/xmlaccelcfg.cxx b/unotools/source/config/xmlaccelcfg.cxx
index 719cbf7f6058..bd598d2fc4c8 100644
--- a/unotools/source/config/xmlaccelcfg.cxx
+++ b/unotools/source/config/xmlaccelcfg.cxx
@@ -35,146 +35,6 @@ using namespace com::sun::star::xml::sax;
#define ATTRIBUTE_MODIFIER "modifier"
#define ATTRIBUTE_URL "url"
-namespace {
-
-struct AttributeListImpl_impl;
-class AttributeListImpl : public ::cppu::WeakImplHelper1< ::com::sun::star::xml::sax::XAttributeList >
-{
-protected:
- ~AttributeListImpl();
-
-public:
- AttributeListImpl();
- AttributeListImpl( const AttributeListImpl & );
-
-public:
- virtual sal_Int16 SAL_CALL getLength(void) throw (::com::sun::star::uno::RuntimeException);
- virtual OUString SAL_CALL getNameByIndex(sal_Int16 i) throw (::com::sun::star::uno::RuntimeException);
- virtual OUString SAL_CALL getTypeByIndex(sal_Int16 i) throw (::com::sun::star::uno::RuntimeException);
- virtual OUString SAL_CALL getTypeByName(const OUString& aName) throw (::com::sun::star::uno::RuntimeException);
- virtual OUString SAL_CALL getValueByIndex(sal_Int16 i) throw (::com::sun::star::uno::RuntimeException);
- virtual OUString SAL_CALL getValueByName(const OUString& aName) throw (::com::sun::star::uno::RuntimeException);
-
-public:
- void addAttribute( const OUString &sName , const OUString &sType , const OUString &sValue );
-
-private:
- struct AttributeListImpl_impl *m_pImpl;
-};
-
-struct TagAttribute
-{
- TagAttribute(){}
- TagAttribute( const OUString &aName, const OUString &aType , const OUString &aValue )
- {
- sName = aName;
- sType = aType;
- sValue = aValue;
- }
-
- OUString sName;
- OUString sType;
- OUString sValue;
-};
-
-struct AttributeListImpl_impl
-{
- AttributeListImpl_impl()
- {
- // performance improvement during adding
- vecAttribute.reserve(20);
- }
- ::std::vector<struct TagAttribute> vecAttribute;
-};
-
-
-
-sal_Int16 SAL_CALL AttributeListImpl::getLength(void) throw (RuntimeException)
-{
- return sal::static_int_cast< sal_Int16 >(m_pImpl->vecAttribute.size());
-}
-
-
-AttributeListImpl::AttributeListImpl( const AttributeListImpl &r ) :
- cppu::WeakImplHelper1<com::sun::star::xml::sax::XAttributeList>(r)
-{
- m_pImpl = new AttributeListImpl_impl;
- *m_pImpl = *(r.m_pImpl);
-}
-
-OUString AttributeListImpl::getNameByIndex(sal_Int16 i) throw (RuntimeException)
-{
- if( i < sal::static_int_cast<sal_Int16>(m_pImpl->vecAttribute.size()) ) {
- return m_pImpl->vecAttribute[i].sName;
- }
- return OUString();
-}
-
-
-OUString AttributeListImpl::getTypeByIndex(sal_Int16 i) throw (RuntimeException)
-{
- if( i < sal::static_int_cast<sal_Int16>(m_pImpl->vecAttribute.size()) ) {
- return m_pImpl->vecAttribute[i].sType;
- }
- return OUString();
-}
-
-OUString AttributeListImpl::getValueByIndex(sal_Int16 i) throw (RuntimeException)
-{
- if( i < sal::static_int_cast<sal_Int16>(m_pImpl->vecAttribute.size()) ) {
- return m_pImpl->vecAttribute[i].sValue;
- }
- return OUString();
-
-}
-
-OUString AttributeListImpl::getTypeByName( const OUString& sName ) throw (RuntimeException)
-{
- ::std::vector<struct TagAttribute>::iterator ii = m_pImpl->vecAttribute.begin();
-
- for( ; ii != m_pImpl->vecAttribute.end() ; ++ii ) {
- if( (*ii).sName == sName ) {
- return (*ii).sType;
- }
- }
- return OUString();
-}
-
-OUString AttributeListImpl::getValueByName(const OUString& sName) throw (RuntimeException)
-{
- ::std::vector<struct TagAttribute>::iterator ii = m_pImpl->vecAttribute.begin();
-
- for( ; ii != m_pImpl->vecAttribute.end() ; ++ii ) {
- if( (*ii).sName == sName ) {
- return (*ii).sValue;
- }
- }
- return OUString();
-}
-
-
-AttributeListImpl::AttributeListImpl()
-{
- m_pImpl = new AttributeListImpl_impl;
-}
-
-
-
-AttributeListImpl::~AttributeListImpl()
-{
- delete m_pImpl;
-}
-
-
-void AttributeListImpl::addAttribute( const OUString &sName ,
- const OUString &sType ,
- const OUString &sValue )
-{
- m_pImpl->vecAttribute.push_back( TagAttribute( sName , sType , sValue ) );
-}
-
-} // anonymous namespace
-
Any SAL_CALL OReadAccelatorDocumentHandler::queryInterface( const Type & rType ) throw( RuntimeException )
{
Any a = ::cppu::queryInterface( rType ,(static_cast< XDocumentHandler* >(this)));