update dev300-m58
[ooovba.git] / sw / inc / ndnotxt.hxx
blob4097627f9116ff098cfc587a47aeac82d1ff8609
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 ************************************************************************/
30 #ifndef _NDNOTXT_HXX
31 #define _NDNOTXT_HXX
33 #include "node.hxx"
35 class PolyPolygon;
37 // --------------------
38 // SwNoTxtNode
39 // --------------------
41 class SW_DLLPUBLIC SwNoTxtNode : public SwCntntNode
43 friend class SwNodes;
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
52 // MM100 or or pixel
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
62 protected:
63 SwNoTxtNode( const SwNodeIndex &rWhere, const BYTE nNdType,
64 SwGrfFmtColl *pGrColl, SwAttrSet* pAutoAttr = 0 );
66 public:
67 ~SwNoTxtNode();
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 const String GetTitle() const;
79 void SetTitle( const String& rTitle,
80 bool bBroadcast = false );
81 const String GetDescription() const;
82 void SetDescription( const String& rDescription,
83 bool bBroadcast = false );
85 // const String GetAlternateText() const;
86 // void SetAlternateText( const String& rTxt,
87 // sal_Bool bBroadcast=sal_False );
89 void SetContour( const PolyPolygon *pPoly,
90 BOOL bAutomatic = FALSE );
91 const PolyPolygon *HasContour() const;
92 BOOL _HasContour() const { return pContour!=0; };
93 void GetContour( PolyPolygon &rPoly ) const;
94 void CreateContour();
96 void SetAutomaticContour( BOOL bSet ) { bAutomaticContour = bSet; }
97 BOOL HasAutomaticContour() const { return bAutomaticContour; }
99 // set either a MM100 or pixel contour
100 void SetContourAPI( const PolyPolygon *pPoly );
102 // get either a MM100 or pixel contour, return FALSE if no contour is set.
103 BOOL GetContourAPI( PolyPolygon &rPoly ) const;
105 void SetPixelContour( BOOL bSet ) { bPixelContour = bSet; }
106 BOOL IsPixelContour() const;
108 BOOL IsContourMapModeValid() const { return bContourMapModeValid; }
110 //Besorgt die Graphic, mit SwapIn fuer GrfNode, per GetData fuer OLE.
111 Graphic GetGraphic() const;
114 // Inline Metoden aus Node.hxx - erst hier ist der TxtNode bekannt !!
115 inline SwNoTxtNode *SwNode::GetNoTxtNode()
117 return ND_NOTXTNODE & nNodeType ? (SwNoTxtNode*)this : 0;
119 inline const SwNoTxtNode *SwNode::GetNoTxtNode() const
121 return ND_NOTXTNODE & nNodeType ? (const SwNoTxtNode*)this : 0;
124 #endif // _NDNOTXT_HXX