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_FORMS_EVENTIMPORT_HXX_
21 #define _XMLOFF_FORMS_EVENTIMPORT_HXX_
23 #include <xmloff/XMLEventsImportContext.hxx>
24 #include "callbacks.hxx"
25 #include "ifacecompare.hxx"
26 #include <com/sun/star/container/XIndexAccess.hpp>
29 //.........................................................................
32 //.........................................................................
34 //=====================================================================
35 //= OFormEventsImportContext
36 //=====================================================================
37 class OFormEventsImportContext
: public XMLEventsImportContext
40 IEventAttacher
& m_rEventAttacher
;
43 OFormEventsImportContext(SvXMLImport
& _rImport
, sal_uInt16 _nPrefix
, const OUString
& _rLocalName
,
44 IEventAttacher
& _rEventAttacher
);
47 virtual void EndElement();
50 //=====================================================================
51 //= ODefaultEventAttacherManager
52 //=====================================================================
53 class ODefaultEventAttacherManager
: public IEventAttacherManager
57 ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySet
>, // map from
58 ::com::sun::star::uno::Sequence
< ::com::sun::star::script::ScriptEventDescriptor
>, // map to
59 OPropertySetCompare
, // compare method
60 MapPropertySet2ScriptSequence
); // class name
61 // usually an event attacher manager will need to collect all script events registered, 'cause
62 // the _real_ XEventAttacherManager handles it's events by index, but out indicies are not fixed
63 // until _all_ controls have been inserted.
65 MapPropertySet2ScriptSequence m_aEvents
;
68 // IEventAttacherManager
69 virtual void registerEvents(
70 const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySet
>& _rxElement
,
71 const ::com::sun::star::uno::Sequence
< ::com::sun::star::script::ScriptEventDescriptor
>& _rEvents
76 const ::com::sun::star::uno::Reference
< ::com::sun::star::container::XIndexAccess
>& _rxContainer
79 virtual ~ODefaultEventAttacherManager();
82 //.........................................................................
84 //.........................................................................
86 #endif // _XMLOFF_FORMS_EVENTIMPORT_HXX_
88 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */