LCOV - code coverage report
Current view: top level - include/drawinglayer/primitive2d - texthierarchyprimitive2d.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 7 8 87.5 %
Date: 2015-06-13 12:38:46 Functions: 13 14 92.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             : #ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_TEXTHIERARCHYPRIMITIVE2D_HXX
      21             : #define INCLUDED_DRAWINGLAYER_PRIMITIVE2D_TEXTHIERARCHYPRIMITIVE2D_HXX
      22             : 
      23             : #include <drawinglayer/drawinglayerdllapi.h>
      24             : 
      25             : #include <drawinglayer/primitive2d/groupprimitive2d.hxx>
      26             : #include <rtl/ustring.hxx>
      27             : 
      28             : 
      29             : 
      30             : namespace drawinglayer
      31             : {
      32             :     namespace primitive2d
      33             :     {
      34             :         /** TextHierarchyLinePrimitive2D class
      35             : 
      36             :             Text format hierarchy helper class. It decomposes to its
      37             :             content, so all direct renderers may ignore it. If You need
      38             :             to know more about line hierarchies You may react on it and
      39             :             also need to take care that the source of data uses it.
      40             : 
      41             :             This primitive encapsulates text lines.
      42             :          */
      43       43456 :         class DRAWINGLAYER_DLLPUBLIC TextHierarchyLinePrimitive2D : public GroupPrimitive2D
      44             :         {
      45             :         private:
      46             :         public:
      47             :             /// constructor
      48             :             explicit TextHierarchyLinePrimitive2D(const Primitive2DSequence& rChildren);
      49             : 
      50             :             /// provide unique ID
      51             :             DeclPrimitive2DIDBlock()
      52             :         };
      53             :     } // end of namespace primitive2d
      54             : } // end of namespace drawinglayer
      55             : 
      56             : 
      57             : 
      58             : namespace drawinglayer
      59             : {
      60             :     namespace primitive2d
      61             :     {
      62             :         /** TextHierarchyBulletPrimitive2D class
      63             : 
      64             :             This primitive encapsulates text bullets.
      65             :          */
      66        1882 :         class DRAWINGLAYER_DLLPUBLIC TextHierarchyBulletPrimitive2D : public GroupPrimitive2D
      67             :         {
      68             :         private:
      69             :         public:
      70             :             /// constructor
      71             :             explicit TextHierarchyBulletPrimitive2D(const Primitive2DSequence& rChildren);
      72             : 
      73             :             /// provide unique ID
      74             :             DeclPrimitive2DIDBlock()
      75             :         };
      76             :     } // end of namespace primitive2d
      77             : } // end of namespace drawinglayer
      78             : 
      79             : 
      80             : 
      81             : namespace drawinglayer
      82             : {
      83             :     namespace primitive2d
      84             :     {
      85             :         /** TextHierarchyParagraphPrimitive2D class
      86             : 
      87             :             This primitive encapsulates text paragraphs.
      88             :          */
      89       39264 :         class DRAWINGLAYER_DLLPUBLIC TextHierarchyParagraphPrimitive2D : public GroupPrimitive2D
      90             :         {
      91             :         private:
      92             :         public:
      93             :             /// constructor
      94             :             explicit TextHierarchyParagraphPrimitive2D(const Primitive2DSequence& rChildren);
      95             : 
      96             :             /// provide unique ID
      97             :             DeclPrimitive2DIDBlock()
      98             :         };
      99             :     } // end of namespace primitive2d
     100             : } // end of namespace drawinglayer
     101             : 
     102             : 
     103             : 
     104             : namespace drawinglayer
     105             : {
     106             :     namespace primitive2d
     107             :     {
     108             :         /** TextHierarchyBlockPrimitive2D class
     109             : 
     110             :             This primitive encapsulates text blocks.
     111             :          */
     112       34576 :         class DRAWINGLAYER_DLLPUBLIC TextHierarchyBlockPrimitive2D : public GroupPrimitive2D
     113             :         {
     114             :         private:
     115             :         public:
     116             :             /// constructor
     117             :             explicit TextHierarchyBlockPrimitive2D(const Primitive2DSequence& rChildren);
     118             : 
     119             :             /// provide unique ID
     120             :             DeclPrimitive2DIDBlock()
     121             :         };
     122             :     } // end of namespace primitive2d
     123             : } // end of namespace drawinglayer
     124             : 
     125             : 
     126             : 
     127             : namespace drawinglayer
     128             : {
     129             :     namespace primitive2d
     130             :     {
     131             :         /** FieldType definition */
     132             :         enum FieldType
     133             :         {
     134             :             /** unspecified. If more info is needed for a FieldType,
     135             :                 create a new type and its handling
     136             :              */
     137             :             FIELD_TYPE_COMMON,
     138             : 
     139             :             /** uses "FIELD_SEQ_BEGIN;PageField" -> special handling */
     140             :             FIELD_TYPE_PAGE,
     141             : 
     142             :             /** uses URL as string -> special handling */
     143             :             FIELD_TYPE_URL
     144             :         };
     145             : 
     146             :         /** TextHierarchyFieldPrimitive2D class
     147             : 
     148             :             This primitive encapsulates text fields.
     149             :             Also: This type uses a type enum to transport the encapsulated field
     150             :             type. Also added is a String which is type-dependent. E.g. for URL
     151             :             fields, it contains the URL.
     152             :          */
     153        3206 :         class DRAWINGLAYER_DLLPUBLIC TextHierarchyFieldPrimitive2D : public GroupPrimitive2D
     154             :         {
     155             :         private:
     156             :             FieldType                               meType;
     157             :             OUString                           maString;
     158             : 
     159             :         public:
     160             :             /// constructor
     161             :             TextHierarchyFieldPrimitive2D(
     162             :                 const Primitive2DSequence& rChildren,
     163             :                 const FieldType& rFieldType,
     164             :                 const OUString& rString);
     165             : 
     166             :             /// data read access
     167           8 :             FieldType getType() const { return meType; }
     168           0 :             const OUString& getString() const { return maString; }
     169             : 
     170             :             /// compare operator
     171             :             virtual bool operator==(const BasePrimitive2D& rPrimitive) const SAL_OVERRIDE;
     172             : 
     173             :             /// provide unique ID
     174             :             DeclPrimitive2DIDBlock()
     175             :         };
     176             :     } // end of namespace primitive2d
     177             : } // end of namespace drawinglayer
     178             : 
     179             : 
     180             : 
     181             : namespace drawinglayer
     182             : {
     183             :     namespace primitive2d
     184             :     {
     185             :         /** TextHierarchyEditPrimitive2D class
     186             : 
     187             :             #i97628#
     188             :             Primitive to encapsulate text from an active text edit; some
     189             :             renderers need to suppress this output due to painting the
     190             :             edited text in e.g. an OutlinerEditView. It's derived from
     191             :             GroupPrimitive2D, so the implicit decomposition will use the
     192             :             content. To suppress, this primitive needs to be parsed by
     193             :             the renderer without taking any action.
     194             :          */
     195          14 :         class DRAWINGLAYER_DLLPUBLIC TextHierarchyEditPrimitive2D : public GroupPrimitive2D
     196             :         {
     197             :         private:
     198             :         public:
     199             :             /// constructor
     200             :             explicit TextHierarchyEditPrimitive2D(const Primitive2DSequence& rChildren);
     201             : 
     202             :             /// provide unique ID
     203             :             DeclPrimitive2DIDBlock()
     204             :         };
     205             :     } // end of namespace primitive2d
     206             : } // end of namespace drawinglayer
     207             : 
     208             : 
     209             : 
     210             : #endif //INCLUDED_DRAWINGLAYER_PRIMITIVE2D_TEXTHIERARCHYPRIMITIVE2D_HXX
     211             : 
     212             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11