LCOV - code coverage report
Current view: top level - svx/inc/sdr/primitive2d - sdrcustomshapeprimitive2d.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 7 7 100.0 %
Date: 2014-11-03 Functions: 8 8 100.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_SDR_PRIMITIVE2D_SDRCUSTOMSHAPEPRIMITIVE2D_HXX
      21             : #define INCLUDED_SVX_INC_SDR_PRIMITIVE2D_SDRCUSTOMSHAPEPRIMITIVE2D_HXX
      22             : 
      23             : #include <drawinglayer/primitive2d/baseprimitive2d.hxx>
      24             : #include <basegfx/matrix/b2dhommatrix.hxx>
      25             : #include <svx/sdr/attribute/sdrshadowtextattribute.hxx>
      26             : 
      27             : 
      28             : // predefines
      29             : 
      30             : 
      31             : 
      32             : namespace drawinglayer
      33             : {
      34             :     namespace primitive2d
      35             :     {
      36       18388 :         class SdrCustomShapePrimitive2D : public BufferedDecompositionPrimitive2D
      37             :         {
      38             :         private:
      39             :             attribute::SdrShadowTextAttribute           maSdrSTAttribute;
      40             :             Primitive2DSequence                         maSubPrimitives;
      41             :             basegfx::B2DHomMatrix                       maTextBox;
      42             : 
      43             :             // bitfield
      44             :             // defines if SdrTextWordWrapItem was set at SdrObjCustomShape which means
      45             :             // that the text needs to be block formatted
      46             :             bool                                        mbWordWrap : 1;
      47             : 
      48             :             // defines that the object contains/is a 3D AutoShape. Needed for
      49             :             // making exceptions with shadow generation
      50             :             bool                                        mb3DShape : 1;
      51             : 
      52             :             // #SJ# Allow text clipping against TextBox in special cases (used for SC)
      53             :             bool                                        mbForceTextClipToTextRange : 1;
      54             : 
      55             :         protected:
      56             :             // local decomposition.
      57             :             virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const SAL_OVERRIDE;
      58             : 
      59             :         public:
      60             :             SdrCustomShapePrimitive2D(
      61             :                 const attribute::SdrShadowTextAttribute& rSdrSTAttribute,
      62             :                 const Primitive2DSequence& rSubPrimitives,
      63             :                 const basegfx::B2DHomMatrix& rTextBox,
      64             :                 bool bWordWrap,
      65             :                 bool b3DShape,
      66             :                 bool bForceTextClipToTextRange);
      67             : 
      68             :             // data access
      69       29370 :             const attribute::SdrShadowTextAttribute& getSdrSTAttribute() const { return maSdrSTAttribute; }
      70       18930 :             const Primitive2DSequence& getSubPrimitives() const { return maSubPrimitives; }
      71        9920 :             const basegfx::B2DHomMatrix& getTextBox() const { return maTextBox; }
      72        9804 :             bool getWordWrap() const { return mbWordWrap; }
      73        8566 :             bool get3DShape() const { return mb3DShape; }
      74        9804 :             bool isForceTextClipToTextRange() const { return mbForceTextClipToTextRange; }
      75             : 
      76             :             // compare operator
      77             :             virtual bool operator==(const BasePrimitive2D& rPrimitive) const SAL_OVERRIDE;
      78             : 
      79             :             // provide unique ID
      80             :             DeclPrimitive2DIDBlock()
      81             :         };
      82             :     } // end of namespace primitive2d
      83             : } // end of namespace drawinglayer
      84             : 
      85             : 
      86             : 
      87             : #endif // INCLUDED_SVX_INC_SDR_PRIMITIVE2D_SDRCUSTOMSHAPEPRIMITIVE2D_HXX
      88             : 
      89             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10