1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
28 class SW_DLLPUBLIC SwNoTxtNode
: public SwCntntNode
31 friend class SwNoTxtFrm
;
33 PolyPolygon
*pContour
;
34 sal_Bool bAutomaticContour
: 1; // automatic contour polygon, not manipulated
35 sal_Bool bContourMapModeValid
: 1; // contour map mode is not the graphics's
36 // prefered map mode, but either
38 sal_Bool bPixelContour
: 1; // contour map mode is invalid and pixel.
40 // Creates for all derivations an AttrSet with ranges for frame- and
41 // graphics-attributes (only called by SwCntntNode).
42 virtual void NewAttrSet( SwAttrPool
& );
44 SwNoTxtNode( const SwNoTxtNode
& ); // Not allowed.
45 SwNoTxtNode
&operator=( const SwNoTxtNode
& ); // Not allowed.
48 SwNoTxtNode( const SwNodeIndex
&rWhere
, const sal_uInt8 nNdType
,
49 SwGrfFmtColl
*pGrColl
, SwAttrSet
* pAutoAttr
= 0 );
54 virtual SwCntntFrm
*MakeFrm( SwFrm
* );
56 inline SwGrfFmtColl
*GetGrfColl() const { return (SwGrfFmtColl
*)GetRegisteredIn(); }
58 virtual Size
GetTwipSize() const = 0;
60 virtual sal_Bool
SavePersistentData();
61 virtual sal_Bool
RestorePersistentData();
63 const String
GetTitle() const;
64 void SetTitle( const String
& rTitle
,
65 bool bBroadcast
= false );
66 const String
GetDescription() const;
67 void SetDescription( const String
& rDescription
,
68 bool bBroadcast
= false );
70 void SetContour( const PolyPolygon
*pPoly
,
71 sal_Bool bAutomatic
= sal_False
);
72 const PolyPolygon
*HasContour() const;
73 sal_Bool
_HasContour() const { return pContour
!=0; };
74 void GetContour( PolyPolygon
&rPoly
) const;
77 void SetAutomaticContour( sal_Bool bSet
) { bAutomaticContour
= bSet
; }
78 sal_Bool
HasAutomaticContour() const { return bAutomaticContour
; }
80 // set either a MM100 or pixel contour
81 void SetContourAPI( const PolyPolygon
*pPoly
);
83 // get either a MM100 or pixel contour, return sal_False if no contour is set.
84 sal_Bool
GetContourAPI( PolyPolygon
&rPoly
) const;
86 void SetPixelContour( sal_Bool bSet
) { bPixelContour
= bSet
; }
87 sal_Bool
IsPixelContour() const;
89 sal_Bool
IsContourMapModeValid() const { return bContourMapModeValid
; }
91 // Obtains the graphic with SwapIn for GrfNode via GetData for OLE.
92 Graphic
GetGraphic() const;
95 // Inline methods from Node.hxx - we know TxtNode only here!!
96 inline SwNoTxtNode
*SwNode::GetNoTxtNode()
98 return ND_NOTXTNODE
& nNodeType
? (SwNoTxtNode
*)this : 0;
100 inline const SwNoTxtNode
*SwNode::GetNoTxtNode() const
102 return ND_NOTXTNODE
& nNodeType
? (const SwNoTxtNode
*)this : 0;
105 #endif // _NDNOTXT_HXX
107 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */