LCOV - code coverage report
Current view: top level - sw/inc - ndnotxt.hxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 6 10 60.0 %
Date: 2014-04-11 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             : class PolyPolygon;
      25             : 
      26             : // SwNoTxtNode
      27             : 
      28             : class SW_DLLPUBLIC SwNoTxtNode : public SwCntntNode
      29             : {
      30             :     friend class SwNodes;
      31             :     friend class SwNoTxtFrm;
      32             : 
      33             :     PolyPolygon *pContour;
      34             :     sal_Bool bAutomaticContour : 1; // automatic contour polygon, not manipulated
      35             :     sal_Bool bContourMapModeValid : 1; // contour map mode is not the graphics's
      36             :                                    // preferred map mode, but either
      37             :                                       // MM100 or or pixel
      38             :     sal_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 SwCntntNode).
      42             :     virtual void NewAttrSet( SwAttrPool& ) SAL_OVERRIDE;
      43             : 
      44             :     SwNoTxtNode( const SwNoTxtNode& );              // Not allowed.
      45             :     SwNoTxtNode &operator=( const SwNoTxtNode& );   // Not allowed.
      46             : 
      47             : protected:
      48             :     SwNoTxtNode( const SwNodeIndex &rWhere, const sal_uInt8 nNdType,
      49             :                 SwGrfFmtColl *pGrColl, SwAttrSet* pAutoAttr = 0 );
      50             : 
      51             : public:
      52             :     virtual ~SwNoTxtNode();
      53             : 
      54             :     virtual SwCntntFrm *MakeFrm( SwFrm* ) SAL_OVERRIDE;
      55             : 
      56          54 :     inline SwGrfFmtColl *GetGrfColl() const { return (SwGrfFmtColl*)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 PolyPolygon *pPoly,
      69             :                                    sal_Bool bAutomatic = sal_False );
      70             :     const PolyPolygon *HasContour() const;
      71           0 :     sal_Bool               _HasContour() const { return pContour!=0; };
      72             :     void               GetContour( PolyPolygon &rPoly ) const;
      73             :     void               CreateContour();
      74             : 
      75           0 :     void               SetAutomaticContour( sal_Bool bSet ) { bAutomaticContour = bSet; }
      76          92 :     sal_Bool               HasAutomaticContour() const { return bAutomaticContour; }
      77             : 
      78             :     // set either a MM100 or pixel contour
      79             :     void               SetContourAPI( const PolyPolygon *pPoly );
      80             : 
      81             :     // get either a MM100 or pixel contour, return sal_False if no contour is set.
      82             :     sal_Bool               GetContourAPI( PolyPolygon &rPoly ) const;
      83             : 
      84           0 :     void               SetPixelContour( sal_Bool bSet ) { bPixelContour = bSet; }
      85             :     sal_Bool               IsPixelContour() const;
      86             : 
      87           0 :     sal_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 TxtNode only here!!
      94         265 : inline SwNoTxtNode *SwNode::GetNoTxtNode()
      95             : {
      96         265 :     return ND_NOTXTNODE & nNodeType ? (SwNoTxtNode*)this : 0;
      97             : }
      98         191 : inline const SwNoTxtNode *SwNode::GetNoTxtNode() const
      99             : {
     100         191 :     return ND_NOTXTNODE & nNodeType ? (const SwNoTxtNode*)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.10