LCOV - code coverage report
Current view: top level - libreoffice/xmloff/source/core - SvXMLAttrCollection.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 1 1 100.0 %
Date: 2012-12-27 Functions: 3 3 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * Version: MPL 1.1 / GPLv3+ / LGPLv3+
       4             :  *
       5             :  * The contents of this file are subject to the Mozilla Public License Version
       6             :  * 1.1 (the "License"); you may not use this file except in compliance with
       7             :  * the License or as specified alternatively below. You may obtain a copy of
       8             :  * the License at http://www.mozilla.org/MPL/
       9             :  *
      10             :  * Software distributed under the License is distributed on an "AS IS" basis,
      11             :  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
      12             :  * for the specific language governing rights and limitations under the
      13             :  * License.
      14             :  *
      15             :  * The Initial Developer of the Original Code is
      16             :  *       Nigel Hawkins  - n.hawkins@gmx.com
      17             :  * Portions created by the Initial Developer are Copyright (C) 2011 the
      18             :  * Initial Developer. All Rights Reserved.
      19             :  *
      20             :  * Major Contributor(s):
      21             :  *
      22             :  * For minor contributions see the git repository.
      23             :  *
      24             :  * Alternatively, the contents of this file may be used under the terms of
      25             :  * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
      26             :  * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
      27             :  * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
      28             :  * instead of those above.
      29             :  */
      30             : 
      31             : #ifndef SVXMLATTRCOLLECTION_HXX_
      32             : #define SVXMLATTRCOLLECTION_HXX_
      33             : 
      34             : #include "SvXMLAttr.hxx"
      35             : 
      36             : #include <xmloff/nmspmap.hxx>  //SvXMLNamespaceMap
      37             : #include <rtl/ustring.hxx>     //rtl::OUString
      38             : #include <sal/types.h>         //sal_uInt16 and sal_Bool
      39             : #include <vector>
      40             : 
      41        2010 : class SvXMLAttrCollection
      42             : {
      43             : public:
      44             :     SvXMLNamespaceMap      aNamespaceMap;
      45             :     std::vector<SvXMLAttr> aAttrs;
      46             : 
      47             :     bool operator==(const SvXMLAttrCollection &rCmp) const;
      48             :     sal_Bool AddAttr( const rtl::OUString& rLName,
      49             :                       const rtl::OUString& rValue );
      50             :     sal_Bool AddAttr( const rtl::OUString& rPrefix,
      51             :                       const rtl::OUString& rNamespace,
      52             :                       const rtl::OUString& rLName,
      53             :                       const rtl::OUString& rValue );
      54             :     sal_Bool AddAttr( const rtl::OUString& rPrefix,
      55             :                       const rtl::OUString& rLName,
      56             :                       const rtl::OUString& rValue );
      57             : 
      58             :     sal_Bool SetAt( size_t i,
      59             :                     const rtl::OUString& rLName,
      60             :                     const rtl::OUString& rValue );
      61             :     sal_Bool SetAt( size_t i,
      62             :                     const rtl::OUString& rPrefix,
      63             :                     const rtl::OUString& rNamespace,
      64             :                     const rtl::OUString& rLName,
      65             :                     const rtl::OUString& rValue );
      66             :     sal_Bool SetAt( size_t i,
      67             :                     const rtl::OUString& rPrefix,
      68             :                     const rtl::OUString& rLName,
      69             :                     const rtl::OUString& rValue );
      70             : 
      71             :     void Remove( size_t i );
      72             : 
      73             :     size_t GetAttrCount() const;
      74             :     const rtl::OUString& GetAttrLName(size_t i) const;
      75             :     const rtl::OUString& GetAttrValue(size_t i) const;
      76             :     const rtl::OUString GetAttrNamespace( size_t i ) const;
      77             :     const rtl::OUString GetAttrPrefix( size_t i ) const;
      78             :     const rtl::OUString& GetNamespace( sal_uInt16 i ) const;
      79             :     const rtl::OUString& GetPrefix( sal_uInt16 i ) const;
      80             :     sal_uInt16 GetFirstNamespaceIndex() const;
      81             :     sal_uInt16 GetNextNamespaceIndex( sal_uInt16 nIdx ) const;
      82             : 
      83             : private:
      84             :     sal_uInt16 GetPrefixPos( size_t i ) const;
      85             : };
      86             : 
      87             : #endif /* SVXMLATTRCOLLECTION_HXX_ */
      88             : 
      89             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
      90             : 

Generated by: LCOV version 1.10