LCOV - code coverage report
Current view: top level - chart2/source/tools - LineProperties.cxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 39 0.0 %
Date: 2014-04-14 Functions: 0 4 0.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 "LineProperties.hxx"
      11             : 
      12             : using namespace com::sun::star;
      13             : 
      14           0 : LineProperties::LineProperties():
      15             :     mnLineWidth(0),
      16             :     meLineStyle(drawing::LineStyle_SOLID),
      17             :     maLineColor(0),
      18             :     mnLineTransparence(0),
      19           0 :     meLineJoint(drawing::LineJoint_ROUND)
      20             : {
      21           0 : }
      22             : 
      23           0 : LineProperties::LineProperties(const LineProperties& r):
      24             :     maDashName(r.maDashName),
      25             :     maLineDash(r.maLineDash),
      26             :     mnLineWidth(r.mnLineWidth),
      27             :     meLineStyle(r.meLineStyle),
      28             :     maLineColor(r.maLineColor),
      29             :     mnLineTransparence(r.mnLineTransparence),
      30           0 :     meLineJoint(r.meLineJoint)
      31             : {
      32           0 : }
      33             : 
      34           0 : uno::Any LineProperties::getPropertyValue(const OUString& rName)
      35             : {
      36           0 :     uno::Any aRet;
      37           0 :     if(rName == "LineDashName")
      38             :     {
      39           0 :         aRet <<= maDashName;
      40             :     }
      41           0 :     else if(rName == "LineDash")
      42             :     {
      43           0 :         aRet <<= maLineDash;
      44             :     }
      45           0 :     else if(rName == "LineWidth")
      46             :     {
      47           0 :         aRet <<= mnLineWidth;
      48             :     }
      49           0 :     else if(rName == "LineStyle")
      50             :     {
      51           0 :         aRet = uno::makeAny(meLineStyle);
      52             :     }
      53           0 :     else if(rName == "LineColor")
      54             :     {
      55           0 :         aRet <<= maLineColor;
      56             :     }
      57           0 :     else if(rName == "LineTransparence")
      58             :     {
      59           0 :         aRet <<= mnLineTransparence;
      60             :     }
      61           0 :     else if(rName == "LineJoint")
      62             :     {
      63           0 :         aRet <<= meLineJoint;
      64             :     }
      65           0 :     return aRet;
      66             : }
      67             : 
      68           0 : void LineProperties::setPropertyValue(const OUString& rName, const uno::Any& rAny)
      69             : {
      70           0 :     if(rName == "LineDashName")
      71             :     {
      72           0 :         rAny >>= maDashName;
      73             :     }
      74           0 :     else if(rName == "LineDash")
      75             :     {
      76           0 :         rAny >>= maLineDash;
      77             :     }
      78           0 :     else if(rName == "LineWidth")
      79             :     {
      80           0 :         rAny >>= mnLineWidth;
      81             :     }
      82           0 :     else if(rName == "LineStyle")
      83             :     {
      84           0 :         rAny >>= meLineStyle;
      85             :     }
      86           0 :     else if(rName == "LineColor")
      87             :     {
      88           0 :         rAny >>= maLineColor;
      89             :     }
      90           0 :     else if(rName == "LineTransparence")
      91             :     {
      92           0 :         rAny >>= mnLineTransparence;
      93             :     }
      94           0 :     else if(rName == "LineJoint")
      95             :     {
      96           0 :         rAny >>= meLineJoint;
      97             :     }
      98           0 : }
      99             : 
     100             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10