LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/drawinglayer/source/primitive2d - clippedborderlineprimitive2d.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 1 14 7.1 %
Date: 2013-07-09 Functions: 2 6 33.3 %
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             :  */
      12             : 
      13             : #include <drawinglayer/primitive2d/clippedborderlineprimitive2d.hxx>
      14             : #include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx>
      15             : 
      16             : namespace drawinglayer
      17             : {
      18             :     namespace primitive2d
      19             :     {
      20           0 :         basegfx::B2DPolyPolygon ClippedBorderLinePrimitive2D::getClipPolygon(
      21             :             SAL_UNUSED_PARAMETER geometry::ViewInformation2D const&) const
      22             :         {
      23           0 :             basegfx::B2DPolyPolygon aPolyPolygon;
      24           0 :             aPolyPolygon.append( maIntersection );
      25           0 :             return aPolyPolygon;
      26             :         }
      27             : 
      28           0 :         ClippedBorderLinePrimitive2D::ClippedBorderLinePrimitive2D(
      29             :             const basegfx::B2DPoint& rStart,
      30             :             const basegfx::B2DPoint& rEnd,
      31             :             double fLeftWidth,
      32             :             double fDistance,
      33             :             double fRightWidth,
      34             :             const basegfx::B2DPolygon& rIntersection,
      35             :             const basegfx::BColor& rRGBColorRight,
      36             :             const basegfx::BColor& rRGBColorLeft,
      37             :             const basegfx::BColor& rRGBColorGap,
      38             :             bool bHasGapColor,
      39             :             const short nStyle)
      40             :         :   BorderLinePrimitive2D( rStart, rEnd, fLeftWidth,fDistance, fRightWidth,
      41             :                         0.0, 0.0, 0.0, 0.0, rRGBColorRight, rRGBColorLeft,
      42             :                         rRGBColorGap, bHasGapColor, nStyle),
      43           0 :             maIntersection( rIntersection )
      44             :         {
      45           0 :         }
      46             : 
      47           0 :         bool ClippedBorderLinePrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const
      48             :         {
      49           0 :             if(BorderLinePrimitive2D::operator==(rPrimitive))
      50             :             {
      51           0 :                 const ClippedBorderLinePrimitive2D& rCompare = (ClippedBorderLinePrimitive2D&)rPrimitive;
      52             : 
      53           0 :                 return maIntersection == rCompare.maIntersection;
      54             :             }
      55             : 
      56           0 :             return false;
      57             :         }
      58             : 
      59             :         // provide unique ID
      60           0 :         ImplPrimitive2DIDBlock(ClippedBorderLinePrimitive2D, PRIMITIVE2D_ID_CLIPPEDBORDERLINEPRIMITIVE2D)
      61             : 
      62             : 
      63             :     } // namespace primitive2d
      64         408 : } // namespace drawinglayer
      65             : 
      66             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10