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_PRESENTER_TEXT_VIEW_HXX
25 #define SD_PRESENTER_TEXT_VIEW_HXX
26 
27 #include "tools/PropertySet.hxx"
28 #include <com/sun/star/beans/XPropertySet.hpp>
29 #include <com/sun/star/lang/XInitialization.hpp>
30 #include <cppuhelper/basemutex.hxx>
31 #include <cppuhelper/implbase1.hxx>
32 #include <boost/noncopyable.hpp>
33 #include <boost/scoped_ptr.hpp>
34 
35 namespace css = ::com::sun::star;
36 
37 namespace sd { namespace presenter {
38 
39 namespace {
40     typedef ::cppu::ImplInheritanceHelper1 <
41         tools::PropertySet,
42         css::lang::XInitialization
43     > PresenterTextViewInterfaceBase;
44 }
45 
46 
47 /** Render text into bitmaps.  An edit engine is used to render the text.
48     This service is used by the presenter screen to render the notes view.
49 */
50 class PresenterTextView
51     : private ::boost::noncopyable,
52       public PresenterTextViewInterfaceBase
53 {
54 public:
55     explicit PresenterTextView (const css::uno::Reference<css::uno::XComponentContext>& rxContext);
56     virtual ~PresenterTextView (void);
57 
58     // XInitialization
59 
60     virtual void SAL_CALL initialize (const css::uno::Sequence<css::uno::Any>& rArguments)
61         throw (css::uno::Exception, css::uno::RuntimeException);
62 
63 
64 protected:
65     virtual void SAL_CALL disposing (void);
66 
67     virtual css::uno::Any GetPropertyValue (
68         const ::rtl::OUString& rsPropertyName);
69     virtual css::uno::Any SetPropertyValue (
70         const ::rtl::OUString& rsPropertyName,
71         const css::uno::Any& rValue);
72 
73 private:
74     class Implementation;
75     ::boost::scoped_ptr<Implementation> mpImplementation;
76 
77     /** This method throws a DisposedException when the object has already been
78         disposed.
79     */
80     void ThrowIfDisposed (void) throw (css::lang::DisposedException);
81 };
82 
83 } } // end of namespace ::sd::presenter
84 
85 #endif
86