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 .
20 #ifndef INCLUDED_XMLOFF_SOURCE_TEXT_XMLAUTOTEXTEVENTEXPORT_HXX
21 #define INCLUDED_XMLOFF_SOURCE_TEXT_XMLAUTOTEXTEVENTEXPORT_HXX
23 #include <xmloff/xmlexp.hxx>
28 namespace com
{ namespace sun
{ namespace star
{
29 namespace container
{ class XNameAccess
; }
30 namespace frame
{ class XModel
; }
31 namespace lang
{ class XMultiServiceFactory
; }
32 namespace uno
{ template<class X
> class Reference
; }
33 namespace uno
{ template<class X
> class Sequence
; }
34 namespace uno
{ class XInterface
; }
35 namespace uno
{ class Exception
; }
36 namespace xml
{ namespace sax
{ class XDocumentHandler
; } }
41 * Component for the export of events attached to autotext blocks.
42 * Via the XInitialization interface it expects up to two strings, the
43 * first giving the file name (URL) of the autotext group, and the second
44 * identifying the autotext. If one of the strings is not given, it
45 * will export the whole group / all groups.
47 class XMLAutoTextEventExport
: public SvXMLExport
49 ::com::sun::star::uno::Reference
<
50 ::com::sun::star::container::XNameAccess
> xEvents
;
54 XMLAutoTextEventExport(
55 const ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XComponentContext
>& xContext
, OUString
const & implementationName
, SvXMLExportFlags nFlags
58 virtual ~XMLAutoTextEventExport();
61 virtual void SAL_CALL
initialize(
62 const ::com::sun::star::uno::Sequence
<
63 ::com::sun::star::uno::Any
> & rArguments
)
65 ::com::sun::star::uno::Exception
,
66 ::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
70 /// export the events off all autotexts
71 virtual sal_uInt32
exportDoc(
72 enum ::xmloff::token::XMLTokenEnum eClass
= xmloff::token::XML_TOKEN_INVALID
) SAL_OVERRIDE
;
74 /// does the document have any events ?
77 /// export the events element
81 /// add the namespaces used by events
82 /// (to be called for the document element)
86 // methods without content:
87 virtual void _ExportMeta() SAL_OVERRIDE
;
88 virtual void _ExportScripts() SAL_OVERRIDE
;
89 virtual void _ExportFontDecls() SAL_OVERRIDE
;
90 virtual void _ExportStyles( bool bUsed
) SAL_OVERRIDE
;
91 virtual void _ExportAutoStyles() SAL_OVERRIDE
;
92 virtual void _ExportMasterStyles() SAL_OVERRIDE
;
93 virtual void _ExportContent() SAL_OVERRIDE
;
98 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */