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 _DRAWFONT_HXX 24cdf0e10cSrcweir #define _DRAWFONT_HXX 25cdf0e10cSrcweir 26cdf0e10cSrcweir #include <tools/solar.h> 27cdf0e10cSrcweir #include <tools/string.hxx> 28cdf0e10cSrcweir #include <errhdl.hxx> 29cdf0e10cSrcweir 30cdf0e10cSrcweir class SwTxtFrm; 31cdf0e10cSrcweir class OutputDevice; 32cdf0e10cSrcweir class ViewShell; 33cdf0e10cSrcweir class SwScriptInfo; 34cdf0e10cSrcweir class Point; 35cdf0e10cSrcweir class SwWrongList; 36cdf0e10cSrcweir class Size; 37cdf0e10cSrcweir class SwFont; 38cdf0e10cSrcweir class Font; 39cdf0e10cSrcweir class SwUnderlineFont; 40cdf0e10cSrcweir 41cdf0e10cSrcweir /************************************************************************* 42cdf0e10cSrcweir * class SwDrawTextInfo 43cdf0e10cSrcweir * 44cdf0e10cSrcweir * encapsulates information for drawing text 45cdf0e10cSrcweir *************************************************************************/ 46cdf0e10cSrcweir 47cdf0e10cSrcweir class SwDrawTextInfo 48cdf0e10cSrcweir { 49cdf0e10cSrcweir const SwTxtFrm* pFrm; 50cdf0e10cSrcweir OutputDevice* pOut; 51cdf0e10cSrcweir ViewShell* pSh; 52cdf0e10cSrcweir const SwScriptInfo* pScriptInfo; 53cdf0e10cSrcweir const Point* pPos; 54cdf0e10cSrcweir const XubString* pText; 55cdf0e10cSrcweir const SwWrongList* pWrong; 56cdf0e10cSrcweir const SwWrongList* pGrammarCheck; 57cdf0e10cSrcweir const SwWrongList* pSmartTags; // SMARTTAGS 58cdf0e10cSrcweir const Size* pSize; 59cdf0e10cSrcweir SwFont *pFnt; 60cdf0e10cSrcweir SwUnderlineFont* pUnderFnt; 61cdf0e10cSrcweir xub_StrLen* pHyphPos; 62cdf0e10cSrcweir long nLeft; 63cdf0e10cSrcweir long nRight; 64cdf0e10cSrcweir long nKanaDiff; 65cdf0e10cSrcweir xub_StrLen nIdx; 66cdf0e10cSrcweir xub_StrLen nLen; 67cdf0e10cSrcweir xub_StrLen nOfst; 68cdf0e10cSrcweir sal_uInt16 nWidth; 69cdf0e10cSrcweir sal_uInt16 nAscent; 70cdf0e10cSrcweir sal_uInt16 nCompress; 71cdf0e10cSrcweir long nSperren; 72cdf0e10cSrcweir long nSpace; 73cdf0e10cSrcweir long nKern; 74cdf0e10cSrcweir xub_StrLen nNumberOfBlanks; 75cdf0e10cSrcweir sal_uInt8 nCursorBidiLevel; 76cdf0e10cSrcweir sal_Bool bBullet : 1; 77cdf0e10cSrcweir sal_Bool bUpper : 1; // Fuer Kapitaelchen: Grossbuchstaben-Flag 78cdf0e10cSrcweir sal_Bool bDrawSpace : 1; // Fuer Kapitaelchen: Unter/Durchstreichung 79cdf0e10cSrcweir sal_Bool bGreyWave : 1; // Graue Wellenlinie beim extended TextInput 80cdf0e10cSrcweir sal_Bool bSpaceStop : 1; // For underlining we need to know, if a portion 81cdf0e10cSrcweir // is right in front of a hole portion or a 82cdf0e10cSrcweir // fix margin portion. 83cdf0e10cSrcweir sal_Bool bSnapToGrid : 1; // Does paragraph snap to grid? 84cdf0e10cSrcweir sal_Bool bIgnoreFrmRTL : 1; // Paint text as if text has LTR direction, used for 85cdf0e10cSrcweir // line numbering 86cdf0e10cSrcweir sal_Bool bPosMatchesBounds :1; // GetCrsrOfst should not return the next 87cdf0e10cSrcweir // position if screen position is inside second 88cdf0e10cSrcweir // half of bound rect, used for Accessibility 89cdf0e10cSrcweir 90cdf0e10cSrcweir SwDrawTextInfo(); // nicht zulaessig 91cdf0e10cSrcweir public: 92cdf0e10cSrcweir 93cdf0e10cSrcweir #ifdef DBG_UTIL 94cdf0e10cSrcweir sal_Bool bPos : 1; // These flags should control, that the appropriate 95cdf0e10cSrcweir sal_Bool bWrong : 1; // Set-function has been called before calling 96cdf0e10cSrcweir sal_Bool bGrammarCheck : 1; // the Get-function of a member 97cdf0e10cSrcweir sal_Bool bSize : 1; 98cdf0e10cSrcweir sal_Bool bFnt : 1; 99cdf0e10cSrcweir sal_Bool bHyph : 1; 100cdf0e10cSrcweir sal_Bool bLeft : 1; 101cdf0e10cSrcweir sal_Bool bRight : 1; 102cdf0e10cSrcweir sal_Bool bKana : 1; 103cdf0e10cSrcweir sal_Bool bOfst : 1; 104cdf0e10cSrcweir sal_Bool bAscent: 1; 105cdf0e10cSrcweir sal_Bool bSperr : 1; 106cdf0e10cSrcweir sal_Bool bSpace : 1; 107cdf0e10cSrcweir sal_Bool bNumberOfBlanks : 1; 108cdf0e10cSrcweir sal_Bool bUppr : 1; 109cdf0e10cSrcweir sal_Bool bDrawSp: 1; 110cdf0e10cSrcweir #endif 111cdf0e10cSrcweir SwDrawTextInfo(ViewShell * pS,OutputDevice & rO,const SwScriptInfo * pSI,const XubString & rSt,xub_StrLen nI,xub_StrLen nL,sal_uInt16 nW=0,sal_Bool bB=sal_False)112cdf0e10cSrcweir SwDrawTextInfo( ViewShell *pS, OutputDevice &rO, const SwScriptInfo* pSI, 113cdf0e10cSrcweir const XubString &rSt, xub_StrLen nI, xub_StrLen nL, 114cdf0e10cSrcweir sal_uInt16 nW = 0, sal_Bool bB = sal_False ) 115cdf0e10cSrcweir { 116cdf0e10cSrcweir pFrm = NULL; 117cdf0e10cSrcweir pSh = pS; 118cdf0e10cSrcweir pOut = &rO; 119cdf0e10cSrcweir pScriptInfo = pSI; 120cdf0e10cSrcweir pText = &rSt; 121cdf0e10cSrcweir nIdx = nI; 122cdf0e10cSrcweir nLen = nL; 123cdf0e10cSrcweir nKern = 0; 124cdf0e10cSrcweir nCompress = 0; 125cdf0e10cSrcweir nWidth = nW; 126cdf0e10cSrcweir nNumberOfBlanks = 0; 127cdf0e10cSrcweir nCursorBidiLevel = 0; 128cdf0e10cSrcweir bBullet = bB; 129cdf0e10cSrcweir pUnderFnt = 0; 130cdf0e10cSrcweir bGreyWave = sal_False; 131cdf0e10cSrcweir bSpaceStop = sal_False; 132cdf0e10cSrcweir bSnapToGrid = sal_False; 133cdf0e10cSrcweir bIgnoreFrmRTL = sal_False; 134cdf0e10cSrcweir bPosMatchesBounds = sal_False; 135cdf0e10cSrcweir 136cdf0e10cSrcweir // These values are initialized but, they have to be 137cdf0e10cSrcweir // set explicitly via their Set-function before they may 138cdf0e10cSrcweir // be accessed by their Get-function: 139cdf0e10cSrcweir pPos = 0; 140cdf0e10cSrcweir pWrong = 0; 141cdf0e10cSrcweir pGrammarCheck = 0; 142cdf0e10cSrcweir pSmartTags = 0; 143cdf0e10cSrcweir pSize = 0; 144cdf0e10cSrcweir pFnt = 0; 145cdf0e10cSrcweir pHyphPos = 0; 146cdf0e10cSrcweir nLeft = 0; 147cdf0e10cSrcweir nRight = 0; 148cdf0e10cSrcweir nKanaDiff = 0; 149cdf0e10cSrcweir nOfst = 0; 150cdf0e10cSrcweir nAscent = 0; 151cdf0e10cSrcweir nSperren = 0; 152cdf0e10cSrcweir nSpace = 0; 153cdf0e10cSrcweir bUpper = sal_False; 154cdf0e10cSrcweir bDrawSpace = sal_False; 155cdf0e10cSrcweir 156cdf0e10cSrcweir #ifdef DBG_UTIL 157cdf0e10cSrcweir // these flags control, whether the matching member variables have 158cdf0e10cSrcweir // been set by using the Set-function before they may be accessed 159cdf0e10cSrcweir // by their Get-function: 160cdf0e10cSrcweir bPos = bWrong = bGrammarCheck = bSize = bFnt = bAscent = bSpace = bNumberOfBlanks = bUppr = 161cdf0e10cSrcweir bDrawSp = bLeft = bRight = bKana = bOfst = bHyph = bSperr = sal_False; 162cdf0e10cSrcweir #endif 163cdf0e10cSrcweir } 164cdf0e10cSrcweir GetFrm() const165cdf0e10cSrcweir const SwTxtFrm* GetFrm() const 166cdf0e10cSrcweir { 167cdf0e10cSrcweir return pFrm; 168cdf0e10cSrcweir } 169cdf0e10cSrcweir SetFrm(const SwTxtFrm * pNewFrm)170cdf0e10cSrcweir void SetFrm( const SwTxtFrm* pNewFrm ) 171cdf0e10cSrcweir { 172cdf0e10cSrcweir pFrm = pNewFrm; 173cdf0e10cSrcweir } 174cdf0e10cSrcweir GetShell() const175cdf0e10cSrcweir ViewShell *GetShell() const 176cdf0e10cSrcweir { 177cdf0e10cSrcweir return pSh; 178cdf0e10cSrcweir } 179cdf0e10cSrcweir GetOut() const180cdf0e10cSrcweir OutputDevice& GetOut() const 181cdf0e10cSrcweir { 182cdf0e10cSrcweir return *pOut; 183cdf0e10cSrcweir } 184cdf0e10cSrcweir GetpOut() const185cdf0e10cSrcweir OutputDevice *GetpOut() const 186cdf0e10cSrcweir { 187cdf0e10cSrcweir return pOut; 188cdf0e10cSrcweir } 189cdf0e10cSrcweir GetScriptInfo() const190cdf0e10cSrcweir const SwScriptInfo* GetScriptInfo() const 191cdf0e10cSrcweir { 192cdf0e10cSrcweir return pScriptInfo; 193cdf0e10cSrcweir } 194cdf0e10cSrcweir GetPos() const195cdf0e10cSrcweir const Point &GetPos() const 196cdf0e10cSrcweir { 197cdf0e10cSrcweir ASSERT( bPos, "DrawTextInfo: Undefined Position" ); 198cdf0e10cSrcweir return *pPos; 199cdf0e10cSrcweir } 200cdf0e10cSrcweir GetHyphPos() const201cdf0e10cSrcweir xub_StrLen *GetHyphPos() const 202cdf0e10cSrcweir { 203cdf0e10cSrcweir ASSERT( bHyph, "DrawTextInfo: Undefined Hyph Position" ); 204cdf0e10cSrcweir return pHyphPos; 205cdf0e10cSrcweir } 206cdf0e10cSrcweir GetText() const207cdf0e10cSrcweir const XubString &GetText() const 208cdf0e10cSrcweir { 209cdf0e10cSrcweir return *pText; 210cdf0e10cSrcweir } 211cdf0e10cSrcweir GetWrong() const212cdf0e10cSrcweir const SwWrongList* GetWrong() const 213cdf0e10cSrcweir { 214cdf0e10cSrcweir ASSERT( bWrong, "DrawTextInfo: Undefined WrongList" ); 215cdf0e10cSrcweir return pWrong; 216cdf0e10cSrcweir } 217cdf0e10cSrcweir GetGrammarCheck() const218cdf0e10cSrcweir const SwWrongList* GetGrammarCheck() const 219cdf0e10cSrcweir { 220cdf0e10cSrcweir ASSERT( bGrammarCheck, "DrawTextInfo: Undefined GrammarCheck List" ); 221cdf0e10cSrcweir return pGrammarCheck; 222cdf0e10cSrcweir } 223cdf0e10cSrcweir GetSmartTags() const224cdf0e10cSrcweir const SwWrongList* GetSmartTags() const 225cdf0e10cSrcweir { 226cdf0e10cSrcweir return pSmartTags; 227cdf0e10cSrcweir } 228cdf0e10cSrcweir GetSize() const229cdf0e10cSrcweir const Size &GetSize() const 230cdf0e10cSrcweir { 231cdf0e10cSrcweir ASSERT( bSize, "DrawTextInfo: Undefined Size" ); 232cdf0e10cSrcweir return *pSize; 233cdf0e10cSrcweir } 234cdf0e10cSrcweir GetFont() const235cdf0e10cSrcweir SwFont* GetFont() const 236cdf0e10cSrcweir { 237cdf0e10cSrcweir ASSERT( bFnt, "DrawTextInfo: Undefined Font" ); 238cdf0e10cSrcweir return pFnt; 239cdf0e10cSrcweir } 240cdf0e10cSrcweir GetUnderFnt() const241cdf0e10cSrcweir SwUnderlineFont* GetUnderFnt() const 242cdf0e10cSrcweir { 243cdf0e10cSrcweir return pUnderFnt; 244cdf0e10cSrcweir } 245cdf0e10cSrcweir GetIdx() const246cdf0e10cSrcweir xub_StrLen GetIdx() const 247cdf0e10cSrcweir { 248cdf0e10cSrcweir return nIdx; 249cdf0e10cSrcweir } 250cdf0e10cSrcweir GetLen() const251cdf0e10cSrcweir xub_StrLen GetLen() const 252cdf0e10cSrcweir { 253cdf0e10cSrcweir return nLen; 254cdf0e10cSrcweir } 255cdf0e10cSrcweir GetOfst() const256cdf0e10cSrcweir xub_StrLen GetOfst() const 257cdf0e10cSrcweir { 258cdf0e10cSrcweir ASSERT( bOfst, "DrawTextInfo: Undefined Offset" ); 259cdf0e10cSrcweir return nOfst; 260cdf0e10cSrcweir } 261cdf0e10cSrcweir GetEnd() const262cdf0e10cSrcweir xub_StrLen GetEnd() const 263cdf0e10cSrcweir { 264cdf0e10cSrcweir return nIdx + nLen; 265cdf0e10cSrcweir } 266cdf0e10cSrcweir GetLeft() const267cdf0e10cSrcweir long GetLeft() const 268cdf0e10cSrcweir { 269cdf0e10cSrcweir ASSERT( bLeft, "DrawTextInfo: Undefined left range" ); 270cdf0e10cSrcweir return nLeft; 271cdf0e10cSrcweir } 272cdf0e10cSrcweir GetRight() const273cdf0e10cSrcweir long GetRight() const 274cdf0e10cSrcweir { 275cdf0e10cSrcweir ASSERT( bRight, "DrawTextInfo: Undefined right range" ); 276cdf0e10cSrcweir return nRight; 277cdf0e10cSrcweir } 278cdf0e10cSrcweir GetKanaDiff() const279cdf0e10cSrcweir long GetKanaDiff() const 280cdf0e10cSrcweir { 281cdf0e10cSrcweir ASSERT( bKana, "DrawTextInfo: Undefined kana difference" ); 282cdf0e10cSrcweir return nKanaDiff; 283cdf0e10cSrcweir } 284cdf0e10cSrcweir GetWidth() const285cdf0e10cSrcweir sal_uInt16 GetWidth() const 286cdf0e10cSrcweir { 287cdf0e10cSrcweir return nWidth; 288cdf0e10cSrcweir } 289cdf0e10cSrcweir GetAscent() const290cdf0e10cSrcweir sal_uInt16 GetAscent() const 291cdf0e10cSrcweir { 292cdf0e10cSrcweir ASSERT( bAscent, "DrawTextInfo: Undefined Ascent" ); 293cdf0e10cSrcweir return nAscent; 294cdf0e10cSrcweir } 295cdf0e10cSrcweir GetKanaComp() const296cdf0e10cSrcweir sal_uInt16 GetKanaComp() const 297cdf0e10cSrcweir { 298cdf0e10cSrcweir return nCompress; 299cdf0e10cSrcweir } 300cdf0e10cSrcweir GetSperren() const301cdf0e10cSrcweir long GetSperren() const 302cdf0e10cSrcweir { 303cdf0e10cSrcweir ASSERT( bSperr, "DrawTextInfo: Undefined >Sperren<" ); 304cdf0e10cSrcweir return nSperren; 305cdf0e10cSrcweir } 306cdf0e10cSrcweir GetKern() const307cdf0e10cSrcweir long GetKern() const 308cdf0e10cSrcweir { 309cdf0e10cSrcweir return nKern; 310cdf0e10cSrcweir } 311cdf0e10cSrcweir GetSpace() const312cdf0e10cSrcweir long GetSpace() const 313cdf0e10cSrcweir { 314cdf0e10cSrcweir ASSERT( bSpace, "DrawTextInfo: Undefined Spacing" ); 315cdf0e10cSrcweir return nSpace; 316cdf0e10cSrcweir } 317cdf0e10cSrcweir GetNumberOfBlanks() const318cdf0e10cSrcweir xub_StrLen GetNumberOfBlanks() const 319cdf0e10cSrcweir { 320cdf0e10cSrcweir ASSERT( bNumberOfBlanks, "DrawTextInfo::Undefined NumberOfBlanks" ); 321cdf0e10cSrcweir return nNumberOfBlanks; 322cdf0e10cSrcweir } 323cdf0e10cSrcweir GetCursorBidiLevel() const324cdf0e10cSrcweir sal_uInt8 GetCursorBidiLevel() const 325cdf0e10cSrcweir { 326cdf0e10cSrcweir return nCursorBidiLevel; 327cdf0e10cSrcweir } 328cdf0e10cSrcweir GetBullet() const329cdf0e10cSrcweir sal_Bool GetBullet() const 330cdf0e10cSrcweir { 331cdf0e10cSrcweir return bBullet; 332cdf0e10cSrcweir } 333cdf0e10cSrcweir GetUpper() const334cdf0e10cSrcweir sal_Bool GetUpper() const 335cdf0e10cSrcweir { 336cdf0e10cSrcweir ASSERT( bUppr, "DrawTextInfo: Undefined Upperflag" ); 337cdf0e10cSrcweir return bUpper; 338cdf0e10cSrcweir } 339cdf0e10cSrcweir GetDrawSpace() const340cdf0e10cSrcweir sal_Bool GetDrawSpace() const 341cdf0e10cSrcweir { 342cdf0e10cSrcweir ASSERT( bDrawSp, "DrawTextInfo: Undefined DrawSpaceflag" ); 343cdf0e10cSrcweir return bDrawSpace; 344cdf0e10cSrcweir } 345cdf0e10cSrcweir GetGreyWave() const346cdf0e10cSrcweir sal_Bool GetGreyWave() const 347cdf0e10cSrcweir { 348cdf0e10cSrcweir return bGreyWave; 349cdf0e10cSrcweir } 350cdf0e10cSrcweir IsSpaceStop() const351cdf0e10cSrcweir sal_Bool IsSpaceStop() const 352cdf0e10cSrcweir { 353cdf0e10cSrcweir return bSpaceStop; 354cdf0e10cSrcweir } 355cdf0e10cSrcweir SnapToGrid() const356cdf0e10cSrcweir sal_Bool SnapToGrid() const 357cdf0e10cSrcweir { 358cdf0e10cSrcweir return bSnapToGrid; 359cdf0e10cSrcweir } 360cdf0e10cSrcweir IsIgnoreFrmRTL() const361cdf0e10cSrcweir sal_Bool IsIgnoreFrmRTL() const 362cdf0e10cSrcweir { 363cdf0e10cSrcweir return bIgnoreFrmRTL; 364cdf0e10cSrcweir } 365cdf0e10cSrcweir IsPosMatchesBounds() const366cdf0e10cSrcweir sal_Bool IsPosMatchesBounds() const 367cdf0e10cSrcweir { 368cdf0e10cSrcweir return bPosMatchesBounds; 369cdf0e10cSrcweir } 370cdf0e10cSrcweir SetOut(OutputDevice & rNew)371cdf0e10cSrcweir void SetOut( OutputDevice &rNew ) 372cdf0e10cSrcweir { 373cdf0e10cSrcweir pOut = &rNew; 374cdf0e10cSrcweir } 375cdf0e10cSrcweir SetPos(const Point & rNew)376cdf0e10cSrcweir void SetPos( const Point &rNew ) 377cdf0e10cSrcweir { 378cdf0e10cSrcweir pPos = &rNew; 379cdf0e10cSrcweir #ifdef DBG_UTIL 380cdf0e10cSrcweir bPos = sal_True; 381cdf0e10cSrcweir #endif 382cdf0e10cSrcweir } 383cdf0e10cSrcweir SetHyphPos(xub_StrLen * pNew)384cdf0e10cSrcweir void SetHyphPos( xub_StrLen *pNew ) 385cdf0e10cSrcweir { 386cdf0e10cSrcweir pHyphPos = pNew; 387cdf0e10cSrcweir #ifdef DBG_UTIL 388cdf0e10cSrcweir bHyph = sal_True; 389cdf0e10cSrcweir #endif 390cdf0e10cSrcweir } 391cdf0e10cSrcweir SetText(const XubString & rNew)392cdf0e10cSrcweir void SetText( const XubString &rNew ) 393cdf0e10cSrcweir { 394cdf0e10cSrcweir pText = &rNew; 395cdf0e10cSrcweir } 396cdf0e10cSrcweir SetWrong(const SwWrongList * pNew)397cdf0e10cSrcweir void SetWrong( const SwWrongList* pNew ) 398cdf0e10cSrcweir { 399cdf0e10cSrcweir pWrong = pNew; 400cdf0e10cSrcweir #ifdef DBG_UTIL 401cdf0e10cSrcweir bWrong = sal_True; 402cdf0e10cSrcweir #endif 403cdf0e10cSrcweir } 404cdf0e10cSrcweir SetGrammarCheck(const SwWrongList * pNew)405cdf0e10cSrcweir void SetGrammarCheck( const SwWrongList* pNew ) 406cdf0e10cSrcweir { 407cdf0e10cSrcweir pGrammarCheck = pNew; 408cdf0e10cSrcweir #ifdef DBG_UTIL 409cdf0e10cSrcweir bGrammarCheck = sal_True; 410cdf0e10cSrcweir #endif 411cdf0e10cSrcweir } 412cdf0e10cSrcweir SetSmartTags(const SwWrongList * pNew)413cdf0e10cSrcweir void SetSmartTags( const SwWrongList* pNew ) 414cdf0e10cSrcweir { 415cdf0e10cSrcweir pSmartTags = pNew; 416cdf0e10cSrcweir } 417cdf0e10cSrcweir SetSize(const Size & rNew)418cdf0e10cSrcweir void SetSize( const Size &rNew ) 419cdf0e10cSrcweir { 420cdf0e10cSrcweir pSize = &rNew; 421cdf0e10cSrcweir #ifdef DBG_UTIL 422cdf0e10cSrcweir bSize = sal_True; 423cdf0e10cSrcweir #endif 424cdf0e10cSrcweir } 425cdf0e10cSrcweir SetFont(SwFont * pNew)426cdf0e10cSrcweir void SetFont( SwFont* pNew ) 427cdf0e10cSrcweir { 428cdf0e10cSrcweir pFnt = pNew; 429cdf0e10cSrcweir #ifdef DBG_UTIL 430cdf0e10cSrcweir bFnt = sal_True; 431cdf0e10cSrcweir #endif 432cdf0e10cSrcweir } 433cdf0e10cSrcweir SetIdx(xub_StrLen nNew)434cdf0e10cSrcweir void SetIdx( xub_StrLen nNew ) 435cdf0e10cSrcweir { 436cdf0e10cSrcweir nIdx = nNew; 437cdf0e10cSrcweir } 438cdf0e10cSrcweir SetLen(xub_StrLen nNew)439cdf0e10cSrcweir void SetLen( xub_StrLen nNew ) 440cdf0e10cSrcweir { 441cdf0e10cSrcweir nLen = nNew; 442cdf0e10cSrcweir } 443cdf0e10cSrcweir SetOfst(xub_StrLen nNew)444cdf0e10cSrcweir void SetOfst( xub_StrLen nNew ) 445cdf0e10cSrcweir { 446cdf0e10cSrcweir nOfst = nNew; 447cdf0e10cSrcweir #ifdef DBG_UTIL 448cdf0e10cSrcweir bOfst = sal_True; 449cdf0e10cSrcweir #endif 450cdf0e10cSrcweir } 451cdf0e10cSrcweir SetLeft(long nNew)452cdf0e10cSrcweir void SetLeft( long nNew ) 453cdf0e10cSrcweir { 454cdf0e10cSrcweir nLeft = nNew; 455cdf0e10cSrcweir #ifdef DBG_UTIL 456cdf0e10cSrcweir bLeft = sal_True; 457cdf0e10cSrcweir #endif 458cdf0e10cSrcweir } 459cdf0e10cSrcweir SetRight(long nNew)460cdf0e10cSrcweir void SetRight( long nNew ) 461cdf0e10cSrcweir { 462cdf0e10cSrcweir nRight = nNew; 463cdf0e10cSrcweir #ifdef DBG_UTIL 464cdf0e10cSrcweir bRight = sal_True; 465cdf0e10cSrcweir #endif 466cdf0e10cSrcweir } 467cdf0e10cSrcweir SetKanaDiff(long nNew)468cdf0e10cSrcweir void SetKanaDiff( long nNew ) 469cdf0e10cSrcweir { 470cdf0e10cSrcweir nKanaDiff = nNew; 471cdf0e10cSrcweir #ifdef DBG_UTIL 472cdf0e10cSrcweir bKana = sal_True; 473cdf0e10cSrcweir #endif 474cdf0e10cSrcweir } 475cdf0e10cSrcweir SetWidth(sal_uInt16 nNew)476cdf0e10cSrcweir void SetWidth( sal_uInt16 nNew ) 477cdf0e10cSrcweir { 478cdf0e10cSrcweir nWidth = nNew; 479cdf0e10cSrcweir } 480cdf0e10cSrcweir SetAscent(sal_uInt16 nNew)481cdf0e10cSrcweir void SetAscent( sal_uInt16 nNew ) 482cdf0e10cSrcweir { 483cdf0e10cSrcweir nAscent = nNew; 484cdf0e10cSrcweir #ifdef DBG_UTIL 485cdf0e10cSrcweir bAscent = sal_True; 486cdf0e10cSrcweir #endif 487cdf0e10cSrcweir } 488cdf0e10cSrcweir SetKern(long nNew)489cdf0e10cSrcweir void SetKern( long nNew ) 490cdf0e10cSrcweir { 491cdf0e10cSrcweir nKern = nNew; 492cdf0e10cSrcweir } 493cdf0e10cSrcweir SetSpace(long nNew)494cdf0e10cSrcweir void SetSpace( long nNew ) 495cdf0e10cSrcweir { 496cdf0e10cSrcweir if( nNew < 0 ) 497cdf0e10cSrcweir { 498cdf0e10cSrcweir nSperren = -nNew; 499cdf0e10cSrcweir nSpace = 0; 500cdf0e10cSrcweir } 501cdf0e10cSrcweir else 502cdf0e10cSrcweir { 503cdf0e10cSrcweir nSpace = nNew; 504cdf0e10cSrcweir nSperren = 0; 505cdf0e10cSrcweir } 506cdf0e10cSrcweir #ifdef DBG_UTIL 507cdf0e10cSrcweir bSpace = sal_True; 508cdf0e10cSrcweir bSperr = sal_True; 509cdf0e10cSrcweir #endif 510cdf0e10cSrcweir } 511cdf0e10cSrcweir SetNumberOfBlanks(xub_StrLen nNew)512cdf0e10cSrcweir void SetNumberOfBlanks( xub_StrLen nNew ) 513cdf0e10cSrcweir { 514cdf0e10cSrcweir #ifdef DBG_UTIL 515cdf0e10cSrcweir bNumberOfBlanks = sal_True; 516cdf0e10cSrcweir #endif 517cdf0e10cSrcweir nNumberOfBlanks = nNew; 518cdf0e10cSrcweir } 519cdf0e10cSrcweir SetCursorBidiLevel(sal_uInt8 nNew)520cdf0e10cSrcweir void SetCursorBidiLevel( sal_uInt8 nNew ) 521cdf0e10cSrcweir { 522cdf0e10cSrcweir nCursorBidiLevel = nNew; 523cdf0e10cSrcweir } 524cdf0e10cSrcweir SetKanaComp(short nNew)525cdf0e10cSrcweir void SetKanaComp( short nNew ) 526cdf0e10cSrcweir { 527cdf0e10cSrcweir nCompress = nNew; 528cdf0e10cSrcweir } 529cdf0e10cSrcweir SetBullet(sal_Bool bNew)530cdf0e10cSrcweir void SetBullet( sal_Bool bNew ) 531cdf0e10cSrcweir { 532cdf0e10cSrcweir bBullet = bNew; 533cdf0e10cSrcweir } 534cdf0e10cSrcweir SetUnderFnt(SwUnderlineFont * pULFnt)535cdf0e10cSrcweir void SetUnderFnt( SwUnderlineFont* pULFnt ) 536cdf0e10cSrcweir { 537cdf0e10cSrcweir pUnderFnt = pULFnt; 538cdf0e10cSrcweir } 539cdf0e10cSrcweir SetUpper(sal_Bool bNew)540cdf0e10cSrcweir void SetUpper( sal_Bool bNew ) 541cdf0e10cSrcweir { 542cdf0e10cSrcweir bUpper = bNew; 543cdf0e10cSrcweir #ifdef DBG_UTIL 544cdf0e10cSrcweir bUppr = sal_True; 545cdf0e10cSrcweir #endif 546cdf0e10cSrcweir } 547cdf0e10cSrcweir SetDrawSpace(sal_Bool bNew)548cdf0e10cSrcweir void SetDrawSpace( sal_Bool bNew ) 549cdf0e10cSrcweir { 550cdf0e10cSrcweir bDrawSpace = bNew; 551cdf0e10cSrcweir #ifdef DBG_UTIL 552cdf0e10cSrcweir bDrawSp = sal_True; 553cdf0e10cSrcweir #endif 554cdf0e10cSrcweir } 555cdf0e10cSrcweir SetGreyWave(sal_Bool bNew)556cdf0e10cSrcweir void SetGreyWave( sal_Bool bNew ) 557cdf0e10cSrcweir { 558cdf0e10cSrcweir bGreyWave = bNew; 559cdf0e10cSrcweir } 560cdf0e10cSrcweir SetSpaceStop(sal_Bool bNew)561cdf0e10cSrcweir void SetSpaceStop( sal_Bool bNew ) 562cdf0e10cSrcweir { 563cdf0e10cSrcweir bSpaceStop = bNew; 564cdf0e10cSrcweir } 565cdf0e10cSrcweir SetSnapToGrid(sal_Bool bNew)566cdf0e10cSrcweir void SetSnapToGrid( sal_Bool bNew ) 567cdf0e10cSrcweir { 568cdf0e10cSrcweir bSnapToGrid = bNew; 569cdf0e10cSrcweir } 570cdf0e10cSrcweir SetIgnoreFrmRTL(sal_Bool bNew)571cdf0e10cSrcweir void SetIgnoreFrmRTL( sal_Bool bNew ) 572cdf0e10cSrcweir { 573cdf0e10cSrcweir bIgnoreFrmRTL = bNew; 574cdf0e10cSrcweir } 575cdf0e10cSrcweir SetPosMatchesBounds(sal_Bool bNew)576cdf0e10cSrcweir void SetPosMatchesBounds( sal_Bool bNew ) 577cdf0e10cSrcweir { 578cdf0e10cSrcweir bPosMatchesBounds = bNew; 579cdf0e10cSrcweir } 580cdf0e10cSrcweir 581cdf0e10cSrcweir void Shift( sal_uInt16 nDir ); 582cdf0e10cSrcweir 583cdf0e10cSrcweir // sets a new color at the output device if necessary 584cdf0e10cSrcweir // if a font is passed as argument, the change if made to the font 585cdf0e10cSrcweir // otherwise the font at the output device is changed 586cdf0e10cSrcweir // returns if the font has been changed 587cdf0e10cSrcweir sal_Bool ApplyAutoColor( Font* pFnt = 0 ); 588cdf0e10cSrcweir }; 589cdf0e10cSrcweir 590cdf0e10cSrcweir #endif 591