LCOV - code coverage report
Current view: top level - sfx2/source/control - templatesearchview.cxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 1 23 4.3 %
Date: 2015-06-13 12:38:46 Functions: 2 7 28.6 %
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             : 
      10             : #include "templatesearchview.hxx"
      11             : #include "templatesearchviewitem.hxx"
      12             : 
      13             : #include <vcl/builderfactory.hxx>
      14             : 
      15           0 : TemplateSearchView::TemplateSearchView (vcl::Window *pParent, WinBits nWinStyle)
      16           0 :     : ThumbnailView(pParent,nWinStyle)
      17             : {
      18           0 : }
      19             : 
      20           0 : VCL_BUILDER_FACTORY(TemplateSearchView)
      21             : 
      22           0 : void TemplateSearchView::setOpenTemplateHdl(const Link<> &rLink)
      23             : {
      24           0 :     maOpenTemplateHdl = rLink;
      25           0 : }
      26             : 
      27           0 : void TemplateSearchView::OnItemDblClicked (ThumbnailViewItem *pItem)
      28             : {
      29           0 :     maOpenTemplateHdl.Call(pItem);
      30           0 : }
      31             : 
      32           0 : void TemplateSearchView::AppendItem(sal_uInt16 nAssocItemId, sal_uInt16 nRegionId, sal_uInt16 nIdx,
      33             :                                     const OUString &rTitle, const OUString &rSubtitle,
      34             :                                     const OUString &rPath,
      35             :                                     const BitmapEx &rImage)
      36             : {
      37           0 :     TemplateSearchViewItem *pItem = new TemplateSearchViewItem(*this, getNextItemId());
      38           0 :     pItem->mnAssocId = nAssocItemId;
      39           0 :     pItem->mnDocId = nIdx;
      40           0 :     pItem->mnRegionId = nRegionId;
      41           0 :     pItem->maPreview1 = rImage;
      42           0 :     pItem->maTitle = rTitle;
      43           0 :     pItem->setSubTitle(rSubtitle);
      44           0 :     pItem->setPath(rPath);
      45           0 :     pItem->setSelectClickHdl(LINK(this,ThumbnailView,OnItemSelected));
      46             : 
      47           0 :     ThumbnailView::AppendItem(pItem);
      48             : 
      49           0 :     CalculateItemPositions();
      50         648 : }
      51             : 
      52             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
      53             : 
      54             : 

Generated by: LCOV version 1.11