calc: on editing invalidation of view with different zoom is wrong
[LibreOffice.git] / xmlsecurity / source / helper / xsecparser.hxx
blob6279d65439e19c8bfc7775830fd99ef899aec1c2
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #pragma once
22 #include <com/sun/star/lang/XInitialization.hpp>
23 #include <com/sun/star/xml/sax/XDocumentHandler.hpp>
25 #include <cppuhelper/implbase.hxx>
27 #include <xmloff/namespacemap.hxx>
29 #include <memory>
30 #include <optional>
31 #include <stack>
33 class XMLSignatureHelper;
34 class XSecController;
36 class XSecParser: public cppu::WeakImplHelper
38 css::xml::sax::XDocumentHandler,
39 css::lang::XInitialization
41 /****** XSecController.hxx/CLASS XSecParser ***********************************
43 * NAME
44 * XSecParser -- a SAX parser that can detect security elements
46 * FUNCTION
47 * The XSecParser object is connected on the SAX chain and detects
48 * security elements in the SAX event stream, then notifies
49 * the XSecController.
51 * NOTES
52 * This class is used when importing a document.
53 ******************************************************************************/
55 friend class XSecController;
56 public:
57 class Context;
58 private:
59 class UnknownContext;
60 class ReferencedContextImpl;
61 class LoPGPOwnerContext;
62 class DsPGPKeyPacketContext;
63 class DsPGPKeyIDContext;
64 class DsPGPDataContext;
65 class DsX509CertificateContext;
66 class DsX509SerialNumberContext;
67 class DsX509IssuerNameContext;
68 class DsX509IssuerSerialContext;
69 class DsX509DataContext;
70 class DsKeyInfoContext;
71 class DsSignatureValueContext;
72 class DsDigestValueContext;
73 class DsDigestMethodContext;
74 class DsTransformContext;
75 class DsTransformsContext;
76 class DsReferenceContext;
77 class DsSignatureMethodContext;
78 class DsSignedInfoContext;
79 class XadesEncapsulatedX509CertificateContext;
80 class XadesCertificateValuesContext;
81 class XadesUnsignedSignaturePropertiesContext;
82 class XadesUnsignedPropertiesContext;
83 class LoSignatureLineIdContext;
84 class LoSignatureLineValidImageContext;
85 class LoSignatureLineInvalidImageContext;
86 class LoSignatureLineContext;
87 class XadesCertDigestContext;
88 class XadesCertContext;
89 class XadesSigningCertificateContext;
90 class XadesSigningTimeContext;
91 class XadesSignedSignaturePropertiesContext;
92 class XadesSignedPropertiesContext;
93 class XadesQualifyingPropertiesContext;
94 class DcDateContext;
95 class DcDescriptionContext;
96 class DsSignaturePropertyContext;
97 class DsSignaturePropertiesContext;
98 class DsObjectContext;
99 class DsSignatureContext;
100 class DsigSignaturesContext;
102 std::stack<std::unique_ptr<Context>> m_ContextStack;
103 std::optional<SvXMLNamespaceMap> m_pNamespaceMap;
106 * the XSecController collaborating with XSecParser
108 XSecController* m_pXSecController;
111 * the next XDocumentHandler on the SAX chain
113 css::uno::Reference<
114 css::xml::sax::XDocumentHandler > m_xNextHandler;
116 XMLSignatureHelper& m_rXMLSignatureHelper;
118 OUString HandleIdAttr(css::uno::Reference<css::xml::sax::XAttributeList> const& xAttrs);
119 static OUString getIdAttr(const css::uno::Reference<
120 css::xml::sax::XAttributeList >& xAttribs );
122 public:
123 XSecParser(XMLSignatureHelper& rXMLSignatureHelper, XSecController* pXSecController);
126 * XDocumentHandler
128 virtual void SAL_CALL startDocument( ) override;
130 virtual void SAL_CALL endDocument( ) override;
132 virtual void SAL_CALL startElement(
133 const OUString& aName,
134 const css::uno::Reference<
135 css::xml::sax::XAttributeList >& xAttribs ) override;
137 virtual void SAL_CALL endElement( const OUString& aName ) override;
139 virtual void SAL_CALL characters( const OUString& aChars ) override;
141 virtual void SAL_CALL ignorableWhitespace( const OUString& aWhitespaces ) override;
143 virtual void SAL_CALL processingInstruction(
144 const OUString& aTarget,
145 const OUString& aData ) override;
147 virtual void SAL_CALL setDocumentLocator(
148 const css::uno::Reference<
149 css::xml::sax::XLocator >& xLocator ) override;
152 * XInitialization
154 virtual void SAL_CALL initialize(
155 const css::uno::Sequence< css::uno::Any >& aArguments ) override;
159 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */