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 SD_DOCUMENT_RENDERER_HXX
25 #define SD_DOCUMENT_RENDERER_HXX
26 
27 #include "ViewShellBase.hxx"
28 
29 #include <com/sun/star/view/XRenderable.hpp>
30 #include <cppuhelper/compbase1.hxx>
31 #include <cppuhelper/basemutex.hxx>
32 #include <boost/scoped_ptr.hpp>
33 
34 namespace css = ::com::sun::star;
35 
36 namespace sd {
37 
38 namespace {
39     typedef ::cppu::WeakComponentImplHelper1 <
40         ::com::sun::star::view::XRenderable
41         > DocumentRendererInterfaceBase;
42 }
43 
44 
45 class DocumentRenderer
46     : protected ::cppu::BaseMutex,
47       public DocumentRendererInterfaceBase
48 {
49 public:
50     DocumentRenderer (ViewShellBase& rBase);
51     virtual ~DocumentRenderer (void);
52 
53     // XRenderable
54     virtual sal_Int32 SAL_CALL getRendererCount (
55         const css::uno::Any& aSelection,
56         const css::uno::Sequence<css::beans::PropertyValue >& xOptions)
57         throw (css::lang::IllegalArgumentException, css::uno::RuntimeException);
58 
59     virtual css::uno::Sequence<css::beans::PropertyValue> SAL_CALL getRenderer (
60         sal_Int32 nRenderer,
61         const css::uno::Any& rSelection,
62         const css::uno::Sequence<css::beans::PropertyValue>& rxOptions)
63         throw (css::lang::IllegalArgumentException, css::uno::RuntimeException);
64 
65     virtual void SAL_CALL render (
66         sal_Int32 nRenderer,
67         const css::uno::Any& rSelection,
68         const css::uno::Sequence<css::beans::PropertyValue>& rxOptions)
69         throw (css::lang::IllegalArgumentException, css::uno::RuntimeException);
70 
71 private:
72     class Implementation;
73     ::boost::scoped_ptr<Implementation> mpImpl;
74 };
75 
76 } // end of namespace sd
77 
78 #endif
79