LCOV - code coverage report
Current view: top level - sd/source/ui/slidesorter/controller - SlsProperties.cxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 21 49 42.9 %
Date: 2015-06-13 12:38:46 Functions: 6 14 42.9 %
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             : #include "controller/SlsProperties.hxx"
      21             : #include <vcl/svapp.hxx>
      22             : #include <vcl/settings.hxx>
      23             : 
      24             : namespace sd { namespace slidesorter { namespace controller {
      25             : 
      26          64 : Properties::Properties()
      27             :     : mbIsHighlightCurrentSlide(false),
      28             :       mbIsShowSelection(true),
      29             :       mbIsShowFocus(true),
      30             :       mbIsCenterSelection(false),
      31             :       mbIsSmoothSelectionScrolling(true),
      32             :       mbIsSuspendPreviewUpdatesDuringFullScreenPresentation(true),
      33          64 :       maBackgroundColor(Application::GetSettings().GetStyleSettings().GetWindowColor()),
      34          64 :       maTextColor(Application::GetSettings().GetStyleSettings().GetActiveTextColor()),
      35          64 :       maSelectionColor(Application::GetSettings().GetStyleSettings().GetHighlightColor()),
      36          64 :       maHighlightColor(Application::GetSettings().GetStyleSettings().GetMenuHighlightColor()),
      37             :       mbIsUIReadOnly(false),
      38             :       mbIsOnlyPreviewTriggersMouseOver(true),
      39             :       mbIsHighContrastModeActive(
      40         320 :           Application::GetSettings().GetStyleSettings().GetHighContrastMode())
      41             : {
      42          64 : }
      43             : 
      44          64 : Properties::~Properties()
      45             : {
      46          64 : }
      47             : 
      48           0 : void Properties::HandleDataChangeEvent()
      49             : {
      50           0 :     maBackgroundColor = Application::GetSettings().GetStyleSettings().GetWindowColor();
      51           0 :     maTextColor = Application::GetSettings().GetStyleSettings().GetActiveTextColor();
      52           0 :     maSelectionColor = Application::GetSettings().GetStyleSettings().GetHighlightColor();
      53           0 :     maHighlightColor = Application::GetSettings().GetStyleSettings().GetMenuHighlightColor();
      54             :     mbIsHighContrastModeActive
      55           0 :         = Application::GetSettings().GetStyleSettings().GetHighContrastMode();
      56           0 : }
      57             : 
      58           0 : void Properties::SetHighlightCurrentSlide (const bool bIsHighlightCurrentSlide)
      59             : {
      60           0 :     mbIsHighlightCurrentSlide = bIsHighlightCurrentSlide;
      61           0 : }
      62             : 
      63           0 : void Properties::SetShowSelection (const bool bIsShowSelection)
      64             : {
      65           0 :     mbIsShowSelection = bIsShowSelection;
      66           0 : }
      67             : 
      68           0 : void Properties::SetShowFocus (const bool bIsShowFocus)
      69             : {
      70           0 :     mbIsShowFocus = bIsShowFocus;
      71           0 : }
      72             : 
      73           0 : void Properties::SetCenterSelection (const bool bIsCenterSelection)
      74             : {
      75           0 :     mbIsCenterSelection = bIsCenterSelection;
      76           0 : }
      77             : 
      78           0 : void Properties::SetSmoothSelectionScrolling (const bool bIsSmoothSelectionScrolling)
      79             : {
      80           0 :     mbIsSmoothSelectionScrolling = bIsSmoothSelectionScrolling;
      81           0 : }
      82             : 
      83           0 : void Properties::SetSuspendPreviewUpdatesDuringFullScreenPresentation (const bool bFlag)
      84             : {
      85           0 :     mbIsSuspendPreviewUpdatesDuringFullScreenPresentation = bFlag;
      86           0 : }
      87             : 
      88          64 : void Properties::SetBackgroundColor (const Color& rColor)
      89             : {
      90          64 :     maBackgroundColor = rColor;
      91          64 : }
      92             : 
      93          64 : void Properties::SetTextColor (const Color& rColor)
      94             : {
      95          64 :     maTextColor = rColor;
      96          64 : }
      97             : 
      98          64 : void Properties::SetSelectionColor (const Color& rColor)
      99             : {
     100          64 :     maSelectionColor = rColor;
     101          64 : }
     102             : 
     103          64 : void Properties::SetHighlightColor (const Color& rColor)
     104             : {
     105          64 :     maHighlightColor = rColor;
     106          64 : }
     107             : 
     108           0 : void Properties::SetUIReadOnly (const bool bIsUIReadOnly)
     109             : {
     110           0 :     mbIsUIReadOnly = bIsUIReadOnly;
     111           0 : }
     112             : 
     113             : } } } // end of namespace ::sd::slidesorter::controller
     114             : 
     115             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11