Files
libreoffice/sw/source/core/inc/drawfont.hxx

692 lines
20 KiB
C++
Raw Normal View History

2000-09-18 23:08:29 +00:00
/*************************************************************************
*
* $RCSfile: drawfont.hxx,v $
*
* $Revision: 1.28 $
2000-09-18 23:08:29 +00:00
*
* last change: $Author: fme $ $Date: 2002-12-02 10:27:19 $
2000-09-18 23:08:29 +00:00
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _DRAWFONT_HXX
#define _DRAWFONT_HXX
2001-04-09 09:44:17 +00:00
#ifndef _SVSTDARR_HXX
#define _SVSTDARR_SHORTS
#define _SVSTDARR_BYTES
2001-04-09 09:44:17 +00:00
#define _SVSTDARR_USHORTS
#define _SVSTDARR_XUB_STRLEN
#include <svtools/svstdarr.hxx>
#endif
2000-09-18 23:08:29 +00:00
#ifndef _GEN_HXX //autogen
#include <tools/gen.hxx>
#endif
#ifndef _STRING_HXX //autogen
#include <tools/string.hxx>
#endif
#include "errhdl.hxx"
#ifndef _FRACT_HXX
#include <tools/fract.hxx>
#endif
2000-09-18 23:08:29 +00:00
2002-04-10 06:07:45 +00:00
#ifndef _LANG_HXX
#include <tools/lang.hxx>
#endif
2000-09-18 23:08:29 +00:00
class OutputDevice;
class Point;
class SwWrongList;
class Size;
class SwFont;
class Font;
class ViewShell;
2001-04-09 09:44:17 +00:00
class SwTxtNode;
class SwAttrHandler;
2001-08-31 05:22:48 +00:00
class SwTxtFrm;
class SwUnderlineFont;
2002-04-10 06:07:45 +00:00
/*************************************************************************
* class SwScanner
* Hilfsklasse, die beim Spellen die Worte im gewuenschten Bereich
* nacheinander zur Verfuegung stellt.
*************************************************************************/
class SwScanner
{
XubString aWord;
const SwWrongList* pWrong;
const SwTxtNode& rNode;
2002-04-10 06:07:45 +00:00
xub_StrLen nEndPos;
xub_StrLen nBegin;
xub_StrLen nLen;
LanguageType aCurrLang;
USHORT nWordType;
2002-04-10 06:07:45 +00:00
BOOL bReverse;
BOOL bStart;
BOOL bIsOnlineSpell;
2002-04-10 06:07:45 +00:00
public:
SwScanner( const SwTxtNode& rNd, const SwWrongList* pWrng, USHORT nWordType,
xub_StrLen nStart, xub_StrLen nEnde, BOOL bRev, BOOL bOS );
// This next word function tries to find the language for the next word
// It should currently _not_ be used for spell checking, and works only for
// ! bReverse
BOOL NextWord();
2002-04-10 06:07:45 +00:00
BOOL NextWord( LanguageType aLang );
2002-04-10 06:07:45 +00:00
const XubString& GetWord() const { return aWord; }
2002-04-10 06:07:45 +00:00
xub_StrLen GetBegin() const { return nBegin; }
xub_StrLen GetEnd() const { return nBegin + nLen; }
xub_StrLen GetLen() const { return nLen; }
};
2001-04-09 09:44:17 +00:00
/*************************************************************************
* class SwScriptInfo
*
* encapsultes information about script changes
*************************************************************************/
class SwScriptInfo
{
private:
SvXub_StrLens aScriptChg;
SvBytes aScriptType;
#ifdef BIDI
SvXub_StrLens aDirChg;
SvBytes aDirType;
2002-04-10 06:07:45 +00:00
SvXub_StrLens aKashida;
#endif
2001-04-09 09:44:17 +00:00
SvXub_StrLens aCompChg;
SvXub_StrLens aCompLen;
SvBytes aCompType;
2001-04-09 09:44:17 +00:00
xub_StrLen nInvalidityPos;
public:
enum CompType { KANA, SPECIAL_LEFT, SPECIAL_RIGHT, NONE };
inline SwScriptInfo() : nInvalidityPos( 0 ) {};
// determines script changes
void InitScriptInfo( const SwTxtNode& rNode, SwAttrHandler& rAH,
const OutputDevice& rOut );
2001-04-09 09:44:17 +00:00
// set/get position from which data is invalid
inline void SetInvalidity( const xub_StrLen nPos );
inline xub_StrLen GetInvalidity() const { return nInvalidityPos; };
2001-04-09 09:44:17 +00:00
// array operations, nCnt refers to array position
inline USHORT CountScriptChg() const;
inline xub_StrLen GetScriptChg( const USHORT nCnt ) const;
inline BYTE GetScriptType( const USHORT nCnt ) const;
2001-04-09 09:44:17 +00:00
#ifdef BIDI
inline USHORT CountDirChg() const;
inline xub_StrLen GetDirChg( const USHORT nCnt ) const;
inline BYTE GetDirType( const USHORT nCnt ) const;
2002-04-10 06:07:45 +00:00
inline USHORT CountKashida() const;
inline xub_StrLen GetKashida( const USHORT nCnt ) const;
#endif
2001-04-09 09:44:17 +00:00
inline USHORT CountCompChg() const;
inline xub_StrLen GetCompStart( const USHORT nCnt ) const;
inline xub_StrLen GetCompLen( const USHORT nCnt ) const;
inline BYTE GetCompType( const USHORT nCnt ) const;
2001-04-09 09:44:17 +00:00
// "high" level operations, nPos refers to string position
xub_StrLen NextScriptChg( const xub_StrLen nPos ) const;
BYTE ScriptType( const xub_StrLen nPos ) const;
#ifdef BIDI
2002-03-21 08:19:43 +00:00
// Returns the position of the next direction level change.
// If bLevel is set, the position of the next level which is smaller
// than the level at position nPos is returned. This is required to
// obtain the end of a SwBidiPortion
xub_StrLen NextDirChg( const xub_StrLen nPos,
const BYTE* pLevel = 0 ) const;
BYTE DirType( const xub_StrLen nPos ) const;
#endif
BYTE CompType( const xub_StrLen nPos ) const;
2001-04-09 09:44:17 +00:00
// examines the range [ nStart, nStart + nEnd ] if there are kanas
// returns start index of kana entry in array, otherwise USHRT_MAX
USHORT HasKana( xub_StrLen nStart, const xub_StrLen nEnd ) const;
// modifies the kerning array according to a given compress value
long Compress( long* pKernArray, xub_StrLen nIdx, xub_StrLen nLen,
const USHORT nCompress, const USHORT nFontHeight,
Point* pPoint = NULL ) const;
2002-04-10 06:07:45 +00:00
#ifdef BIDI
/** Performes a kashida justification on the kerning array
@descr Add some extra space for kashida justification to the
positions in the kerning array.
@param pKernArray
The printers kerning array. Optional.
2002-04-10 06:07:45 +00:00
@param pScrArray
The screen kerning array. Optional.
2002-04-10 06:07:45 +00:00
@param nIdx
Start referring to the paragraph.
@param nLen
The number of characters to be considered.
@param nSpace
The value which has to be added to a kashida opportunity.
@return The number of kashida opportunities in the given range
*/
USHORT KashidaJustify( long* pKernArray ,long* pScrArray,
xub_StrLen nIdx, xub_StrLen nLen,
USHORT nSpace = 0 ) const;
/** Checks if language is one of the 16 Arabic languages
@descr Checks if language is one of the 16 Arabic languages
@param aLang
The language which has to be checked.
@return Returns if the language is an Arabic language
*/
static BOOL IsArabicLanguage( LanguageType aLang );
#endif
/** Performes a thai justification on the kerning array
@descr Add some extra space for thai justification to the
positions in the kerning array.
@param rTxt
The String
@param pKernArray
The printers kerning array. Optional.
@param pScrArray
The screen kerning array. Optional.
@param nIdx
Start referring to the paragraph.
@param nLen
The number of characters to be considered.
@param nSpace
The value which has to be added to the cells.
@return The number of extra spaces in the given range
*/
static USHORT ThaiJustify( const XubString& rTxt, long* pKernArray,
long* pScrArray, xub_StrLen nIdx,
xub_StrLen nLen, USHORT nSpace = 0 );
static const SwScriptInfo* GetScriptInfo( const SwTxtNode& rNode );
2001-04-09 09:44:17 +00:00
};
inline void SwScriptInfo::SetInvalidity( const xub_StrLen nPos )
{
if ( nPos < nInvalidityPos )
nInvalidityPos = nPos;
};
inline USHORT SwScriptInfo::CountScriptChg() const { return aScriptChg.Count(); }
inline xub_StrLen SwScriptInfo::GetScriptChg( const USHORT nCnt ) const
{
ASSERT( nCnt < aScriptChg.Count(),"No ScriptChange today!");
2001-04-09 09:44:17 +00:00
return aScriptChg[ nCnt ];
}
inline BYTE SwScriptInfo::GetScriptType( const xub_StrLen nCnt ) const
2001-04-09 09:44:17 +00:00
{
ASSERT( nCnt < aScriptChg.Count(),"No ScriptType today!");
2001-04-09 09:44:17 +00:00
return aScriptType[ nCnt ];
}
#ifdef BIDI
2002-04-10 06:07:45 +00:00
inline USHORT SwScriptInfo::CountDirChg() const { return aDirChg.Count(); }
inline xub_StrLen SwScriptInfo::GetDirChg( const USHORT nCnt ) const
{
ASSERT( nCnt < aDirChg.Count(),"No DirChange today!");
return aDirChg[ nCnt ];
}
inline BYTE SwScriptInfo::GetDirType( const xub_StrLen nCnt ) const
{
ASSERT( nCnt < aDirChg.Count(),"No DirType today!");
return aDirType[ nCnt ];
}
2002-04-10 06:07:45 +00:00
inline USHORT SwScriptInfo::CountKashida() const { return aKashida.Count(); }
inline xub_StrLen SwScriptInfo::GetKashida( const USHORT nCnt ) const
{
ASSERT( nCnt < aKashida.Count(),"No Kashidas today!");
return aKashida[ nCnt ];
}
#endif
2001-04-09 09:44:17 +00:00
inline USHORT SwScriptInfo::CountCompChg() const { return aCompChg.Count(); };
inline xub_StrLen SwScriptInfo::GetCompStart( const USHORT nCnt ) const
{
ASSERT( nCnt < aCompChg.Count(),"No CompressionStart today!");
2001-04-09 09:44:17 +00:00
return aCompChg[ nCnt ];
}
inline xub_StrLen SwScriptInfo::GetCompLen( const USHORT nCnt ) const
{
ASSERT( nCnt < aCompChg.Count(),"No CompressionLen today!");
2001-04-09 09:44:17 +00:00
return aCompLen[ nCnt ];
}
inline BYTE SwScriptInfo::GetCompType( const USHORT nCnt ) const
2001-04-09 09:44:17 +00:00
{
ASSERT( nCnt < aCompChg.Count(),"No CompressionType today!");
2001-04-09 09:44:17 +00:00
return aCompType[ nCnt ];
}
/*************************************************************************
* class SwDrawTextInfo
*
* encapsulates information for drawing text
2001-04-09 09:44:17 +00:00
*************************************************************************/
2000-09-18 23:08:29 +00:00
class SwDrawTextInfo
{
2001-08-31 05:22:48 +00:00
const SwTxtFrm* pFrm;
2000-09-18 23:08:29 +00:00
OutputDevice* pOut;
ViewShell* pSh;
2001-04-09 09:44:17 +00:00
const SwScriptInfo* pScriptInfo;
2000-09-18 23:08:29 +00:00
const Point* pPos;
const XubString* pText;
const SwWrongList* pWrong;
const Size* pSize;
SwFont *pFnt;
SwUnderlineFont* pUnderFnt;
2001-04-09 09:44:17 +00:00
xub_StrLen* pHyphPos;
Fraction aZoom;
2000-09-18 23:08:29 +00:00
long nLeft;
long nRight;
2001-04-09 09:44:17 +00:00
long nKanaDiff;
2000-09-18 23:08:29 +00:00
xub_StrLen nIdx;
xub_StrLen nLen;
2001-04-09 09:44:17 +00:00
xub_StrLen nOfst;
2000-09-18 23:08:29 +00:00
USHORT nWidth;
USHORT nAscent;
2001-04-09 09:44:17 +00:00
USHORT nCompress;
2000-09-18 23:08:29 +00:00
short nSperren;
short nKern;
short nSpace;
BOOL bBullet : 1;
BOOL bUpper : 1; // Fuer Kapitaelchen: Grossbuchstaben-Flag
BOOL bDrawSpace : 1; // Fuer Kapitaelchen: Unter/Durchstreichung
BOOL bGreyWave : 1; // Graue Wellenlinie beim extended TextInput
BOOL bSpaceStop : 1; // For underlining we need to know, if a portion
// is right in front of a hole portion or a
// fix margin portion.
BOOL bSnapToGrid : 1; // Does paragraph snap to grid?
2002-06-20 11:38:34 +00:00
#ifdef BIDI
BOOL bIgnoreFrmRTL : 1; // Paint text as if text has LTR direction, used for
// line numbering
#endif
2000-09-18 23:08:29 +00:00
SwDrawTextInfo(); // nicht zulaessig
public:
#ifndef PRODUCT
BOOL bOut : 1; // In der Non-Product wird der Zugriff auf die Member
BOOL bPos : 1; // durch diese Flags ueberwacht.
BOOL bText : 1; // Wird ein Member gesetzt, so wird das entsprechende
BOOL bWrong : 1; // Flag gesetzt.
BOOL bSize : 1; // Wird ein Member ausgelesen, so wird ASSERTet, dass
BOOL bFnt : 1; // dieser zuvor gesetzt worden ist.
BOOL bIdx : 1;
BOOL bLen : 1;
BOOL bWidth : 1;
BOOL bAscent: 1;
BOOL bSperr : 1;
BOOL bKern : 1;
BOOL bSpace : 1;
BOOL bBull : 1;
BOOL bSpec : 1;
BOOL bUppr : 1;
BOOL bDrawSp: 1;
BOOL bGreyWv: 1;
BOOL bLeft : 1;
BOOL bRight : 1;
2001-04-09 09:44:17 +00:00
BOOL bKana : 1;
BOOL bOfst : 1;
BOOL bHyph : 1;
2000-09-18 23:08:29 +00:00
#endif
2001-04-09 09:44:17 +00:00
SwDrawTextInfo( ViewShell *pS, OutputDevice &rO, const SwScriptInfo* pSI,
2000-09-18 23:08:29 +00:00
const XubString &rSt, xub_StrLen nI, xub_StrLen nL,
2001-04-09 09:44:17 +00:00
USHORT nW = 0, BOOL bB = FALSE)
{ pSh = pS; pOut = &rO; pScriptInfo = pSI; pText = &rSt; nIdx = nI;
nLen = nL; nKern = 0; nCompress = 0; nWidth = nW;
bBullet = bB; pUnderFnt = 0; bGreyWave = bSpaceStop =
2002-06-20 11:38:34 +00:00
#ifdef BIDI
bSnapToGrid = bIgnoreFrmRTL = FALSE;
#else
bSnapToGrid = FALSE;
2002-06-20 11:38:34 +00:00
#endif
pFrm = 0;
2000-09-18 23:08:29 +00:00
#ifndef PRODUCT
bOut = bText = bIdx = bLen = bWidth = bKern = bBull = bSpec =
bGreyWv = TRUE;
2001-04-09 09:44:17 +00:00
bPos = bWrong = bSize = bFnt = bAscent = bSpace = bUppr =
bDrawSp = bLeft = bRight = bKana = bOfst = bHyph = FALSE;
2000-09-18 23:08:29 +00:00
#endif
}
2001-08-31 05:22:48 +00:00
const SwTxtFrm* GetFrm() const { return pFrm; }
void SetFrm( const SwTxtFrm* pNewFrm ) { pFrm = pNewFrm; }
2000-09-18 23:08:29 +00:00
ViewShell *GetShell() const { return pSh; }
OutputDevice& GetOut() const {
ASSERT( bOut, "DrawTextInfo: Undefined Outputdevice" );
return *pOut;
}
OutputDevice *GetpOut() const {
ASSERT( bOut, "DrawTextInfo: Undefined Outputdevice" );
return pOut;
}
2001-04-09 09:44:17 +00:00
const SwScriptInfo* GetScriptInfo() const {
return pScriptInfo;
}
2000-09-18 23:08:29 +00:00
const Point &GetPos() const {
ASSERT( bPos, "DrawTextInfo: Undefined Position" );
return *pPos;
}
2001-04-09 09:44:17 +00:00
xub_StrLen *GetHyphPos() const {
ASSERT( bHyph, "DrawTextInfo: Undefined Hyph Position" );
return pHyphPos;
}
const Fraction &GetZoom() const { return aZoom; }
Fraction &GetZoom() { return aZoom; }
2000-09-18 23:08:29 +00:00
const XubString &GetText() const {
ASSERT( bText, "DrawTextInfo: Undefined String" );
return *pText;
}
const SwWrongList* GetWrong() const {
ASSERT( bWrong, "DrawTextInfo: Undefined WrongList" );
return pWrong;
}
const Size &GetSize() const {
ASSERT( bSize, "DrawTextInfo: Undefined Size" );
return *pSize;
}
SwFont* GetFont() const {
ASSERT( bFnt, "DrawTextInfo: Undefined Font" );
return pFnt;
}
SwUnderlineFont* GetUnderFnt() const {
ASSERT( bSpec, "DrawTextInfo: Undefined Underlinefont" );
return pUnderFnt;
}
2000-09-18 23:08:29 +00:00
xub_StrLen GetIdx() const {
ASSERT( bIdx, "DrawTextInfo: Undefined Index" );
return nIdx;
}
xub_StrLen GetLen() const {
ASSERT( bLen, "DrawTextInfo: Undefined Length" );
return nLen;
}
2001-04-09 09:44:17 +00:00
xub_StrLen GetOfst() const {
ASSERT( bOfst, "DrawTextInfo: Undefined Offset" );
return nOfst;
}
2000-09-18 23:08:29 +00:00
xub_StrLen GetEnd() const {
ASSERT( bIdx, "DrawTextInfo: Undefined Index" );
ASSERT( bLen, "DrawTextInfo: Undefined Length" );
return nIdx + nLen;
}
long GetLeft() const {
ASSERT( bLeft, "DrawTextInfo: Undefined left range" );
return nLeft;
}
long GetRight() const {
ASSERT( bRight, "DrawTextInfo: Undefined right range" );
return nRight;
}
2001-04-09 09:44:17 +00:00
long GetKanaDiff() const {
ASSERT( bKana, "DrawTextInfo: Undefined kana difference" );
return nKanaDiff;
}
2000-09-18 23:08:29 +00:00
USHORT GetWidth() const {
ASSERT( bWidth, "DrawTextInfo: Undefined Width" );
return nWidth;
}
USHORT GetAscent() const {
ASSERT( bAscent, "DrawTextInfo: Undefined Ascent" );
return nAscent;
}
2001-04-09 09:44:17 +00:00
USHORT GetKanaComp() const {
return nCompress;
}
2000-09-18 23:08:29 +00:00
short GetSperren() const {
ASSERT( bSperr, "DrawTextInfo: Undefined >Sperren<" );
return nSperren;
}
short GetKern() const {
ASSERT( bKern, "DrawTextInfo: Undefined Kerning" );
return nKern;
}
short GetSpace() const {
ASSERT( bSpace, "DrawTextInfo: Undefined Spacing" );
return nSpace;
}
BOOL GetBullet() const {
ASSERT( bBull, "DrawTextInfo: Undefined Bulletflag" );
return bBullet;
}
BOOL GetUpper() const {
ASSERT( bUppr, "DrawTextInfo: Undefined Upperflag" );
return bUpper;
}
BOOL GetDrawSpace() const {
ASSERT( bDrawSp, "DrawTextInfo: Undefined DrawSpaceflag" );
return bDrawSpace;
}
BOOL GetGreyWave() const {
ASSERT( bGreyWv, "DrawTextInfo: Undefined GreyWave" );
return bGreyWave;
}
BOOL IsSpaceStop() const {
return bSpaceStop;
}
BOOL SnapToGrid() const {
return bSnapToGrid;
}
2000-09-18 23:08:29 +00:00
2002-06-20 11:38:34 +00:00
BOOL IsIgnoreFrmRTL() const {
return bIgnoreFrmRTL;
}
2000-09-18 23:08:29 +00:00
void SetOut( OutputDevice &rNew ){ pOut = &rNew;
#ifndef PRODUCT
bOut = TRUE;
#endif
}
void SetPos( const Point &rNew ){ pPos = &rNew;
#ifndef PRODUCT
bPos = TRUE;
2001-04-09 09:44:17 +00:00
#endif
}
void SetHyphPos( xub_StrLen *pNew ){ pHyphPos = pNew;
#ifndef PRODUCT
bHyph = TRUE;
2000-09-18 23:08:29 +00:00
#endif
}
void SetText( const XubString &rNew ){ pText = &rNew;
#ifndef PRODUCT
bText = TRUE;
#endif
}
void SetWrong( const SwWrongList* pNew ){ pWrong = pNew;
#ifndef PRODUCT
bWrong = TRUE;
#endif
}
void SetSize( const Size &rNew ){ pSize = &rNew;
#ifndef PRODUCT
bSize = TRUE;
#endif
}
void SetFont( SwFont* pNew ){ pFnt = pNew;
#ifndef PRODUCT
bFnt = TRUE;
#endif
}
void SetIdx( xub_StrLen nNew ){ nIdx = nNew;
#ifndef PRODUCT
bIdx = TRUE;
#endif
}
void SetLen( xub_StrLen nNew ){ nLen = nNew;
#ifndef PRODUCT
bLen = TRUE;
2001-04-09 09:44:17 +00:00
#endif
}
void SetOfst( xub_StrLen nNew ){ nOfst = nNew;
#ifndef PRODUCT
bOfst = TRUE;
2000-09-18 23:08:29 +00:00
#endif
}
void SetLeft( long nNew ){ nLeft = nNew;
#ifndef PRODUCT
bLeft = TRUE;
#endif
}
void SetRight( long nNew ){ nRight = nNew;
#ifndef PRODUCT
bRight = TRUE;
2001-04-09 09:44:17 +00:00
#endif
}
void SetKanaDiff( long nNew ){ nKanaDiff = nNew;
#ifndef PRODUCT
bKana = TRUE;
2000-09-18 23:08:29 +00:00
#endif
}
void SetWidth( USHORT nNew ){ nWidth = nNew;
#ifndef PRODUCT
bWidth = TRUE;
#endif
}
void SetAscent( USHORT nNew ){ nAscent = nNew;
#ifndef PRODUCT
bAscent = TRUE;
#endif
}
void SetKern( short nNew ){ nKern = nNew;
#ifndef PRODUCT
bKern = TRUE;
#endif
}
void SetSperren( short nNew ){ nSperren = nNew;
#ifndef PRODUCT
bSperr = TRUE;
#endif
}
void SetSpace( short nNew ){
if( nNew < 0 )
{
SetSperren( -nNew );
nSpace = 0;
}
else
{
nSpace = nNew;
SetSperren( 0 );
}
#ifndef PRODUCT
bSpace = TRUE;
#endif
}
2001-04-09 09:44:17 +00:00
void SetKanaComp( short nNew ){
nCompress = nNew;
}
2000-09-18 23:08:29 +00:00
void SetBullet( BOOL bNew ){ bBullet = bNew;
#ifndef PRODUCT
bBull = TRUE;
#endif
}
void SetUnderFnt( SwUnderlineFont* pFnt ){ pUnderFnt = pFnt;
2000-09-18 23:08:29 +00:00
#ifndef PRODUCT
bSpec = TRUE;
#endif
}
void SetUpper( BOOL bNew ){ bUpper = bNew;
#ifndef PRODUCT
bUppr = TRUE;
#endif
}
void SetDrawSpace( BOOL bNew ){ bDrawSpace = bNew;
#ifndef PRODUCT
bDrawSp = TRUE;
#endif
}
void SetGreyWave( BOOL bNew ){ bGreyWave = bNew;
#ifndef PRODUCT
bGreyWv = TRUE;
#endif
}
void SetSpaceStop( BOOL bNew ) { bSpaceStop = bNew; }
void SetSnapToGrid( BOOL bNew ) { bSnapToGrid = bNew; }
2002-06-20 11:38:34 +00:00
#ifdef BIDI
void SetIgnoreFrmRTL( BOOL bNew ) { bIgnoreFrmRTL = bNew; }
#endif
void Shift( USHORT nDir );
// sets a new color at the output device if necessary
// if a font is passed as argument, the change if made to the font
// otherwise the font at the output device is changed
// returns if the font has been changed
sal_Bool ApplyAutoColor( Font* pFnt = 0 );
2000-09-18 23:08:29 +00:00
};
#endif