11d2dbeb0SAndrew Rist /**************************************************************
2cdf0e10cSrcweir *
31d2dbeb0SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
41d2dbeb0SAndrew Rist * or more contributor license agreements. See the NOTICE file
51d2dbeb0SAndrew Rist * distributed with this work for additional information
61d2dbeb0SAndrew Rist * regarding copyright ownership. The ASF licenses this file
71d2dbeb0SAndrew Rist * to you under the Apache License, Version 2.0 (the
81d2dbeb0SAndrew Rist * "License"); you may not use this file except in compliance
91d2dbeb0SAndrew Rist * with the License. You may obtain a copy of the License at
101d2dbeb0SAndrew Rist *
111d2dbeb0SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0
121d2dbeb0SAndrew Rist *
131d2dbeb0SAndrew Rist * Unless required by applicable law or agreed to in writing,
141d2dbeb0SAndrew Rist * software distributed under the License is distributed on an
151d2dbeb0SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
161d2dbeb0SAndrew Rist * KIND, either express or implied. See the License for the
171d2dbeb0SAndrew Rist * specific language governing permissions and limitations
181d2dbeb0SAndrew Rist * under the License.
191d2dbeb0SAndrew Rist *
201d2dbeb0SAndrew Rist *************************************************************/
211d2dbeb0SAndrew Rist
221d2dbeb0SAndrew Rist
23cdf0e10cSrcweir #ifndef _NDNOTXT_HXX
24cdf0e10cSrcweir #define _NDNOTXT_HXX
25cdf0e10cSrcweir
26cdf0e10cSrcweir #include "node.hxx"
27cdf0e10cSrcweir
28cdf0e10cSrcweir class PolyPolygon;
29cdf0e10cSrcweir
30cdf0e10cSrcweir // --------------------
31cdf0e10cSrcweir // SwNoTxtNode
32cdf0e10cSrcweir // --------------------
33cdf0e10cSrcweir
34cdf0e10cSrcweir class SW_DLLPUBLIC SwNoTxtNode : public SwCntntNode
35cdf0e10cSrcweir {
36cdf0e10cSrcweir friend class SwNodes;
37cdf0e10cSrcweir friend class SwNoTxtFrm;
38cdf0e10cSrcweir
39cdf0e10cSrcweir // String aAlternateText; // alternativer Text (HTML)
40cdf0e10cSrcweir
41cdf0e10cSrcweir PolyPolygon *pContour; // Polygon fuer Konturumlauf
42cdf0e10cSrcweir sal_Bool bAutomaticContour : 1; // automatic contour polygon, not manipulated
43cdf0e10cSrcweir sal_Bool bContourMapModeValid : 1; // contour map mode is not the graphics's
44*86e1cf34SPedro Giffuni // preferred map mode, but either
45cdf0e10cSrcweir // MM100 or or pixel
46cdf0e10cSrcweir sal_Bool bPixelContour : 1; // contour map mode is invalid and pixel.
47cdf0e10cSrcweir
48cdf0e10cSrcweir // erzeugt fuer alle Ableitungen einen AttrSet mit Bereichen
49cdf0e10cSrcweir // fuer Frame- und Grafik-Attributen (wird nur vom SwCntntNode gerufen)
50cdf0e10cSrcweir virtual void NewAttrSet( SwAttrPool& );
51cdf0e10cSrcweir
52cdf0e10cSrcweir SwNoTxtNode( const SwNoTxtNode& ); //nicht erlaubt
53cdf0e10cSrcweir SwNoTxtNode &operator=( const SwNoTxtNode& ); //nicht erlaubt
54cdf0e10cSrcweir
55cdf0e10cSrcweir protected:
56cdf0e10cSrcweir SwNoTxtNode( const SwNodeIndex &rWhere, const sal_uInt8 nNdType,
57cdf0e10cSrcweir SwGrfFmtColl *pGrColl, SwAttrSet* pAutoAttr = 0 );
58cdf0e10cSrcweir
59cdf0e10cSrcweir public:
60cdf0e10cSrcweir ~SwNoTxtNode();
61cdf0e10cSrcweir
62cdf0e10cSrcweir virtual SwCntntFrm *MakeFrm( SwFrm* );
63cdf0e10cSrcweir
GetGrfColl() const64cdf0e10cSrcweir inline SwGrfFmtColl *GetGrfColl() const { return (SwGrfFmtColl*)GetRegisteredIn(); }
65cdf0e10cSrcweir
66cdf0e10cSrcweir virtual Size GetTwipSize() const = 0;
67cdf0e10cSrcweir
68cdf0e10cSrcweir virtual sal_Bool SavePersistentData();
69cdf0e10cSrcweir virtual sal_Bool RestorePersistentData();
70cdf0e10cSrcweir
71cdf0e10cSrcweir const String GetTitle() const;
72cdf0e10cSrcweir void SetTitle( const String& rTitle,
73cdf0e10cSrcweir bool bBroadcast = false );
74cdf0e10cSrcweir const String GetDescription() const;
75cdf0e10cSrcweir void SetDescription( const String& rDescription,
76cdf0e10cSrcweir bool bBroadcast = false );
77cdf0e10cSrcweir
78cdf0e10cSrcweir // const String GetAlternateText() const;
79cdf0e10cSrcweir // void SetAlternateText( const String& rTxt,
80cdf0e10cSrcweir // sal_Bool bBroadcast=sal_False );
81cdf0e10cSrcweir
82cdf0e10cSrcweir void SetContour( const PolyPolygon *pPoly,
83cdf0e10cSrcweir sal_Bool bAutomatic = sal_False );
84cdf0e10cSrcweir const PolyPolygon *HasContour() const;
_HasContour() const85cdf0e10cSrcweir sal_Bool _HasContour() const { return pContour!=0; };
86cdf0e10cSrcweir void GetContour( PolyPolygon &rPoly ) const;
87cdf0e10cSrcweir void CreateContour();
88cdf0e10cSrcweir
SetAutomaticContour(sal_Bool bSet)89cdf0e10cSrcweir void SetAutomaticContour( sal_Bool bSet ) { bAutomaticContour = bSet; }
HasAutomaticContour() const90cdf0e10cSrcweir sal_Bool HasAutomaticContour() const { return bAutomaticContour; }
91cdf0e10cSrcweir
92cdf0e10cSrcweir // set either a MM100 or pixel contour
93cdf0e10cSrcweir void SetContourAPI( const PolyPolygon *pPoly );
94cdf0e10cSrcweir
95cdf0e10cSrcweir // get either a MM100 or pixel contour, return sal_False if no contour is set.
96cdf0e10cSrcweir sal_Bool GetContourAPI( PolyPolygon &rPoly ) const;
97cdf0e10cSrcweir
SetPixelContour(sal_Bool bSet)98cdf0e10cSrcweir void SetPixelContour( sal_Bool bSet ) { bPixelContour = bSet; }
99cdf0e10cSrcweir sal_Bool IsPixelContour() const;
100cdf0e10cSrcweir
IsContourMapModeValid() const101cdf0e10cSrcweir sal_Bool IsContourMapModeValid() const { return bContourMapModeValid; }
102cdf0e10cSrcweir
103cdf0e10cSrcweir //Besorgt die Graphic, mit SwapIn fuer GrfNode, per GetData fuer OLE.
104cdf0e10cSrcweir Graphic GetGraphic() const;
105cdf0e10cSrcweir };
106cdf0e10cSrcweir
107cdf0e10cSrcweir // Inline Metoden aus Node.hxx - erst hier ist der TxtNode bekannt !!
GetNoTxtNode()108cdf0e10cSrcweir inline SwNoTxtNode *SwNode::GetNoTxtNode()
109cdf0e10cSrcweir {
110cdf0e10cSrcweir return ND_NOTXTNODE & nNodeType ? (SwNoTxtNode*)this : 0;
111cdf0e10cSrcweir }
GetNoTxtNode() const112cdf0e10cSrcweir inline const SwNoTxtNode *SwNode::GetNoTxtNode() const
113cdf0e10cSrcweir {
114cdf0e10cSrcweir return ND_NOTXTNODE & nNodeType ? (const SwNoTxtNode*)this : 0;
115cdf0e10cSrcweir }
116cdf0e10cSrcweir
117cdf0e10cSrcweir #endif // _NDNOTXT_HXX
118