Update ooo320-m1
[ooovba.git] / binfilter / inc / bf_sw / ndnotxt.hxx
blob994d1dc62b99a4108b9cf63f670e2dab889ca8e4
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: ndnotxt.hxx,v $
10 * $Revision: 1.7 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _NDNOTXT_HXX
31 #define _NDNOTXT_HXX
33 #include "node.hxx"
34 class PolyPolygon;
35 namespace binfilter {
39 // --------------------
40 // SwNoTxtNode
41 // --------------------
43 class SwNoTxtNode : public SwCntntNode
45 friend class SwNodes;
46 friend class SwNoTxtFrm;
48 String aAlternateText; // alternativer Text (HTML)
50 PolyPolygon *pContour; // Polygon fuer Konturumlauf
51 BOOL bAutomaticContour : 1; // automatic contour polygon, not manipulated
52 BOOL bContourMapModeValid : 1; // contour map mode is not the graphics's
53 // prefered map mode, but either
54 // MM100 or or pixel
55 BOOL bPixelContour : 1; // contour map mode is invalid and pixel.
57 // erzeugt fuer alle Ableitungen einen AttrSet mit Bereichen
58 // fuer Frame- und Grafik-Attributen (wird nur vom SwCntntNode gerufen)
59 virtual void NewAttrSet( SwAttrPool& );
61 SwNoTxtNode( const SwNoTxtNode& ); //nicht erlaubt
62 SwNoTxtNode &operator=( const SwNoTxtNode& ); //nicht erlaubt
64 protected:
65 SwNoTxtNode( const SwNodeIndex &rWhere, const BYTE nNdType,
66 SwGrfFmtColl *pGrColl, SwAttrSet* pAutoAttr = 0 );
68 public:
69 ~SwNoTxtNode();
71 virtual SwCntntFrm *MakeFrm();
73 inline SwGrfFmtColl *GetGrfColl() const;
75 virtual Size GetTwipSize() const = 0;
78 // alternativen Text abfragen/setzen
79 const String& GetAlternateText() const { return aAlternateText; }
80 void SetAlternateText( const String& rTxt, sal_Bool bBroadcast=sal_False );
82 void SetContour( const PolyPolygon *pPoly,
83 BOOL bAutomatic = FALSE );
84 const PolyPolygon *HasContour() const;
85 const BOOL _HasContour() const { return pContour!=0; };
87 void SetAutomaticContour( BOOL bSet ) { bAutomaticContour = bSet; }
88 const BOOL HasAutomaticContour() const { return bAutomaticContour; }
90 // set either a MM100 or pixel contour
91 void SetContourAPI( const PolyPolygon *pPoly ){DBG_BF_ASSERT(0, "STRIP");} //STRIP001 void SetContourAPI( const PolyPolygon *pPoly );
93 // get either a MM100 or pixel contour, return FALSE if no contour is set.
94 BOOL GetContourAPI( PolyPolygon &rPoly ) const;
96 void SetPixelContour( BOOL bSet ) { bPixelContour = bSet; }
97 const BOOL IsPixelContour() const;
99 const BOOL IsContourMapModeValid() const { return bContourMapModeValid; }
101 //Besorgt die Graphic, mit SwapIn fuer GrfNode, per GetData fuer OLE.
102 Graphic GetGraphic() const;
105 inline SwGrfFmtColl* SwNoTxtNode::GetGrfColl() const
107 return (SwGrfFmtColl*)GetRegisteredIn();
110 // Inline Metoden aus Node.hxx - erst hier ist der TxtNode bekannt !!
111 #if !(defined(MACOSX) && ( __GNUC__ < 3 ))
112 // GrP moved to gcc_outl.cxx; revisit with gcc3
113 inline SwNoTxtNode *SwNode::GetNoTxtNode()
115 return ND_NOTXTNODE & nNodeType ? (SwNoTxtNode*)this : 0;
117 inline const SwNoTxtNode *SwNode::GetNoTxtNode() const
119 return ND_NOTXTNODE & nNodeType ? (const SwNoTxtNode*)this : 0;
121 #endif
123 } //namespace binfilter
124 #endif // _NDNOTXT_HXX