LCOV - code coverage report
Current view: top level - sfx2/source/control - templatedefaultview.cxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 8 11 72.7 %
Date: 2015-06-13 12:38:46 Functions: 4 5 80.0 %
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/builderfactory.hxx>
      13             : #include <sfx2/app.hxx>
      14             : 
      15           1 : VCL_BUILDER_FACTORY(TemplateDefaultView)
      16             : 
      17           1 : TemplateDefaultView::TemplateDefaultView( Window* pParent)
      18             :     : TemplateLocalView(pParent)
      19             :     , mnTextHeight(30)
      20             :     , mnItemPadding(5)
      21           1 :     , mnLastMouseDownItem( THUMBNAILVIEW_ITEM_NOTFOUND )
      22             : {
      23           1 :     Rectangle aScreen = Application::GetScreenPosSizePixel(Application::GetDisplayBuiltInScreen());
      24           1 :     mnItemMaxSize = std::min(aScreen.GetWidth(),aScreen.GetHeight()) > 800 ? 256 : 192;
      25           1 :     ThumbnailView::setItemDimensions( mnItemMaxSize, mnItemMaxSize, mnTextHeight, mnItemPadding );
      26           1 : }
      27             : 
      28           0 : void TemplateDefaultView::reload()
      29             : {
      30           0 :     TemplateLocalView::reload();
      31             :     // Set preferred width
      32           0 :     set_width_request(mnTextHeight + mnItemMaxSize + 2*mnItemPadding);
      33             : 
      34         648 : }
      35             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11