Update ooo320-m1
[ooovba.git] / xmlsecurity / source / framework / elementmark.cxx
blobd7b8943687eafecae8f39bab3e22f69f988a22bd
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: elementmark.cxx,v $
10 * $Revision: 1.6 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_xmlsecurity.hxx"
34 #include "elementmark.hxx"
35 #include "buffernode.hxx"
37 namespace cssxc = com::sun::star::xml::crypto;
39 ElementMark::ElementMark(sal_Int32 nSecurityId, sal_Int32 nBufferId)
40 :m_pBufferNode(NULL),
41 m_nSecurityId(nSecurityId),
42 m_nBufferId(nBufferId),
43 m_type(cssxc::sax::ElementMarkType_ELEMENTMARK)
44 /****** ElementMark/ElementMark ***********************************************
46 * NAME
47 * ElementMark -- constructor method
49 * SYNOPSIS
50 * ElementMark(nSecurityId, nBufferId);
52 * FUNCTION
53 * construct an ElementMark object.
55 * INPUTS
56 * nSecurityId - represents which security entity the buffer node is
57 * related with. Either a signature or an encryption is
58 * a security entity.
59 * nBufferId - the id of the element bufferred in the document
60 * wrapper component. The document wrapper component
61 * uses this id to search the particular bufferred
62 * element.
64 * RESULT
65 * empty
67 * HISTORY
68 * 05.01.2004 - implemented
70 * AUTHOR
71 * Michael Mi
72 * Email: michael.mi@sun.com
73 ******************************************************************************/
77 BufferNode* ElementMark::getBufferNode() const
79 return m_pBufferNode;
82 void ElementMark::setBufferNode(const BufferNode* pBufferNode)
84 m_pBufferNode = (BufferNode*)pBufferNode;
87 sal_Int32 ElementMark::getSecurityId() const
89 return m_nSecurityId;
92 void ElementMark::setSecurityId(sal_Int32 nSecurityId)
94 m_nSecurityId = nSecurityId;
97 com::sun::star::xml::crypto::sax::ElementMarkType ElementMark::getType() const
99 return m_type;
102 sal_Int32 ElementMark::getBufferId() const
104 return m_nBufferId;