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