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_SHAPE_SHAPEFILTERBASE_HXX
25 #define OOX_SHAPE_SHAPEFILTERBASE_HXX
26 
27 #include <boost/shared_ptr.hpp>
28 #include <rtl/ref.hxx>
29 #include "oox/vml/vmldrawing.hxx"
30 #include "oox/drawingml/table/tablestylelist.hxx"
31 #include "oox/core/xmlfilterbase.hxx"
32 
33 namespace oox {
34 namespace shape {
35 
36 // ============================================================================
37 
38 class ShapeFilterBase : public core::XmlFilterBase
39 {
40 public:
41     typedef boost::shared_ptr<ShapeFilterBase> Pointer_t;
42 
43     explicit            ShapeFilterBase(
44                             const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext )
45                             throw( ::com::sun::star::uno::RuntimeException );
46 
47     virtual             ~ShapeFilterBase();
48 
49     /** Has to be implemented by each filter, returns the current theme. */
50     virtual const ::oox::drawingml::Theme* getCurrentTheme() const;
51 
52     /** Has to be implemented by each filter to return the collection of VML shapes. */
53     virtual ::oox::vml::Drawing* getVmlDrawing();
54 
55     /** Has to be implemented by each filter to return TableStyles. */
56 	virtual const ::oox::drawingml::table::TableStyleListPtr getTableStyles();
57 
58     virtual ::oox::drawingml::chart::ChartConverter& getChartConverter();
59 
importDocument()60     virtual bool importDocument() { return true; }
exportDocument()61     virtual bool exportDocument() { return true; }
62 
63 private:
64     virtual ::oox::ole::VbaProject* implCreateVbaProject() const;
65     virtual rtl::OUString implGetImplementationName() const;
66 
67     ::boost::shared_ptr< ::oox::drawingml::chart::ChartConverter > mxChartConv;
68 };
69 
70 // ============================================================================
71 
72 } // namespace shape
73 } // namespace oox
74 
75 #endif
76 
77