Branch data 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 : : #include <limits.h> //USHRT_MAX
32 : : #include "SvXMLAttr.hxx"
33 : :
34 : 0 : SvXMLAttr::SvXMLAttr( const rtl::OUString& rLName,
35 : : const rtl::OUString& rValue ) :
36 : : aPrefixPos(USHRT_MAX),
37 : : aLName(rLName),
38 : 0 : aValue(rValue)
39 : : {
40 : 0 : }
41 : :
42 : 16 : SvXMLAttr::SvXMLAttr( const sal_uInt16 nPos,
43 : : const rtl::OUString& rLName,
44 : : const rtl::OUString& rValue ) :
45 : : aPrefixPos(nPos),
46 : : aLName(rLName),
47 : 16 : aValue(rValue)
48 : : {
49 : 16 : }
50 : :
51 : 1597 : bool SvXMLAttr::operator== (const SvXMLAttr &rCmp) const
52 : : {
53 : : return ( rCmp.aPrefixPos == aPrefixPos ) &&
54 : 1597 : ( rCmp.aLName == aLName ) &&
55 [ + - + - ]: 3194 : ( rCmp.aValue == aValue );
[ + - ]
56 : : }
57 : :
58 : 60 : sal_uInt16 SvXMLAttr::getPrefixPos() const
59 : : {
60 : 60 : return aPrefixPos;
61 : : }
62 : :
63 : 45 : const rtl::OUString& SvXMLAttr::getLName() const
64 : : {
65 : 45 : return aLName;
66 : : }
67 : :
68 : 15 : const rtl::OUString& SvXMLAttr::getValue() const {
69 : 15 : return aValue;
70 : : }
71 : :
72 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|