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 _XMLOFF_XMLAUTOTEXTEVENTEXPORT_HXX
21 #define _XMLOFF_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
;
52 const OUString sEventType
;
58 XMLAutoTextEventExport(
59 const ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XComponentContext
>& xContext
, sal_uInt16 nFlags
62 ~XMLAutoTextEventExport();
65 virtual void SAL_CALL
initialize(
66 const ::com::sun::star::uno::Sequence
<
67 ::com::sun::star::uno::Any
> & rArguments
)
69 ::com::sun::star::uno::Exception
,
70 ::com::sun::star::uno::RuntimeException
);
74 /// export the events off all autotexts
75 virtual sal_uInt32
exportDoc(
76 enum ::xmloff::token::XMLTokenEnum eClass
= xmloff::token::XML_TOKEN_INVALID
);
78 /// does the document have any events ?
81 /// export the events element
85 /// add the namespaces used by events
86 /// (to be called for the document element)
90 // methods without content:
91 virtual void _ExportMeta();
92 virtual void _ExportScripts();
93 virtual void _ExportFontDecls();
94 virtual void _ExportStyles( sal_Bool bUsed
) ;
95 virtual void _ExportAutoStyles();
96 virtual void _ExportMasterStyles();
97 virtual void _ExportContent();
102 // global functions to support the component
104 ::com::sun::star::uno::Sequence
< OUString
> SAL_CALL
105 XMLAutoTextEventExport_getSupportedServiceNames()
108 OUString SAL_CALL
XMLAutoTextEventExport_getImplementationName()
111 ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XInterface
> SAL_CALL
112 XMLAutoTextEventExportOOO_createInstance(
113 const ::com::sun::star::uno::Reference
<
114 ::com::sun::star::lang::XMultiServiceFactory
> & )
115 throw( ::com::sun::star::uno::Exception
);
117 ::com::sun::star::uno::Sequence
< OUString
> SAL_CALL
118 XMLAutoTextEventExportOOO_getSupportedServiceNames()
121 OUString SAL_CALL
XMLAutoTextEventExportOOO_getImplementationName()
124 ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XInterface
> SAL_CALL
125 XMLAutoTextEventExportOOO_createInstance(
126 const ::com::sun::star::uno::Reference
<
127 ::com::sun::star::lang::XMultiServiceFactory
> & )
128 throw( ::com::sun::star::uno::Exception
);
132 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */