Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : :
29 : : #include "SvXMLAttrCollection.hxx"
30 : : #include <xmloff/xmlcnimp.hxx>
31 : : #include <rtl/ustring.hxx> //rtl::OUString
32 : :
33 [ + - ]: 5777 : SvXMLAttrContainerData::SvXMLAttrContainerData() : pimpl( new SvXMLAttrCollection() )
34 : : {
35 : 5777 : }
36 : :
37 : 4774 : SvXMLAttrContainerData::SvXMLAttrContainerData(const SvXMLAttrContainerData &rCopy) :
38 [ + - ]: 4774 : pimpl( new SvXMLAttrCollection( *(rCopy.pimpl) ) )
39 : : {
40 : 4774 : }
41 : :
42 : : //Need destructor defined (despite it being empty) to avoid "checked_delete"
43 : : //compiler errors.
44 : 9956 : SvXMLAttrContainerData::~SvXMLAttrContainerData()
45 : : {
46 : 9956 : }
47 : :
48 : 7557 : int SvXMLAttrContainerData::operator ==( const SvXMLAttrContainerData& rCmp ) const
49 : : {
50 : 7557 : return ( *(rCmp.pimpl) == *(pimpl) );
51 : : }
52 : :
53 : 0 : sal_Bool SvXMLAttrContainerData::AddAttr( const rtl::OUString& rLName,
54 : : const rtl::OUString& rValue )
55 : : {
56 : 0 : return pimpl->AddAttr(rLName, rValue);
57 : : }
58 : :
59 : 16 : sal_Bool SvXMLAttrContainerData::AddAttr( const rtl::OUString& rPrefix,
60 : : const rtl::OUString& rNamespace,
61 : : const rtl::OUString& rLName,
62 : : const rtl::OUString& rValue )
63 : : {
64 : 16 : return pimpl->AddAttr(rPrefix, rNamespace, rLName, rValue);
65 : : }
66 : :
67 : 0 : sal_Bool SvXMLAttrContainerData::AddAttr( const rtl::OUString& rPrefix,
68 : : const rtl::OUString& rLName,
69 : : const rtl::OUString& rValue )
70 : : {
71 : 0 : return pimpl->AddAttr(rPrefix, rLName, rValue);
72 : : }
73 : :
74 : 0 : sal_Bool SvXMLAttrContainerData::SetAt( size_t i,
75 : : const rtl::OUString& rLName,
76 : : const rtl::OUString& rValue )
77 : : {
78 : 0 : return pimpl->SetAt(i, rLName, rValue);
79 : : }
80 : :
81 : 0 : sal_Bool SvXMLAttrContainerData::SetAt( size_t i,
82 : : const rtl::OUString& rPrefix,
83 : : const rtl::OUString& rNamespace,
84 : : const rtl::OUString& rLName,
85 : : const rtl::OUString& rValue )
86 : : {
87 : 0 : return pimpl->SetAt(i, rPrefix, rNamespace, rLName, rValue);
88 : : }
89 : :
90 : 0 : sal_Bool SvXMLAttrContainerData::SetAt( size_t i,
91 : : const rtl::OUString& rPrefix,
92 : : const rtl::OUString& rLName,
93 : : const rtl::OUString& rValue )
94 : : {
95 : 0 : return pimpl->SetAt(i, rPrefix, rLName, rValue);
96 : : }
97 : :
98 : 0 : void SvXMLAttrContainerData::Remove( size_t i )
99 : : {
100 : 0 : pimpl->Remove(i);
101 : 0 : }
102 : :
103 : 151 : size_t SvXMLAttrContainerData::GetAttrCount() const
104 : : {
105 : 151 : return pimpl->GetAttrCount();
106 : : }
107 : :
108 : 45 : const rtl::OUString& SvXMLAttrContainerData::GetAttrLName(size_t i) const
109 : : {
110 : 45 : return pimpl->GetAttrLName(i);
111 : : }
112 : :
113 : 15 : const rtl::OUString& SvXMLAttrContainerData::GetAttrValue(size_t i) const
114 : : {
115 : 15 : return pimpl->GetAttrValue(i);
116 : : }
117 : :
118 : 15 : const rtl::OUString SvXMLAttrContainerData::GetAttrNamespace( size_t i ) const
119 : : {
120 : 15 : return pimpl->GetAttrNamespace(i);
121 : : }
122 : :
123 : 45 : const rtl::OUString SvXMLAttrContainerData::GetAttrPrefix( size_t i ) const
124 : : {
125 : 45 : return pimpl->GetAttrPrefix(i);
126 : : }
127 : :
128 : 0 : const rtl::OUString& SvXMLAttrContainerData::GetNamespace( sal_uInt16 i ) const
129 : : {
130 : 0 : return pimpl->GetNamespace(i);
131 : : }
132 : :
133 : 0 : const rtl::OUString& SvXMLAttrContainerData::GetPrefix( sal_uInt16 i ) const
134 : : {
135 : 0 : return pimpl->GetPrefix(i);
136 : : }
137 : :
138 : 0 : sal_uInt16 SvXMLAttrContainerData::GetFirstNamespaceIndex() const
139 : : {
140 : 0 : return pimpl->GetFirstNamespaceIndex();
141 : : }
142 : :
143 : 0 : sal_uInt16 SvXMLAttrContainerData::GetNextNamespaceIndex( sal_uInt16 nIdx ) const
144 : : {
145 : 0 : return pimpl->GetNextNamespaceIndex( nIdx );
146 : : }
147 : :
148 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|