LibreOffice Module sd (master) 1
PresenterPreviewCache.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#pragma once
21
22#include <com/sun/star/drawing/XSlidePreviewCache.hpp>
23#include <com/sun/star/lang/XInitialization.hpp>
24#include <com/sun/star/lang/XServiceInfo.hpp>
25#include <tools/gen.hxx>
27#include <memory>
28
30
31namespace sd::presenter {
32
34 css::lang::XInitialization,
35 css::lang::XServiceInfo,
36 css::drawing::XSlidePreviewCache
38
43{
44public:
46 virtual ~PresenterPreviewCache() override;
49
50 // XInitialize
51
55 virtual void SAL_CALL initialize (const css::uno::Sequence<css::uno::Any>& rArguments) override;
56
57 OUString SAL_CALL getImplementationName() override;
58 sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override;
59 css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override;
60
61 // XSlidePreviewCache
62
63 virtual void SAL_CALL setDocumentSlides (
64 const css::uno::Reference<css::container::XIndexAccess>& rxSlides,
65 const css::uno::Reference<css::uno::XInterface>& rxDocument) override;
66
67 virtual void SAL_CALL setVisibleRange (
68 sal_Int32 nFirstVisibleSlideIndex,
69 sal_Int32 nLastVisibleSlideIndex) override;
70
71 virtual void SAL_CALL setPreviewSize (
72 const css::geometry::IntegerSize2D& rSize) override;
73
74 virtual css::uno::Reference<css::rendering::XBitmap> SAL_CALL
76 sal_Int32 nSlideIndex,
77 const css::uno::Reference<css::rendering::XCanvas>& rxCanvas) override;
78
79 virtual void SAL_CALL addPreviewCreationNotifyListener (
80 const css::uno::Reference<css::drawing::XSlidePreviewCacheListener>& rxListener) override;
81
82 virtual void SAL_CALL removePreviewCreationNotifyListener (
83 const css::uno::Reference<css::drawing::XSlidePreviewCacheListener>& rxListener) override;
84
85 virtual void SAL_CALL pause() override;
86
87 virtual void SAL_CALL resume() override;
88
89private:
92 std::shared_ptr<PresenterCacheContext> mpCacheContext;
93 std::shared_ptr<sd::slidesorter::cache::PageCache> mpCache;
94
98 void ThrowIfDisposed();
99};
100
101} // end of namespace ::sd::presenter
102
103/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Uno API wrapper around the slide preview cache.
virtual void SAL_CALL setVisibleRange(sal_Int32 nFirstVisibleSlideIndex, sal_Int32 nLastVisibleSlideIndex) override
OUString SAL_CALL getImplementationName() override
virtual void SAL_CALL initialize(const css::uno::Sequence< css::uno::Any > &rArguments) override
Accepts no arguments.
std::shared_ptr< sd::slidesorter::cache::PageCache > mpCache
PresenterPreviewCache & operator=(const PresenterPreviewCache &)=delete
virtual void SAL_CALL setDocumentSlides(const css::uno::Reference< css::container::XIndexAccess > &rxSlides, const css::uno::Reference< css::uno::XInterface > &rxDocument) override
std::shared_ptr< PresenterCacheContext > mpCacheContext
PresenterPreviewCache(const PresenterPreviewCache &)=delete
virtual void SAL_CALL setPreviewSize(const css::geometry::IntegerSize2D &rSize) override
virtual void SAL_CALL pause() override
css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual css::uno::Reference< css::rendering::XBitmap > SAL_CALL getSlidePreview(sal_Int32 nSlideIndex, const css::uno::Reference< css::rendering::XCanvas > &rxCanvas) override
virtual void SAL_CALL addPreviewCreationNotifyListener(const css::uno::Reference< css::drawing::XSlidePreviewCacheListener > &rxListener) override
virtual void SAL_CALL resume() override
sal_Bool SAL_CALL supportsService(OUString const &ServiceName) override
virtual void SAL_CALL removePreviewCreationNotifyListener(const css::uno::Reference< css::drawing::XSlidePreviewCacheListener > &rxListener) override
The page cache is responsible for the creation and storage of preview bitmaps of pages that are shown...
comphelper::WeakComponentImplHelper< css::lang::XInitialization, css::lang::XServiceInfo, css::drawing::XSlidePreviewCache > PresenterPreviewCacheInterfaceBase
unsigned char sal_Bool