xref: /aoo42x/main/sw/source/core/inc/swfont.hxx (revision 69a74367)
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 _SWFONT_HXX
24cdf0e10cSrcweir #define	_SWFONT_HXX
25cdf0e10cSrcweir 
26cdf0e10cSrcweir #include <i18npool/lang.h>
27cdf0e10cSrcweir #include <tools/color.hxx>
28cdf0e10cSrcweir #ifndef _TOOLS_STREAM_HXX //autogen
29cdf0e10cSrcweir #include <tools/stream.hxx>
30cdf0e10cSrcweir #endif
31cdf0e10cSrcweir #include <editeng/svxfont.hxx>
32cdf0e10cSrcweir #include <swtypes.hxx>
33cdf0e10cSrcweir #include <drawfont.hxx>		// SwDrawTextInfo
34cdf0e10cSrcweir 
35cdf0e10cSrcweir class SfxItemSet;
36cdf0e10cSrcweir class SwAttrSet;
37cdf0e10cSrcweir class SwDoCapitals; 	// DoCapitals
38cdf0e10cSrcweir class SwDrawTextInfo;   // _DrawText
39cdf0e10cSrcweir class SwScriptInfo;     // _GetTxtSize
40cdf0e10cSrcweir class ViewShell;
41cdf0e10cSrcweir class IDocumentSettingAccess;
42cdf0e10cSrcweir 
43cdf0e10cSrcweir const xub_Unicode CH_BLANK = ' ';  	// ' ' Leerzeichen
44cdf0e10cSrcweir const xub_Unicode CH_BREAK = 0x0A; 	//
45cdf0e10cSrcweir const xub_Unicode CH_TAB   = '\t'; 	// \t
46cdf0e10cSrcweir const xub_Unicode CH_PAR    = 0xB6;   	// Paragraph
47cdf0e10cSrcweir const xub_Unicode CH_BULLET = 0xB7;		// mittiger Punkt
48cdf0e10cSrcweir 
49cdf0e10cSrcweir class SwSubFont : public SvxFont
50cdf0e10cSrcweir {
51cdf0e10cSrcweir 	friend class SwFont;
52cdf0e10cSrcweir 	const void *pMagic;			// "MagicNumber" innerhalb des Fontcaches
53cdf0e10cSrcweir 	Size		aSize;          // Fremde kriegen nur diese Size zu sehen
54cdf0e10cSrcweir 	sal_uInt16 		nFntIndex;      // Index im Fontcache
55cdf0e10cSrcweir 	sal_uInt16	 	nOrgHeight;		// Hoehe inkl. Escapement/Proportion
56cdf0e10cSrcweir 	sal_uInt16	 	nOrgAscent;		// Ascent inkl. Escapement/Proportion
57cdf0e10cSrcweir 	sal_uInt16		nPropWidth;		// proportional width
SwSubFont()58cdf0e10cSrcweir 	inline SwSubFont() : aSize(0,0)
59cdf0e10cSrcweir 	{ pMagic = NULL; nFntIndex = nOrgHeight = nOrgAscent = 0; nPropWidth =100; }
60cdf0e10cSrcweir 
61cdf0e10cSrcweir 	sal_uInt16 CalcEscAscent( const sal_uInt16 nOldAscent ) const;
62cdf0e10cSrcweir 	sal_uInt16 CalcEscHeight( const sal_uInt16 nOldHeight,
63cdf0e10cSrcweir 						  const sal_uInt16 nOldAscent ) const;
64cdf0e10cSrcweir     void CalcEsc( SwDrawTextInfo& rInf, Point& rPos );
65cdf0e10cSrcweir 
CopyMagic(const SwSubFont & rFnt)66cdf0e10cSrcweir 	inline void CopyMagic( const SwSubFont& rFnt )
67cdf0e10cSrcweir 		{ pMagic = rFnt.pMagic; nFntIndex = rFnt.nFntIndex; }
68cdf0e10cSrcweir 
69cdf0e10cSrcweir 	sal_Bool operator==( const SwFont &rFnt ) const;
70cdf0e10cSrcweir 	SwSubFont& operator=( const SwSubFont &rFont );
71cdf0e10cSrcweir 
72cdf0e10cSrcweir 	short _CheckKerning( );
73cdf0e10cSrcweir 
74cdf0e10cSrcweir     sal_Bool ChgFnt( ViewShell *pSh, OutputDevice& rOut );
75cdf0e10cSrcweir 	sal_Bool IsSymbol( ViewShell *pSh );
76cdf0e10cSrcweir     sal_uInt16 GetAscent( ViewShell *pSh, const OutputDevice& rOut );
77cdf0e10cSrcweir     sal_uInt16 GetHeight( ViewShell *pSh, const OutputDevice& rOut );
78cdf0e10cSrcweir 	Size _GetTxtSize( SwDrawTextInfo& rInf );
79cdf0e10cSrcweir 	Size GetCapitalSize( SwDrawTextInfo& rInf );
80cdf0e10cSrcweir 	void _DrawText( SwDrawTextInfo &rInf, const sal_Bool bGrey );
81cdf0e10cSrcweir 	void DrawCapital( SwDrawTextInfo &rInf );
82cdf0e10cSrcweir 	void DrawStretchCapital( SwDrawTextInfo &rInf );
83cdf0e10cSrcweir 	void DoOnCapitals( SwDoCapitals &rDo );
84cdf0e10cSrcweir 	void _DrawStretchText( SwDrawTextInfo &rInf );
85cdf0e10cSrcweir 	xub_StrLen _GetCrsrOfst( SwDrawTextInfo& rInf );
86cdf0e10cSrcweir 	xub_StrLen GetCapitalCrsrOfst( SwDrawTextInfo& rInf );
87cdf0e10cSrcweir 
88cdf0e10cSrcweir 	inline void SetColor( const Color& rColor );
89cdf0e10cSrcweir 	inline void SetFillColor( const Color& rColor );
90cdf0e10cSrcweir 	inline void SetCharSet( const CharSet eCharSet );
91cdf0e10cSrcweir 	inline void SetPitch( const FontPitch ePitch );
92cdf0e10cSrcweir 	inline void SetAlign( const FontAlign eAlign );
93cdf0e10cSrcweir 	inline void SetUnderline( const FontUnderline eUnderline );
94cdf0e10cSrcweir 	inline void SetOverline( const FontUnderline eOverline );
95cdf0e10cSrcweir 	inline void SetStrikeout( const FontStrikeout eStrikeout );
96cdf0e10cSrcweir 	inline void SetItalic( const FontItalic eItalic );
97cdf0e10cSrcweir 	inline void SetOutline( const sal_Bool bOutline );
98cdf0e10cSrcweir     inline void SetVertical( const sal_uInt16 nDir, const sal_Bool bVertFormat );
99cdf0e10cSrcweir 	inline void SetShadow( const sal_Bool bShadow );
100cdf0e10cSrcweir 	inline void SetAutoKern( const sal_uInt8 nAutoKern );
101cdf0e10cSrcweir 	inline void SetWordLineMode( const sal_Bool bWordLineMode );
102cdf0e10cSrcweir 	inline void SetEmphasisMark( const FontEmphasisMark eValue );
103cdf0e10cSrcweir 	inline void SetRelief( const FontRelief eNew );
104cdf0e10cSrcweir 
105cdf0e10cSrcweir 	// Methoden fuer die Hoch-/Tiefstellung
106cdf0e10cSrcweir 	inline void SetEscapement( const short nNewEsc );
107cdf0e10cSrcweir 	inline void SetProportion( const sal_uInt8 nNewPropr );
108cdf0e10cSrcweir 
109cdf0e10cSrcweir 	inline void SetFamily( const FontFamily eFamily );
110cdf0e10cSrcweir 	inline void SetName( const XubString& rName );
111cdf0e10cSrcweir 	inline void SetStyleName( const XubString& rStyleName );
112cdf0e10cSrcweir 	inline void SetSize( const Size& rSize );
113cdf0e10cSrcweir 	inline void SetWeight( const FontWeight eWeight );
114cdf0e10cSrcweir 	inline void SetLanguage( LanguageType eNewLang );
CheckKerning()115cdf0e10cSrcweir 	inline short CheckKerning()
116cdf0e10cSrcweir 	{   return GetFixKerning() >= 0 ? GetFixKerning() : _CheckKerning( ); }
SetPropWidth(const sal_uInt16 nNew)117cdf0e10cSrcweir 	inline void SetPropWidth( const sal_uInt16 nNew )
118cdf0e10cSrcweir 		{ pMagic = 0; nPropWidth = nNew; }
119cdf0e10cSrcweir public:
GetPropWidth() const120cdf0e10cSrcweir 	sal_uInt16 GetPropWidth() const { return nPropWidth; }
121cdf0e10cSrcweir };
122cdf0e10cSrcweir 
123cdf0e10cSrcweir #define SW_LATIN 0
124cdf0e10cSrcweir #define SW_CJK 1
125cdf0e10cSrcweir #define SW_CTL 2
126cdf0e10cSrcweir #define SW_SCRIPTS 3
127cdf0e10cSrcweir 
128cdf0e10cSrcweir class SwFont
129*69a74367SOliver-Rainer Wittmann {   // CJK == Chinese, Japanese, Korean
130*69a74367SOliver-Rainer Wittmann     // CTL == Complex text layout ( Hebrew, Arabic )
131*69a74367SOliver-Rainer Wittmann     SwSubFont aSub[SW_SCRIPTS]; // Latin-, CJK- and CTL-font
132*69a74367SOliver-Rainer Wittmann 
133*69a74367SOliver-Rainer Wittmann     Color* pBackColor;     // background color (i.e. at character styles)
134*69a74367SOliver-Rainer Wittmann     Color  aUnderColor;    // color of the underlining
135*69a74367SOliver-Rainer Wittmann     Color  aOverColor;     // color of the overlining
136*69a74367SOliver-Rainer Wittmann 
137*69a74367SOliver-Rainer Wittmann     sal_uInt8   nToxCnt;        // Zaehlt die Schachtelungstiefe der Tox
138*69a74367SOliver-Rainer Wittmann     sal_uInt8   nRefCnt;        // Zaehlt die Schachtelungstiefe der Refs
139*69a74367SOliver-Rainer Wittmann     sal_uInt8   m_nMetaCount;   // count META/METAFIELD
140*69a74367SOliver-Rainer Wittmann     sal_uInt8   m_nInputFieldCount; // count INPUTFIELD
141*69a74367SOliver-Rainer Wittmann 
142*69a74367SOliver-Rainer Wittmann         sal_uInt8   nActual;        // actual font (Latin, CJK or CTL)
143cdf0e10cSrcweir 
144cdf0e10cSrcweir 	// Schalter fuer die Font-Extensions
145cdf0e10cSrcweir 	sal_Bool bNoHyph		:1;  // SwTxtNoHyphenHere:	  keine Trennstelle
146cdf0e10cSrcweir 	sal_Bool bBlink      	:1;  // blinkender Font
147cdf0e10cSrcweir 	sal_Bool bPaintBlank    :1;  // Blanks nicht mit DrawRect
148cdf0e10cSrcweir 	sal_Bool bFntChg		:1;
149cdf0e10cSrcweir 	sal_Bool bOrgChg		:1;	 // nOrgHeight/Ascent sind invalid
150cdf0e10cSrcweir 	sal_Bool bURL			:1;
151cdf0e10cSrcweir 	sal_Bool bPaintWrong	:1;  // Flag fuer Rechtschreibfehler
152cdf0e10cSrcweir 	sal_Bool bGreyWave		:1;  // Fuers extended TextInput: Graue Wellenlinie
153cdf0e10cSrcweir 	sal_Bool bNoColReplace  :1;  // Replacement without colormanipulation
154cdf0e10cSrcweir 
155cdf0e10cSrcweir 	sal_Bool operator==( const SwFont &rFnt ) const;
156cdf0e10cSrcweir 
157cdf0e10cSrcweir protected:
SwFont()158cdf0e10cSrcweir 	inline SwFont()	{ pBackColor = NULL; nActual = SW_LATIN; }
159cdf0e10cSrcweir 
160cdf0e10cSrcweir public:
161cdf0e10cSrcweir     SwFont( const SwAttrSet* pSet, const IDocumentSettingAccess* pIDocumentSettingAccess );
162cdf0e10cSrcweir 	SwFont( const SwFont& rFont );
163cdf0e10cSrcweir 
ChgFnt(ViewShell * pSh,OutputDevice & rOut)164cdf0e10cSrcweir     inline void ChgFnt( ViewShell *pSh, OutputDevice& rOut )
165cdf0e10cSrcweir         { bPaintBlank = aSub[nActual].ChgFnt( pSh, rOut ); }
166cdf0e10cSrcweir 
~SwFont()167cdf0e10cSrcweir 	~SwFont(){ delete pBackColor; }
168cdf0e10cSrcweir 
169cdf0e10cSrcweir 	SwFont& operator=( const SwFont &rFont );
170cdf0e10cSrcweir 
GetActual() const171cdf0e10cSrcweir 	inline sal_uInt8 GetActual() const {	return nActual;	}
172cdf0e10cSrcweir     inline void SetActual( sal_uInt8 nNew );
GetActualFont() const173cdf0e10cSrcweir 	inline const SvxFont& GetActualFont() const { return aSub[nActual]; }
174cdf0e10cSrcweir 
175cdf0e10cSrcweir 	// holt sich eine MagicNumber ueber SwFntAccess
176cdf0e10cSrcweir 	void GoMagic( ViewShell *pSh, sal_uInt8 nWhich );
177cdf0e10cSrcweir 	// set background color
178cdf0e10cSrcweir 	void SetBackColor( Color* pNewColor );
GetBackColor() const179cdf0e10cSrcweir 	inline const Color* GetBackColor() const{ return pBackColor; }
180cdf0e10cSrcweir 
ChkMagic(ViewShell * pSh,sal_uInt8 nWhich)181cdf0e10cSrcweir 	inline void ChkMagic( ViewShell *pSh, sal_uInt8 nWhich )
182cdf0e10cSrcweir 		{ if( !aSub[ nWhich ].pMagic ) GoMagic( pSh, nWhich ); }
183cdf0e10cSrcweir 	// uebernimmt die MagicNumber eines (hoffentlich ident.) Kollegen
CopyMagic(const SwFont * pFnt,sal_uInt8 nWhich)184cdf0e10cSrcweir 	inline void CopyMagic( const SwFont* pFnt, sal_uInt8 nWhich )
185cdf0e10cSrcweir 		{ aSub[nWhich].CopyMagic( pFnt->aSub[nWhich] ); }
GetMagic(const void * & rMagic,sal_uInt16 & rIdx,sal_uInt8 nWhich)186cdf0e10cSrcweir 	inline void GetMagic( const void* &rMagic, sal_uInt16 &rIdx, sal_uInt8 nWhich )
187cdf0e10cSrcweir 		{ rMagic = aSub[nWhich].pMagic; rIdx = aSub[nWhich].nFntIndex; }
SetMagic(const void * pNew,const sal_uInt16 nIdx,sal_uInt8 nWhich)188cdf0e10cSrcweir 	inline void SetMagic( const void* pNew, const sal_uInt16 nIdx, sal_uInt8 nWhich )
189cdf0e10cSrcweir 		{ aSub[nWhich].pMagic = pNew; aSub[nWhich].nFntIndex = nIdx; }
DifferentMagic(const SwFont * pFnt,sal_uInt8 nWhich)190cdf0e10cSrcweir 	inline sal_Bool DifferentMagic( const SwFont* pFnt, sal_uInt8 nWhich )
191cdf0e10cSrcweir 		{ return aSub[nWhich].pMagic != pFnt->aSub[nWhich].pMagic ||
192cdf0e10cSrcweir 		  !aSub[nWhich].pMagic || !pFnt->aSub[nWhich].pMagic; }
193cdf0e10cSrcweir 
GetSize(sal_uInt8 nWhich) const194cdf0e10cSrcweir 	inline const Size &GetSize( sal_uInt8 nWhich ) const
195cdf0e10cSrcweir 		{ return aSub[nWhich].aSize; }
IsFntChg() const196cdf0e10cSrcweir 	inline sal_Bool IsFntChg() const { return bFntChg; }
SetFntChg(const sal_Bool bNew)197cdf0e10cSrcweir 	inline void SetFntChg( const sal_Bool bNew ) { bFntChg = bNew; }
198cdf0e10cSrcweir 
199cdf0e10cSrcweir 	// die gekapselten SV-Font-Methoden (setzen bFntChg auf sal_True)
200cdf0e10cSrcweir 	inline void SetColor( const Color& rColor );
201cdf0e10cSrcweir 	inline void SetFillColor( const Color& rColor );
202cdf0e10cSrcweir 	inline void SetAlign( const FontAlign eAlign );
203cdf0e10cSrcweir 	inline void SetUnderline( const FontUnderline eUnderline );
SetUnderColor(const Color & rColor)204cdf0e10cSrcweir 	inline void SetUnderColor( const Color &rColor ) { aUnderColor = rColor; }
205cdf0e10cSrcweir 	inline void SetOverline( const FontUnderline eOverline );
SetOverColor(const Color & rColor)206cdf0e10cSrcweir 	inline void SetOverColor( const Color &rColor ) { aOverColor = rColor; }
207cdf0e10cSrcweir 	inline void SetStrikeout( const FontStrikeout eStrikeout );
208cdf0e10cSrcweir 	inline void SetOutline( const sal_Bool bOutline );
209cdf0e10cSrcweir            void SetVertical( sal_uInt16 nDir, const sal_Bool nVertLayout = sal_False );
210cdf0e10cSrcweir 	inline void SetShadow( const sal_Bool bShadow );
211cdf0e10cSrcweir 	inline void SetAutoKern( sal_uInt8 nAutoKern );
212cdf0e10cSrcweir 	inline void SetTransparent( const sal_Bool bTrans );
213cdf0e10cSrcweir 	inline void SetWordLineMode( const sal_Bool bWordLineMode );
214cdf0e10cSrcweir 	inline void SetFixKerning( const short nNewKern );
215cdf0e10cSrcweir 	inline void SetCaseMap( const SvxCaseMap eNew );
216cdf0e10cSrcweir     inline void SetEmphasisMark( const FontEmphasisMark eValue );
217cdf0e10cSrcweir 
218cdf0e10cSrcweir 	// Methoden fuer die Hoch-/Tiefstellung
219cdf0e10cSrcweir 	inline void SetEscapement( const short nNewEsc );
220cdf0e10cSrcweir     inline void SetProportion( const sal_uInt8 nNewPropr );
221cdf0e10cSrcweir 
222cdf0e10cSrcweir 	inline void SetPropWidth( const sal_uInt16 nNew );
223cdf0e10cSrcweir 
224cdf0e10cSrcweir 	inline void SetFamily( const FontFamily eFamily, const sal_uInt8 nWhich );
225cdf0e10cSrcweir 	inline void SetName( const XubString& rName, const sal_uInt8 nWhich );
226cdf0e10cSrcweir 	inline void SetStyleName( const XubString& rStyleName, const sal_uInt8 nWhich );
227cdf0e10cSrcweir 	inline void SetSize( const Size& rSize, const sal_uInt8 nWhich );
228cdf0e10cSrcweir 	inline void SetWeight( const FontWeight eWeight, const sal_uInt8 nWhich );
229cdf0e10cSrcweir 	inline void SetItalic( const FontItalic eItalic, const sal_uInt8 nWhich );
230cdf0e10cSrcweir 	inline void SetLanguage( LanguageType eNewLang, const sal_uInt8 nWhich );
231cdf0e10cSrcweir 	inline void SetCharSet( const CharSet eCharSet, const sal_uInt8 nWhich );
232cdf0e10cSrcweir 	inline void SetPitch( const FontPitch ePitch, const sal_uInt8 nWhich );
233cdf0e10cSrcweir 	inline void SetRelief( const FontRelief eNew );
234cdf0e10cSrcweir 
235cdf0e10cSrcweir 	// Get/Set-Methoden fuer die aktuelle Einstellung
236cdf0e10cSrcweir 	inline void SetNoHyph( const sal_Bool bNew );
IsNoHyph() const237cdf0e10cSrcweir 	inline sal_Bool IsNoHyph() const { return bNoHyph; }
238cdf0e10cSrcweir 	inline void SetBlink( const sal_Bool bBlink );
IsBlink() const239cdf0e10cSrcweir 	inline sal_Bool IsBlink() const { return bBlink; }
GetTox()240cdf0e10cSrcweir 	inline sal_uInt8 &GetTox() { return nToxCnt; }
GetTox() const241cdf0e10cSrcweir 	inline sal_uInt8 GetTox() const { return nToxCnt; }
IsTox() const242cdf0e10cSrcweir 	inline sal_Bool IsTox() const { return ( 0 != nToxCnt ); }
GetRef()243cdf0e10cSrcweir 	inline sal_uInt8 &GetRef() { return nRefCnt; }
GetRef() const244cdf0e10cSrcweir 	inline sal_uInt8 GetRef() const { return nRefCnt; }
IsRef() const245cdf0e10cSrcweir 	inline sal_Bool IsRef() const { return ( 0 != nRefCnt ); }
GetMeta()246cdf0e10cSrcweir     inline sal_uInt8 &GetMeta() { return m_nMetaCount; }
GetMeta() const247cdf0e10cSrcweir     inline sal_uInt8 GetMeta() const { return m_nMetaCount; }
IsMeta() const248cdf0e10cSrcweir     inline bool IsMeta() const { return (0 != m_nMetaCount); }
GetInputField()249*69a74367SOliver-Rainer Wittmann     inline sal_uInt8 &GetInputField() { return m_nInputFieldCount; }
GetInputField() const250*69a74367SOliver-Rainer Wittmann     inline sal_uInt8 GetInputField() const { return m_nInputFieldCount; }
IsInputField() const251*69a74367SOliver-Rainer Wittmann     inline bool IsInputField() const { return (0 != m_nInputFieldCount); }
252cdf0e10cSrcweir 	inline void SetURL( const sal_Bool bURL );
IsURL() const253cdf0e10cSrcweir 	inline sal_Bool IsURL() const { return bURL; }
254cdf0e10cSrcweir 	inline void SetGreyWave( const sal_Bool bNew );
IsGreyWave() const255cdf0e10cSrcweir 	inline sal_Bool IsGreyWave() const { return bGreyWave; }
256cdf0e10cSrcweir 	inline void SetNoCol( const sal_Bool bNew );
IsNoCol() const257cdf0e10cSrcweir 	inline sal_Bool IsNoCol() const { return bNoColReplace; }
258cdf0e10cSrcweir 
259cdf0e10cSrcweir 	inline void SetPaintBlank( const sal_Bool bNew );
IsPaintBlank() const260cdf0e10cSrcweir 	inline sal_Bool IsPaintBlank() const { return bPaintBlank; }
261cdf0e10cSrcweir 	inline void SetPaintWrong( const sal_Bool bNew );
IsPaintWrong() const262cdf0e10cSrcweir 	inline sal_Bool IsPaintWrong() const { return bPaintWrong; }
263cdf0e10cSrcweir 
264cdf0e10cSrcweir 	// Setzen der Basisklasse Font fuer SwTxtCharFmt
265cdf0e10cSrcweir     void SetDiffFnt( const SfxItemSet* pSet,
266cdf0e10cSrcweir                      const IDocumentSettingAccess* pIDocumentSettingAccess );
267cdf0e10cSrcweir 
GetFnt(const sal_uInt8 nWhich) const268cdf0e10cSrcweir     inline const SvxFont &GetFnt( const sal_uInt8 nWhich ) const
269cdf0e10cSrcweir         { return aSub[nWhich]; };
270cdf0e10cSrcweir 
IsSymbol(ViewShell * pSh)271cdf0e10cSrcweir 	sal_Bool IsSymbol( ViewShell *pSh )
272cdf0e10cSrcweir 		{ return aSub[nActual].IsSymbol( pSh ); }
GetUnderline() const273cdf0e10cSrcweir 	FontUnderline GetUnderline() const { return aSub[nActual].GetUnderline(); }
GetUnderColor() const274cdf0e10cSrcweir 	const Color& GetUnderColor() const { return aUnderColor; }
GetOverline() const275cdf0e10cSrcweir 	FontUnderline GetOverline() const { return aSub[nActual].GetOverline(); }
GetOverColor() const276cdf0e10cSrcweir 	const Color& GetOverColor() const { return aOverColor; }
GetFixKerning() const277cdf0e10cSrcweir 	short GetFixKerning() const { return aSub[nActual].GetFixKerning(); }
GetStrikeout() const278cdf0e10cSrcweir 	FontStrikeout GetStrikeout() const { return aSub[nActual].GetStrikeout(); }
GetColor() const279cdf0e10cSrcweir 	const Color& GetColor() const { return aSub[nActual].GetColor(); }
IsShadow() const280cdf0e10cSrcweir 	sal_Bool IsShadow() const { return aSub[nActual].IsShadow(); }
IsWordLineMode() const281cdf0e10cSrcweir 	sal_Bool IsWordLineMode() const { return aSub[nActual].IsWordLineMode(); }
IsOutline() const282cdf0e10cSrcweir 	sal_Bool IsOutline() const { return aSub[nActual].IsOutline(); }
IsKerning() const283cdf0e10cSrcweir 	sal_Bool IsKerning() const { return aSub[nActual].IsKerning(); }
GetEscapement() const284cdf0e10cSrcweir 	short GetEscapement() const { return aSub[nActual].GetEscapement(); }
GetCaseMap() const285cdf0e10cSrcweir 	SvxCaseMap GetCaseMap() const { return aSub[nActual].GetCaseMap(); }
GetPropr() const286cdf0e10cSrcweir 	sal_uInt8 GetPropr() const { return aSub[nActual].GetPropr(); }
GetItalic() const287cdf0e10cSrcweir 	FontItalic GetItalic() const { return aSub[nActual].GetItalic(); }
GetLanguage() const288cdf0e10cSrcweir 	LanguageType GetLanguage() const { return aSub[nActual].GetLanguage(); }
GetAlign() const289cdf0e10cSrcweir 	FontAlign GetAlign() const { return aSub[nActual].GetAlign(); }
GetName() const290cdf0e10cSrcweir 	const XubString& GetName() const { return aSub[nActual].GetName(); }
GetStyleName() const291cdf0e10cSrcweir 	const XubString& GetStyleName() const {return aSub[nActual].GetStyleName();}
GetFamily() const292cdf0e10cSrcweir 	FontFamily GetFamily() const { return aSub[nActual].GetFamily(); }
GetPitch() const293cdf0e10cSrcweir 	FontPitch GetPitch() const { return aSub[nActual].GetPitch(); }
GetCharSet() const294cdf0e10cSrcweir 	rtl_TextEncoding GetCharSet() const	{ return aSub[nActual].GetCharSet(); }
GetHeight() const295cdf0e10cSrcweir 	long GetHeight() const { return aSub[nActual].GetSize().Height(); }
GetWeight() const296cdf0e10cSrcweir 	FontWeight GetWeight() const { return aSub[nActual].GetWeight(); }
GetEmphasisMark() const297cdf0e10cSrcweir 	FontEmphasisMark GetEmphasisMark() const
298cdf0e10cSrcweir 		{ return aSub[nActual].GetEmphasisMark(); }
GetPropWidth() const299cdf0e10cSrcweir     sal_uInt16 GetPropWidth() const { return aSub[nActual].GetPropWidth(); }
300cdf0e10cSrcweir     sal_uInt16 GetOrientation( const sal_Bool nVertLayout = sal_False ) const;
301cdf0e10cSrcweir 
GetName(const sal_uInt8 nWhich) const302cdf0e10cSrcweir 	inline const XubString& GetName( const sal_uInt8 nWhich ) const
303cdf0e10cSrcweir 		{ return aSub[nWhich].GetName(); }
GetLanguage(const sal_uInt8 nWhich) const304cdf0e10cSrcweir 	inline LanguageType GetLanguage( const sal_uInt8 nWhich ) const
305cdf0e10cSrcweir 		{ return aSub[nWhich].GetLanguage(); }
GetStyleName(const sal_uInt8 nWhich) const306cdf0e10cSrcweir 	inline const XubString& GetStyleName( const sal_uInt8 nWhich ) const
307cdf0e10cSrcweir 		{ return aSub[nWhich].GetStyleName(); }
GetFamily(const sal_uInt8 nWhich) const308cdf0e10cSrcweir 	inline FontFamily GetFamily( const sal_uInt8 nWhich ) const
309cdf0e10cSrcweir 		{ return aSub[nWhich].GetFamily(); }
GetItalic(const sal_uInt8 nWhich) const310cdf0e10cSrcweir 	inline FontItalic GetItalic( const sal_uInt8 nWhich ) const
311cdf0e10cSrcweir 		{ return aSub[nWhich].GetItalic(); }
GetPitch(const sal_uInt8 nWhich) const312cdf0e10cSrcweir 	inline FontPitch GetPitch( const sal_uInt8 nWhich ) const
313cdf0e10cSrcweir 		{ return aSub[nWhich].GetPitch(); }
GetCharSet(const sal_uInt8 nWhich) const314cdf0e10cSrcweir 	inline rtl_TextEncoding GetCharSet( const sal_uInt8 nWhich ) const
315cdf0e10cSrcweir 		{ return aSub[nWhich].GetCharSet(); }
GetHeight(const sal_uInt8 nWhich) const316cdf0e10cSrcweir 	inline long GetHeight( const sal_uInt8 nWhich ) const
317cdf0e10cSrcweir 		{ return aSub[nWhich].GetSize().Height(); }
GetWeight(const sal_uInt8 nWhich) const318cdf0e10cSrcweir 	inline FontWeight GetWeight( const sal_uInt8 nWhich ) const
319cdf0e10cSrcweir 		{ return aSub[nWhich].GetWeight(); }
GetEmphasisMark(const sal_uInt8 nWhich) const320cdf0e10cSrcweir 	inline FontEmphasisMark GetEmphasisMark( const sal_uInt8 nWhich ) const
321cdf0e10cSrcweir 		{ return aSub[nWhich].GetEmphasisMark(); }
322cdf0e10cSrcweir 
323cdf0e10cSrcweir 	// Macht den logischen Font im OutputDevice wirksam.
324cdf0e10cSrcweir     void ChgPhysFnt( ViewShell *pSh, OutputDevice& rOut );
325cdf0e10cSrcweir 
GetCapitalSize(SwDrawTextInfo & rInf)326cdf0e10cSrcweir 	Size GetCapitalSize( SwDrawTextInfo& rInf )
327cdf0e10cSrcweir 		{ return aSub[nActual].GetCapitalSize( rInf ); }
328cdf0e10cSrcweir 
329cdf0e10cSrcweir     xub_StrLen GetCapitalBreak( ViewShell* pSh,  const OutputDevice* pOut,
330cdf0e10cSrcweir         const SwScriptInfo* pScript, const XubString& rTxt,
331cdf0e10cSrcweir         long nTextWidth, xub_StrLen* pExtra, const xub_StrLen nIdx,
332cdf0e10cSrcweir 		const xub_StrLen nLen );
333cdf0e10cSrcweir 
GetCapitalCrsrOfst(SwDrawTextInfo & rInf)334cdf0e10cSrcweir 	xub_StrLen GetCapitalCrsrOfst( SwDrawTextInfo& rInf )
335cdf0e10cSrcweir 		{ return aSub[nActual].GetCapitalCrsrOfst( rInf ); }
336cdf0e10cSrcweir 
DrawCapital(SwDrawTextInfo & rInf)337cdf0e10cSrcweir 	void DrawCapital( SwDrawTextInfo &rInf )
338cdf0e10cSrcweir 		{ aSub[nActual].DrawCapital( rInf ); }
339cdf0e10cSrcweir 
DrawStretchCapital(SwDrawTextInfo & rInf)340cdf0e10cSrcweir 	void DrawStretchCapital( SwDrawTextInfo &rInf )
341cdf0e10cSrcweir 		{ aSub[nActual].DrawStretchCapital( rInf ); }
342cdf0e10cSrcweir 
DoOnCapitals(SwDoCapitals & rDo)343cdf0e10cSrcweir 	void DoOnCapitals( SwDoCapitals &rDo )
344cdf0e10cSrcweir 		{ aSub[nActual].DoOnCapitals( rDo ); }
345cdf0e10cSrcweir 
_GetTxtSize(SwDrawTextInfo & rInf)346cdf0e10cSrcweir 	Size _GetTxtSize( SwDrawTextInfo& rInf )
347cdf0e10cSrcweir         { rInf.SetFont( this ); return aSub[nActual]._GetTxtSize( rInf ); }
348cdf0e10cSrcweir 
349cdf0e10cSrcweir 	xub_StrLen GetTxtBreak( SwDrawTextInfo& rInf, long nTextWidth );
350cdf0e10cSrcweir 
_GetCrsrOfst(SwDrawTextInfo & rInf)351cdf0e10cSrcweir 	xub_StrLen _GetCrsrOfst( SwDrawTextInfo& rInf )
352cdf0e10cSrcweir 		{ return aSub[nActual]._GetCrsrOfst( rInf ); }
353cdf0e10cSrcweir 
_DrawText(SwDrawTextInfo & rInf)354cdf0e10cSrcweir 	inline void _DrawText( SwDrawTextInfo &rInf )
355cdf0e10cSrcweir 		{ aSub[nActual]._DrawText( rInf, IsGreyWave() ); }
356cdf0e10cSrcweir 
_DrawStretchText(SwDrawTextInfo & rInf)357cdf0e10cSrcweir 	inline void _DrawStretchText( SwDrawTextInfo &rInf )
358cdf0e10cSrcweir 		{ aSub[nActual]._DrawStretchText( rInf ); }
359cdf0e10cSrcweir 
CheckKerning()360cdf0e10cSrcweir 	inline short CheckKerning()
361cdf0e10cSrcweir 		{ return aSub[nActual].CheckKerning(); }
362cdf0e10cSrcweir 
GetAscent(ViewShell * pSh,const OutputDevice & rOut)363cdf0e10cSrcweir     inline sal_uInt16 GetAscent( ViewShell *pSh, const OutputDevice& rOut )
364cdf0e10cSrcweir         { return aSub[nActual].GetAscent( pSh, rOut ); }
GetHeight(ViewShell * pSh,const OutputDevice & rOut)365cdf0e10cSrcweir     inline sal_uInt16 GetHeight( ViewShell *pSh, const OutputDevice& rOut )
366cdf0e10cSrcweir         { return aSub[nActual].GetHeight( pSh, rOut ); }
367cdf0e10cSrcweir 
Invalidate()368cdf0e10cSrcweir     inline void Invalidate()
369cdf0e10cSrcweir 		{ bFntChg = bOrgChg = sal_True; }
370cdf0e10cSrcweir };
371cdf0e10cSrcweir 
SetColor(const Color & rColor)372cdf0e10cSrcweir inline void SwFont::SetColor( const Color& rColor )
373cdf0e10cSrcweir {
374cdf0e10cSrcweir 	bFntChg = sal_True;
375cdf0e10cSrcweir 	aSub[0].SetColor( rColor );
376cdf0e10cSrcweir 	aSub[1].SetColor( rColor );
377cdf0e10cSrcweir 	aSub[2].SetColor( rColor );
378cdf0e10cSrcweir }
379cdf0e10cSrcweir 
380cdf0e10cSrcweir // gekapselte SV-Font-Methode
SetColor(const Color & rColor)381cdf0e10cSrcweir inline void SwSubFont::SetColor( const Color& rColor )
382cdf0e10cSrcweir {
383cdf0e10cSrcweir 	pMagic = 0;
384cdf0e10cSrcweir 	Font::SetColor( rColor );
385cdf0e10cSrcweir }
386cdf0e10cSrcweir 
387cdf0e10cSrcweir 
388cdf0e10cSrcweir // gekapselte SV-Font-Methode
SetFillColor(const Color & rColor)389cdf0e10cSrcweir inline void SwSubFont::SetFillColor( const Color& rColor )
390cdf0e10cSrcweir {
391cdf0e10cSrcweir 	pMagic = 0;
392cdf0e10cSrcweir 	Font::SetFillColor( rColor );
393cdf0e10cSrcweir }
394cdf0e10cSrcweir 
SetFillColor(const Color & rColor)395cdf0e10cSrcweir inline void SwFont::SetFillColor( const Color& rColor )
396cdf0e10cSrcweir {
397cdf0e10cSrcweir 	bFntChg = sal_True;
398cdf0e10cSrcweir 	aSub[0].SetFillColor( rColor );
399cdf0e10cSrcweir 	aSub[1].SetFillColor( rColor );
400cdf0e10cSrcweir 	aSub[2].SetFillColor( rColor );
401cdf0e10cSrcweir }
402cdf0e10cSrcweir 
403cdf0e10cSrcweir // gekapselte SV-Font-Methode
SetFamily(const FontFamily eFamily)404cdf0e10cSrcweir inline void SwSubFont::SetFamily( const FontFamily eFamily )
405cdf0e10cSrcweir {
406cdf0e10cSrcweir 	pMagic = 0;
407cdf0e10cSrcweir 	Font::SetFamily( eFamily );
408cdf0e10cSrcweir }
409cdf0e10cSrcweir 
SetFamily(const FontFamily eFamily,const sal_uInt8 nWhich)410cdf0e10cSrcweir inline void SwFont::SetFamily( const FontFamily eFamily, const sal_uInt8 nWhich )
411cdf0e10cSrcweir {
412cdf0e10cSrcweir 	bFntChg = sal_True;
413cdf0e10cSrcweir 	aSub[nWhich].SetFamily( eFamily );
414cdf0e10cSrcweir }
415cdf0e10cSrcweir 
416cdf0e10cSrcweir // gekapselte SV-Font-Methode
SetName(const XubString & rName)417cdf0e10cSrcweir inline void SwSubFont::SetName( const XubString& rName )
418cdf0e10cSrcweir {
419cdf0e10cSrcweir 	pMagic = 0;
420cdf0e10cSrcweir 	Font::SetName( rName );
421cdf0e10cSrcweir }
422cdf0e10cSrcweir 
SetName(const XubString & rName,const sal_uInt8 nWhich)423cdf0e10cSrcweir inline void SwFont::SetName( const XubString& rName, const sal_uInt8 nWhich )
424cdf0e10cSrcweir {
425cdf0e10cSrcweir 	bFntChg = sal_True;
426cdf0e10cSrcweir 	aSub[nWhich].SetName( rName );
427cdf0e10cSrcweir }
428cdf0e10cSrcweir 
429cdf0e10cSrcweir // gekapselte SV-Font-Methode
SetStyleName(const XubString & rStyleName)430cdf0e10cSrcweir inline void SwSubFont::SetStyleName( const XubString& rStyleName )
431cdf0e10cSrcweir {
432cdf0e10cSrcweir 	pMagic = 0;
433cdf0e10cSrcweir 	Font::SetStyleName( rStyleName );
434cdf0e10cSrcweir }
435cdf0e10cSrcweir 
SetStyleName(const XubString & rStyle,const sal_uInt8 nWhich)436cdf0e10cSrcweir inline void SwFont::SetStyleName( const XubString& rStyle, const sal_uInt8 nWhich )
437cdf0e10cSrcweir {
438cdf0e10cSrcweir 	bFntChg = sal_True;
439cdf0e10cSrcweir 	aSub[nWhich].SetStyleName( rStyle );
440cdf0e10cSrcweir }
441cdf0e10cSrcweir 
442cdf0e10cSrcweir // gekapselte SV-Font-Methode
SetCharSet(const CharSet eCharSet)443cdf0e10cSrcweir inline void SwSubFont::SetCharSet( const CharSet eCharSet )
444cdf0e10cSrcweir {
445cdf0e10cSrcweir 	pMagic = 0;
446cdf0e10cSrcweir 	Font::SetCharSet( eCharSet );
447cdf0e10cSrcweir }
448cdf0e10cSrcweir 
SetCharSet(const CharSet eCharSet,const sal_uInt8 nWhich)449cdf0e10cSrcweir inline void SwFont::SetCharSet( const CharSet eCharSet, const sal_uInt8 nWhich )
450cdf0e10cSrcweir {
451cdf0e10cSrcweir 	bFntChg = sal_True;
452cdf0e10cSrcweir 	aSub[nWhich].SetCharSet( eCharSet );
453cdf0e10cSrcweir }
454cdf0e10cSrcweir 
455cdf0e10cSrcweir // gekapselte SV-Font-Methode
SetPitch(const FontPitch ePitch)456cdf0e10cSrcweir inline void SwSubFont::SetPitch( const FontPitch ePitch )
457cdf0e10cSrcweir {
458cdf0e10cSrcweir 	pMagic = 0;
459cdf0e10cSrcweir 	Font::SetPitch( ePitch );
460cdf0e10cSrcweir }
461cdf0e10cSrcweir 
462cdf0e10cSrcweir // gekapselte SV-Font-Methode
SetPitch(const FontPitch ePitch,const sal_uInt8 nWhich)463cdf0e10cSrcweir inline void SwFont::SetPitch( const FontPitch ePitch, const sal_uInt8 nWhich )
464cdf0e10cSrcweir {
465cdf0e10cSrcweir 	bFntChg = sal_True;
466cdf0e10cSrcweir 	aSub[nWhich].SetPitch( ePitch );
467cdf0e10cSrcweir }
468cdf0e10cSrcweir 
469cdf0e10cSrcweir // gekapselte SV-Font-Methode
SetAlign(const FontAlign eAlign)470cdf0e10cSrcweir inline void SwSubFont::SetAlign( const FontAlign eAlign )
471cdf0e10cSrcweir {
472cdf0e10cSrcweir 	pMagic = 0;
473cdf0e10cSrcweir 	Font::SetAlign( eAlign );
474cdf0e10cSrcweir }
475cdf0e10cSrcweir 
SetAlign(const FontAlign eAlign)476cdf0e10cSrcweir inline void SwFont::SetAlign( const FontAlign eAlign )
477cdf0e10cSrcweir {
478cdf0e10cSrcweir 	bFntChg = sal_True;
479cdf0e10cSrcweir 	aSub[0].SetAlign( eAlign );
480cdf0e10cSrcweir 	aSub[1].SetAlign( eAlign );
481cdf0e10cSrcweir 	aSub[2].SetAlign( eAlign );
482cdf0e10cSrcweir }
483cdf0e10cSrcweir 
484cdf0e10cSrcweir // gekapselte SV-Font-Methode
SetWeight(const FontWeight eWeight)485cdf0e10cSrcweir inline void SwSubFont::SetWeight( const FontWeight eWeight )
486cdf0e10cSrcweir {
487cdf0e10cSrcweir 	pMagic = 0;
488cdf0e10cSrcweir 	Font::SetWeight( eWeight );
489cdf0e10cSrcweir }
490cdf0e10cSrcweir 
SetWeight(const FontWeight eWeight,const sal_uInt8 nWhich)491cdf0e10cSrcweir inline void SwFont::SetWeight( const FontWeight eWeight, const sal_uInt8 nWhich )
492cdf0e10cSrcweir {
493cdf0e10cSrcweir 	bFntChg = sal_True;
494cdf0e10cSrcweir 	aSub[nWhich].SetWeight( eWeight );
495cdf0e10cSrcweir }
496cdf0e10cSrcweir 
497cdf0e10cSrcweir // gekapselte SV-Font-Methode
SetUnderline(const FontUnderline eUnderline)498cdf0e10cSrcweir inline void SwSubFont::SetUnderline( const FontUnderline eUnderline )
499cdf0e10cSrcweir {
500cdf0e10cSrcweir 	pMagic = 0;
501cdf0e10cSrcweir 	Font::SetUnderline( eUnderline );
502cdf0e10cSrcweir }
503cdf0e10cSrcweir 
SetUnderline(const FontUnderline eUnderline)504cdf0e10cSrcweir inline void SwFont::SetUnderline( const FontUnderline eUnderline )
505cdf0e10cSrcweir {
506cdf0e10cSrcweir 	bFntChg = sal_True;
507cdf0e10cSrcweir 	aSub[0].SetUnderline( eUnderline );
508cdf0e10cSrcweir 	aSub[1].SetUnderline( eUnderline );
509cdf0e10cSrcweir 	aSub[2].SetUnderline( eUnderline );
510cdf0e10cSrcweir }
511cdf0e10cSrcweir 
512cdf0e10cSrcweir // gekapselte SV-Font-Methode
SetOverline(const FontUnderline eOverline)513cdf0e10cSrcweir inline void SwSubFont::SetOverline( const FontUnderline eOverline )
514cdf0e10cSrcweir {
515cdf0e10cSrcweir 	pMagic = 0;
516cdf0e10cSrcweir 	Font::SetOverline( eOverline );
517cdf0e10cSrcweir }
518cdf0e10cSrcweir 
SetOverline(const FontUnderline eOverline)519cdf0e10cSrcweir inline void SwFont::SetOverline( const FontUnderline eOverline )
520cdf0e10cSrcweir {
521cdf0e10cSrcweir 	bFntChg = sal_True;
522cdf0e10cSrcweir 	aSub[0].SetOverline( eOverline );
523cdf0e10cSrcweir 	aSub[1].SetOverline( eOverline );
524cdf0e10cSrcweir 	aSub[2].SetOverline( eOverline );
525cdf0e10cSrcweir }
526cdf0e10cSrcweir 
527cdf0e10cSrcweir // gekapselte SV-Font-Methode
SetStrikeout(const FontStrikeout eStrikeout)528cdf0e10cSrcweir inline void SwSubFont::SetStrikeout( const FontStrikeout eStrikeout )
529cdf0e10cSrcweir {
530cdf0e10cSrcweir 	pMagic = 0;
531cdf0e10cSrcweir 	Font::SetStrikeout( eStrikeout );
532cdf0e10cSrcweir }
533cdf0e10cSrcweir 
SetStrikeout(const FontStrikeout eStrikeout)534cdf0e10cSrcweir inline void SwFont::SetStrikeout( const FontStrikeout eStrikeout )
535cdf0e10cSrcweir {
536cdf0e10cSrcweir 	bFntChg = sal_True;
537cdf0e10cSrcweir 	aSub[0].SetStrikeout( eStrikeout );
538cdf0e10cSrcweir 	aSub[1].SetStrikeout( eStrikeout );
539cdf0e10cSrcweir 	aSub[2].SetStrikeout( eStrikeout );
540cdf0e10cSrcweir }
541cdf0e10cSrcweir 
542cdf0e10cSrcweir // gekapselte SV-Font-Methode
SetItalic(const FontItalic eItalic)543cdf0e10cSrcweir inline void SwSubFont::SetItalic( const FontItalic eItalic )
544cdf0e10cSrcweir {
545cdf0e10cSrcweir 	pMagic = 0;
546cdf0e10cSrcweir 	Font::SetItalic( eItalic );
547cdf0e10cSrcweir }
548cdf0e10cSrcweir 
SetItalic(const FontItalic eItalic,const sal_uInt8 nWhich)549cdf0e10cSrcweir inline void SwFont::SetItalic( const FontItalic eItalic, const sal_uInt8 nWhich )
550cdf0e10cSrcweir {
551cdf0e10cSrcweir 	bFntChg = sal_True;
552cdf0e10cSrcweir 	aSub[nWhich].SetItalic( eItalic );
553cdf0e10cSrcweir }
554cdf0e10cSrcweir 
555cdf0e10cSrcweir // gekapselte SV-Font-Methode
SetOutline(const sal_Bool bOutline)556cdf0e10cSrcweir inline void SwSubFont::SetOutline( const sal_Bool bOutline )
557cdf0e10cSrcweir {
558cdf0e10cSrcweir 	pMagic = 0;
559cdf0e10cSrcweir 	Font::SetOutline( bOutline );
560cdf0e10cSrcweir }
561cdf0e10cSrcweir 
SetOutline(const sal_Bool bOutline)562cdf0e10cSrcweir inline void SwFont::SetOutline( const sal_Bool bOutline )
563cdf0e10cSrcweir {
564cdf0e10cSrcweir 	bFntChg = sal_True;
565cdf0e10cSrcweir 	aSub[0].SetOutline( bOutline );
566cdf0e10cSrcweir 	aSub[1].SetOutline( bOutline );
567cdf0e10cSrcweir 	aSub[2].SetOutline( bOutline );
568cdf0e10cSrcweir }
569cdf0e10cSrcweir 
570cdf0e10cSrcweir // gekapselte SV-Font-Methode
SetShadow(const sal_Bool bShadow)571cdf0e10cSrcweir inline void SwSubFont::SetShadow( const sal_Bool bShadow )
572cdf0e10cSrcweir {
573cdf0e10cSrcweir 	pMagic = 0;
574cdf0e10cSrcweir 	Font::SetShadow( bShadow );
575cdf0e10cSrcweir }
576cdf0e10cSrcweir 
SetShadow(const sal_Bool bShadow)577cdf0e10cSrcweir inline void SwFont::SetShadow( const sal_Bool bShadow )
578cdf0e10cSrcweir {
579cdf0e10cSrcweir 	bFntChg = sal_True;
580cdf0e10cSrcweir 	aSub[0].SetShadow( bShadow );
581cdf0e10cSrcweir 	aSub[1].SetShadow( bShadow );
582cdf0e10cSrcweir 	aSub[2].SetShadow( bShadow );
583cdf0e10cSrcweir }
584cdf0e10cSrcweir 
585cdf0e10cSrcweir // gekapselte SV-Font-Methode
SetAutoKern(const sal_uInt8 nAutoKern)586cdf0e10cSrcweir inline void SwSubFont::SetAutoKern( const sal_uInt8 nAutoKern )
587cdf0e10cSrcweir {
588cdf0e10cSrcweir 	pMagic = 0;
589cdf0e10cSrcweir 	Font::SetKerning( nAutoKern );
590cdf0e10cSrcweir }
591cdf0e10cSrcweir 
SetAutoKern(sal_uInt8 nAutoKern)592cdf0e10cSrcweir inline void SwFont::SetAutoKern( sal_uInt8 nAutoKern )
593cdf0e10cSrcweir {
594cdf0e10cSrcweir 	bFntChg = sal_True;
595cdf0e10cSrcweir 	aSub[1].SetAutoKern( nAutoKern );
596cdf0e10cSrcweir 	if( nAutoKern )
597cdf0e10cSrcweir 		nAutoKern = KERNING_FONTSPECIFIC;
598cdf0e10cSrcweir 	aSub[0].SetAutoKern( nAutoKern );
599cdf0e10cSrcweir 	aSub[2].SetAutoKern( nAutoKern );
600cdf0e10cSrcweir }
601cdf0e10cSrcweir 
SetTransparent(const sal_Bool bTrans)602cdf0e10cSrcweir inline void SwFont::SetTransparent( const sal_Bool bTrans )
603cdf0e10cSrcweir {
604cdf0e10cSrcweir 	aSub[0].SetTransparent( bTrans );
605cdf0e10cSrcweir 	aSub[1].SetTransparent( bTrans );
606cdf0e10cSrcweir 	aSub[2].SetTransparent( bTrans );
607cdf0e10cSrcweir }
608cdf0e10cSrcweir 
SetFixKerning(const short nNewKern)609cdf0e10cSrcweir inline void SwFont::SetFixKerning( const short nNewKern )
610cdf0e10cSrcweir {
611cdf0e10cSrcweir 	aSub[SW_LATIN].SetFixKerning( nNewKern );
612cdf0e10cSrcweir 	aSub[SW_CJK].SetFixKerning( nNewKern );
613cdf0e10cSrcweir 	aSub[SW_CTL].SetFixKerning( nNewKern );
614cdf0e10cSrcweir }
615cdf0e10cSrcweir 
SetCaseMap(const SvxCaseMap eNew)616cdf0e10cSrcweir inline void SwFont::SetCaseMap( const SvxCaseMap eNew )
617cdf0e10cSrcweir {
618cdf0e10cSrcweir 	aSub[SW_LATIN].SetCaseMap( eNew );
619cdf0e10cSrcweir 	aSub[SW_CJK].SetCaseMap( eNew );
620cdf0e10cSrcweir 	aSub[SW_CTL].SetCaseMap( eNew );
621cdf0e10cSrcweir }
622cdf0e10cSrcweir 
623cdf0e10cSrcweir // gekapselte SV-Font-Methode
SetWordLineMode(const sal_Bool bWordLineMode)624cdf0e10cSrcweir inline void SwSubFont::SetWordLineMode( const sal_Bool bWordLineMode )
625cdf0e10cSrcweir {
626cdf0e10cSrcweir 	pMagic = 0;
627cdf0e10cSrcweir 	Font::SetWordLineMode( bWordLineMode );
628cdf0e10cSrcweir }
629cdf0e10cSrcweir 
SetWordLineMode(const sal_Bool bWordLineMode)630cdf0e10cSrcweir inline void SwFont::SetWordLineMode( const sal_Bool bWordLineMode )
631cdf0e10cSrcweir {
632cdf0e10cSrcweir 	bFntChg = sal_True;
633cdf0e10cSrcweir 	aSub[0].SetWordLineMode( bWordLineMode );
634cdf0e10cSrcweir 	aSub[1].SetWordLineMode( bWordLineMode );
635cdf0e10cSrcweir 	aSub[2].SetWordLineMode( bWordLineMode );
636cdf0e10cSrcweir }
637cdf0e10cSrcweir // gekapselte SV-Font-Methode
SetEmphasisMark(const FontEmphasisMark eValue)638cdf0e10cSrcweir inline void SwSubFont::SetEmphasisMark( const FontEmphasisMark eValue )
639cdf0e10cSrcweir {
640cdf0e10cSrcweir 	pMagic = 0;
641cdf0e10cSrcweir 	Font::SetEmphasisMark( eValue );
642cdf0e10cSrcweir }
643cdf0e10cSrcweir 
SetEmphasisMark(const FontEmphasisMark eValue)644cdf0e10cSrcweir inline void SwFont::SetEmphasisMark( const FontEmphasisMark eValue )
645cdf0e10cSrcweir {
646cdf0e10cSrcweir 	bFntChg = sal_True;
647cdf0e10cSrcweir 	aSub[0].SetEmphasisMark( eValue );
648cdf0e10cSrcweir 	aSub[1].SetEmphasisMark( eValue );
649cdf0e10cSrcweir 	aSub[2].SetEmphasisMark( eValue );
650cdf0e10cSrcweir }
651cdf0e10cSrcweir 
SetPropWidth(const sal_uInt16 nNew)652cdf0e10cSrcweir inline void SwFont::SetPropWidth( const sal_uInt16 nNew )
653cdf0e10cSrcweir {
654cdf0e10cSrcweir 	if( nNew != aSub[0].GetPropWidth() )
655cdf0e10cSrcweir 	{
656cdf0e10cSrcweir 		bFntChg = sal_True;
657cdf0e10cSrcweir 		aSub[0].SetPropWidth( nNew );
658cdf0e10cSrcweir 		aSub[1].SetPropWidth( nNew );
659cdf0e10cSrcweir 		aSub[2].SetPropWidth( nNew );
660cdf0e10cSrcweir 	}
661cdf0e10cSrcweir }
662cdf0e10cSrcweir 
663cdf0e10cSrcweir // gekapselte SV-Font-Methode
SetRelief(const FontRelief eNew)664cdf0e10cSrcweir inline void SwSubFont::SetRelief( const FontRelief eNew )
665cdf0e10cSrcweir {
666cdf0e10cSrcweir 	pMagic = 0;
667cdf0e10cSrcweir 	Font::SetRelief( eNew );
668cdf0e10cSrcweir }
669cdf0e10cSrcweir 
SetRelief(const FontRelief eNew)670cdf0e10cSrcweir inline void SwFont::SetRelief( const FontRelief eNew )
671cdf0e10cSrcweir {
672cdf0e10cSrcweir 	if( eNew != aSub[0].GetRelief() )
673cdf0e10cSrcweir 	{
674cdf0e10cSrcweir 		bFntChg = sal_True;
675cdf0e10cSrcweir 		aSub[0].SetRelief( eNew );
676cdf0e10cSrcweir 		aSub[1].SetRelief( eNew );
677cdf0e10cSrcweir 		aSub[2].SetRelief( eNew );
678cdf0e10cSrcweir 	}
679cdf0e10cSrcweir }
680cdf0e10cSrcweir 
681cdf0e10cSrcweir // ueberladene Font-Methode
SetSize(const Size & rSize)682cdf0e10cSrcweir inline void SwSubFont::SetSize( const Size& rSize )
683cdf0e10cSrcweir {
684cdf0e10cSrcweir 	aSize = rSize;
685cdf0e10cSrcweir 	if ( GetPropr() == 100 )
686cdf0e10cSrcweir 		Font::SetSize( aSize );
687cdf0e10cSrcweir 	else
688cdf0e10cSrcweir 	{
689cdf0e10cSrcweir 		Font::SetSize( Size(
690cdf0e10cSrcweir 			(long) aSize.Width() * GetPropr() / 100L,
691cdf0e10cSrcweir 			(long) aSize.Height() * GetPropr() / 100L ) );
692cdf0e10cSrcweir 	}
693cdf0e10cSrcweir 	pMagic = 0;
694cdf0e10cSrcweir }
695cdf0e10cSrcweir 
SetSize(const Size & rSize,const sal_uInt8 nWhich)696cdf0e10cSrcweir inline void SwFont::SetSize( const Size& rSize, const sal_uInt8 nWhich )
697cdf0e10cSrcweir {
698cdf0e10cSrcweir 	if( aSub[nWhich].aSize != rSize )
699cdf0e10cSrcweir 	{
700cdf0e10cSrcweir 		aSub[nWhich].SetSize( rSize );
701cdf0e10cSrcweir 		bFntChg = sal_True;
702cdf0e10cSrcweir 		bOrgChg = sal_True;
703cdf0e10cSrcweir 	}
704cdf0e10cSrcweir }
705cdf0e10cSrcweir 
SetActual(sal_uInt8 nNew)706cdf0e10cSrcweir inline void SwFont::SetActual( sal_uInt8 nNew )
707cdf0e10cSrcweir {
708cdf0e10cSrcweir      if ( nActual != nNew )
709cdf0e10cSrcweir      {
710cdf0e10cSrcweir         bFntChg = sal_True;
711cdf0e10cSrcweir         bOrgChg = sal_True;
712cdf0e10cSrcweir         nActual = nNew;
713cdf0e10cSrcweir      }
714cdf0e10cSrcweir }
715cdf0e10cSrcweir 
SetProportion(const sal_uInt8 nNewPropr)716cdf0e10cSrcweir inline void SwSubFont::SetProportion( const sal_uInt8 nNewPropr )
717cdf0e10cSrcweir {
718cdf0e10cSrcweir 	pMagic = 0;
719cdf0e10cSrcweir 	Font::SetSize( Size( (long) aSize.Width() * nNewPropr / 100L,
720cdf0e10cSrcweir 						 (long) aSize.Height() * nNewPropr / 100L ) );
721cdf0e10cSrcweir 	SvxFont::SetPropr( nNewPropr );
722cdf0e10cSrcweir }
723cdf0e10cSrcweir 
SetProportion(const sal_uInt8 nNewPropr)724cdf0e10cSrcweir inline void SwFont::SetProportion( const sal_uInt8 nNewPropr )
725cdf0e10cSrcweir {
726cdf0e10cSrcweir     if( nNewPropr != aSub[0].GetPropr() )
727cdf0e10cSrcweir     {
728cdf0e10cSrcweir         bFntChg = sal_True;
729cdf0e10cSrcweir         bOrgChg = sal_True;
730cdf0e10cSrcweir 
731cdf0e10cSrcweir         aSub[0].SetProportion( nNewPropr );
732cdf0e10cSrcweir         aSub[1].SetProportion( nNewPropr );
733cdf0e10cSrcweir         aSub[2].SetProportion( nNewPropr );
734cdf0e10cSrcweir     }
735cdf0e10cSrcweir }
736cdf0e10cSrcweir 
SetEscapement(const short nNewEsc)737cdf0e10cSrcweir inline void SwSubFont::SetEscapement( const short nNewEsc )
738cdf0e10cSrcweir {
739cdf0e10cSrcweir 	pMagic = 0;
740cdf0e10cSrcweir 	SvxFont::SetEscapement( nNewEsc );
741cdf0e10cSrcweir }
742cdf0e10cSrcweir 
SetEscapement(const short nNewEsc)743cdf0e10cSrcweir inline void SwFont::SetEscapement( const short nNewEsc )
744cdf0e10cSrcweir {
745cdf0e10cSrcweir 	if( nNewEsc != aSub[0].GetEscapement() )
746cdf0e10cSrcweir 	{
747cdf0e10cSrcweir         // these have to be set, otherwise nOrgHeight and nOrgAscent will not
748cdf0e10cSrcweir         // be calculated
749cdf0e10cSrcweir         bFntChg = sal_True;
750cdf0e10cSrcweir         bOrgChg = sal_True;
751cdf0e10cSrcweir 
752cdf0e10cSrcweir 		aSub[0].SetEscapement( nNewEsc );
753cdf0e10cSrcweir 		aSub[1].SetEscapement( nNewEsc );
754cdf0e10cSrcweir 		aSub[2].SetEscapement( nNewEsc );
755cdf0e10cSrcweir 	}
756cdf0e10cSrcweir }
757cdf0e10cSrcweir 
SetLanguage(LanguageType eNewLang)758cdf0e10cSrcweir inline void SwSubFont::SetLanguage( LanguageType eNewLang )
759cdf0e10cSrcweir {
760cdf0e10cSrcweir 	if( eNewLang == LANGUAGE_SYSTEM )
761cdf0e10cSrcweir 		eNewLang = (LanguageType)GetAppLanguage();
762cdf0e10cSrcweir 	SvxFont::SetLanguage( eNewLang );
763cdf0e10cSrcweir }
764cdf0e10cSrcweir 
SetLanguage(const LanguageType eNewLang,const sal_uInt8 nWhich)765cdf0e10cSrcweir inline void SwFont::SetLanguage( const LanguageType eNewLang, const sal_uInt8 nWhich )
766cdf0e10cSrcweir {
767cdf0e10cSrcweir 	aSub[nWhich].SetLanguage( eNewLang );
768cdf0e10cSrcweir 	if( SW_CJK == nWhich )
769cdf0e10cSrcweir 	{
770cdf0e10cSrcweir 		aSub[SW_LATIN].SetCJKContextLanguage( eNewLang );
771cdf0e10cSrcweir 		aSub[SW_CJK].SetCJKContextLanguage( eNewLang );
772cdf0e10cSrcweir 		aSub[SW_CTL].SetCJKContextLanguage( eNewLang );
773cdf0e10cSrcweir 	}
774cdf0e10cSrcweir }
775cdf0e10cSrcweir 
SetPaintBlank(const sal_Bool bNew)776cdf0e10cSrcweir inline void SwFont::SetPaintBlank( const sal_Bool bNew )
777cdf0e10cSrcweir {
778cdf0e10cSrcweir 	bPaintBlank = bNew;
779cdf0e10cSrcweir }
780cdf0e10cSrcweir 
SetPaintWrong(const sal_Bool bNew)781cdf0e10cSrcweir inline void SwFont::SetPaintWrong( const sal_Bool bNew )
782cdf0e10cSrcweir {
783cdf0e10cSrcweir 	bPaintWrong = bNew;
784cdf0e10cSrcweir }
785cdf0e10cSrcweir 
SetNoHyph(const sal_Bool bNew)786cdf0e10cSrcweir inline void SwFont::SetNoHyph( const sal_Bool bNew )
787cdf0e10cSrcweir {
788cdf0e10cSrcweir 	bNoHyph = bNew;
789cdf0e10cSrcweir }
790cdf0e10cSrcweir 
SetBlink(const sal_Bool bNew)791cdf0e10cSrcweir inline void SwFont::SetBlink( const sal_Bool bNew )
792cdf0e10cSrcweir {
793cdf0e10cSrcweir 	bBlink = bNew;
794cdf0e10cSrcweir }
795cdf0e10cSrcweir 
SetURL(const sal_Bool bNew)796cdf0e10cSrcweir inline void SwFont::SetURL( const sal_Bool bNew )
797cdf0e10cSrcweir {
798cdf0e10cSrcweir 	bURL = bNew;
799cdf0e10cSrcweir }
800cdf0e10cSrcweir 
SetGreyWave(const sal_Bool bNew)801cdf0e10cSrcweir inline void SwFont::SetGreyWave( const sal_Bool bNew )
802cdf0e10cSrcweir {
803cdf0e10cSrcweir 	bGreyWave = bNew;
804cdf0e10cSrcweir }
805cdf0e10cSrcweir 
SetNoCol(const sal_Bool bNew)806cdf0e10cSrcweir inline void SwFont::SetNoCol( const sal_Bool bNew )
807cdf0e10cSrcweir {
808cdf0e10cSrcweir 	bNoColReplace = bNew;
809cdf0e10cSrcweir }
810cdf0e10cSrcweir 
SetVertical(const sal_uInt16 nDir,const sal_Bool bVertFormat)811cdf0e10cSrcweir inline void SwSubFont::SetVertical( const sal_uInt16 nDir, const sal_Bool bVertFormat )
812cdf0e10cSrcweir {
813cdf0e10cSrcweir 	pMagic = 0;
814cdf0e10cSrcweir     Font::SetVertical( bVertFormat );
815cdf0e10cSrcweir 	Font::SetOrientation( nDir );
816cdf0e10cSrcweir }
817cdf0e10cSrcweir 
818cdf0e10cSrcweir 
819cdf0e10cSrcweir /*************************************************************************
820cdf0e10cSrcweir  *                      class SwUnderlineFont
821cdf0e10cSrcweir  *
822cdf0e10cSrcweir  * Used for the "continuous underline" feature.
823cdf0e10cSrcweir  *************************************************************************/
824cdf0e10cSrcweir 
825cdf0e10cSrcweir class SwUnderlineFont
826cdf0e10cSrcweir {
827cdf0e10cSrcweir     Point aPos;
828cdf0e10cSrcweir     SwFont* pFnt;
829cdf0e10cSrcweir 
830cdf0e10cSrcweir public:
831cdf0e10cSrcweir     // sets the font which should paint the common baseline
832cdf0e10cSrcweir     // and the starting point of the common baseline
833cdf0e10cSrcweir     SwUnderlineFont( SwFont& rFnt, const Point& rPoint );
834cdf0e10cSrcweir     ~SwUnderlineFont();
835cdf0e10cSrcweir 
GetFont()836cdf0e10cSrcweir     SwFont& GetFont()
837cdf0e10cSrcweir     {
838cdf0e10cSrcweir         ASSERT( pFnt, "No underline font" )
839cdf0e10cSrcweir         return *pFnt;
840cdf0e10cSrcweir     }
GetPos() const841cdf0e10cSrcweir     const Point& GetPos() const { return aPos; }
842cdf0e10cSrcweir     // the x coordinate of the starting point has to be set for each portion
SetPos(const Point & rPoint)843cdf0e10cSrcweir     void SetPos( const Point& rPoint ) { aPos = rPoint;  }
844cdf0e10cSrcweir };
845cdf0e10cSrcweir 
846cdf0e10cSrcweir 
847cdf0e10cSrcweir /*************************************************************************
848cdf0e10cSrcweir  *						class SvStatistics
849cdf0e10cSrcweir  *************************************************************************/
850cdf0e10cSrcweir 
851cdf0e10cSrcweir #ifndef DBG_UTIL
852cdf0e10cSrcweir #define SV_STAT(nWhich)
853cdf0e10cSrcweir #else
854cdf0e10cSrcweir 
855cdf0e10cSrcweir class SvStatistics
856cdf0e10cSrcweir {
857cdf0e10cSrcweir public:
858cdf0e10cSrcweir 	sal_uInt16 nGetTextSize;
859cdf0e10cSrcweir 	sal_uInt16 nDrawText;
860cdf0e10cSrcweir 	sal_uInt16 nGetStretchTextSize;
861cdf0e10cSrcweir 	sal_uInt16 nDrawStretchText;
862cdf0e10cSrcweir 	sal_uInt16 nChangeFont;
863cdf0e10cSrcweir 	sal_uInt16 nGetFontMetric;
864cdf0e10cSrcweir 
Reset()865cdf0e10cSrcweir 	inline void Reset()
866cdf0e10cSrcweir 	{
867cdf0e10cSrcweir 		nGetTextSize = nDrawText = nGetStretchTextSize =
868cdf0e10cSrcweir 		nDrawStretchText = nChangeFont = nGetFontMetric = 0;
869cdf0e10cSrcweir 	}
870cdf0e10cSrcweir 
SvStatistics()871cdf0e10cSrcweir 	inline SvStatistics() { Reset(); }
872cdf0e10cSrcweir 
873cdf0e10cSrcweir 	inline void PrintOn( SvStream &rOS ) const; //$ ostream
IsEmpty() const874cdf0e10cSrcweir 	inline sal_Bool IsEmpty() const
875cdf0e10cSrcweir 	{
876cdf0e10cSrcweir 		return !( nGetTextSize || nDrawText ||
877cdf0e10cSrcweir 				  nDrawStretchText || nChangeFont || nGetFontMetric );
878cdf0e10cSrcweir 	}
879cdf0e10cSrcweir };
880cdf0e10cSrcweir 
881cdf0e10cSrcweir // globale Variable, implementiert in swfont.cxx
882cdf0e10cSrcweir extern SvStatistics aSvStat;
883cdf0e10cSrcweir 
884cdf0e10cSrcweir #define SV_STAT(nWhich) ++(aSvStat.nWhich);
885cdf0e10cSrcweir 
PrintOn(SvStream & rOS) const886cdf0e10cSrcweir inline void SvStatistics::PrintOn( SvStream &rOS ) const //$ ostream
887cdf0e10cSrcweir {
888cdf0e10cSrcweir 	if( IsEmpty() )
889cdf0e10cSrcweir 		return;
890cdf0e10cSrcweir 
891cdf0e10cSrcweir 	rOS << "{	SV called:" << '\n';
892cdf0e10cSrcweir 	if( nGetTextSize )
893cdf0e10cSrcweir 		rOS << "\tnGetTextSize:	" <<	nGetTextSize	<< '\n';		if(	nDrawText	)
894cdf0e10cSrcweir 		rOS	<< "\tnDrawText: "	<< nDrawText	<< '\n';		if(	nGetStretchTextSize	)
895cdf0e10cSrcweir 		rOS	<< "\tnGetStretchTextSize: "	<< nGetStretchTextSize	<< '\n';		if(	nDrawStretchText	)
896cdf0e10cSrcweir 		rOS	<< "\tnDrawStretchText: "	<< nDrawStretchText	<< '\n';		if(	nChangeFont	)
897cdf0e10cSrcweir 		rOS	<< "\tnChangeFont: "	<< nChangeFont	<< '\n';		if(	nGetFontMetric	)
898cdf0e10cSrcweir 		rOS	<< "\tnGetFontMetric: "	<< nGetFontMetric	<< '\n';		rOS	<< "}"	<< '\n';	}
899cdf0e10cSrcweir #endif	/*	PRODUCT	*/
900cdf0e10cSrcweir 
901cdf0e10cSrcweir #endif
902cdf0e10cSrcweir 
903