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: txtrange.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 ************************************************************************/
31 #ifndef _MyTXTRANGE_HXX
32 #define _MyTXTRANGE_HXX
35 #define _SVSTDARR_BOOLS
36 #define _SVSTDARR_LONGS
37 #include <bf_svtools/svstdarr.hxx>
46 typedef SvLongs
* SvLongsPtr
;
48 /*************************************************************************
53 |* Ersterstellung 20.01.97
54 |* Letzte Aenderung AMA 20.01.97
56 *************************************************************************/
61 PolyPolygon
*pPoly
; // Flaechenpolygon
62 PolyPolygon
*pLine
; // Linienpolygon
63 Rectangle
*pBound
; // Umfassendes Rechteck
64 USHORT nCacheSize
; // Cache-Size
65 USHORT nCacheIdx
; // Cache-Index
66 USHORT nRight
; // Abstand Kontur-Text
67 USHORT nLeft
; // Abstand Text-Kontur
68 USHORT nUpper
; // Abstand Kontur-Text
69 USHORT nLower
; // Abstand Text-Kontur
70 USHORT nPointCount
; // Anzahl der Polygonpunkte
71 BOOL bSimple
: 1; // Nur Aussenkante
72 BOOL bInner
: 1; // TRUE: Objekt beschriften (EditEngine);
73 // FALSE: Objekt umfliessen (StarWriter);
74 BOOL bVertical
:1; // for vertical writing mode
80 TextRanger( const TextRanger
& ); // not implemented
82 TextRanger( const XPolyPolygon
& rXPoly
, const XPolyPolygon
* pXLine
,
83 USHORT nCacheSize
, USHORT nLeft
, USHORT nRight
,
84 BOOL bSimple
, BOOL bInner
, BOOL bVert
= sal_False
);
86 SvLongsPtr
GetTextRanges( const Range
& rRange
);
87 USHORT
GetRight() const { return nRight
; }
88 USHORT
GetLeft() const { return nLeft
; }
89 USHORT
GetUpper() const { return nUpper
; }
90 USHORT
GetLower() const { return nLower
; }
91 USHORT
GetPointCount() const { return nPointCount
; }
92 BOOL
IsSimple() const { return bSimple
; }
93 BOOL
IsInner() const { return bInner
; }
94 BOOL
IsVertical() const { return bVertical
; }
95 BOOL
HasBorder() const { return nRight
|| nLeft
; }
96 const PolyPolygon
& GetPolyPolygon() const { return *pPoly
; }
97 const PolyPolygon
* GetLinePolygon() const { return pLine
; }
98 void SetUpper( USHORT nNew
){ nUpper
= nNew
; }
99 void SetLower( USHORT nNew
){ nLower
= nNew
; }
100 BOOL
IsFlag3() const { return bFlag3
; }
101 void SetFlag3( BOOL bNew
) { bFlag3
= bNew
; }
102 BOOL
IsFlag4() const { return bFlag4
; }
103 void SetFlag4( BOOL bNew
) { bFlag4
= bNew
; }
104 BOOL
IsFlag5() const { return bFlag5
; }
105 void SetFlag5( BOOL bNew
) { bFlag5
= bNew
; }
106 BOOL
IsFlag6() const { return bFlag6
; }
107 void SetFlag6( BOOL bNew
) { bFlag6
= bNew
; }
108 BOOL
IsFlag7() const { return bFlag7
; }
109 void SetFlag7( BOOL bNew
) { bFlag7
= bNew
; }
112 }//end of namespace binfilter
113 #endif // _TXTRANGE_HXX