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 #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
)
44 PageCache::~PageCache()
48 void PageCache::ChangeSize (
49 const Size
& rPreviewSize
,
50 const bool bDoSuperSampling
)
52 mpImplementation
->ChangePreviewSize(rPreviewSize
, bDoSuperSampling
);
55 BitmapEx
PageCache::GetPreviewBitmap (
59 return mpImplementation
->GetPreviewBitmap(aKey
, bResize
);
62 BitmapEx
PageCache::GetMarkedPreviewBitmap (
65 return mpImplementation
->GetMarkedPreviewBitmap(aKey
);
68 void PageCache::SetMarkedPreviewBitmap (
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 (
83 if (mpImplementation
->InvalidatePreviewBitmap(aKey
))
84 RequestPreviewBitmap(aKey
);
87 void PageCache::InvalidateCache()
89 mpImplementation
->InvalidateCache();
92 void PageCache::SetPreciousFlag (
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: */