LCOV - code coverage report
Current view: top level - sw/inc - ndnotxt.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 6 10 60.0 %
Date: 2015-06-13 12:38:46 Functions: 4 8 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             : #ifndef INCLUDED_SW_INC_NDNOTXT_HXX
      20             : #define INCLUDED_SW_INC_NDNOTXT_HXX
      21             : 
      22             : #include "node.hxx"
      23             : 
      24             : namespace tools { class PolyPolygon; }
      25             : 
      26             : // SwNoTextNode
      27             : 
      28             : class SW_DLLPUBLIC SwNoTextNode : public SwContentNode
      29             : {
      30             :     friend class SwNodes;
      31             :     friend class SwNoTextFrm;
      32             : 
      33             :     tools::PolyPolygon *pContour;
      34             :     bool bAutomaticContour : 1; // automatic contour polygon, not manipulated
      35             :     bool bContourMapModeValid : 1; // contour map mode is not the graphics's
      36             :                                    // preferred map mode, but either
      37             :                                       // MM100 or pixel
      38             :     bool bPixelContour : 1;     // contour map mode is invalid and pixel.
      39             : 
      40             :     // Creates for all derivations an AttrSet with ranges for frame- and
      41             :     // graphics-attributes (only called by SwContentNode).
      42             :     virtual void NewAttrSet( SwAttrPool& ) SAL_OVERRIDE;
      43             : 
      44             :     SwNoTextNode( const SwNoTextNode& ) SAL_DELETED_FUNCTION;
      45             :     SwNoTextNode &operator=( const SwNoTextNode& ) SAL_DELETED_FUNCTION;
      46             : 
      47             : protected:
      48             :     SwNoTextNode( const SwNodeIndex &rWhere, const sal_uInt8 nNdType,
      49             :                 SwGrfFormatColl *pGrColl, SwAttrSet* pAutoAttr = 0 );
      50             : 
      51             : public:
      52             :     virtual ~SwNoTextNode();
      53             : 
      54             :     virtual SwContentFrm *MakeFrm( SwFrm* ) SAL_OVERRIDE;
      55             : 
      56         177 :     inline SwGrfFormatColl *GetGrfColl() const { return const_cast<SwGrfFormatColl*>(static_cast<const SwGrfFormatColl*>(GetRegisteredIn())); }
      57             : 
      58             :     virtual Size GetTwipSize() const = 0;
      59             : 
      60             :     virtual bool SavePersistentData();
      61             :     virtual bool RestorePersistentData();
      62             : 
      63             :     OUString GetTitle() const;
      64             :     void SetTitle( const OUString& rTitle, bool bBroadcast = false );
      65             :     OUString GetDescription() const;
      66             :     void SetDescription( const OUString& rDescription, bool bBroadcast = false );
      67             : 
      68             :     void               SetContour( const tools::PolyPolygon *pPoly,
      69             :                                    bool bAutomatic = false );
      70             :     const tools::PolyPolygon *HasContour() const;
      71           0 :     bool               _HasContour() const { return pContour!=0; };
      72             :     void               GetContour( tools::PolyPolygon &rPoly ) const;
      73             :     void               CreateContour();
      74             : 
      75           0 :     void               SetAutomaticContour( bool bSet ) { bAutomaticContour = bSet; }
      76         206 :     bool               HasAutomaticContour() const { return bAutomaticContour; }
      77             : 
      78             :     // set either a MM100 or pixel contour
      79             :     void               SetContourAPI( const tools::PolyPolygon *pPoly );
      80             : 
      81             :     // get either a MM100 or pixel contour, return false if no contour is set.
      82             :     bool               GetContourAPI( tools::PolyPolygon &rPoly ) const;
      83             : 
      84           0 :     void               SetPixelContour( bool bSet ) { bPixelContour = bSet; }
      85             :     bool               IsPixelContour() const;
      86             : 
      87           0 :     bool               IsContourMapModeValid() const { return bContourMapModeValid; }
      88             : 
      89             :     // Obtains the graphic with SwapIn for GrfNode via GetData for OLE.
      90             :     Graphic GetGraphic() const;
      91             : };
      92             : 
      93             : // Inline methods from Node.hxx - we know TextNode only here!!
      94        1025 : inline SwNoTextNode *SwNode::GetNoTextNode()
      95             : {
      96        1025 :     return ND_NOTXTNODE & nNodeType ? static_cast<SwNoTextNode*>(this) : 0;
      97             : }
      98         272 : inline const SwNoTextNode *SwNode::GetNoTextNode() const
      99             : {
     100         272 :     return ND_NOTXTNODE & nNodeType ? static_cast<const SwNoTextNode*>(this) : 0;
     101             : }
     102             : 
     103             : #endif // INCLUDED_SW_INC_NDNOTXT_HXX
     104             : 
     105             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11