LibreOffice Module xmloff (master) 1
xmlevent.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#ifndef INCLUDED_XMLOFF_XMLEVENT_HXX
21#define INCLUDED_XMLOFF_XMLEVENT_HXX
22
23#include <rtl/ustring.hxx>
24
25namespace com::sun::star::uno { template <class interface_type> class Reference; }
26namespace com::sun::star::uno { template <typename > class Sequence; }
27
28
35namespace com::sun::star {
36 namespace xml::sax { class XFastAttributeList; }
37 namespace beans { struct PropertyValue; }
38}
39
40class SvXMLExport;
42class SvXMLImport;
44
45
47{
48 sal_uInt16 m_nPrefix;
49 OUString m_aName;
50
52 XMLEventName( sal_uInt16 n, const char *p ) :
53 m_nPrefix( n ),
54 m_aName( OUString::createFromAscii(p) )
55 {}
56
57 XMLEventName( sal_uInt16 n, const OUString& r ) :
58 m_nPrefix( n ),
59 m_aName( r )
60 {}
61
62 bool operator<( const XMLEventName& r ) const
63 {
64 return m_nPrefix < r.m_nPrefix ||
65 (m_nPrefix == r.m_nPrefix && m_aName < r.m_aName );
66 }
67
68};
69
76{
77 const char* sAPIName;
78 sal_uInt16 nPrefix; // namespace prefix
79 const char* sXMLName;
80};
81
85
86
94{
95public:
97
98 virtual void Export(
99 SvXMLExport& rExport,
100 const OUString& rEventQName,
101 const css::uno::Sequence<css::beans::PropertyValue> & rValues,
102 bool bUseWhitespace) = 0;
103};
104
105
125{
126public:
128
130 SvXMLImport& rImport,
131 const css::uno::Reference<css::xml::sax::XFastAttributeList> & xAttrList,
133 XMLEventsImportContext* rEvents,
135 const OUString& rApiEventName) = 0;
136};
137
138
139#endif
140
141/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
This class deliberately does not support XWeak, to improve performance when loading large documents.
Definition: xmlictxt.hxx:48
Handle import of an event for a certain event type (as defined by the PropertyValue "EventType" in th...
Definition: xmlevent.hxx:125
virtual SvXMLImportContext * CreateContext(SvXMLImport &rImport, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList, XMLEventsImportContext *rEvents, const OUString &rApiEventName)=0
virtual ~XMLEventContextFactory()
Definition: xmlevent.hxx:127
Handle export of an event for a certain event type (event type as defined by the PropertyValue "Event...
Definition: xmlevent.hxx:94
virtual void Export(SvXMLExport &rExport, const OUString &rEventQName, const css::uno::Sequence< css::beans::PropertyValue > &rValues, bool bUseWhitespace)=0
virtual ~XMLEventExportHandler()
Definition: xmlevent.hxx:96
Import <script:events> element.
void * p
sal_Int64 n
Reference
XMLEventNameTranslation: define tables that translate between event names as used in the XML file for...
Definition: xmlevent.hxx:76
const char * sXMLName
Definition: xmlevent.hxx:79
const char * sAPIName
Definition: xmlevent.hxx:77
sal_uInt16 m_nPrefix
Definition: xmlevent.hxx:48
XMLEventName(sal_uInt16 n, const char *p)
Definition: xmlevent.hxx:52
bool operator<(const XMLEventName &r) const
Definition: xmlevent.hxx:62
XMLEventName(sal_uInt16 n, const OUString &r)
Definition: xmlevent.hxx:57
OUString m_aName
Definition: xmlevent.hxx:49
const XMLEventNameTranslation aStandardEventTable[]
a translation table for the events defined in the XEventsSupplier service (implemented in XMLEventExp...