bump product version to 4.1.6.2
[LibreOffice.git] / xmloff / source / forms / eventimport.hxx
blobaf7df463bade684e9946f7b5235aae78d4024337
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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>
28 class SvXMLImport;
29 //.........................................................................
30 namespace xmloff
32 //.........................................................................
34 //=====================================================================
35 //= OFormEventsImportContext
36 //=====================================================================
37 class OFormEventsImportContext : public XMLEventsImportContext
39 protected:
40 IEventAttacher& m_rEventAttacher;
42 public:
43 OFormEventsImportContext(SvXMLImport& _rImport, sal_uInt16 _nPrefix, const OUString& _rLocalName,
44 IEventAttacher& _rEventAttacher);
46 protected:
47 virtual void EndElement();
50 //=====================================================================
51 //= ODefaultEventAttacherManager
52 //=====================================================================
53 class ODefaultEventAttacherManager : public IEventAttacherManager
55 protected:
56 DECLARE_STL_MAP(
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;
67 public:
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
74 protected:
75 void setEvents(
76 const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >& _rxContainer
79 virtual ~ODefaultEventAttacherManager();
82 //.........................................................................
83 } // namespace xmloff
84 //.........................................................................
86 #endif // _XMLOFF_FORMS_EVENTIMPORT_HXX_
88 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */