LCOV - code coverage report
Current view: top level - svx/inc - xpolyimp.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 4 8 50.0 %
Date: 2014-11-03 Functions: 2 4 50.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             :  * 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             : #ifndef INCLUDED_SVX_INC_XPOLYIMP_HXX
      21             : #define INCLUDED_SVX_INC_XPOLYIMP_HXX
      22             : 
      23             : #include <svx/xpoly.hxx>
      24             : #include <vector>
      25             : 
      26             : class Point;
      27             : 
      28             : class ImpXPolygon
      29             : {
      30             : public:
      31             :     Point*              pPointAry;
      32             :     sal_uInt8*          pFlagAry;
      33             :     Point*              pOldPointAry;
      34             :     bool                bDeleteOldPoints;
      35             :     sal_uInt16          nSize;
      36             :     sal_uInt16          nResize;
      37             :     sal_uInt16          nPoints;
      38             :     sal_uInt16          nRefCount;
      39             : 
      40             :     ImpXPolygon( sal_uInt16 nInitSize = 16, sal_uInt16 nResize=16 );
      41             :     ImpXPolygon( const ImpXPolygon& rImpXPoly );
      42             :     ~ImpXPolygon();
      43             : 
      44             :     bool operator==(const ImpXPolygon& rImpXPoly) const;
      45           0 :     bool operator!=(const ImpXPolygon& rImpXPoly) const { return !operator==(rImpXPoly); }
      46             : 
      47       15214 :     void CheckPointDelete()
      48             :     {
      49       15214 :         if ( bDeleteOldPoints )
      50             :         {
      51           0 :             delete[] (char*)pOldPointAry;
      52           0 :             bDeleteOldPoints = false;
      53             :         }
      54       15214 :     }
      55             : 
      56             :     void Resize( sal_uInt16 nNewSize, bool bDeletePoints = true );
      57             :     void InsertSpace( sal_uInt16 nPos, sal_uInt16 nCount );
      58             :     void Remove( sal_uInt16 nPos, sal_uInt16 nCount );
      59             : };
      60             : 
      61             : typedef ::std::vector< XPolygon* > XPolygonList;
      62             : 
      63             : class ImpXPolyPolygon
      64             : {
      65             : public:
      66             :     XPolygonList aXPolyList;
      67             :     sal_uInt16       nRefCount;
      68             : 
      69         330 :                 ImpXPolyPolygon() { nRefCount = 1; }
      70             :                 ImpXPolyPolygon( const ImpXPolyPolygon& rImpXPolyPoly );
      71             :                 ~ImpXPolyPolygon();
      72             : 
      73             :     bool operator==(const ImpXPolyPolygon& rImpXPolyPoly) const;
      74           0 :     bool operator!=(const ImpXPolyPolygon& rImpXPolyPoly) const { return !operator==(rImpXPolyPoly); }
      75             : };
      76             : 
      77             : 
      78             : 
      79             : #endif // INCLUDED_SVX_INC_XPOLYIMP_HXX
      80             : 
      81             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10