merge the formfield patch from ooo-build
[ooovba.git] / sd / source / ui / inc / outlinfo.hxx
blob9fb354e7d612ab54245dca60e5491b514302147e
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: outlinfo.hxx,v $
10 * $Revision: 1.6.108.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 ************************************************************************/
31 #ifndef _OUTLINFO_HXX
32 #define _OUTLINFO_HXX
34 #include <tools/gen.hxx>
35 #include <vcl/outdev.hxx>
37 // ---------------
38 // - SdLaserInfo -
39 // ---------------
41 struct OutlinerCharacter
43 Rectangle aRect;
44 ULONG nPara;
45 Color aColor;
47 // #101500# Removed CharCode, it's only used in one place to compare
48 // for single space character. This can be done at creation, too.
49 //USHORT nCharCode;
51 OutlinerCharacter( const Rectangle& _rRect, ULONG _nPara, const Color& _rCol /* #101500#, USHORT _nCharCode*/ )
52 : aRect( _rRect ),
53 nPara( _nPara ),
54 aColor( _rCol )
59 // -----------------------------------------------------------------------------
61 struct OutlinerParagraph
63 Rectangle aRect;
64 ULONG nCharCount;
66 OutlinerParagraph() : nCharCount( 0 ) {}
67 ~OutlinerParagraph() {};
70 // ----------------
71 // - OutlinerInfo -
72 // ----------------
74 class DrawPortionInfo;
75 class SdDrawDocument;
76 class SdrRectObj;
78 class OutlinerInfo
80 private:
82 List aCharacterList;
83 Rectangle aObjBound;
84 Rectangle aParaBound;
85 Point aTextOffset;
86 OutlinerParagraph* pParagraphs;
87 OutputDevice* mpOut;
88 ULONG nParaCount;
89 ULONG nCurPara;
90 long nExtraData;
91 BOOL bInit;
92 BOOL mbVertical;
94 OutlinerInfo( const OutlinerInfo& ) {}
95 OutlinerInfo& operator=( const OutlinerInfo& ) { return *this; }
97 DECL_LINK( DrawPortionHdl, DrawPortionInfo* );
99 public:
101 OutlinerInfo();
102 ~OutlinerInfo();
104 void Clear();
106 void SetTextObj( SdDrawDocument* pDoc, SdrRectObj* pObj, OutputDevice* _pOut );
108 const Rectangle& GetObjRect() const { return aObjBound; }
109 const Rectangle& GetTextRect() const { return aParaBound; }
110 const Point& GetTextOffset() const { return aTextOffset; }
112 ULONG GetParaCount() const { return nParaCount; }
114 const Rectangle& GetParaRect( const ULONG nPara ) const;
115 BOOL GetParaCharCount( const ULONG nPara ) const;
117 ULONG GetCharacterCount() const { return aCharacterList.Count(); }
118 OutlinerCharacter* GetCharacter( ULONG nPos ) const { return (OutlinerCharacter*) aCharacterList.GetObject( nPos ); };
119 OutlinerCharacter* GetFirstCharacter() { return (OutlinerCharacter*) aCharacterList.First(); }
120 OutlinerCharacter* GetNextCharacter() { return (OutlinerCharacter*) aCharacterList.Next(); }
122 void SetExtraData( const long _nExtraData = 0L ) { nExtraData = _nExtraData; }
123 long GetExtraData() const { return nExtraData; }
125 BOOL IsVertical() const { return mbVertical; }
128 #endif