LibreOffice Module xmloff (master)  1
XMLAutoTextEventExport.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_SOURCE_TEXT_XMLAUTOTEXTEVENTEXPORT_HXX
21 #define INCLUDED_XMLOFF_SOURCE_TEXT_XMLAUTOTEXTEVENTEXPORT_HXX
22 
23 #include <xmloff/xmlexp.hxx>
24 
25 
26 namespace com::sun::star {
27  namespace container { class XNameAccess; }
28  namespace frame { class XModel; }
29  namespace lang { class XMultiServiceFactory; }
30  namespace uno { template<class X> class Reference; }
31  namespace uno { template<class X> class Sequence; }
32  namespace uno { class XInterface; }
33  namespace uno { class Exception; }
34  namespace xml::sax { class XDocumentHandler; }
35 }
36 
37 
46 {
47  css::uno::Reference<css::container::XNameAccess> xEvents;
48 
49 public:
50 
52  const css::uno::Reference< css::uno::XComponentContext >& xContext, OUString const & implementationName, SvXMLExportFlags nFlags
53  );
54 
55  virtual ~XMLAutoTextEventExport() override;
56 
57  // XInitialization
58  virtual void SAL_CALL initialize(
59  const css::uno::Sequence<css::uno::Any> & rArguments ) override;
60 
61 private:
62 
64  virtual ErrCode exportDoc(
66 
68  bool hasEvents() const;
69 
71  void exportEvents();
72 
73 
76  void addNamespaces();
77 
78 
79  // methods without content:
80  virtual void ExportMeta_() override;
81  virtual void ExportScripts_() override;
82  virtual void ExportFontDecls_() override;
83  virtual void ExportStyles_( bool bUsed ) override ;
84  virtual void ExportAutoStyles_() override;
85  virtual void ExportMasterStyles_() override;
86  virtual void ExportContent_() override;
87 };
88 
89 #endif
90 
91 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void ExportContent_() override
Override this method to export the content of .
virtual void ExportMeta_() override
Override this method to export the content of .
SvXMLExportFlags
Definition: xmlexp.hxx:89
Reference
XMLAutoTextEventExport(const css::uno::Reference< css::uno::XComponentContext > &xContext, OUString const &implementationName, SvXMLExportFlags nFlags)
Component for the export of events attached to autotext blocks.
virtual ErrCode exportDoc(enum::xmloff::token::XMLTokenEnum eClass=xmloff::token::XML_TOKEN_INVALID) override
export the events off all autotexts
exports com.sun.star. container
exports com.sun.star. frame
XMLTokenEnum
The enumeration of all XML tokens.
Definition: xmltoken.hxx:49
virtual void ExportMasterStyles_() override
Override this method to export the contents of .
void exportEvents()
export the events element
virtual ~XMLAutoTextEventExport() override
virtual void ExportFontDecls_() override
Override this method to export the font declarations The default implementation will export the conte...
exports com.sun.star. lang
virtual void SAL_CALL initialize(const css::uno::Sequence< css::uno::Any > &rArguments) override
bool hasEvents() const
does the document have any events ?
css::uno::Reference< css::container::XNameAccess > xEvents
virtual void ExportAutoStyles_() override
Override this method to export the contents of .
virtual void ExportStyles_(bool bUsed) override
Override this method to export the content of .
virtual void ExportScripts_() override
Override this method to export the content of .
void addNamespaces()
add the namespaces used by events (to be called for the document element)