LCOV - code coverage report
Current view: top level - sw/inc - ndnotxt.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 6 10 60.0 %
Date: 2014-11-03 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             : // SwNoTxtNode
      27             : 
      28             : class SW_DLLPUBLIC SwNoTxtNode : public SwCntntNode
      29             : {
      30             :     friend class SwNodes;
      31             :     friend class SwNoTxtFrm;
      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 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 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         278 :     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 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         316 :     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 sal_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 TxtNode only here!!
      94        1112 : inline SwNoTxtNode *SwNode::GetNoTxtNode()
      95             : {
      96        1112 :     return ND_NOTXTNODE & nNodeType ? (SwNoTxtNode*)this : 0;
      97             : }
      98         458 : inline const SwNoTxtNode *SwNode::GetNoTxtNode() const
      99             : {
     100         458 :     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