bump product version to 6.3.0.0.beta1
[LibreOffice.git] / sd / source / ui / slidesorter / cache / SlsPageCache.cxx
blobd91d810799ad736d0234cae97026bb20f8a0bcca
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 #include <tools/gen.hxx>
21 #include "SlsGenericPageCache.hxx"
22 #include "SlsRequestFactory.hxx"
23 #include <cache/SlsPageCache.hxx>
24 #include <model/SlideSorterModel.hxx>
26 using namespace ::com::sun::star;
28 namespace sd { namespace slidesorter { namespace cache {
30 //===== PageCache =============================================================
32 PageCache::PageCache (
33 const Size& rPreviewSize,
34 const bool bDoSuperSampling,
35 const SharedCacheContext& rpCacheContext)
36 : mpImplementation(
37 new GenericPageCache(
38 rPreviewSize,
39 bDoSuperSampling,
40 rpCacheContext))
44 PageCache::~PageCache()
48 void PageCache::ChangeSize (
49 const Size& rPreviewSize,
50 const bool bDoSuperSampling)
52 mpImplementation->ChangePreviewSize(rPreviewSize, bDoSuperSampling);
55 BitmapEx PageCache::GetPreviewBitmap (
56 const CacheKey aKey,
57 const bool bResize)
59 return mpImplementation->GetPreviewBitmap(aKey, bResize);
62 BitmapEx PageCache::GetMarkedPreviewBitmap (
63 const CacheKey aKey)
65 return mpImplementation->GetMarkedPreviewBitmap(aKey);
68 void PageCache::SetMarkedPreviewBitmap (
69 const CacheKey aKey,
70 const BitmapEx& rMarkedBitmap)
72 mpImplementation->SetMarkedPreviewBitmap(aKey, rMarkedBitmap);
75 void PageCache::RequestPreviewBitmap (const CacheKey aKey)
77 return mpImplementation->RequestPreviewBitmap(aKey, true);
80 void PageCache::InvalidatePreviewBitmap (
81 const CacheKey aKey)
83 if (mpImplementation->InvalidatePreviewBitmap(aKey))
84 RequestPreviewBitmap(aKey);
87 void PageCache::InvalidateCache()
89 mpImplementation->InvalidateCache();
92 void PageCache::SetPreciousFlag (
93 const CacheKey aKey,
94 const bool bIsPrecious)
96 mpImplementation->SetPreciousFlag(aKey, bIsPrecious);
99 void PageCache::Pause()
101 mpImplementation->Pause();
104 void PageCache::Resume()
106 mpImplementation->Resume();
109 } } } // end of namespace ::sd::slidesorter::cache
111 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */