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 
25 namespace com::sun::star::uno { template <class interface_type> class Reference; }
26 namespace com::sun::star::uno { template <typename > class Sequence; }
27 
28 
35 namespace com::sun::star {
36  namespace xml::sax { class XFastAttributeList; }
37  namespace beans { struct PropertyValue; }
38 }
39 
40 class SvXMLExport;
41 class SvXMLImportContext;
42 class SvXMLImport;
44 
45 
47 {
48  sal_uInt16 m_nPrefix;
49  OUString m_aName;
50 
51  XMLEventName() : m_nPrefix( 0 ) {}
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 {
95 public:
96  virtual ~XMLEventExportHandler() {};
97 
98  virtual void Export(
100  const OUString& rEventQName,
101  const css::uno::Sequence<css::beans::PropertyValue> & rValues,
102  bool bUseWhitespace) = 0;
103 };
104 
105 
125 {
126 public:
128 
130  SvXMLImport& rImport,
131  const css::uno::Reference<css::xml::sax::XFastAttributeList> & xAttrList,
132  XMLEventsImportContext* rEvents,
135  const OUString& rApiEventName) = 0;
136 };
137 
138 
139 #endif
140 
141 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const XMLEventNameTranslation aStandardEventTable[]
a translation table for the events defined in the XEventsSupplier service (implemented in XMLEventExp...
Handle import of an event for a certain event type (as defined by the PropertyValue "EventType" in th...
Definition: xmlevent.hxx:124
bool operator<(const XMLEventName &r) const
Definition: xmlevent.hxx:62
const char * sXMLName
Definition: xmlevent.hxx:79
OUString m_aName
Definition: xmlevent.hxx:49
Reference
virtual ~XMLEventExportHandler()
Definition: xmlevent.hxx:96
XMLEventName(sal_uInt16 n, const OUString &r)
Definition: xmlevent.hxx:57
virtual void Export(SvXMLExport &rExport, const OUString &rEventQName, const css::uno::Sequence< css::beans::PropertyValue > &rValues, bool bUseWhitespace)=0
sal_uInt16 m_nPrefix
Definition: xmlevent.hxx:48
This class deliberately does not support XWeak, to improve performance when loading large documents...
Definition: xmlictxt.hxx:45
XMLEventName(sal_uInt16 n, const char *p)
Definition: xmlevent.hxx:52
exports com.sun.star. beans
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:93
css::uno::Any const SvXMLExport & rExport
Definition: ImageStyle.hxx:38
XMLEventNameTranslation: define tables that translate between event names as used in the XML file for...
Definition: xmlevent.hxx:75
const char * sAPIName
Definition: xmlevent.hxx:77