LCOV - code coverage report
Current view: top level - sd/source/ui/slidesorter/cache - SlsPageCache.cxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 20 34 58.8 %
Date: 2015-06-13 12:38:46 Functions: 9 14 64.3 %
Legend: Lines: hit not hit

          Line data    Source code
       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             : #include <tools/gen.hxx>
      21             : #include "SlsGenericPageCache.hxx"
      22             : #include "SlsRequestFactory.hxx"
      23             : #include "cache/SlsPageCache.hxx"
      24             : #include "model/SlideSorterModel.hxx"
      25             : 
      26             : using namespace ::com::sun::star;
      27             : 
      28             : namespace sd { namespace slidesorter { namespace cache {
      29             : 
      30             : //===== PageCache =============================================================
      31             : 
      32          64 : PageCache::PageCache (
      33             :     const Size& rPreviewSize,
      34             :     const bool bDoSuperSampling,
      35             :     const SharedCacheContext& rpCacheContext)
      36             :    : mpImplementation(
      37             :         new GenericPageCache(
      38             :             rPreviewSize,
      39             :             bDoSuperSampling,
      40          64 :             rpCacheContext))
      41             : {
      42          64 : }
      43             : 
      44          64 : PageCache::~PageCache()
      45             : {
      46          64 : }
      47             : 
      48          65 : void PageCache::ChangeSize (
      49             :     const Size& rPreviewSize,
      50             :     const bool bDoSuperSampling)
      51             : {
      52          65 :     mpImplementation->ChangePreviewSize(rPreviewSize, bDoSuperSampling);
      53          65 : }
      54             : 
      55         320 : Bitmap PageCache::GetPreviewBitmap (
      56             :     const CacheKey aKey,
      57             :     const bool bResize)
      58             : {
      59         320 :     return mpImplementation->GetPreviewBitmap(aKey, bResize);
      60             : }
      61             : 
      62           0 : Bitmap PageCache::GetMarkedPreviewBitmap (
      63             :     const CacheKey aKey,
      64             :     const bool bResize)
      65             : {
      66           0 :     return mpImplementation->GetMarkedPreviewBitmap(aKey, bResize);
      67             : }
      68             : 
      69           0 : void PageCache::SetMarkedPreviewBitmap (
      70             :     const CacheKey aKey,
      71             :     const Bitmap& rMarkedBitmap)
      72             : {
      73           0 :     mpImplementation->SetMarkedPreviewBitmap(aKey, rMarkedBitmap);
      74           0 : }
      75             : 
      76         425 : void PageCache::RequestPreviewBitmap (const CacheKey aKey)
      77             : {
      78         425 :     return mpImplementation->RequestPreviewBitmap(aKey);
      79             : }
      80             : 
      81           5 : void PageCache::InvalidatePreviewBitmap (
      82             :     const CacheKey aKey,
      83             :     const bool bRequestPreview)
      84             : {
      85           5 :     if (mpImplementation->InvalidatePreviewBitmap(aKey) && bRequestPreview)
      86           3 :         RequestPreviewBitmap(aKey);
      87           5 : }
      88             : 
      89           0 : void PageCache::InvalidateCache (const bool bUpdateCache)
      90             : {
      91           0 :     mpImplementation->InvalidateCache(bUpdateCache);
      92           0 : }
      93             : 
      94         681 : void PageCache::SetPreciousFlag (
      95             :     const CacheKey aKey,
      96             :     const bool bIsPrecious)
      97             : {
      98         681 :     mpImplementation->SetPreciousFlag(aKey, bIsPrecious);
      99         681 : }
     100             : 
     101           0 : void PageCache::Pause()
     102             : {
     103           0 :     mpImplementation->Pause();
     104           0 : }
     105             : 
     106           0 : void PageCache::Resume()
     107             : {
     108           0 :     mpImplementation->Resume();
     109           0 : }
     110             : 
     111          66 : } } } // end of namespace ::sd::slidesorter::cache
     112             : 
     113             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11