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 $
10 * $Revision: 1.10.212.1 $
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 ************************************************************************/
37 // --------------------
39 // --------------------
41 class SW_DLLPUBLIC SwNoTxtNode
: public SwCntntNode
44 friend class SwNoTxtFrm
;
46 String aAlternateText
; // alternativer Text (HTML)
48 PolyPolygon
*pContour
; // Polygon fuer Konturumlauf
49 BOOL bAutomaticContour
: 1; // automatic contour polygon, not manipulated
50 BOOL bContourMapModeValid
: 1; // contour map mode is not the graphics's
51 // prefered map mode, but either
53 BOOL bPixelContour
: 1; // contour map mode is invalid and pixel.
55 // erzeugt fuer alle Ableitungen einen AttrSet mit Bereichen
56 // fuer Frame- und Grafik-Attributen (wird nur vom SwCntntNode gerufen)
57 virtual void NewAttrSet( SwAttrPool
& );
59 SwNoTxtNode( const SwNoTxtNode
& ); //nicht erlaubt
60 SwNoTxtNode
&operator=( const SwNoTxtNode
& ); //nicht erlaubt
63 SwNoTxtNode( const SwNodeIndex
&rWhere
, const BYTE nNdType
,
64 SwGrfFmtColl
*pGrColl
, SwAttrSet
* pAutoAttr
= 0 );
69 virtual SwCntntFrm
*MakeFrm();
71 inline SwGrfFmtColl
*GetGrfColl() const { return (SwGrfFmtColl
*)GetRegisteredIn(); }
73 virtual Size
GetTwipSize() const = 0;
75 virtual BOOL
SavePersistentData();
76 virtual BOOL
RestorePersistentData();
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 BOOL
_HasContour() const { return pContour
!=0; };
86 void GetContour( PolyPolygon
&rPoly
) const;
89 void SetAutomaticContour( BOOL bSet
) { bAutomaticContour
= bSet
; }
90 BOOL
HasAutomaticContour() const { return bAutomaticContour
; }
92 // set either a MM100 or pixel contour
93 void SetContourAPI( const PolyPolygon
*pPoly
);
95 // get either a MM100 or pixel contour, return FALSE if no contour is set.
96 BOOL
GetContourAPI( PolyPolygon
&rPoly
) const;
98 void SetPixelContour( BOOL bSet
) { bPixelContour
= bSet
; }
99 BOOL
IsPixelContour() const;
101 BOOL
IsContourMapModeValid() const { return bContourMapModeValid
; }
103 //Besorgt die Graphic, mit SwapIn fuer GrfNode, per GetData fuer OLE.
104 Graphic
GetGraphic() const;
107 // Inline Metoden aus Node.hxx - erst hier ist der TxtNode bekannt !!
108 inline SwNoTxtNode
*SwNode::GetNoTxtNode()
110 return ND_NOTXTNODE
& nNodeType
? (SwNoTxtNode
*)this : 0;
112 inline const SwNoTxtNode
*SwNode::GetNoTxtNode() const
114 return ND_NOTXTNODE
& nNodeType
? (const SwNoTxtNode
*)this : 0;
117 #endif // _NDNOTXT_HXX