1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_SD_SOURCE_UI_PRESENTER_SLIDERENDERER_HXX
21 #define INCLUDED_SD_SOURCE_UI_PRESENTER_SLIDERENDERER_HXX
23 #include <PreviewRenderer.hxx>
24 #include <com/sun/star/drawing/XSlideRenderer.hpp>
25 #include <com/sun/star/lang/XInitialization.hpp>
26 #include <com/sun/star/lang/XServiceInfo.hpp>
28 #include <cppuhelper/basemutex.hxx>
29 #include <cppuhelper/compbase.hxx>
31 namespace com
{ namespace sun
{ namespace star
{ namespace drawing
{ class XDrawPage
; } } } }
33 namespace sd
{ namespace presenter
{
35 typedef ::cppu::WeakComponentImplHelper
<
36 css::drawing::XSlideRenderer
,
37 css::lang::XInitialization
,
38 css::lang::XServiceInfo
39 > SlideRendererInterfaceBase
;
41 /** Render single slides into bitmaps.
44 : protected ::cppu::BaseMutex
,
45 public SlideRendererInterfaceBase
49 virtual ~SlideRenderer() override
;
50 SlideRenderer(const SlideRenderer
&) = delete;
51 SlideRenderer
& operator=(const SlideRenderer
&) = delete;
52 virtual void SAL_CALL
disposing() override
;
56 virtual void SAL_CALL
initialize (const css::uno::Sequence
<css::uno::Any
>& rArguments
) override
;
58 OUString SAL_CALL
getImplementationName() override
;
60 sal_Bool SAL_CALL
supportsService(OUString
const & ServiceName
) override
;
62 css::uno::Sequence
<OUString
> SAL_CALL
getSupportedServiceNames() override
;
66 virtual css::uno::Reference
<css::awt::XBitmap
> SAL_CALL
createPreview (
67 const css::uno::Reference
<css::drawing::XDrawPage
>& rxSlide
,
68 const css::awt::Size
& rMaximumPreviewPixelSize
,
69 sal_Int16 nSuperSampleFactor
) override
;
71 virtual css::uno::Reference
<css::rendering::XBitmap
> SAL_CALL
createPreviewForCanvas (
72 const css::uno::Reference
<css::drawing::XDrawPage
>& rxSlide
,
73 const css::awt::Size
& rMaximumPreviewPixelSize
,
74 sal_Int16 nSuperSampleFactor
,
75 const css::uno::Reference
<css::rendering::XCanvas
>& rxCanvas
) override
;
77 virtual css::awt::Size SAL_CALL
calculatePreviewSize (
78 double nSlideAspectRatio
,
79 const css::awt::Size
& rMaximumPreviewPixelSize
) override
;
82 PreviewRenderer maPreviewRenderer
;
84 /// @throws css::uno::RuntimeException
85 BitmapEx
CreatePreview (
86 const css::uno::Reference
<css::drawing::XDrawPage
>& rxSlide
,
87 const css::awt::Size
& rMaximumPreviewPixelSize
,
88 sal_Int16 nSuperSampleFactor
);
90 /** @throws css::lang::DisposedException when the object has already been
93 void ThrowIfDisposed();
96 } } // end of namespace ::sd::presenter
100 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */