Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*
3 : : * Copyright 2012 LibreOffice contributors.
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 : :
12 : : #include "templatesearchviewitem.hxx"
13 : :
14 : 0 : TemplateSearchView::TemplateSearchView (Window *pParent, WinBits nWinStyle)
15 : 0 : : ThumbnailView(pParent,nWinStyle)
16 : : {
17 : 0 : }
18 : :
19 : 0 : TemplateSearchView::~TemplateSearchView ()
20 : : {
21 [ # # ]: 0 : }
22 : :
23 : 0 : void TemplateSearchView::AppendItem(sal_uInt16 nItemId, sal_uInt16 nRegionId, sal_uInt16 nIdx,
24 : : const OUString &rTitle, const OUString &rSubtitle,
25 : : const OUString &rPath,
26 : : const BitmapEx &rImage)
27 : : {
28 [ # # ]: 0 : TemplateSearchViewItem *pItem = new TemplateSearchViewItem(*this,this);
29 : 0 : pItem->mnId = nItemId;
30 : 0 : pItem->mnIdx = nIdx;
31 : 0 : pItem->mnRegionId = nRegionId;
32 : 0 : pItem->maPreview1 = rImage;
33 : 0 : pItem->maTitle = rTitle;
34 : 0 : pItem->setSubTitle(rSubtitle);
35 : 0 : pItem->setPath(rPath);
36 [ # # ]: 0 : pItem->setSelectClickHdl(LINK(this,ThumbnailView,OnItemSelected));
37 : :
38 [ # # ]: 0 : mItemList.push_back(pItem);
39 : :
40 : 0 : CalculateItemPositions();
41 : 0 : }
42 : :
43 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
44 : :
45 : :
|