1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: ndnotxt.hxx,v $
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 ************************************************************************/
39 // --------------------
41 // --------------------
43 class SwNoTxtNode
: public SwCntntNode
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
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
65 SwNoTxtNode( const SwNodeIndex
&rWhere
, const BYTE nNdType
,
66 SwGrfFmtColl
*pGrColl
, SwAttrSet
* pAutoAttr
= 0 );
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;
123 } //namespace binfilter
124 #endif // _NDNOTXT_HXX