LCOV - code coverage report
Current view: top level - sd/source/ui/slidesorter/cache - SlsPageCache.cxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 19 33 57.6 %
Date: 2014-04-11 Functions: 7 12 58.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             : 
      21             : #include <tools/gen.hxx>
      22             : #include "SlsGenericPageCache.hxx"
      23             : #include "SlsRequestFactory.hxx"
      24             : #include "cache/SlsPageCache.hxx"
      25             : #include "model/SlideSorterModel.hxx"
      26             : 
      27             : using namespace ::com::sun::star;
      28             : 
      29             : 
      30             : namespace sd { namespace slidesorter { namespace cache {
      31             : 
      32             : 
      33             : //===== PageCache =============================================================
      34             : 
      35          63 : PageCache::PageCache (
      36             :     const Size& rPreviewSize,
      37             :     const bool bDoSuperSampling,
      38             :     const SharedCacheContext& rpCacheContext)
      39             :    : mpImplementation(
      40             :         new GenericPageCache(
      41             :             rPreviewSize,
      42             :             bDoSuperSampling,
      43          63 :             rpCacheContext))
      44             : {
      45          63 : }
      46             : 
      47             : 
      48             : 
      49             : 
      50          63 : PageCache::~PageCache (void)
      51             : {
      52          63 : }
      53             : 
      54             : 
      55             : 
      56             : 
      57          67 : void PageCache::ChangeSize (
      58             :     const Size& rPreviewSize,
      59             :     const bool bDoSuperSampling)
      60             : {
      61          67 :     mpImplementation->ChangePreviewSize(rPreviewSize, bDoSuperSampling);
      62          67 : }
      63             : 
      64             : 
      65             : 
      66             : 
      67         346 : Bitmap PageCache::GetPreviewBitmap (
      68             :     const CacheKey aKey,
      69             :     const bool bResize)
      70             : {
      71         346 :     return mpImplementation->GetPreviewBitmap(aKey, bResize);
      72             : }
      73             : 
      74             : 
      75             : 
      76             : 
      77           0 : Bitmap PageCache::GetMarkedPreviewBitmap (
      78             :     const CacheKey aKey,
      79             :     const bool bResize)
      80             : {
      81           0 :     return mpImplementation->GetMarkedPreviewBitmap(aKey, bResize);
      82             : }
      83             : 
      84             : 
      85             : 
      86             : 
      87           0 : void PageCache::SetMarkedPreviewBitmap (
      88             :     const CacheKey aKey,
      89             :     const Bitmap& rMarkedBitmap)
      90             : {
      91           0 :     mpImplementation->SetMarkedPreviewBitmap(aKey, rMarkedBitmap);
      92           0 : }
      93             : 
      94             : 
      95             : 
      96             : 
      97         425 : void PageCache::RequestPreviewBitmap (const CacheKey aKey)
      98             : {
      99         425 :     return mpImplementation->RequestPreviewBitmap(aKey);
     100             : }
     101             : 
     102             : 
     103             : 
     104             : 
     105           5 : void PageCache::InvalidatePreviewBitmap (
     106             :     const CacheKey aKey,
     107             :     const bool bRequestPreview)
     108             : {
     109           5 :     if (mpImplementation->InvalidatePreviewBitmap(aKey) && bRequestPreview)
     110           3 :         RequestPreviewBitmap(aKey);
     111           5 : }
     112             : 
     113             : 
     114             : 
     115             : 
     116           0 : void PageCache::InvalidateCache (const bool bUpdateCache)
     117             : {
     118           0 :     mpImplementation->InvalidateCache(bUpdateCache);
     119           0 : }
     120             : 
     121             : 
     122             : 
     123             : 
     124         717 : void PageCache::SetPreciousFlag (
     125             :     const CacheKey aKey,
     126             :     const bool bIsPrecious)
     127             : {
     128         717 :     mpImplementation->SetPreciousFlag(aKey, bIsPrecious);
     129         717 : }
     130             : 
     131             : 
     132             : 
     133             : 
     134           0 : void PageCache::Pause (void)
     135             : {
     136           0 :     mpImplementation->Pause();
     137           0 : }
     138             : 
     139             : 
     140             : 
     141             : 
     142           0 : void PageCache::Resume (void)
     143             : {
     144           0 :     mpImplementation->Resume();
     145           0 : }
     146             : 
     147             : 
     148             : } } } // end of namespace ::sd::slidesorter::cache
     149             : 
     150             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10