1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
22 #include <xmloff/xmlexp.hxx>
25 namespace 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
; }
38 * Component for the export of events attached to autotext blocks.
39 * Via the XInitialization interface it expects up to two strings, the
40 * first giving the file name (URL) of the autotext group, and the second
41 * identifying the autotext. If one of the strings is not given, it
42 * will export the whole group / all groups.
44 class XMLAutoTextEventExport
: public SvXMLExport
46 css::uno::Reference
<css::container::XNameAccess
> xEvents
;
50 XMLAutoTextEventExport(
51 const css::uno::Reference
< css::uno::XComponentContext
>& xContext
, OUString
const & implementationName
, SvXMLExportFlags nFlags
54 virtual ~XMLAutoTextEventExport() override
;
57 virtual void SAL_CALL
initialize(
58 const css::uno::Sequence
<css::uno::Any
> & rArguments
) override
;
62 /// export the events off all autotexts
63 virtual ErrCode
exportDoc(
64 enum ::xmloff::token::XMLTokenEnum eClass
= xmloff::token::XML_TOKEN_INVALID
) override
;
66 /// does the document have any events ?
67 bool hasEvents() const;
69 /// export the events element
73 /// add the namespaces used by events
74 /// (to be called for the document element)
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
;
88 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */