LCOV - code coverage report
Current view: top level - sfx2/source/control - templatedefaultview.cxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 11 14 78.6 %
Date: 2014-11-03 Functions: 6 7 85.7 %
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 <sfx2/templatedefaultview.hxx>
      11             : #include <sfx2/thumbnailview.hxx>
      12             : #include <vcl/builder.hxx>
      13             : #include <sfx2/app.hxx>
      14             : 
      15           2 : extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeTemplateDefaultView(vcl::Window *pParent, VclBuilder::stringmap &)
      16             : {
      17           2 :     return new TemplateDefaultView(pParent);
      18             : }
      19             : 
      20           2 : TemplateDefaultView::TemplateDefaultView( Window* pParent)
      21             :     : TemplateLocalView(pParent)
      22             :     , mnTextHeight(30)
      23             :     , mnItemPadding(5)
      24           2 :     , mnLastMouseDownItem( THUMBNAILVIEW_ITEM_NOTFOUND )
      25             : {
      26           2 :     Rectangle aScreen = Application::GetScreenPosSizePixel(Application::GetDisplayBuiltInScreen());
      27           2 :     mnItemMaxSize = std::min(aScreen.GetWidth(),aScreen.GetHeight()) > 800 ? 256 : 192;
      28           2 :     ThumbnailView::setItemDimensions( mnItemMaxSize, mnItemMaxSize, mnTextHeight, mnItemPadding );
      29           2 : }
      30             : 
      31           4 : TemplateDefaultView::~TemplateDefaultView()
      32             : {
      33           4 : }
      34             : 
      35           0 : void TemplateDefaultView::reload()
      36             : {
      37           0 :     TemplateLocalView::reload();
      38             :     // Set preferred width
      39           0 :     set_width_request(mnTextHeight + mnItemMaxSize + 2*mnItemPadding);
      40             : 
      41         951 : }
      42             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10