1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef SD_PRESENTER_TEXT_VIEW_HXX 29 #define SD_PRESENTER_TEXT_VIEW_HXX 30 31 #include "tools/PropertySet.hxx" 32 #include <com/sun/star/beans/XPropertySet.hpp> 33 #include <com/sun/star/lang/XInitialization.hpp> 34 #include <cppuhelper/basemutex.hxx> 35 #include <cppuhelper/implbase1.hxx> 36 #include <boost/noncopyable.hpp> 37 #include <boost/scoped_ptr.hpp> 38 39 namespace css = ::com::sun::star; 40 41 namespace sd { namespace presenter { 42 43 namespace { 44 typedef ::cppu::ImplInheritanceHelper1 < 45 tools::PropertySet, 46 css::lang::XInitialization 47 > PresenterTextViewInterfaceBase; 48 } 49 50 51 /** Render text into bitmaps. An edit engine is used to render the text. 52 This service is used by the presenter screen to render the notes view. 53 */ 54 class PresenterTextView 55 : private ::boost::noncopyable, 56 public PresenterTextViewInterfaceBase 57 { 58 public: 59 explicit PresenterTextView (const css::uno::Reference<css::uno::XComponentContext>& rxContext); 60 virtual ~PresenterTextView (void); 61 62 // XInitialization 63 64 virtual void SAL_CALL initialize (const css::uno::Sequence<css::uno::Any>& rArguments) 65 throw (css::uno::Exception, css::uno::RuntimeException); 66 67 68 protected: 69 virtual void SAL_CALL disposing (void); 70 71 virtual css::uno::Any GetPropertyValue ( 72 const ::rtl::OUString& rsPropertyName); 73 virtual css::uno::Any SetPropertyValue ( 74 const ::rtl::OUString& rsPropertyName, 75 const css::uno::Any& rValue); 76 77 private: 78 class Implementation; 79 ::boost::scoped_ptr<Implementation> mpImplementation; 80 81 /** This method throws a DisposedException when the object has already been 82 disposed. 83 */ 84 void ThrowIfDisposed (void) throw (css::lang::DisposedException); 85 }; 86 87 } } // end of namespace ::sd::presenter 88 89 #endif 90