xref: /aoo41x/main/sw/source/core/text/inftxt.hxx (revision b8d31f9f)
1*1d2dbeb0SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*1d2dbeb0SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*1d2dbeb0SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*1d2dbeb0SAndrew Rist  * distributed with this work for additional information
6*1d2dbeb0SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*1d2dbeb0SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*1d2dbeb0SAndrew Rist  * "License"); you may not use this file except in compliance
9*1d2dbeb0SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*1d2dbeb0SAndrew Rist  *
11*1d2dbeb0SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*1d2dbeb0SAndrew Rist  *
13*1d2dbeb0SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*1d2dbeb0SAndrew Rist  * software distributed under the License is distributed on an
15*1d2dbeb0SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*1d2dbeb0SAndrew Rist  * KIND, either express or implied.  See the License for the
17*1d2dbeb0SAndrew Rist  * specific language governing permissions and limitations
18*1d2dbeb0SAndrew Rist  * under the License.
19*1d2dbeb0SAndrew Rist  *
20*1d2dbeb0SAndrew Rist  *************************************************************/
21*1d2dbeb0SAndrew Rist 
22*1d2dbeb0SAndrew Rist 
23cdf0e10cSrcweir #ifndef _INFTXT_HXX
24cdf0e10cSrcweir #define _INFTXT_HXX
25cdf0e10cSrcweir #include <com/sun/star/linguistic2/XHyphenatedWord.hpp>
26cdf0e10cSrcweir #include <com/sun/star/beans/PropertyValues.hpp>
27cdf0e10cSrcweir 
28cdf0e10cSrcweir #ifndef _TABLE_HXX //autogen
29cdf0e10cSrcweir #include <tools/table.hxx>
30cdf0e10cSrcweir #endif
31cdf0e10cSrcweir 
32cdf0e10cSrcweir #include "swtypes.hxx"
33cdf0e10cSrcweir #include "txttypes.hxx"
34cdf0e10cSrcweir #include "swrect.hxx"
35cdf0e10cSrcweir #include "txtfly.hxx"
36cdf0e10cSrcweir #include "swfont.hxx"
37cdf0e10cSrcweir #include "porlay.hxx"
38cdf0e10cSrcweir #include "txtfrm.hxx"
39cdf0e10cSrcweir #include "ndtxt.hxx"
40cdf0e10cSrcweir #include "txttypes.hxx"
41cdf0e10cSrcweir #include <editeng/paravertalignitem.hxx>
42cdf0e10cSrcweir 
43cdf0e10cSrcweir class Font;
44cdf0e10cSrcweir class OutputDevice;
45cdf0e10cSrcweir class SvxBrushItem;
46cdf0e10cSrcweir class SvxLineSpacingItem;
47cdf0e10cSrcweir class SvxTabStop;
48cdf0e10cSrcweir class SvxTabStopItem;
49cdf0e10cSrcweir class SwAttrSet;
50cdf0e10cSrcweir class SwFldPortion;
51cdf0e10cSrcweir class SwFlyPortion;
52cdf0e10cSrcweir class SwFmtDrop;
53cdf0e10cSrcweir class SwLineLayout;
54cdf0e10cSrcweir class SwLinePortion;
55cdf0e10cSrcweir class SwParaPortion;
56cdf0e10cSrcweir class SwTabPortion;
57cdf0e10cSrcweir class SwTxtFrm;
58cdf0e10cSrcweir class SwTxtSizeInfo;
59cdf0e10cSrcweir class SwViewOption;
60cdf0e10cSrcweir class ViewShell;
61cdf0e10cSrcweir class SwTxtFtn;
62cdf0e10cSrcweir class SwAttrIter;
63cdf0e10cSrcweir struct SwMultiCreator;
64cdf0e10cSrcweir class SwMultiPortion;
65cdf0e10cSrcweir class SwWrongList;
66cdf0e10cSrcweir 
67cdf0e10cSrcweir /* Minimum: Prozentwert fuers kernen */
68cdf0e10cSrcweir #define MINKERNPERCENT 5
69cdf0e10cSrcweir #define ARROW_WIDTH	200
70cdf0e10cSrcweir #define DIR_LEFT2RIGHT 0
71cdf0e10cSrcweir #define DIR_BOTTOM2TOP 1
72cdf0e10cSrcweir #define DIR_RIGHT2LEFT 2
73cdf0e10cSrcweir #define DIR_TOP2BOTTOM 3
74cdf0e10cSrcweir 
75cdf0e10cSrcweir #ifdef DBG_UTIL
76cdf0e10cSrcweir #define OPTCALM( rInf )  (rInf).IsOptCalm()
77cdf0e10cSrcweir #define OPTLOW( rInf )	 (rInf).IsOptLow()
78cdf0e10cSrcweir #define OPTDBG( rInf )	 (rInf).IsOptDbg()
79cdf0e10cSrcweir #else
80cdf0e10cSrcweir #define OPTCALM( rInf )  sal_True
81cdf0e10cSrcweir #define OPTLOW( rInf )	 sal_False
82cdf0e10cSrcweir #define OPTDBG( rInf )	 sal_False
83cdf0e10cSrcweir #endif
84cdf0e10cSrcweir 
85cdf0e10cSrcweir /*************************************************************************
86cdf0e10cSrcweir  *						class SwLineInfo
87cdf0e10cSrcweir  *************************************************************************/
88cdf0e10cSrcweir 
89cdf0e10cSrcweir // Beruecksichtigt das Attribut LineSpace bei der Hoehen/Ascentberechnung.
90cdf0e10cSrcweir 
91cdf0e10cSrcweir class SwLineInfo
92cdf0e10cSrcweir {
93cdf0e10cSrcweir 	friend class SwTxtIter;
94cdf0e10cSrcweir 
95cdf0e10cSrcweir     SvxTabStopItem* pRuler;
96cdf0e10cSrcweir 	const SvxLineSpacingItem *pSpace;
97cdf0e10cSrcweir     sal_uInt16 nVertAlign;
98cdf0e10cSrcweir     KSHORT nDefTabStop;
99cdf0e10cSrcweir     // --> OD 2008-02-04 #newlistlevelattrs#
100cdf0e10cSrcweir     bool bListTabStopIncluded;
101cdf0e10cSrcweir     long nListTabStopPosition;
102cdf0e10cSrcweir     // <--
103cdf0e10cSrcweir 
104cdf0e10cSrcweir     // --> OD 2008-01-17 #newlistlevelattrs#
105cdf0e10cSrcweir     void CtorInitLineInfo( const SwAttrSet& rAttrSet,
106cdf0e10cSrcweir                            const SwTxtNode& rTxtNode );
107cdf0e10cSrcweir     // <--
108cdf0e10cSrcweir 
109cdf0e10cSrcweir     // --> OD 2008-01-17 #newlistlevelattrs#
110cdf0e10cSrcweir     SwLineInfo();
111cdf0e10cSrcweir     ~SwLineInfo();
112cdf0e10cSrcweir public:
113cdf0e10cSrcweir //        const SvxTabStop *GetTabStop( const SwTwips nLinePos,
114cdf0e10cSrcweir //                                        const SwTwips nLeft,
115cdf0e10cSrcweir     // #i24363# tab stops relative to indent - returns the tab stop following nSearchPos or NULL
116cdf0e10cSrcweir     const SvxTabStop *GetTabStop( const SwTwips nSearchPos,
117cdf0e10cSrcweir 								 const SwTwips nRight ) const;
GetLineSpacing() const118cdf0e10cSrcweir 	inline const SvxLineSpacingItem *GetLineSpacing() const { return pSpace; }
GetDefTabStop() const119cdf0e10cSrcweir 	inline KSHORT GetDefTabStop() const { return nDefTabStop; }
SetDefTabStop(KSHORT nNew) const120cdf0e10cSrcweir 	inline void SetDefTabStop( KSHORT nNew ) const
121cdf0e10cSrcweir 		{ ( (SwLineInfo*)this )->nDefTabStop = nNew; }
122cdf0e10cSrcweir 
123cdf0e10cSrcweir     // vertical alignment
GetVertAlign() const124cdf0e10cSrcweir     inline sal_uInt16 GetVertAlign() const { return nVertAlign; }
HasSpecialAlign(sal_Bool bVert) const125cdf0e10cSrcweir     inline sal_Bool HasSpecialAlign( sal_Bool bVert ) const
126cdf0e10cSrcweir         { return bVert ?
127cdf0e10cSrcweir                  ( SvxParaVertAlignItem::BASELINE  != nVertAlign ) :
128cdf0e10cSrcweir                  ( SvxParaVertAlignItem::BASELINE  != nVertAlign &&
129cdf0e10cSrcweir                    SvxParaVertAlignItem::AUTOMATIC != nVertAlign ); }
130cdf0e10cSrcweir 
131cdf0e10cSrcweir     sal_uInt16 NumberOfTabStops() const;
132cdf0e10cSrcweir 
133cdf0e10cSrcweir     // --> OD 2008-02-04 #newlistlevelattrs#
IsListTabStopIncluded() const134cdf0e10cSrcweir     inline bool IsListTabStopIncluded() const
135cdf0e10cSrcweir     {
136cdf0e10cSrcweir         return bListTabStopIncluded;
137cdf0e10cSrcweir     }
GetListTabStopPosition() const138cdf0e10cSrcweir     inline long GetListTabStopPosition() const
139cdf0e10cSrcweir     {
140cdf0e10cSrcweir         return nListTabStopPosition;
141cdf0e10cSrcweir     }
142cdf0e10cSrcweir     // <--
143cdf0e10cSrcweir 
144cdf0e10cSrcweir 
145cdf0e10cSrcweir //  friend ostream &operator<<( ostream &rOS, const SwLineInfo &rInf );
146cdf0e10cSrcweir 	friend SvStream &operator<<( SvStream &rOS, const SwLineInfo &rInf );
147cdf0e10cSrcweir };
148cdf0e10cSrcweir 
149cdf0e10cSrcweir /*************************************************************************
150cdf0e10cSrcweir  *						class SwTxtInfo
151cdf0e10cSrcweir  *************************************************************************/
152cdf0e10cSrcweir 
153cdf0e10cSrcweir class SwTxtInfo
154cdf0e10cSrcweir {
155cdf0e10cSrcweir 	// Implementation in txthyph.cxx
156cdf0e10cSrcweir 	friend void SetParaPortion( SwTxtInfo *pInf, SwParaPortion *pRoot );
157cdf0e10cSrcweir 	SwParaPortion *pPara;
158cdf0e10cSrcweir 	xub_StrLen nTxtStart;				  // TxtOfst bei Follows
159cdf0e10cSrcweir 
160cdf0e10cSrcweir protected:
SwTxtInfo()161cdf0e10cSrcweir 	inline SwTxtInfo() { }
162cdf0e10cSrcweir public:
163cdf0e10cSrcweir 	void CtorInitTxtInfo( SwTxtFrm *pFrm );
164cdf0e10cSrcweir 	SwTxtInfo( const SwTxtInfo &rInf );
SwTxtInfo(SwTxtFrm * pFrm)165cdf0e10cSrcweir 	inline SwTxtInfo( SwTxtFrm *pFrm ) { CtorInitTxtInfo( pFrm ); }
GetParaPortion()166cdf0e10cSrcweir 	inline SwParaPortion *GetParaPortion() { return pPara; }
GetParaPortion() const167cdf0e10cSrcweir 	inline const SwParaPortion *GetParaPortion() const { return pPara; }
GetTxtStart() const168cdf0e10cSrcweir 	inline xub_StrLen GetTxtStart() const { return nTxtStart; }
169cdf0e10cSrcweir 
170cdf0e10cSrcweir 	friend SvStream &operator<<( SvStream &rOS, const SwTxtInfo &rInf );
171cdf0e10cSrcweir };
172cdf0e10cSrcweir 
173cdf0e10cSrcweir /*************************************************************************
174cdf0e10cSrcweir  *						class SwTxtSizeInfo
175cdf0e10cSrcweir  *************************************************************************/
176cdf0e10cSrcweir 
177cdf0e10cSrcweir DECLARE_TABLE( SwTxtPortionTable, sal_IntPtr )
178cdf0e10cSrcweir 
179cdf0e10cSrcweir class SwTxtSizeInfo : public SwTxtInfo
180cdf0e10cSrcweir {
181cdf0e10cSrcweir protected:
182cdf0e10cSrcweir     // during formatting, a small database is built, mapping portion pointers
183cdf0e10cSrcweir     // to their maximum size (used for kana compression)
184cdf0e10cSrcweir     SwTxtPortionTable aMaxWidth;
185cdf0e10cSrcweir     // for each line, an array of compression values is calculated
186cdf0e10cSrcweir     // this array is passed over to the info structure
187cdf0e10cSrcweir     SvUShorts* pKanaComp;
188cdf0e10cSrcweir 
189cdf0e10cSrcweir 	ViewShell	 *pVsh;
190cdf0e10cSrcweir 
191cdf0e10cSrcweir     // pOut is the output device, pRef is the device used for formatting
192cdf0e10cSrcweir     OutputDevice* pOut;
193cdf0e10cSrcweir     OutputDevice* pRef;
194cdf0e10cSrcweir 
195cdf0e10cSrcweir 	SwFont *pFnt;
196cdf0e10cSrcweir     SwUnderlineFont *pUnderFnt; // Font for underlining
197cdf0e10cSrcweir 	SwTxtFrm *pFrm;
198cdf0e10cSrcweir 	const SwViewOption *pOpt;
199cdf0e10cSrcweir 	const XubString *pTxt;
200cdf0e10cSrcweir 	xub_StrLen nIdx, nLen;
201cdf0e10cSrcweir     sal_uInt16 nKanaIdx;
202cdf0e10cSrcweir     sal_Bool bOnWin     : 1;
203cdf0e10cSrcweir 	sal_Bool bNotEOL	: 1;
204cdf0e10cSrcweir 	sal_Bool bURLNotify : 1;
205cdf0e10cSrcweir 	sal_Bool bStopUnderFlow : 1;// Underflow gestoppt z.B. von einer FlyPortion
206cdf0e10cSrcweir     sal_Bool bFtnInside : 1;    // the current line contains a footnote
207cdf0e10cSrcweir     sal_Bool bOtherThanFtnInside : 1; // the current line contains another portion than a footnote portion.
208cdf0e10cSrcweir                                       // needed for checking keep together of footnote portion with previous portion
209cdf0e10cSrcweir 	sal_Bool bMulti : 1;		// inside a multiportion
210cdf0e10cSrcweir     sal_Bool bFirstMulti : 1;   // this flag is used for two purposes:
211cdf0e10cSrcweir                                 // - the multiportion is the first lineportion
212cdf0e10cSrcweir                                 // - indicates, if we are currently in second
213cdf0e10cSrcweir                                 //   line of multi portion
214cdf0e10cSrcweir 	sal_Bool bRuby : 1;			// during the formatting of a phonetic line
215cdf0e10cSrcweir 	sal_Bool bHanging : 1;		// formatting of hanging punctuation allowed
216cdf0e10cSrcweir 	sal_Bool bScriptSpace : 1;	// space between different scripts (Asian/Latin)
217cdf0e10cSrcweir 	sal_Bool bForbiddenChars : 1; // Forbidden start/endline characters
218cdf0e10cSrcweir     sal_Bool bSnapToGrid : 1;   // paragraph snaps to grid
219cdf0e10cSrcweir     sal_uInt8 nDirection : 2;       // writing direction: 0/90/180/270 degree
220cdf0e10cSrcweir 
221cdf0e10cSrcweir protected:
222cdf0e10cSrcweir 	void CtorInitTxtSizeInfo( SwTxtFrm *pFrm, SwFont *pFnt = 0,
223cdf0e10cSrcweir 				   const xub_StrLen nIdx = 0,
224cdf0e10cSrcweir 				   const xub_StrLen nLen = STRING_LEN );
SwTxtSizeInfo()225cdf0e10cSrcweir 	SwTxtSizeInfo() {}
226cdf0e10cSrcweir public:
227cdf0e10cSrcweir 	SwTxtSizeInfo( const SwTxtSizeInfo &rInf );
228cdf0e10cSrcweir 	SwTxtSizeInfo( const SwTxtSizeInfo &rInf, const XubString &rTxt,
229cdf0e10cSrcweir 				   const xub_StrLen nIdx = 0,
230cdf0e10cSrcweir 				   const xub_StrLen nLen = STRING_LEN );
231cdf0e10cSrcweir 
SwTxtSizeInfo(SwTxtFrm * pTxtFrm,SwFont * pTxtFnt=0,const xub_StrLen nIndex=0,const xub_StrLen nLength=STRING_LEN)232cdf0e10cSrcweir     inline SwTxtSizeInfo( SwTxtFrm *pTxtFrm, SwFont *pTxtFnt = 0,
233cdf0e10cSrcweir                    const xub_StrLen nIndex = 0,
234cdf0e10cSrcweir                    const xub_StrLen nLength = STRING_LEN )
235cdf0e10cSrcweir            { CtorInitTxtSizeInfo( pTxtFrm, pTxtFnt, nIndex, nLength ); }
236cdf0e10cSrcweir 
237cdf0e10cSrcweir 	// GetMultiAttr returns the text attribute of the multiportion,
238cdf0e10cSrcweir 	// if rPos is inside any multi-line part.
239cdf0e10cSrcweir 	// rPos will set to the end of the multi-line part.
240cdf0e10cSrcweir     SwMultiCreator* GetMultiCreator( xub_StrLen &rPos, SwMultiPortion* pM ) const;
241cdf0e10cSrcweir 
OnWin() const242cdf0e10cSrcweir 	inline sal_Bool OnWin() const { return bOnWin; }
SetOnWin(const sal_Bool bNew)243cdf0e10cSrcweir 	inline void SetOnWin( const sal_Bool bNew ) { bOnWin = bNew; }
NotEOL() const244cdf0e10cSrcweir 	inline sal_Bool NotEOL() const { return bNotEOL; }
SetNotEOL(const sal_Bool bNew)245cdf0e10cSrcweir 	inline void SetNotEOL( const sal_Bool bNew ) { bNotEOL = bNew; }
URLNotify() const246cdf0e10cSrcweir 	inline sal_Bool URLNotify() const { return bURLNotify; }
SetURLNotify(const sal_Bool bNew)247cdf0e10cSrcweir 	inline void SetURLNotify( const sal_Bool bNew ) { bURLNotify = bNew; }
StopUnderFlow() const248cdf0e10cSrcweir 	inline sal_Bool StopUnderFlow() const { return bStopUnderFlow; }
SetStopUnderFlow(const sal_Bool bNew)249cdf0e10cSrcweir 	inline void SetStopUnderFlow( const sal_Bool bNew ) { bStopUnderFlow = bNew; }
IsFtnInside() const250cdf0e10cSrcweir 	inline sal_Bool IsFtnInside() const { return bFtnInside; }
SetFtnInside(const sal_Bool bNew)251cdf0e10cSrcweir 	inline void SetFtnInside( const sal_Bool bNew ) { bFtnInside = bNew; }
IsOtherThanFtnInside() const252cdf0e10cSrcweir     inline sal_Bool IsOtherThanFtnInside() const { return bOtherThanFtnInside; }
SetOtherThanFtnInside(const sal_Bool bNew)253cdf0e10cSrcweir     inline void SetOtherThanFtnInside( const sal_Bool bNew ) { bOtherThanFtnInside = bNew; }
IsMulti() const254cdf0e10cSrcweir 	inline sal_Bool IsMulti() const { return bMulti; }
SetMulti(const sal_Bool bNew)255cdf0e10cSrcweir 	inline void SetMulti( const sal_Bool bNew ) { bMulti = bNew; }
IsFirstMulti() const256cdf0e10cSrcweir 	inline sal_Bool IsFirstMulti() const { return bFirstMulti; }
SetFirstMulti(const sal_Bool bNew)257cdf0e10cSrcweir 	inline void SetFirstMulti( const sal_Bool bNew ) { bFirstMulti = bNew; }
IsRuby() const258cdf0e10cSrcweir 	inline sal_Bool IsRuby() const { return bRuby; }
SetRuby(const sal_Bool bNew)259cdf0e10cSrcweir 	inline void SetRuby( const sal_Bool bNew ) { bRuby = bNew; }
IsHanging() const260cdf0e10cSrcweir 	inline sal_Bool IsHanging() const { return bHanging; }
SetHanging(const sal_Bool bNew)261cdf0e10cSrcweir 	inline void SetHanging( const sal_Bool bNew ) { bHanging = bNew; }
HasScriptSpace() const262cdf0e10cSrcweir 	inline sal_Bool HasScriptSpace() const { return bScriptSpace; }
SetScriptSpace(const sal_Bool bNew)263cdf0e10cSrcweir 	inline void SetScriptSpace( const sal_Bool bNew ) { bScriptSpace = bNew; }
HasForbiddenChars() const264cdf0e10cSrcweir 	inline sal_Bool HasForbiddenChars() const { return bForbiddenChars; }
SetForbiddenChars(const sal_Bool bN)265cdf0e10cSrcweir 	inline void SetForbiddenChars( const sal_Bool bN ) { bForbiddenChars = bN; }
SnapToGrid() const266cdf0e10cSrcweir     inline sal_Bool SnapToGrid() const { return bSnapToGrid; }
SetSnapToGrid(const sal_Bool bN)267cdf0e10cSrcweir     inline void SetSnapToGrid( const sal_Bool bN ) { bSnapToGrid = bN; }
GetDirection() const268cdf0e10cSrcweir     inline sal_uInt8 GetDirection() const { return nDirection; }
SetDirection(const sal_uInt8 nNew)269cdf0e10cSrcweir 	inline void SetDirection( const sal_uInt8 nNew ) { nDirection = nNew; }
IsRotated() const270cdf0e10cSrcweir 	inline sal_Bool IsRotated() const { return 0 != ( 1 & nDirection ); }
271cdf0e10cSrcweir 
GetVsh()272cdf0e10cSrcweir 	inline ViewShell *GetVsh() { return pVsh; }
GetVsh() const273cdf0e10cSrcweir 	inline const ViewShell *GetVsh() const { return pVsh; }
274cdf0e10cSrcweir 
GetOut()275cdf0e10cSrcweir     inline OutputDevice *GetOut() { return pOut; }
GetOut() const276cdf0e10cSrcweir 	inline const OutputDevice *GetOut() const { return pOut; }
SetOut(OutputDevice * pNewOut)277cdf0e10cSrcweir     inline void SetOut( OutputDevice* pNewOut ) { pOut = pNewOut; }
278cdf0e10cSrcweir 
GetRefDev()279cdf0e10cSrcweir     inline OutputDevice *GetRefDev() { return pRef; }
GetRefDev() const280cdf0e10cSrcweir     inline const OutputDevice *GetRefDev() const { return pRef; }
281cdf0e10cSrcweir 
GetFont()282cdf0e10cSrcweir     inline SwFont *GetFont() { return pFnt; }
GetFont() const283cdf0e10cSrcweir 	inline const SwFont *GetFont() const { return pFnt; }
SetFont(SwFont * pNew)284cdf0e10cSrcweir 	inline void SetFont( SwFont *pNew ) { pFnt = pNew; }
285cdf0e10cSrcweir 	void SelectFont();
SetUnderFnt(SwUnderlineFont * pNew)286cdf0e10cSrcweir     inline void SetUnderFnt( SwUnderlineFont* pNew ) { pUnderFnt = pNew; }
GetUnderFnt() const287cdf0e10cSrcweir     inline SwUnderlineFont* GetUnderFnt() const { return pUnderFnt; }
288cdf0e10cSrcweir 
GetOpt() const289cdf0e10cSrcweir 	inline const  SwViewOption &GetOpt() const { return *pOpt; }
GetTxt() const290cdf0e10cSrcweir 	inline const XubString &GetTxt() const { return *pTxt; }
GetChar(const xub_StrLen nPos) const291cdf0e10cSrcweir 	inline xub_Unicode GetChar( const xub_StrLen nPos ) const
292cdf0e10cSrcweir 		{ return pTxt->GetChar( nPos ); }
293cdf0e10cSrcweir 
294cdf0e10cSrcweir 	inline KSHORT	   GetTxtHeight() const;
295cdf0e10cSrcweir 
296cdf0e10cSrcweir     //
297cdf0e10cSrcweir     // GetTxtSize
298cdf0e10cSrcweir     //
299cdf0e10cSrcweir     SwPosSize GetTxtSize( OutputDevice* pOut, const SwScriptInfo* pSI,
300cdf0e10cSrcweir                           const XubString& rTxt, const xub_StrLen nIdx,
301cdf0e10cSrcweir                           const xub_StrLen nLen, const sal_uInt16 nComp ) const;
302cdf0e10cSrcweir     SwPosSize GetTxtSize() const;
303cdf0e10cSrcweir     void GetTxtSize( const SwScriptInfo* pSI, const xub_StrLen nIdx,
304cdf0e10cSrcweir                       const xub_StrLen nLen, const sal_uInt16 nComp,
305cdf0e10cSrcweir                       sal_uInt16& nMinSize, sal_uInt16& nMaxSizeDiff ) const;
306cdf0e10cSrcweir     inline SwPosSize GetTxtSize( const SwScriptInfo* pSI, const xub_StrLen nIdx,
307cdf0e10cSrcweir                                  const xub_StrLen nLen, const sal_uInt16 nComp ) const;
308cdf0e10cSrcweir     inline SwPosSize GetTxtSize( const XubString &rTxt ) const;
309cdf0e10cSrcweir 
310cdf0e10cSrcweir     //
311cdf0e10cSrcweir     // GetTxtBreak
312cdf0e10cSrcweir     //
313cdf0e10cSrcweir     xub_StrLen GetTxtBreak( const long nLineWidth,
314cdf0e10cSrcweir                                            const xub_StrLen nMaxLen,
315cdf0e10cSrcweir                                            const sal_uInt16 nComp ) const;
316cdf0e10cSrcweir     xub_StrLen GetTxtBreak( const long nLineWidth,
317cdf0e10cSrcweir                                            const xub_StrLen nMaxLen,
318cdf0e10cSrcweir                                            const sal_uInt16 nComp,
319cdf0e10cSrcweir                                            xub_StrLen& rExtraCharPos ) const;
320cdf0e10cSrcweir 
321cdf0e10cSrcweir     inline KSHORT GetAscent() const;
322cdf0e10cSrcweir 
GetIdx() const323cdf0e10cSrcweir 	inline xub_StrLen GetIdx() const { return nIdx; }
SetIdx(const xub_StrLen nNew)324cdf0e10cSrcweir 	inline void SetIdx( const xub_StrLen nNew ) { nIdx = nNew; }
GetLen() const325cdf0e10cSrcweir 	inline xub_StrLen GetLen() const { return nLen; }
SetLen(const xub_StrLen nNew)326cdf0e10cSrcweir 	inline void SetLen( const xub_StrLen nNew ) { nLen = nNew; }
SetTxt(const XubString & rNew)327cdf0e10cSrcweir 	inline void SetTxt( const XubString &rNew ){ pTxt = &rNew; }
328cdf0e10cSrcweir 
329cdf0e10cSrcweir 	friend SvStream &operator<<( SvStream &rOS, const SwTxtSizeInfo &rInf );
330cdf0e10cSrcweir 
331cdf0e10cSrcweir // 7780: Keine Bullets beim Symbol-Zeichensatz!
IsNoSymbol() const332cdf0e10cSrcweir 	inline sal_Bool IsNoSymbol() const
333cdf0e10cSrcweir 	{ return RTL_TEXTENCODING_SYMBOL != pFnt->GetCharSet( pFnt->GetActual() ); }
334cdf0e10cSrcweir 
335cdf0e10cSrcweir     void NoteAnimation() const;
336cdf0e10cSrcweir 
337cdf0e10cSrcweir     // Home is where Your heart is...
GetTxtFrm()338cdf0e10cSrcweir 	inline SwTxtFrm *GetTxtFrm() { return pFrm; }
GetTxtFrm() const339cdf0e10cSrcweir 	inline const SwTxtFrm *GetTxtFrm() const { return pFrm; }
340cdf0e10cSrcweir 
HasHint(xub_StrLen nPos) const341cdf0e10cSrcweir 	inline sal_Bool HasHint( xub_StrLen nPos ) const
342cdf0e10cSrcweir 		{ return _HasHint( pFrm->GetTxtNode(), nPos ); }
343cdf0e10cSrcweir 	static sal_Bool _HasHint( const SwTxtNode* pTxtNode, xub_StrLen nPos );
344cdf0e10cSrcweir 
345cdf0e10cSrcweir     // If Kana Compression is enabled, a minimum and maximum portion width
346cdf0e10cSrcweir     // is calculated. We format lines with minimal size and share remaining
347cdf0e10cSrcweir     // space among compressed kanas.
348cdf0e10cSrcweir     // During formatting, the maximum values of compressable portions are
349cdf0e10cSrcweir     // stored in aMaxWidth and discarded after a line has been formatted.
SetMaxWidthDiff(sal_uLong nKey,sal_uInt16 nVal)350cdf0e10cSrcweir     inline void SetMaxWidthDiff( sal_uLong nKey, sal_uInt16 nVal )
351cdf0e10cSrcweir     {
352cdf0e10cSrcweir         aMaxWidth.Insert( nKey, nVal );
353cdf0e10cSrcweir     };
GetMaxWidthDiff(sal_uLong nKey)354cdf0e10cSrcweir     inline sal_uInt16 GetMaxWidthDiff( sal_uLong nKey )
355cdf0e10cSrcweir     {
356cdf0e10cSrcweir         return (sal_uInt16)aMaxWidth.Get( nKey );
357cdf0e10cSrcweir     };
ResetMaxWidthDiff()358cdf0e10cSrcweir     inline void ResetMaxWidthDiff()
359cdf0e10cSrcweir     {
360cdf0e10cSrcweir         aMaxWidth.Clear();
361cdf0e10cSrcweir     };
CompressLine()362cdf0e10cSrcweir     inline sal_Bool CompressLine()
363cdf0e10cSrcweir     {
364cdf0e10cSrcweir         return (sal_Bool)aMaxWidth.Count();
365cdf0e10cSrcweir     };
366cdf0e10cSrcweir 
367cdf0e10cSrcweir     //
368cdf0e10cSrcweir     // Feature: Kana Compression
369cdf0e10cSrcweir     //
GetKanaIdx() const370cdf0e10cSrcweir     inline MSHORT GetKanaIdx() const { return nKanaIdx; }
ResetKanaIdx()371cdf0e10cSrcweir     inline void ResetKanaIdx(){ nKanaIdx = 0; }
SetKanaIdx(MSHORT nNew)372cdf0e10cSrcweir     inline void SetKanaIdx( MSHORT nNew ) { nKanaIdx = nNew; }
IncKanaIdx()373cdf0e10cSrcweir     inline void IncKanaIdx() { ++nKanaIdx; }
SetKanaComp(SvUShorts * pNew)374cdf0e10cSrcweir     inline void SetKanaComp( SvUShorts *pNew ){ pKanaComp = pNew; }
GetpKanaComp() const375cdf0e10cSrcweir     inline SvUShorts* GetpKanaComp() const { return pKanaComp; }
GetKanaComp() const376cdf0e10cSrcweir     inline sal_uInt16 GetKanaComp() const
377cdf0e10cSrcweir         { return ( pKanaComp && nKanaIdx < pKanaComp->Count() )
378cdf0e10cSrcweir                    ? (*pKanaComp)[nKanaIdx] : 0; }
379cdf0e10cSrcweir 
380cdf0e10cSrcweir #ifdef DBG_UTIL
381cdf0e10cSrcweir 	sal_Bool IsOptCalm() const;
382cdf0e10cSrcweir 	sal_Bool IsOptLow() const;
383cdf0e10cSrcweir 	sal_Bool IsOptDbg() const;
384cdf0e10cSrcweir 	sal_Bool IsOptTest1() const;
385cdf0e10cSrcweir 	sal_Bool IsOptTest2() const;
386cdf0e10cSrcweir 	sal_Bool IsOptTest3() const;
387cdf0e10cSrcweir 	sal_Bool IsOptTest4() const;
388cdf0e10cSrcweir 	sal_Bool IsOptTest5() const;
389cdf0e10cSrcweir 	sal_Bool IsOptTest6() const;
390cdf0e10cSrcweir 	sal_Bool IsOptTest7() const;
391cdf0e10cSrcweir 	sal_Bool IsOptTest8() const;
392cdf0e10cSrcweir #endif
393cdf0e10cSrcweir };
394cdf0e10cSrcweir 
395cdf0e10cSrcweir /*************************************************************************
396cdf0e10cSrcweir  *						class SwTxtPaintInfo
397cdf0e10cSrcweir  *************************************************************************/
398cdf0e10cSrcweir 
399cdf0e10cSrcweir class SwTxtPaintInfo : public SwTxtSizeInfo
400cdf0e10cSrcweir {
401cdf0e10cSrcweir     const SwWrongList *pWrongList;
402cdf0e10cSrcweir     const SwWrongList *pGrammarCheckList;
403cdf0e10cSrcweir     const SwWrongList *pSmartTags;    // SMARTTAGS
404cdf0e10cSrcweir     std::vector<long>* pSpaceAdd;
405cdf0e10cSrcweir 	const SvxBrushItem *pBrushItem; // Fuer den Hintergrund
406cdf0e10cSrcweir 	SwRect      aItemRect;			// ebenfalls fuer den Hintergrund
407cdf0e10cSrcweir 	SwTxtFly	aTxtFly;	// FlyFrm-Berechnung
408cdf0e10cSrcweir 	Point		aPos;		// Ausgabeposition
409cdf0e10cSrcweir 	SwRect		aPaintRect;	// Original Ausgaberechteck (aus Layout-Paint)
410cdf0e10cSrcweir 
411cdf0e10cSrcweir 	MSHORT nSpaceIdx;
412cdf0e10cSrcweir 	void _DrawText( const XubString &rText, const SwLinePortion &rPor,
413cdf0e10cSrcweir 				   const xub_StrLen nIdx, const xub_StrLen nLen,
414cdf0e10cSrcweir                    const sal_Bool bKern, const sal_Bool bWrong = sal_False,
415cdf0e10cSrcweir                    const sal_Bool bSmartTag = sal_False,
416cdf0e10cSrcweir                    const sal_Bool bGrammarCheck = sal_False );  // SMARTTAGS
417cdf0e10cSrcweir 
418cdf0e10cSrcweir 	SwTxtPaintInfo &operator=(const SwTxtPaintInfo&);
419cdf0e10cSrcweir 	void _NotifyURL( const SwLinePortion &rPor ) const;
420cdf0e10cSrcweir 	void _DrawBackBrush( const SwLinePortion &rPor ) const;
421cdf0e10cSrcweir 
422cdf0e10cSrcweir protected:
423cdf0e10cSrcweir #ifndef DBG_UTIL
SwTxtPaintInfo()424cdf0e10cSrcweir     SwTxtPaintInfo() { pFrm = 0; pWrongList = 0; pGrammarCheckList = 0; pWrongList = 0; pSmartTags = 0; pSpaceAdd = 0; pBrushItem = 0;}
425cdf0e10cSrcweir #else
426cdf0e10cSrcweir     SwTxtPaintInfo() { pFrm = 0; pWrongList = 0; pGrammarCheckList = 0; pSmartTags = 0; pSpaceAdd = 0;
427cdf0e10cSrcweir                        pBrushItem = ((SvxBrushItem*)-1);}
428cdf0e10cSrcweir #endif
429cdf0e10cSrcweir public:
430cdf0e10cSrcweir 	SwTxtPaintInfo( const SwTxtPaintInfo &rInf );
431cdf0e10cSrcweir 	SwTxtPaintInfo( const SwTxtPaintInfo &rInf, const XubString &rTxt );
432cdf0e10cSrcweir 
433cdf0e10cSrcweir 	void CtorInitTxtPaintInfo( SwTxtFrm *pFrame, const SwRect &rPaint );
434cdf0e10cSrcweir 
SetBack(const SvxBrushItem * pItem,const SwRect & rRect)435cdf0e10cSrcweir 	void SetBack( const SvxBrushItem *pItem,
436cdf0e10cSrcweir 				  const SwRect &rRect ) { pBrushItem = pItem; aItemRect = rRect;}
GetBrushItem() const437cdf0e10cSrcweir 	const SvxBrushItem *GetBrushItem() const { return pBrushItem; }
GetBrushRect() const438cdf0e10cSrcweir 	const SwRect       &GetBrushRect() const { return aItemRect;  }
439cdf0e10cSrcweir 
SwTxtPaintInfo(SwTxtFrm * pFrame,const SwRect & rPaint)440cdf0e10cSrcweir 	inline SwTxtPaintInfo( SwTxtFrm *pFrame, const SwRect &rPaint )
441cdf0e10cSrcweir 		   { CtorInitTxtPaintInfo( pFrame, rPaint ); }
442cdf0e10cSrcweir 
X() const443cdf0e10cSrcweir 	inline SwTwips X() const { return aPos.X(); }
X(const long nNew)444cdf0e10cSrcweir 	inline void X( const long nNew ) { aPos.X() = nNew; }
Y() const445cdf0e10cSrcweir 	inline SwTwips Y() const { return aPos.Y(); }
Y(const SwTwips nNew)446cdf0e10cSrcweir 	inline void Y( const SwTwips nNew ) { aPos.Y() = nNew; }
447cdf0e10cSrcweir 
GetTxtFly()448cdf0e10cSrcweir 	inline SwTxtFly *GetTxtFly() { return &aTxtFly; }
GetTxtFly() const449cdf0e10cSrcweir 	inline const SwTxtFly *GetTxtFly() const { return &aTxtFly; }
450cdf0e10cSrcweir 	inline void DrawText( const XubString &rText, const SwLinePortion &rPor,
451cdf0e10cSrcweir 						  const xub_StrLen nIdx = 0,
452cdf0e10cSrcweir 						  const xub_StrLen nLen = STRING_LEN,
453cdf0e10cSrcweir 						  const sal_Bool bKern = sal_False) const;
454cdf0e10cSrcweir 	inline void DrawText( const SwLinePortion &rPor, const xub_StrLen nLen,
455cdf0e10cSrcweir 						  const sal_Bool bKern = sal_False ) const;
456cdf0e10cSrcweir     inline void DrawMarkedText( const SwLinePortion &rPor, const xub_StrLen nLen,
457cdf0e10cSrcweir                                 const sal_Bool bKern,
458cdf0e10cSrcweir                                 const sal_Bool bWrong,
459cdf0e10cSrcweir                                 const sal_Bool bSmartTags,
460cdf0e10cSrcweir                                 const sal_Bool bGrammarCheck ) const;
461cdf0e10cSrcweir 
462cdf0e10cSrcweir     void DrawRect( const SwRect &rRect, sal_Bool bNoGraphic = sal_False,
463cdf0e10cSrcweir 				   sal_Bool bRetouche = sal_True ) const;
464cdf0e10cSrcweir 	void DrawTab( const SwLinePortion &rPor ) const;
465cdf0e10cSrcweir 	void DrawLineBreak( const SwLinePortion &rPor ) const;
466cdf0e10cSrcweir     void DrawRedArrow( const SwLinePortion &rPor ) const;
467cdf0e10cSrcweir     void DrawPostIts( const SwLinePortion &rPor, sal_Bool bScript ) const;
468cdf0e10cSrcweir 	void DrawBackground( const SwLinePortion &rPor ) const;
469cdf0e10cSrcweir 	void DrawViewOpt( const SwLinePortion &rPor, const MSHORT nWhich ) const;
DrawBackBrush(const SwLinePortion & rPor) const470cdf0e10cSrcweir 	inline void DrawBackBrush( const SwLinePortion &rPor ) const
471cdf0e10cSrcweir 	{ /* if( pFnt->GetBackColor() ) */ _DrawBackBrush( rPor ); }
472cdf0e10cSrcweir 
473cdf0e10cSrcweir     void DrawCheckBox( const SwFieldFormPortion &rPor, bool checked) const;
474cdf0e10cSrcweir 
NotifyURL(const SwLinePortion & rPor) const475cdf0e10cSrcweir 	inline void NotifyURL( const SwLinePortion &rPor ) const
476cdf0e10cSrcweir 		{ if( URLNotify() ) _NotifyURL( rPor ); }
477cdf0e10cSrcweir 
478cdf0e10cSrcweir     void CalcRect( const SwLinePortion& rPor, SwRect* pRect, SwRect* pIntersect = 0 ) const;
479cdf0e10cSrcweir 
480cdf0e10cSrcweir 	inline SwTwips GetPaintOfst() const;
481cdf0e10cSrcweir 	inline void SetPaintOfst( const SwTwips nNew );
GetPos() const482cdf0e10cSrcweir 	inline const Point &GetPos() const { return aPos; }
SetPos(const Point & rNew)483cdf0e10cSrcweir 	inline void SetPos( const Point &rNew ) { aPos = rNew; }
484cdf0e10cSrcweir 
GetPaintRect() const485cdf0e10cSrcweir 	inline const SwRect &GetPaintRect() const { return aPaintRect; }
SetPaintRect(const SwRect & rNew)486cdf0e10cSrcweir 	inline void SetPaintRect( const SwRect &rNew ) { aPaintRect = rNew; }
487cdf0e10cSrcweir 
488cdf0e10cSrcweir 	friend SvStream &operator<<( SvStream &rOS, const SwTxtPaintInfo &rInf );
489cdf0e10cSrcweir 
490cdf0e10cSrcweir     //
491cdf0e10cSrcweir     // STUFF FOR JUSTIFIED ALIGNMENT
492cdf0e10cSrcweir     //
GetSpaceIdx() const493cdf0e10cSrcweir     inline MSHORT GetSpaceIdx() const { return nSpaceIdx; }
ResetSpaceIdx()494cdf0e10cSrcweir 	inline void ResetSpaceIdx(){nSpaceIdx = 0; }
SetSpaceIdx(MSHORT nNew)495cdf0e10cSrcweir 	inline void SetSpaceIdx( MSHORT nNew ) { nSpaceIdx = nNew; }
IncSpaceIdx()496cdf0e10cSrcweir 	inline void IncSpaceIdx() { ++nSpaceIdx; }
RemoveFirstSpaceAdd()497cdf0e10cSrcweir     inline void RemoveFirstSpaceAdd() { pSpaceAdd->erase( pSpaceAdd->begin() ); }
GetSpaceAdd() const498cdf0e10cSrcweir     inline long GetSpaceAdd() const
499cdf0e10cSrcweir         { return ( pSpaceAdd && nSpaceIdx < pSpaceAdd->size() )
500cdf0e10cSrcweir 				   ? (*pSpaceAdd)[nSpaceIdx] : 0; }
501cdf0e10cSrcweir 
SetpSpaceAdd(std::vector<long> * pNew)502cdf0e10cSrcweir     inline void SetpSpaceAdd( std::vector<long>* pNew ){ pSpaceAdd = pNew; }
GetpSpaceAdd() const503cdf0e10cSrcweir     inline std::vector<long>* GetpSpaceAdd() const { return pSpaceAdd; }
504cdf0e10cSrcweir 
505cdf0e10cSrcweir 
SetWrongList(const SwWrongList * pNew)506cdf0e10cSrcweir     inline void SetWrongList( const SwWrongList *pNew ){ pWrongList = pNew; }
GetpWrongList() const507cdf0e10cSrcweir     inline const SwWrongList* GetpWrongList() const { return pWrongList; }
508cdf0e10cSrcweir 
SetGrammarCheckList(const SwWrongList * pNew)509cdf0e10cSrcweir     inline void SetGrammarCheckList( const SwWrongList *pNew ){ pGrammarCheckList = pNew; }
GetGrammarCheckList() const510cdf0e10cSrcweir     inline const SwWrongList* GetGrammarCheckList() const { return pGrammarCheckList; }
511cdf0e10cSrcweir 
512cdf0e10cSrcweir     // SMARTTAGS
SetSmartTags(const SwWrongList * pNew)513cdf0e10cSrcweir     inline void SetSmartTags( const SwWrongList *pNew ){ pSmartTags = pNew; }
GetSmartTags() const514cdf0e10cSrcweir     inline const SwWrongList* GetSmartTags() const { return pSmartTags; }
515cdf0e10cSrcweir };
516cdf0e10cSrcweir 
517cdf0e10cSrcweir /*************************************************************************
518cdf0e10cSrcweir  *						class SwTxtFormatInfo
519cdf0e10cSrcweir  *************************************************************************/
520cdf0e10cSrcweir 
521cdf0e10cSrcweir class SwTxtFormatInfo : public SwTxtPaintInfo
522cdf0e10cSrcweir {
523cdf0e10cSrcweir 	// temporary arguments for hyphenation
524cdf0e10cSrcweir 	com::sun::star::beans::PropertyValues	aHyphVals;
525cdf0e10cSrcweir 
526cdf0e10cSrcweir 	SwLineLayout	*pRoot; 	  // die Root der aktuellen Zeile (pCurr)
527cdf0e10cSrcweir 	SwLinePortion	*pLast; 	  // die letzte Portion
528cdf0e10cSrcweir 	SwFlyPortion	*pFly;		  // die nachfolgende FlyPortion
529cdf0e10cSrcweir 	SwFldPortion	*pLastFld;	  // umgebrochenes Feld
530cdf0e10cSrcweir 	SwLinePortion	*pUnderFlow;  // Unterlaufsituation: letzte Portion
531cdf0e10cSrcweir 	SwLinePortion	*pRest; 	  // Rest ist der Beginn der naechsten Zeile
532cdf0e10cSrcweir 
533cdf0e10cSrcweir 	SwTabPortion	*pLastTab;	   // die _letzte_ TabPortion
534cdf0e10cSrcweir 
535cdf0e10cSrcweir 	xub_StrLen nSoftHyphPos;    // SoftHyphPos fuer Hyphenate
536cdf0e10cSrcweir 	xub_StrLen nHyphStart;	    // TxtPos, an der die interakt.Tr.z.Z. steht
537cdf0e10cSrcweir 	xub_StrLen nHyphWrdStart;   // gefundene Wort-Position
538cdf0e10cSrcweir 	xub_StrLen nHyphWrdLen;     // gefundene Wort-Laenge
539cdf0e10cSrcweir 	xub_StrLen nLineStart;		// aktueller Zeilenbeginn im rTxt
540cdf0e10cSrcweir     xub_StrLen nUnderScorePos;  // enlarge repaint if underscore has been found
541cdf0e10cSrcweir     // --> FME 2004-11-25 #i34348# Changed type from sal_uInt16 to SwTwips
542cdf0e10cSrcweir     SwTwips nLeft;          // linker Rand
543cdf0e10cSrcweir     SwTwips nRight;           // rechter Rand
544cdf0e10cSrcweir     SwTwips nFirst;           // EZE
545cdf0e10cSrcweir     // <--
546cdf0e10cSrcweir     KSHORT nRealWidth;      // "echte" Zeilenbreite
547cdf0e10cSrcweir 	KSHORT nWidth;			// "virtuelle" Zeilenbreite
548cdf0e10cSrcweir 	KSHORT nLineHeight; 	// endgueltige Hoehe nach CalcLine
549cdf0e10cSrcweir     KSHORT nLineNettoHeight;   // line height without spacing
550cdf0e10cSrcweir 	KSHORT nForcedLeftMargin;	// Verschiebung des linken Rands wg. Rahmen
551cdf0e10cSrcweir 
552cdf0e10cSrcweir 	sal_Int16  nMinLeading;		// minimum number of chars before hyphenation point
553cdf0e10cSrcweir 	sal_Int16  nMinTrailing;	// minimum number of chars after hyphenation point
554cdf0e10cSrcweir 	sal_Int16  nMinWordLength;	// minimum length of word to be hyphenated
555cdf0e10cSrcweir 
556cdf0e10cSrcweir 	sal_Bool bFull	 : 1;	   // Zeile ist voll
557cdf0e10cSrcweir 	sal_Bool bFtnDone  : 1;	   // Ftn bereits formatiert
558cdf0e10cSrcweir 	sal_Bool bErgoDone : 1;	   // ErgoDone bereits formatiert
559cdf0e10cSrcweir 	sal_Bool bNumDone  : 1;	   // bNumDone bereits formatiert
560cdf0e10cSrcweir     sal_Bool bArrowDone : 1;    // Pfeil nach links bei gescrollten Absaetzen
561cdf0e10cSrcweir 	sal_Bool bStop	 : 1;	   // Sofort abbrechen, Zeile verwerfen.
562cdf0e10cSrcweir 	sal_Bool bNewLine  : 1;	   // Noch eine weitere Zeile formatieren.
563cdf0e10cSrcweir 	sal_Bool bShift	 : 1;	   // Positionsaend.: Repaint bis auf Weiteres
564cdf0e10cSrcweir 	sal_Bool bUnderFlow : 1;	   // Kontext: UnderFlow() ?
565cdf0e10cSrcweir 	sal_Bool bInterHyph: 1;	   // interaktive Trennung ?
566cdf0e10cSrcweir 	sal_Bool bAutoHyph : 1;	   // automatische Trennung ?
567cdf0e10cSrcweir 	sal_Bool bDropInit : 1;	   // DropWidth einstellen.
568cdf0e10cSrcweir 	sal_Bool bQuick	 : 1;	   // FormatQuick()
569cdf0e10cSrcweir 	sal_Bool bNoEndHyph	 : 1;  // Trennung am Zeilenende abgeschaltet wg. MaxHyphens
570cdf0e10cSrcweir 	sal_Bool bNoMidHyph	 : 1;  // Trennung vor Flies abgeschaltet wg. MaxHyphens
571cdf0e10cSrcweir 	sal_Bool bIgnoreFly: 1;	   // FitToContent ignoriert Flies
572cdf0e10cSrcweir     sal_Bool bFakeLineStart: 1; // String has been replaced by field portion
573cdf0e10cSrcweir                                 // info structure only pretends that we are at
574cdf0e10cSrcweir                                 // the beginning of a line
575cdf0e10cSrcweir 
576cdf0e10cSrcweir 	xub_Unicode   cTabDecimal;	// das _aktuelle_ Dezimalzeichen
577cdf0e10cSrcweir 	xub_Unicode   cHookChar;	// fuer Tabs in Feldern etc.
578cdf0e10cSrcweir 	sal_uInt8   nMaxHyph;		// max. Zeilenanz. aufeinanderfolg. Trenn.
579cdf0e10cSrcweir 	sal_Bool   bTestFormat;		// Testformatierung aus WouldFit, keine Benachrichtigungen etc.
580cdf0e10cSrcweir 
581cdf0e10cSrcweir 	// Hyphenating ...
582cdf0e10cSrcweir 	sal_Bool InitHyph( const sal_Bool bAuto = sal_False );
583cdf0e10cSrcweir 	sal_Bool _CheckFtnPortion( SwLineLayout* pCurr );
584cdf0e10cSrcweir 
585cdf0e10cSrcweir public:
586cdf0e10cSrcweir 	void CtorInitTxtFormatInfo( SwTxtFrm *pFrm, const sal_Bool bInterHyph = sal_False,
587cdf0e10cSrcweir 		const sal_Bool bQuick = sal_False, const sal_Bool bTst = sal_False );
SwTxtFormatInfo(SwTxtFrm * pFrame,const sal_Bool bInterHyphL=sal_False,const sal_Bool bQuickL=sal_False,const sal_Bool bTst=sal_False)588cdf0e10cSrcweir     inline SwTxtFormatInfo(SwTxtFrm *pFrame,const sal_Bool bInterHyphL=sal_False,
589cdf0e10cSrcweir             const sal_Bool bQuickL = sal_False, const sal_Bool bTst = sal_False )
590cdf0e10cSrcweir            { CtorInitTxtFormatInfo( pFrame, bInterHyphL, bQuickL, bTst ); }
591cdf0e10cSrcweir 
592cdf0e10cSrcweir 	// For the formatting inside a double line in a line (multi-line portion)
593cdf0e10cSrcweir 	// we need a modified text-format-info:
594cdf0e10cSrcweir 	SwTxtFormatInfo( const SwTxtFormatInfo& rInf, SwLineLayout& rLay,
595cdf0e10cSrcweir 		SwTwips nActWidth );
596cdf0e10cSrcweir 
Width() const597cdf0e10cSrcweir 	inline KSHORT Width() const { return nWidth; }
Width(const KSHORT nNew)598cdf0e10cSrcweir 	inline void Width( const KSHORT nNew ) { nWidth = nNew; }
599cdf0e10cSrcweir 		   void Init();
600cdf0e10cSrcweir 
601cdf0e10cSrcweir 	// liefert die erste veraenderte Position im Absatz zurueck
602cdf0e10cSrcweir 	inline xub_StrLen GetReformatStart() const;
603cdf0e10cSrcweir 
604cdf0e10cSrcweir 	// Raender
Left() const605cdf0e10cSrcweir     inline SwTwips Left() const { return nLeft; }
Left(const SwTwips nNew)606cdf0e10cSrcweir     inline void Left( const SwTwips nNew ) { nLeft = nNew; }
Right() const607cdf0e10cSrcweir     inline SwTwips Right() const { return nRight; }
Right(const SwTwips nNew)608cdf0e10cSrcweir     inline void Right( const SwTwips nNew ) { nRight = nNew; }
First() const609cdf0e10cSrcweir     inline SwTwips First() const { return nFirst; }
First(const SwTwips nNew)610cdf0e10cSrcweir     inline void First( const SwTwips nNew ) { nFirst = nNew; }
RealWidth() const611cdf0e10cSrcweir 	inline KSHORT RealWidth() const { return nRealWidth; }
RealWidth(const KSHORT nNew)612cdf0e10cSrcweir 	inline void RealWidth( const KSHORT nNew ) { nRealWidth = nNew; }
ForcedLeftMargin() const613cdf0e10cSrcweir 	inline KSHORT ForcedLeftMargin() const { return nForcedLeftMargin; }
ForcedLeftMargin(const KSHORT nN)614cdf0e10cSrcweir 	inline void ForcedLeftMargin( const KSHORT nN ) { nForcedLeftMargin = nN; }
615cdf0e10cSrcweir 
MaxHyph()616cdf0e10cSrcweir 	inline sal_uInt8 &MaxHyph() { return nMaxHyph; }
MaxHyph() const617cdf0e10cSrcweir 	inline const sal_uInt8 &MaxHyph() const { return nMaxHyph; }
618cdf0e10cSrcweir 
GetRoot()619cdf0e10cSrcweir 	inline SwLineLayout *GetRoot() { return pRoot; }
GetRoot() const620cdf0e10cSrcweir 	inline const SwLineLayout *GetRoot() const { return pRoot; }
621cdf0e10cSrcweir 
SetRoot(SwLineLayout * pNew)622cdf0e10cSrcweir 	inline void SetRoot( SwLineLayout *pNew ) { pRoot = pNew; }
GetLast()623cdf0e10cSrcweir 	inline SwLinePortion *GetLast() { return pLast; }
SetLast(SwLinePortion * pNewLast)624cdf0e10cSrcweir 	inline void SetLast( SwLinePortion *pNewLast ) { pLast = pNewLast; }
IsFull() const625cdf0e10cSrcweir 	inline sal_Bool IsFull() const { return bFull; }
SetFull(const sal_Bool bNew)626cdf0e10cSrcweir 	inline void SetFull( const sal_Bool bNew ) { bFull = bNew; }
IsHyphForbud() const627cdf0e10cSrcweir 	inline sal_Bool IsHyphForbud() const
628cdf0e10cSrcweir 		{ return pFly ? bNoMidHyph : bNoEndHyph; }
SetHyphForbud(const sal_Bool bNew)629cdf0e10cSrcweir 	inline void SetHyphForbud( const sal_Bool bNew )
630cdf0e10cSrcweir 		{ if ( pFly ) bNoMidHyph = bNew; else bNoEndHyph = bNew; }
ChkNoHyph(const sal_uInt8 bEnd,const sal_uInt8 bMid)631cdf0e10cSrcweir 	inline void ChkNoHyph( const sal_uInt8 bEnd, const sal_uInt8 bMid )
632cdf0e10cSrcweir 		{ bNoEndHyph = (nMaxHyph && bEnd >= nMaxHyph);
633cdf0e10cSrcweir 		  bNoMidHyph = (nMaxHyph && bMid >= nMaxHyph); }
IsIgnoreFly() const634cdf0e10cSrcweir 	inline sal_Bool IsIgnoreFly() const { return bIgnoreFly; }
SetIgnoreFly(const sal_Bool bNew)635cdf0e10cSrcweir 	inline void SetIgnoreFly( const sal_Bool bNew ) { bIgnoreFly = bNew; }
IsFakeLineStart() const636cdf0e10cSrcweir     inline sal_Bool IsFakeLineStart() const { return bFakeLineStart; }
SetFakeLineStart(const sal_Bool bNew)637cdf0e10cSrcweir     inline void SetFakeLineStart( const sal_Bool bNew ) { bFakeLineStart = bNew; }
IsStop() const638cdf0e10cSrcweir 	inline sal_Bool IsStop() const { return bStop; }
SetStop(const sal_Bool bNew)639cdf0e10cSrcweir 	inline void SetStop( const sal_Bool bNew ) { bStop = bNew; }
GetRest()640cdf0e10cSrcweir 	inline SwLinePortion *GetRest() { return pRest; }
SetRest(SwLinePortion * pNewRest)641cdf0e10cSrcweir 	inline void SetRest( SwLinePortion *pNewRest ) { pRest = pNewRest; }
IsNewLine() const642cdf0e10cSrcweir 	inline sal_Bool IsNewLine() const { return bNewLine; }
SetNewLine(const sal_Bool bNew)643cdf0e10cSrcweir 	inline void SetNewLine( const sal_Bool bNew ) { bNewLine = bNew; }
IsShift() const644cdf0e10cSrcweir 	inline sal_Bool IsShift() const { return bShift; }
SetShift(const sal_Bool bNew)645cdf0e10cSrcweir 	inline void SetShift( const sal_Bool bNew ) { bShift = bNew; }
IsInterHyph() const646cdf0e10cSrcweir 	inline sal_Bool IsInterHyph() const { return bInterHyph; }
IsAutoHyph() const647cdf0e10cSrcweir 	inline sal_Bool IsAutoHyph() const { return bAutoHyph; }
IsUnderFlow() const648cdf0e10cSrcweir 	inline sal_Bool IsUnderFlow() const { return bUnderFlow; }
ClrUnderFlow()649cdf0e10cSrcweir 	inline void ClrUnderFlow() { bUnderFlow = sal_False; }
IsDropInit() const650cdf0e10cSrcweir 	inline sal_Bool IsDropInit() const { return bDropInit; }
SetDropInit(const sal_Bool bNew)651cdf0e10cSrcweir 	inline void SetDropInit( const sal_Bool bNew ) { bDropInit = bNew; }
IsQuick() const652cdf0e10cSrcweir 	inline sal_Bool IsQuick() const { return bQuick; }
IsTest() const653cdf0e10cSrcweir 	inline sal_Bool IsTest() const { return bTestFormat; }
654cdf0e10cSrcweir 
GetLineStart() const655cdf0e10cSrcweir 	inline xub_StrLen GetLineStart() const { return nLineStart; }
SetLineStart(const xub_StrLen nNew)656cdf0e10cSrcweir 	inline void SetLineStart( const xub_StrLen nNew ) { nLineStart = nNew; }
657cdf0e10cSrcweir 
658cdf0e10cSrcweir     // these are used during fly calculation
GetLineHeight() const659cdf0e10cSrcweir     inline KSHORT GetLineHeight() const { return nLineHeight; }
SetLineHeight(const KSHORT nNew)660cdf0e10cSrcweir 	inline void SetLineHeight( const KSHORT nNew ) { nLineHeight = nNew; }
GetLineNettoHeight() const661cdf0e10cSrcweir     inline KSHORT GetLineNettoHeight() const { return nLineNettoHeight; }
SetLineNettoHeight(const KSHORT nNew)662cdf0e10cSrcweir     inline void SetLineNettoHeight( const KSHORT nNew ) { nLineNettoHeight = nNew; }
663cdf0e10cSrcweir 
GetUnderFlow() const664cdf0e10cSrcweir 	inline const SwLinePortion *GetUnderFlow() const { return pUnderFlow; }
GetUnderFlow()665cdf0e10cSrcweir 	inline SwLinePortion *GetUnderFlow() { return pUnderFlow; }
SetUnderFlow(SwLinePortion * pNew)666cdf0e10cSrcweir 	inline void SetUnderFlow( SwLinePortion *pNew )
667cdf0e10cSrcweir 		   { pUnderFlow = pNew; bUnderFlow = sal_True; }
GetSoftHyphPos() const668cdf0e10cSrcweir 	inline xub_StrLen GetSoftHyphPos() const { return nSoftHyphPos; }
SetSoftHyphPos(const xub_StrLen nNew)669cdf0e10cSrcweir 	inline void SetSoftHyphPos( const xub_StrLen nNew ) { nSoftHyphPos = nNew; }
670cdf0e10cSrcweir 
671cdf0e10cSrcweir 	inline void SetParaFtn();
672cdf0e10cSrcweir 
673cdf0e10cSrcweir 	// FlyFrms
GetFly()674cdf0e10cSrcweir 	inline SwFlyPortion *GetFly() { return pFly; }
SetFly(SwFlyPortion * pNew)675cdf0e10cSrcweir 	inline void SetFly( SwFlyPortion *pNew ) { pFly = pNew; }
676cdf0e10cSrcweir 
677cdf0e10cSrcweir 	inline const SwAttrSet& GetCharAttr() const;
678cdf0e10cSrcweir 
679cdf0e10cSrcweir 	// Tabs
GetLastTab()680cdf0e10cSrcweir 	inline SwTabPortion *GetLastTab() { return pLastTab; }
SetLastTab(SwTabPortion * pNew)681cdf0e10cSrcweir 	inline void SetLastTab( SwTabPortion *pNew ) { pLastTab = pNew; }
GetTabDecimal() const682cdf0e10cSrcweir 	inline xub_Unicode GetTabDecimal() const { return cTabDecimal; }
SetTabDecimal(const xub_Unicode cNew)683cdf0e10cSrcweir 	inline void SetTabDecimal( const xub_Unicode cNew ) { cTabDecimal = cNew;}
684cdf0e10cSrcweir 
685cdf0e10cSrcweir 	// Last*
GetLastFld()686cdf0e10cSrcweir 	inline SwFldPortion *GetLastFld() { return pLastFld; }
SetLastFld(SwFldPortion * pNew)687cdf0e10cSrcweir 	inline void SetLastFld( SwFldPortion *pNew ) { pLastFld = pNew; }
688cdf0e10cSrcweir 
ClearHookChar()689cdf0e10cSrcweir 	inline void ClearHookChar() { cHookChar = 0; }
SetHookChar(const xub_Unicode cNew)690cdf0e10cSrcweir 	inline void SetHookChar( const xub_Unicode cNew ) { cHookChar = cNew; }
GetHookChar() const691cdf0e10cSrcweir 	inline xub_Unicode GetHookChar() const { return cHookChar; }
692cdf0e10cSrcweir 
693cdf0e10cSrcweir 	// Done-Flags
IsFtnDone() const694cdf0e10cSrcweir 	inline sal_Bool IsFtnDone() const { return bFtnDone; }
SetFtnDone(const sal_Bool bNew)695cdf0e10cSrcweir 	inline void SetFtnDone( const sal_Bool bNew ) { bFtnDone = bNew; }
IsErgoDone() const696cdf0e10cSrcweir 	inline sal_Bool IsErgoDone() const { return bErgoDone; }
SetErgoDone(const sal_Bool bNew)697cdf0e10cSrcweir 	inline void SetErgoDone( const sal_Bool bNew ) { bErgoDone = bNew; }
IsNumDone() const698cdf0e10cSrcweir 	inline sal_Bool IsNumDone() const { return bNumDone; }
SetNumDone(const sal_Bool bNew)699cdf0e10cSrcweir 	inline void SetNumDone( const sal_Bool bNew ) { bNumDone = bNew; }
IsArrowDone() const700cdf0e10cSrcweir 	inline sal_Bool IsArrowDone() const { return bArrowDone; }
SetArrowDone(const sal_Bool bNew)701cdf0e10cSrcweir 	inline void SetArrowDone( const sal_Bool bNew ) { bArrowDone = bNew; }
702cdf0e10cSrcweir 
703cdf0e10cSrcweir 	// Fuer SwTxtPortion::Hyphenate
704cdf0e10cSrcweir 	inline sal_Bool IsSoftHyph( const xub_StrLen nPos ) const;
705cdf0e10cSrcweir 	sal_Bool ChgHyph( const sal_Bool bNew );
706cdf0e10cSrcweir 
707cdf0e10cSrcweir 	// Soll die Trennhilfe angeschmissen werden?
708cdf0e10cSrcweir 	sal_Bool IsHyphenate() const;
SetHyphStart(const xub_StrLen nNew)709cdf0e10cSrcweir 	inline void SetHyphStart( const xub_StrLen nNew ) { nHyphStart = nNew; }
GetHyphStart() const710cdf0e10cSrcweir 	inline xub_StrLen GetHyphStart() const { return nHyphStart; }
SetHyphWrdStart(const xub_StrLen nNew)711cdf0e10cSrcweir 	inline void SetHyphWrdStart( const xub_StrLen nNew ) { nHyphWrdStart = nNew; }
GetHyphWrdStart() const712cdf0e10cSrcweir 	inline xub_StrLen GetHyphWrdStart() const { return nHyphWrdStart; }
SetHyphWrdLen(const xub_StrLen nNew)713cdf0e10cSrcweir 	inline void SetHyphWrdLen( const xub_StrLen nNew ) { nHyphWrdLen = nNew; }
GetHyphWrdLen() const714cdf0e10cSrcweir 	inline xub_StrLen GetHyphWrdLen() const { return nHyphWrdLen; }
GetUnderScorePos() const715cdf0e10cSrcweir     inline xub_StrLen GetUnderScorePos() const { return nUnderScorePos; }
SetUnderScorePos(xub_StrLen nNew)716cdf0e10cSrcweir     inline void SetUnderScorePos( xub_StrLen nNew ) { nUnderScorePos = nNew; }
717cdf0e10cSrcweir 
718cdf0e10cSrcweir 	// ruft HyphenateWord() des Hyphenators
719cdf0e10cSrcweir 	::com::sun::star::uno::Reference<
720cdf0e10cSrcweir 		::com::sun::star::linguistic2::XHyphenatedWord >
721cdf0e10cSrcweir 				HyphWord( const String &rTxt, const sal_uInt16 nMinTrail );
722cdf0e10cSrcweir 	const com::sun::star::beans::PropertyValues	&
723cdf0e10cSrcweir 				GetHyphValues() const;
724cdf0e10cSrcweir 
CheckFtnPortion(SwLineLayout * pCurr)725cdf0e10cSrcweir 	sal_Bool CheckFtnPortion( SwLineLayout* pCurr )
726cdf0e10cSrcweir 		{ return IsFtnInside() && _CheckFtnPortion( pCurr ); }
727cdf0e10cSrcweir 
728cdf0e10cSrcweir 	// Dropcaps vom SwTxtFormatter::CTOR gerufen.
729cdf0e10cSrcweir 	const SwFmtDrop *GetDropFmt() const;
730cdf0e10cSrcweir 
731cdf0e10cSrcweir 	// setzt die FormatInfo wieder in den Anfangszustand
732cdf0e10cSrcweir 	void Reset( const SwTxtFrm *pFrame); // , const sal_Bool bAll );
733cdf0e10cSrcweir 
734cdf0e10cSrcweir 	// Sets the last SwKernPortion as pLast, if it is followed by empty portions
735cdf0e10cSrcweir 	sal_Bool LastKernPortion();
736cdf0e10cSrcweir 
737cdf0e10cSrcweir     // Sucht ab nIdx bis nEnd nach Tabs, TabDec, TXTATR und BRK.
738cdf0e10cSrcweir 	// Return: gefundene Position, setzt ggf. cHookChar
739cdf0e10cSrcweir     xub_StrLen ScanPortionEnd( const xub_StrLen nStart, const xub_StrLen nEnd );
740cdf0e10cSrcweir 
741cdf0e10cSrcweir //	friend ostream &operator<<( ostream &rOS, const SwTxtFormatInfo &rInf );
742cdf0e10cSrcweir 	friend SvStream &operator<<( SvStream &rOS, const SwTxtFormatInfo &rInf );
743cdf0e10cSrcweir };
744cdf0e10cSrcweir 
745cdf0e10cSrcweir /*************************************************************************
746cdf0e10cSrcweir  *						class SwTxtSlot
747cdf0e10cSrcweir  *************************************************************************/
748cdf0e10cSrcweir 
749cdf0e10cSrcweir // Fuer die Textersetzung und Restaurierung der SwTxtSizeInfo.
750cdf0e10cSrcweir // Die Art und Weise ist etwas kriminell, rInf ist const und wird
751cdf0e10cSrcweir // trotzdem veraendert. Da rInf im DTOR wieder restauriert wird,
752cdf0e10cSrcweir // ist dies zulaessig, es handelt sich um ein "logisches const".
753cdf0e10cSrcweir 
754cdf0e10cSrcweir class SwTxtSlot
755cdf0e10cSrcweir {
756cdf0e10cSrcweir     XubString aTxt;
757cdf0e10cSrcweir     const XubString *pOldTxt;
758cdf0e10cSrcweir     const SwWrongList* pOldSmartTagList;
759cdf0e10cSrcweir     const SwWrongList* pOldGrammarCheckList;
760cdf0e10cSrcweir     SwWrongList* pTempList;
761cdf0e10cSrcweir     xub_StrLen nIdx;
762cdf0e10cSrcweir 	xub_StrLen nLen;
763cdf0e10cSrcweir 	sal_Bool bOn;
764cdf0e10cSrcweir protected:
765cdf0e10cSrcweir 	SwTxtSizeInfo *pInf;
766cdf0e10cSrcweir public:
767cdf0e10cSrcweir     // Der Ersetzungstring kommt wahlweise aus der Portion via GetExpText()
768cdf0e10cSrcweir     // oder aus dem char Pointer pCh, wenn dieser ungleich NULL ist.
769cdf0e10cSrcweir     SwTxtSlot( const SwTxtSizeInfo *pNew, const SwLinePortion *pPor, bool bTxtLen,
770cdf0e10cSrcweir                bool bExgLists, const sal_Char *pCh = NULL );
771cdf0e10cSrcweir     ~SwTxtSlot();
IsOn() const772cdf0e10cSrcweir 	inline sal_Bool IsOn() const { return bOn; }
773cdf0e10cSrcweir };
774cdf0e10cSrcweir 
775cdf0e10cSrcweir /*************************************************************************
776cdf0e10cSrcweir  *						class SwFontSave
777cdf0e10cSrcweir  *************************************************************************/
778cdf0e10cSrcweir 
779cdf0e10cSrcweir class SwFontSave
780cdf0e10cSrcweir {
781cdf0e10cSrcweir 	SwTxtSizeInfo *pInf;
782cdf0e10cSrcweir 	SwFont		  *pFnt;
783cdf0e10cSrcweir 	SwAttrIter	  *pIter;
784cdf0e10cSrcweir public:
785cdf0e10cSrcweir 	SwFontSave( const SwTxtSizeInfo &rInf, SwFont *pFnt,
786cdf0e10cSrcweir 				SwAttrIter* pItr = NULL );
787cdf0e10cSrcweir    ~SwFontSave();
788cdf0e10cSrcweir };
789cdf0e10cSrcweir 
790cdf0e10cSrcweir /*************************************************************************
791cdf0e10cSrcweir  *						class SwDefFontSave
792cdf0e10cSrcweir  *************************************************************************/
793cdf0e10cSrcweir 
794cdf0e10cSrcweir class SwDefFontSave
795cdf0e10cSrcweir {
796cdf0e10cSrcweir 	SwTxtSizeInfo *pInf;
797cdf0e10cSrcweir 	SwFont		  *pFnt;
798cdf0e10cSrcweir 	SwFont		  *pNewFnt;
799cdf0e10cSrcweir 	sal_Bool		   bAlter;
800cdf0e10cSrcweir public:
801cdf0e10cSrcweir 	SwDefFontSave( const SwTxtSizeInfo &rInf );
802cdf0e10cSrcweir    ~SwDefFontSave();
803cdf0e10cSrcweir };
804cdf0e10cSrcweir 
805cdf0e10cSrcweir /*************************************************************************
806cdf0e10cSrcweir  *                       Inline-Implementierungen SwTxtSizeInfo
807cdf0e10cSrcweir  *************************************************************************/
808cdf0e10cSrcweir 
GetAscent() const809cdf0e10cSrcweir inline KSHORT SwTxtSizeInfo::GetAscent() const
810cdf0e10cSrcweir {
811cdf0e10cSrcweir     ASSERT( GetOut(), "SwTxtSizeInfo::GetAscent() without pOut" )
812cdf0e10cSrcweir     return ((SwFont*)GetFont())->GetAscent( pVsh, *GetOut() );
813cdf0e10cSrcweir }
814cdf0e10cSrcweir 
GetTxtHeight() const815cdf0e10cSrcweir inline KSHORT SwTxtSizeInfo::GetTxtHeight() const
816cdf0e10cSrcweir {
817cdf0e10cSrcweir     ASSERT( GetOut(), "SwTxtSizeInfo::GetTxtHeight() without pOut" )
818cdf0e10cSrcweir     return ((SwFont*)GetFont())->GetHeight( pVsh, *GetOut() );
819cdf0e10cSrcweir }
820cdf0e10cSrcweir 
GetTxtSize(const XubString & rTxt) const821cdf0e10cSrcweir inline SwPosSize SwTxtSizeInfo::GetTxtSize( const XubString &rTxt ) const
822cdf0e10cSrcweir {
823cdf0e10cSrcweir     return GetTxtSize( pOut, 0, rTxt, 0, rTxt.Len(), 0 );
824cdf0e10cSrcweir }
825cdf0e10cSrcweir 
GetTxtSize(const SwScriptInfo * pSI,const xub_StrLen nNewIdx,const xub_StrLen nNewLen,const sal_uInt16 nCompress) const826cdf0e10cSrcweir inline SwPosSize SwTxtSizeInfo::GetTxtSize( const SwScriptInfo* pSI,
827cdf0e10cSrcweir                                             const xub_StrLen nNewIdx,
828cdf0e10cSrcweir                                             const xub_StrLen nNewLen,
829cdf0e10cSrcweir                                             const sal_uInt16 nCompress ) const
830cdf0e10cSrcweir {
831cdf0e10cSrcweir     return GetTxtSize( pOut, pSI, *pTxt, nNewIdx, nNewLen, nCompress );
832cdf0e10cSrcweir }
833cdf0e10cSrcweir 
834cdf0e10cSrcweir /*************************************************************************
835cdf0e10cSrcweir  *                       Inline-Implementierungen SwTxtPaintInfo
836cdf0e10cSrcweir  *************************************************************************/
837cdf0e10cSrcweir 
GetPaintOfst() const838cdf0e10cSrcweir inline SwTwips SwTxtPaintInfo::GetPaintOfst() const
839cdf0e10cSrcweir {
840cdf0e10cSrcweir 	return GetParaPortion()->GetRepaint()->GetOfst();
841cdf0e10cSrcweir }
842cdf0e10cSrcweir 
SetPaintOfst(const SwTwips nNew)843cdf0e10cSrcweir inline void SwTxtPaintInfo::SetPaintOfst( const SwTwips nNew )
844cdf0e10cSrcweir {
845cdf0e10cSrcweir 	GetParaPortion()->GetRepaint()->SetOfst( nNew );
846cdf0e10cSrcweir }
847cdf0e10cSrcweir 
848cdf0e10cSrcweir 
DrawText(const XubString & rText,const SwLinePortion & rPor,const xub_StrLen nStart,const xub_StrLen nLength,const sal_Bool bKern) const849cdf0e10cSrcweir inline void SwTxtPaintInfo::DrawText( const XubString &rText,
850cdf0e10cSrcweir 							const SwLinePortion &rPor,
851cdf0e10cSrcweir                             const xub_StrLen nStart, const xub_StrLen nLength,
852cdf0e10cSrcweir 							const sal_Bool bKern ) const
853cdf0e10cSrcweir {
854cdf0e10cSrcweir     ((SwTxtPaintInfo*)this)->_DrawText( rText, rPor, nStart, nLength, bKern );
855cdf0e10cSrcweir }
856cdf0e10cSrcweir 
DrawText(const SwLinePortion & rPor,const xub_StrLen nLength,const sal_Bool bKern) const857cdf0e10cSrcweir inline void SwTxtPaintInfo::DrawText( const SwLinePortion &rPor,
858cdf0e10cSrcweir         const xub_StrLen nLength, const sal_Bool bKern ) const
859cdf0e10cSrcweir {
860cdf0e10cSrcweir     ((SwTxtPaintInfo*)this)->_DrawText( *pTxt, rPor, nIdx, nLength, bKern );
861cdf0e10cSrcweir }
862cdf0e10cSrcweir 
DrawMarkedText(const SwLinePortion & rPor,const xub_StrLen nLength,const sal_Bool bKern,const sal_Bool bWrong,const sal_Bool bSmartTags,const sal_Bool bGrammarCheck) const863cdf0e10cSrcweir inline void SwTxtPaintInfo::DrawMarkedText( const SwLinePortion &rPor,
864cdf0e10cSrcweir                                             const xub_StrLen nLength,
865cdf0e10cSrcweir                                             const sal_Bool bKern,
866cdf0e10cSrcweir                                             const sal_Bool bWrong,
867cdf0e10cSrcweir                                             const sal_Bool bSmartTags,
868cdf0e10cSrcweir                                             const sal_Bool bGrammarCheck ) const
869cdf0e10cSrcweir {
870cdf0e10cSrcweir     ((SwTxtPaintInfo*)this)->_DrawText( *pTxt, rPor, nIdx, nLength, bKern, bWrong, bSmartTags, bGrammarCheck );
871cdf0e10cSrcweir }
872cdf0e10cSrcweir 
873cdf0e10cSrcweir /*************************************************************************
874cdf0e10cSrcweir  *                       Inline-Implementierungen SwTxtFormatInfo
875cdf0e10cSrcweir  *************************************************************************/
876cdf0e10cSrcweir 
GetReformatStart() const877cdf0e10cSrcweir inline xub_StrLen SwTxtFormatInfo::GetReformatStart() const
878cdf0e10cSrcweir {
879cdf0e10cSrcweir 	return GetParaPortion()->GetReformat()->Start();
880cdf0e10cSrcweir }
881cdf0e10cSrcweir 
GetCharAttr() const882cdf0e10cSrcweir inline const SwAttrSet& SwTxtFormatInfo::GetCharAttr() const
883cdf0e10cSrcweir {
884cdf0e10cSrcweir 	return GetTxtFrm()->GetTxtNode()->GetSwAttrSet();
885cdf0e10cSrcweir }
886cdf0e10cSrcweir 
SetParaFtn()887cdf0e10cSrcweir inline void SwTxtFormatInfo::SetParaFtn()
888cdf0e10cSrcweir {
889cdf0e10cSrcweir 	GetTxtFrm()->SetFtn( sal_True );
890cdf0e10cSrcweir }
891cdf0e10cSrcweir 
IsSoftHyph(const xub_StrLen nPos) const892cdf0e10cSrcweir inline sal_Bool SwTxtFormatInfo::IsSoftHyph( const xub_StrLen nPos ) const
893cdf0e10cSrcweir {
894cdf0e10cSrcweir 	return CHAR_SOFTHYPHEN == GetTxtFrm()->GetTxtNode()->GetTxt().GetChar(nPos);
895cdf0e10cSrcweir }
896cdf0e10cSrcweir 
897cdf0e10cSrcweir 
898cdf0e10cSrcweir 
899cdf0e10cSrcweir #endif
900cdf0e10cSrcweir 
901