1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef OOX_OLE_AXCONTROLFRAGMENT_HXX 25 #define OOX_OLE_AXCONTROLFRAGMENT_HXX 26 27 #include "oox/core/fragmenthandler2.hxx" 28 29 namespace oox { 30 namespace ole { 31 32 class ControlModelBase; 33 class EmbeddedControl; 34 35 // ============================================================================ 36 37 /** Context handler for ActiveX form control model properties. */ 38 class AxControlPropertyContext : public ::oox::core::ContextHandler2 39 { 40 public: 41 explicit AxControlPropertyContext( 42 ::oox::core::FragmentHandler2& rFragment, 43 ControlModelBase& rModel ); 44 45 virtual ::oox::core::ContextHandlerRef 46 onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ); 47 48 private: 49 ControlModelBase& mrModel; 50 sal_Int32 mnPropId; /// Identifier of currently processed property. 51 }; 52 53 // ============================================================================ 54 55 /** Fragment handler for an embedded ActiveX form control fragment. */ 56 class AxControlFragment : public ::oox::core::FragmentHandler2 57 { 58 public: 59 explicit AxControlFragment( 60 ::oox::core::XmlFilterBase& rFilter, 61 const ::rtl::OUString& rFragmentPath, 62 EmbeddedControl& rControl ); 63 64 virtual ::oox::core::ContextHandlerRef 65 onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ); 66 67 private: 68 EmbeddedControl& mrControl; 69 }; 70 71 // ============================================================================ 72 73 } // namespace ole 74 } // namespace oox 75 76 #endif 77