2010-10-14 08:30:41 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2011-03-31 10:05:04 +02:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2012-06-02 16:15:10 +02:00
|
|
|
|
2000-09-18 23:08:29 +00:00
|
|
|
#ifndef _DRAWFONT_HXX
|
|
|
|
#define _DRAWFONT_HXX
|
2007-09-27 07:55:25 +00:00
|
|
|
|
|
|
|
#include <tools/solar.h>
|
|
|
|
#include <tools/string.hxx>
|
|
|
|
|
2003-10-30 09:18:07 +00:00
|
|
|
class SwTxtFrm;
|
2000-09-18 23:08:29 +00:00
|
|
|
class OutputDevice;
|
2003-10-30 09:18:07 +00:00
|
|
|
class ViewShell;
|
|
|
|
class SwScriptInfo;
|
2000-09-18 23:08:29 +00:00
|
|
|
class Point;
|
|
|
|
class SwWrongList;
|
|
|
|
class Size;
|
|
|
|
class SwFont;
|
2002-06-07 13:19:05 +00:00
|
|
|
class Font;
|
2002-11-14 07:55:47 +00:00
|
|
|
class SwUnderlineFont;
|
2002-06-19 06:45:53 +00:00
|
|
|
|
2012-06-02 16:04:18 +02:00
|
|
|
// encapsulates information for drawing text
|
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;
|
2008-02-26 08:45:41 +00:00
|
|
|
const SwWrongList* pGrammarCheck;
|
2012-06-02 16:04:18 +02:00
|
|
|
const SwWrongList* pSmartTags;
|
2000-09-18 23:08:29 +00:00
|
|
|
const Size* pSize;
|
|
|
|
SwFont *pFnt;
|
2002-11-14 07:55:47 +00:00
|
|
|
SwUnderlineFont* pUnderFnt;
|
2001-04-09 09:44:17 +00:00
|
|
|
xub_StrLen* pHyphPos;
|
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;
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 nWidth;
|
|
|
|
sal_uInt16 nAscent;
|
|
|
|
sal_uInt16 nCompress;
|
2005-04-18 13:33:12 +00:00
|
|
|
long nSperren;
|
|
|
|
long nSpace;
|
|
|
|
long nKern;
|
|
|
|
xub_StrLen nNumberOfBlanks;
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt8 nCursorBidiLevel;
|
|
|
|
sal_Bool bBullet : 1;
|
2012-06-02 16:04:18 +02:00
|
|
|
sal_Bool bUpper : 1; // for small caps: upper case flag
|
|
|
|
sal_Bool bDrawSpace : 1; // for small caps: underline/ line through
|
|
|
|
sal_Bool bGreyWave : 1; // grey wave line for extended text input
|
|
|
|
// For underlining we need to know, if a section is right in front of a
|
|
|
|
// whole block or a fix margin section.
|
|
|
|
sal_Bool bSpaceStop : 1;
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool bSnapToGrid : 1; // Does paragraph snap to grid?
|
2012-06-02 16:04:18 +02:00
|
|
|
// Paint text as if text has LTR direction, used for line numbering
|
|
|
|
sal_Bool bIgnoreFrmRTL : 1;
|
|
|
|
// GetCrsrOfst should not return the next position if screen position is
|
|
|
|
// inside second half of bound rect, used for Accessibility
|
|
|
|
sal_Bool bPosMatchesBounds :1;
|
2002-06-20 11:38:34 +00:00
|
|
|
|
2012-06-02 16:04:18 +02:00
|
|
|
SwDrawTextInfo(); // prohibited
|
2000-09-18 23:08:29 +00:00
|
|
|
public:
|
2003-11-25 09:36:40 +00:00
|
|
|
|
2011-11-24 00:52:00 +01:00
|
|
|
#ifdef DBG_UTIL
|
2012-06-02 16:04:18 +02:00
|
|
|
// These flags should control that the appropriate Set-function has been
|
|
|
|
// called before calling the Get-function of a member
|
|
|
|
bool m_bPos : 1;
|
|
|
|
bool m_bWrong : 1;
|
|
|
|
bool m_bGrammarCheck : 1;
|
2011-11-24 00:52:00 +01:00
|
|
|
bool m_bSize : 1;
|
|
|
|
bool m_bFnt : 1;
|
|
|
|
bool m_bHyph : 1;
|
|
|
|
bool m_bLeft : 1;
|
|
|
|
bool m_bRight : 1;
|
|
|
|
bool m_bKana : 1;
|
|
|
|
bool m_bOfst : 1;
|
|
|
|
bool m_bAscent: 1;
|
|
|
|
bool m_bSperr : 1;
|
|
|
|
bool m_bSpace : 1;
|
|
|
|
bool m_bNumberOfBlanks : 1;
|
|
|
|
bool m_bUppr : 1;
|
|
|
|
bool m_bDrawSp: 1;
|
2000-09-18 23:08:29 +00:00
|
|
|
#endif
|
2003-03-27 14:45:43 +00:00
|
|
|
|
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,
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 nW = 0, sal_Bool bB = sal_False )
|
2003-03-27 14:45:43 +00:00
|
|
|
{
|
|
|
|
pFrm = NULL;
|
|
|
|
pSh = pS;
|
|
|
|
pOut = &rO;
|
|
|
|
pScriptInfo = pSI;
|
|
|
|
pText = &rSt;
|
|
|
|
nIdx = nI;
|
|
|
|
nLen = nL;
|
|
|
|
nKern = 0;
|
|
|
|
nCompress = 0;
|
|
|
|
nWidth = nW;
|
2005-04-18 13:33:12 +00:00
|
|
|
nNumberOfBlanks = 0;
|
2003-03-27 14:45:43 +00:00
|
|
|
nCursorBidiLevel = 0;
|
|
|
|
bBullet = bB;
|
|
|
|
pUnderFnt = 0;
|
2011-01-17 15:06:54 +01:00
|
|
|
bGreyWave = sal_False;
|
|
|
|
bSpaceStop = sal_False;
|
|
|
|
bSnapToGrid = sal_False;
|
|
|
|
bIgnoreFrmRTL = sal_False;
|
|
|
|
bPosMatchesBounds = sal_False;
|
2002-06-19 06:45:53 +00:00
|
|
|
|
2012-06-02 16:04:18 +02:00
|
|
|
// These values are initialized but have to be set explicitly via their
|
|
|
|
// Set-function before they may be accessed by their Get-function:
|
2003-11-25 09:36:40 +00:00
|
|
|
pPos = 0;
|
|
|
|
pWrong = 0;
|
2008-02-26 08:45:41 +00:00
|
|
|
pGrammarCheck = 0;
|
2007-01-02 15:47:42 +00:00
|
|
|
pSmartTags = 0;
|
2003-11-25 09:36:40 +00:00
|
|
|
pSize = 0;
|
|
|
|
pFnt = 0;
|
|
|
|
pHyphPos = 0;
|
|
|
|
nLeft = 0;
|
|
|
|
nRight = 0;
|
|
|
|
nKanaDiff = 0;
|
|
|
|
nOfst = 0;
|
|
|
|
nAscent = 0;
|
|
|
|
nSperren = 0;
|
|
|
|
nSpace = 0;
|
2011-01-17 15:06:54 +01:00
|
|
|
bUpper = sal_False;
|
|
|
|
bDrawSpace = sal_False;
|
2003-03-27 14:45:43 +00:00
|
|
|
|
2011-11-24 00:52:00 +01:00
|
|
|
#ifdef DBG_UTIL
|
2012-06-02 16:04:18 +02:00
|
|
|
// these flags control whether the matching member variables have been
|
|
|
|
// set by using the Set-function before they may be accessed by their
|
|
|
|
// Get-function:
|
2011-11-24 00:52:00 +01:00
|
|
|
m_bPos = m_bWrong = m_bGrammarCheck = m_bSize = m_bFnt = m_bAscent =
|
|
|
|
m_bSpace = m_bNumberOfBlanks = m_bUppr =
|
|
|
|
m_bDrawSp = m_bLeft = m_bRight = m_bKana = m_bOfst = m_bHyph =
|
|
|
|
m_bSperr = false;
|
2000-09-18 23:08:29 +00:00
|
|
|
#endif
|
|
|
|
}
|
2001-08-31 05:22:48 +00:00
|
|
|
|
2003-03-27 14:45:43 +00:00
|
|
|
const SwTxtFrm* GetFrm() const
|
|
|
|
{
|
|
|
|
return pFrm;
|
|
|
|
}
|
|
|
|
|
|
|
|
void SetFrm( const SwTxtFrm* pNewFrm )
|
|
|
|
{
|
|
|
|
pFrm = pNewFrm;
|
|
|
|
}
|
|
|
|
|
|
|
|
ViewShell *GetShell() const
|
|
|
|
{
|
|
|
|
return pSh;
|
|
|
|
}
|
2001-08-31 05:22:48 +00:00
|
|
|
|
2003-03-27 14:45:43 +00:00
|
|
|
OutputDevice& GetOut() const
|
|
|
|
{
|
2000-09-18 23:08:29 +00:00
|
|
|
return *pOut;
|
|
|
|
}
|
2003-03-27 14:45:43 +00:00
|
|
|
|
|
|
|
OutputDevice *GetpOut() const
|
|
|
|
{
|
2000-09-18 23:08:29 +00:00
|
|
|
return pOut;
|
|
|
|
}
|
2003-03-27 14:45:43 +00:00
|
|
|
|
|
|
|
const SwScriptInfo* GetScriptInfo() const
|
|
|
|
{
|
2001-04-09 09:44:17 +00:00
|
|
|
return pScriptInfo;
|
|
|
|
}
|
2003-03-27 14:45:43 +00:00
|
|
|
|
|
|
|
const Point &GetPos() const
|
|
|
|
{
|
2011-11-24 00:52:00 +01:00
|
|
|
#ifdef DBG_UTIL
|
|
|
|
OSL_ENSURE( m_bPos, "DrawTextInfo: Undefined Position" );
|
2010-11-25 17:08:45 +01:00
|
|
|
#endif
|
2000-09-18 23:08:29 +00:00
|
|
|
return *pPos;
|
|
|
|
}
|
2003-03-27 14:45:43 +00:00
|
|
|
|
|
|
|
xub_StrLen *GetHyphPos() const
|
|
|
|
{
|
2011-11-24 00:52:00 +01:00
|
|
|
#ifdef DBG_UTIL
|
|
|
|
OSL_ENSURE( m_bHyph, "DrawTextInfo: Undefined Hyph Position" );
|
2010-11-25 17:08:45 +01:00
|
|
|
#endif
|
2001-04-09 09:44:17 +00:00
|
|
|
return pHyphPos;
|
|
|
|
}
|
2001-03-07 10:49:12 +00:00
|
|
|
|
2003-03-27 14:45:43 +00:00
|
|
|
const XubString &GetText() const
|
|
|
|
{
|
2000-09-18 23:08:29 +00:00
|
|
|
return *pText;
|
|
|
|
}
|
2003-03-27 14:45:43 +00:00
|
|
|
|
|
|
|
const SwWrongList* GetWrong() const
|
|
|
|
{
|
2011-11-24 00:52:00 +01:00
|
|
|
#ifdef DBG_UTIL
|
|
|
|
OSL_ENSURE( m_bWrong, "DrawTextInfo: Undefined WrongList" );
|
2010-11-25 17:08:45 +01:00
|
|
|
#endif
|
2000-09-18 23:08:29 +00:00
|
|
|
return pWrong;
|
|
|
|
}
|
2003-03-27 14:45:43 +00:00
|
|
|
|
2008-02-26 08:45:41 +00:00
|
|
|
const SwWrongList* GetGrammarCheck() const
|
|
|
|
{
|
2011-11-24 00:52:00 +01:00
|
|
|
#ifdef DBG_UTIL
|
|
|
|
OSL_ENSURE( m_bGrammarCheck, "DrawTextInfo: Undefined GrammarCheck List" );
|
2010-11-25 17:08:45 +01:00
|
|
|
#endif
|
2008-02-26 08:45:41 +00:00
|
|
|
return pGrammarCheck;
|
|
|
|
}
|
|
|
|
|
2007-01-02 15:47:42 +00:00
|
|
|
const SwWrongList* GetSmartTags() const
|
|
|
|
{
|
|
|
|
return pSmartTags;
|
|
|
|
}
|
|
|
|
|
2003-03-27 14:45:43 +00:00
|
|
|
const Size &GetSize() const
|
|
|
|
{
|
2011-11-24 00:52:00 +01:00
|
|
|
#ifdef DBG_UTIL
|
|
|
|
OSL_ENSURE( m_bSize, "DrawTextInfo: Undefined Size" );
|
2010-11-25 17:08:45 +01:00
|
|
|
#endif
|
2000-09-18 23:08:29 +00:00
|
|
|
return *pSize;
|
|
|
|
}
|
2003-03-27 14:45:43 +00:00
|
|
|
|
|
|
|
SwFont* GetFont() const
|
|
|
|
{
|
2011-11-24 00:52:00 +01:00
|
|
|
#ifdef DBG_UTIL
|
|
|
|
OSL_ENSURE( m_bFnt, "DrawTextInfo: Undefined Font" );
|
2010-11-25 17:08:45 +01:00
|
|
|
#endif
|
2000-09-18 23:08:29 +00:00
|
|
|
return pFnt;
|
|
|
|
}
|
2003-03-27 14:45:43 +00:00
|
|
|
|
|
|
|
SwUnderlineFont* GetUnderFnt() const
|
|
|
|
{
|
2001-10-02 12:51:59 +00:00
|
|
|
return pUnderFnt;
|
|
|
|
}
|
2003-03-27 14:45:43 +00:00
|
|
|
|
|
|
|
xub_StrLen GetIdx() const
|
|
|
|
{
|
2000-09-18 23:08:29 +00:00
|
|
|
return nIdx;
|
|
|
|
}
|
2003-03-27 14:45:43 +00:00
|
|
|
|
|
|
|
xub_StrLen GetLen() const
|
|
|
|
{
|
2000-09-18 23:08:29 +00:00
|
|
|
return nLen;
|
|
|
|
}
|
2003-03-27 14:45:43 +00:00
|
|
|
|
|
|
|
xub_StrLen GetOfst() const
|
|
|
|
{
|
2011-11-24 00:52:00 +01:00
|
|
|
#ifdef DBG_UTIL
|
|
|
|
OSL_ENSURE( m_bOfst, "DrawTextInfo: Undefined Offset" );
|
2010-11-25 17:08:45 +01:00
|
|
|
#endif
|
2001-04-09 09:44:17 +00:00
|
|
|
return nOfst;
|
|
|
|
}
|
2003-03-27 14:45:43 +00:00
|
|
|
|
|
|
|
xub_StrLen GetEnd() const
|
|
|
|
{
|
2000-09-18 23:08:29 +00:00
|
|
|
return nIdx + nLen;
|
|
|
|
}
|
2003-03-27 14:45:43 +00:00
|
|
|
|
|
|
|
long GetLeft() const
|
|
|
|
{
|
2011-11-24 00:52:00 +01:00
|
|
|
#ifdef DBG_UTIL
|
|
|
|
OSL_ENSURE( m_bLeft, "DrawTextInfo: Undefined left range" );
|
2010-11-25 17:08:45 +01:00
|
|
|
#endif
|
2000-09-18 23:08:29 +00:00
|
|
|
return nLeft;
|
|
|
|
}
|
2003-03-27 14:45:43 +00:00
|
|
|
|
|
|
|
long GetRight() const
|
|
|
|
{
|
2011-11-24 00:52:00 +01:00
|
|
|
#ifdef DBG_UTIL
|
|
|
|
OSL_ENSURE( m_bRight, "DrawTextInfo: Undefined right range" );
|
2010-11-25 17:08:45 +01:00
|
|
|
#endif
|
2000-09-18 23:08:29 +00:00
|
|
|
return nRight;
|
|
|
|
}
|
2003-03-27 14:45:43 +00:00
|
|
|
|
|
|
|
long GetKanaDiff() const
|
|
|
|
{
|
2011-11-24 00:52:00 +01:00
|
|
|
#ifdef DBG_UTIL
|
|
|
|
OSL_ENSURE( m_bKana, "DrawTextInfo: Undefined kana difference" );
|
2010-11-25 17:08:45 +01:00
|
|
|
#endif
|
2001-04-09 09:44:17 +00:00
|
|
|
return nKanaDiff;
|
|
|
|
}
|
2003-03-27 14:45:43 +00:00
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 GetWidth() const
|
2003-03-27 14:45:43 +00:00
|
|
|
{
|
2000-09-18 23:08:29 +00:00
|
|
|
return nWidth;
|
|
|
|
}
|
2003-03-27 14:45:43 +00:00
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 GetAscent() const
|
2003-03-27 14:45:43 +00:00
|
|
|
{
|
2011-11-24 00:52:00 +01:00
|
|
|
#ifdef DBG_UTIL
|
|
|
|
OSL_ENSURE( m_bAscent, "DrawTextInfo: Undefined Ascent" );
|
2010-11-25 17:08:45 +01:00
|
|
|
#endif
|
2000-09-18 23:08:29 +00:00
|
|
|
return nAscent;
|
|
|
|
}
|
2003-03-27 14:45:43 +00:00
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 GetKanaComp() const
|
2003-03-27 14:45:43 +00:00
|
|
|
{
|
2001-04-09 09:44:17 +00:00
|
|
|
return nCompress;
|
|
|
|
}
|
2003-03-27 14:45:43 +00:00
|
|
|
|
2005-04-18 13:33:12 +00:00
|
|
|
long GetSperren() const
|
2003-03-27 14:45:43 +00:00
|
|
|
{
|
2011-11-24 00:52:00 +01:00
|
|
|
#ifdef DBG_UTIL
|
|
|
|
OSL_ENSURE( m_bSperr, "DrawTextInfo: Undefined >Sperren<" );
|
2010-11-25 17:08:45 +01:00
|
|
|
#endif
|
2000-09-18 23:08:29 +00:00
|
|
|
return nSperren;
|
|
|
|
}
|
2003-03-27 14:45:43 +00:00
|
|
|
|
2005-04-18 13:33:12 +00:00
|
|
|
long GetKern() const
|
2003-03-27 14:45:43 +00:00
|
|
|
{
|
2000-09-18 23:08:29 +00:00
|
|
|
return nKern;
|
|
|
|
}
|
2003-03-27 14:45:43 +00:00
|
|
|
|
2005-04-18 13:33:12 +00:00
|
|
|
long GetSpace() const
|
2003-03-27 14:45:43 +00:00
|
|
|
{
|
2011-11-24 00:52:00 +01:00
|
|
|
#ifdef DBG_UTIL
|
|
|
|
OSL_ENSURE( m_bSpace, "DrawTextInfo: Undefined Spacing" );
|
2010-11-25 17:08:45 +01:00
|
|
|
#endif
|
2000-09-18 23:08:29 +00:00
|
|
|
return nSpace;
|
|
|
|
}
|
2003-03-27 14:45:43 +00:00
|
|
|
|
2005-04-18 13:33:12 +00:00
|
|
|
xub_StrLen GetNumberOfBlanks() const
|
|
|
|
{
|
2011-11-24 00:52:00 +01:00
|
|
|
#ifdef DBG_UTIL
|
|
|
|
OSL_ENSURE( m_bNumberOfBlanks, "DrawTextInfo::Undefined NumberOfBlanks" );
|
2010-11-25 17:08:45 +01:00
|
|
|
#endif
|
2005-04-18 13:33:12 +00:00
|
|
|
return nNumberOfBlanks;
|
|
|
|
}
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt8 GetCursorBidiLevel() const
|
2003-03-27 14:45:43 +00:00
|
|
|
{
|
|
|
|
return nCursorBidiLevel;
|
|
|
|
}
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool GetBullet() const
|
2003-03-27 14:45:43 +00:00
|
|
|
{
|
2000-09-18 23:08:29 +00:00
|
|
|
return bBullet;
|
|
|
|
}
|
2003-03-27 14:45:43 +00:00
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool GetUpper() const
|
2003-03-27 14:45:43 +00:00
|
|
|
{
|
2011-11-24 00:52:00 +01:00
|
|
|
#ifdef DBG_UTIL
|
|
|
|
OSL_ENSURE( m_bUppr, "DrawTextInfo: Undefined Upperflag" );
|
2010-11-25 17:08:45 +01:00
|
|
|
#endif
|
2000-09-18 23:08:29 +00:00
|
|
|
return bUpper;
|
|
|
|
}
|
2003-03-27 14:45:43 +00:00
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool GetDrawSpace() const
|
2003-03-27 14:45:43 +00:00
|
|
|
{
|
2011-11-24 00:52:00 +01:00
|
|
|
#ifdef DBG_UTIL
|
|
|
|
OSL_ENSURE( m_bDrawSp, "DrawTextInfo: Undefined DrawSpaceflag" );
|
2010-11-25 17:08:45 +01:00
|
|
|
#endif
|
2000-09-18 23:08:29 +00:00
|
|
|
return bDrawSpace;
|
|
|
|
}
|
2003-03-27 14:45:43 +00:00
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool GetGreyWave() const
|
2003-03-27 14:45:43 +00:00
|
|
|
{
|
2000-09-18 23:08:29 +00:00
|
|
|
return bGreyWave;
|
|
|
|
}
|
2003-03-27 14:45:43 +00:00
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool IsSpaceStop() const
|
2003-03-27 14:45:43 +00:00
|
|
|
{
|
2001-12-12 11:47:19 +00:00
|
|
|
return bSpaceStop;
|
|
|
|
}
|
2003-03-27 14:45:43 +00:00
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool SnapToGrid() const
|
2003-03-27 14:45:43 +00:00
|
|
|
{
|
2002-02-07 10:12:37 +00:00
|
|
|
return bSnapToGrid;
|
|
|
|
}
|
2000-09-18 23:08:29 +00:00
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool IsIgnoreFrmRTL() const
|
2003-03-27 14:45:43 +00:00
|
|
|
{
|
2002-06-20 11:38:34 +00:00
|
|
|
return bIgnoreFrmRTL;
|
|
|
|
}
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool IsPosMatchesBounds() const
|
2003-04-17 09:11:15 +00:00
|
|
|
{
|
|
|
|
return bPosMatchesBounds;
|
|
|
|
}
|
|
|
|
|
2003-03-27 14:45:43 +00:00
|
|
|
void SetOut( OutputDevice &rNew )
|
|
|
|
{
|
|
|
|
pOut = &rNew;
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
2003-03-27 14:45:43 +00:00
|
|
|
|
|
|
|
void SetPos( const Point &rNew )
|
|
|
|
{
|
|
|
|
pPos = &rNew;
|
2011-11-24 00:52:00 +01:00
|
|
|
#ifdef DBG_UTIL
|
|
|
|
m_bPos = true;
|
2001-04-09 09:44:17 +00:00
|
|
|
#endif
|
|
|
|
}
|
2003-03-27 14:45:43 +00:00
|
|
|
|
|
|
|
void SetHyphPos( xub_StrLen *pNew )
|
|
|
|
{
|
|
|
|
pHyphPos = pNew;
|
2011-11-24 00:52:00 +01:00
|
|
|
#ifdef DBG_UTIL
|
|
|
|
m_bHyph = true;
|
2000-09-18 23:08:29 +00:00
|
|
|
#endif
|
|
|
|
}
|
2003-03-27 14:45:43 +00:00
|
|
|
|
|
|
|
void SetText( const XubString &rNew )
|
|
|
|
{
|
|
|
|
pText = &rNew;
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
2003-03-27 14:45:43 +00:00
|
|
|
|
|
|
|
void SetWrong( const SwWrongList* pNew )
|
|
|
|
{
|
|
|
|
pWrong = pNew;
|
2011-11-24 00:52:00 +01:00
|
|
|
#ifdef DBG_UTIL
|
|
|
|
m_bWrong = true;
|
2000-09-18 23:08:29 +00:00
|
|
|
#endif
|
|
|
|
}
|
2003-03-27 14:45:43 +00:00
|
|
|
|
2008-02-26 08:45:41 +00:00
|
|
|
void SetGrammarCheck( const SwWrongList* pNew )
|
|
|
|
{
|
|
|
|
pGrammarCheck = pNew;
|
2011-11-24 00:52:00 +01:00
|
|
|
#ifdef DBG_UTIL
|
|
|
|
m_bGrammarCheck = true;
|
2008-02-26 08:45:41 +00:00
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2007-01-02 15:47:42 +00:00
|
|
|
void SetSmartTags( const SwWrongList* pNew )
|
|
|
|
{
|
|
|
|
pSmartTags = pNew;
|
|
|
|
}
|
|
|
|
|
2003-03-27 14:45:43 +00:00
|
|
|
void SetSize( const Size &rNew )
|
|
|
|
{
|
|
|
|
pSize = &rNew;
|
2011-11-24 00:52:00 +01:00
|
|
|
#ifdef DBG_UTIL
|
|
|
|
m_bSize = true;
|
2000-09-18 23:08:29 +00:00
|
|
|
#endif
|
|
|
|
}
|
2003-03-27 14:45:43 +00:00
|
|
|
|
|
|
|
void SetFont( SwFont* pNew )
|
|
|
|
{
|
|
|
|
pFnt = pNew;
|
2011-11-24 00:52:00 +01:00
|
|
|
#ifdef DBG_UTIL
|
|
|
|
m_bFnt = sal_True;
|
2000-09-18 23:08:29 +00:00
|
|
|
#endif
|
|
|
|
}
|
2003-03-27 14:45:43 +00:00
|
|
|
|
|
|
|
void SetIdx( xub_StrLen nNew )
|
|
|
|
{
|
|
|
|
nIdx = nNew;
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
2003-03-27 14:45:43 +00:00
|
|
|
|
|
|
|
void SetLen( xub_StrLen nNew )
|
|
|
|
{
|
|
|
|
nLen = nNew;
|
2001-04-09 09:44:17 +00:00
|
|
|
}
|
2003-03-27 14:45:43 +00:00
|
|
|
|
|
|
|
void SetOfst( xub_StrLen nNew )
|
|
|
|
{
|
|
|
|
nOfst = nNew;
|
2011-11-24 00:52:00 +01:00
|
|
|
#ifdef DBG_UTIL
|
|
|
|
m_bOfst = true;
|
2000-09-18 23:08:29 +00:00
|
|
|
#endif
|
|
|
|
}
|
2003-03-27 14:45:43 +00:00
|
|
|
|
|
|
|
void SetLeft( long nNew )
|
|
|
|
{
|
|
|
|
nLeft = nNew;
|
2011-11-24 00:52:00 +01:00
|
|
|
#ifdef DBG_UTIL
|
|
|
|
m_bLeft = true;
|
2000-09-18 23:08:29 +00:00
|
|
|
#endif
|
|
|
|
}
|
2003-03-27 14:45:43 +00:00
|
|
|
|
|
|
|
void SetRight( long nNew )
|
|
|
|
{
|
|
|
|
nRight = nNew;
|
2011-11-24 00:52:00 +01:00
|
|
|
#ifdef DBG_UTIL
|
|
|
|
m_bRight = true;
|
2001-04-09 09:44:17 +00:00
|
|
|
#endif
|
|
|
|
}
|
2003-03-27 14:45:43 +00:00
|
|
|
|
|
|
|
void SetKanaDiff( long nNew )
|
|
|
|
{
|
|
|
|
nKanaDiff = nNew;
|
2011-11-24 00:52:00 +01:00
|
|
|
#ifdef DBG_UTIL
|
|
|
|
m_bKana = true;
|
2000-09-18 23:08:29 +00:00
|
|
|
#endif
|
|
|
|
}
|
2003-03-27 14:45:43 +00:00
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
void SetWidth( sal_uInt16 nNew )
|
2003-03-27 14:45:43 +00:00
|
|
|
{
|
|
|
|
nWidth = nNew;
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
2003-03-27 14:45:43 +00:00
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
void SetAscent( sal_uInt16 nNew )
|
2003-03-27 14:45:43 +00:00
|
|
|
{
|
|
|
|
nAscent = nNew;
|
2011-11-24 00:52:00 +01:00
|
|
|
#ifdef DBG_UTIL
|
|
|
|
m_bAscent = true;
|
2000-09-18 23:08:29 +00:00
|
|
|
#endif
|
|
|
|
}
|
2003-03-27 14:45:43 +00:00
|
|
|
|
2005-04-18 13:33:12 +00:00
|
|
|
void SetKern( long nNew )
|
2003-03-27 14:45:43 +00:00
|
|
|
{
|
|
|
|
nKern = nNew;
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
2003-03-27 14:45:43 +00:00
|
|
|
|
2005-04-18 13:33:12 +00:00
|
|
|
void SetSpace( long nNew )
|
2003-03-27 14:45:43 +00:00
|
|
|
{
|
2000-09-18 23:08:29 +00:00
|
|
|
if( nNew < 0 )
|
|
|
|
{
|
2005-04-18 13:33:12 +00:00
|
|
|
nSperren = -nNew;
|
2000-09-18 23:08:29 +00:00
|
|
|
nSpace = 0;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
nSpace = nNew;
|
2005-04-18 13:33:12 +00:00
|
|
|
nSperren = 0;
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
2011-11-24 00:52:00 +01:00
|
|
|
#ifdef DBG_UTIL
|
|
|
|
m_bSpace = true;
|
|
|
|
m_bSperr = true;
|
2005-04-18 13:33:12 +00:00
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
void SetNumberOfBlanks( xub_StrLen nNew )
|
|
|
|
{
|
2011-11-24 00:52:00 +01:00
|
|
|
#ifdef DBG_UTIL
|
|
|
|
m_bNumberOfBlanks = true;
|
2000-09-18 23:08:29 +00:00
|
|
|
#endif
|
2005-04-18 13:33:12 +00:00
|
|
|
nNumberOfBlanks = nNew;
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
2003-03-27 14:45:43 +00:00
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
void SetCursorBidiLevel( sal_uInt8 nNew )
|
2003-03-27 14:45:43 +00:00
|
|
|
{
|
|
|
|
nCursorBidiLevel = nNew;
|
|
|
|
}
|
|
|
|
|
|
|
|
void SetKanaComp( short nNew )
|
|
|
|
{
|
2001-04-09 09:44:17 +00:00
|
|
|
nCompress = nNew;
|
|
|
|
}
|
2003-03-27 14:45:43 +00:00
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
void SetBullet( sal_Bool bNew )
|
2003-03-27 14:45:43 +00:00
|
|
|
{
|
|
|
|
bBullet = bNew;
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
2003-03-27 14:45:43 +00:00
|
|
|
|
2007-09-27 07:55:25 +00:00
|
|
|
void SetUnderFnt( SwUnderlineFont* pULFnt )
|
2003-03-27 14:45:43 +00:00
|
|
|
{
|
2007-09-27 07:55:25 +00:00
|
|
|
pUnderFnt = pULFnt;
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
2003-03-27 14:45:43 +00:00
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
void SetUpper( sal_Bool bNew )
|
2003-03-27 14:45:43 +00:00
|
|
|
{
|
|
|
|
bUpper = bNew;
|
2011-11-24 00:52:00 +01:00
|
|
|
#ifdef DBG_UTIL
|
|
|
|
m_bUppr = true;
|
2000-09-18 23:08:29 +00:00
|
|
|
#endif
|
|
|
|
}
|
2003-03-27 14:45:43 +00:00
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
void SetDrawSpace( sal_Bool bNew )
|
2003-03-27 14:45:43 +00:00
|
|
|
{
|
|
|
|
bDrawSpace = bNew;
|
2011-11-24 00:52:00 +01:00
|
|
|
#ifdef DBG_UTIL
|
|
|
|
m_bDrawSp = true;
|
2000-09-18 23:08:29 +00:00
|
|
|
#endif
|
|
|
|
}
|
2003-03-27 14:45:43 +00:00
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
void SetGreyWave( sal_Bool bNew )
|
2003-03-27 14:45:43 +00:00
|
|
|
{
|
|
|
|
bGreyWave = bNew;
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
2001-12-12 11:47:19 +00:00
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
void SetSpaceStop( sal_Bool bNew )
|
2003-03-27 14:45:43 +00:00
|
|
|
{
|
|
|
|
bSpaceStop = bNew;
|
|
|
|
}
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
void SetSnapToGrid( sal_Bool bNew )
|
2003-03-27 14:45:43 +00:00
|
|
|
{
|
|
|
|
bSnapToGrid = bNew;
|
|
|
|
}
|
2001-12-12 11:47:19 +00:00
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
void SetIgnoreFrmRTL( sal_Bool bNew )
|
2003-03-27 14:45:43 +00:00
|
|
|
{
|
|
|
|
bIgnoreFrmRTL = bNew;
|
|
|
|
}
|
2003-04-17 09:11:15 +00:00
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
void SetPosMatchesBounds( sal_Bool bNew )
|
2003-04-17 09:11:15 +00:00
|
|
|
{
|
|
|
|
bPosMatchesBounds = bNew;
|
|
|
|
}
|
2002-06-20 11:38:34 +00:00
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
void Shift( sal_uInt16 nDir );
|
2002-06-07 13:19:05 +00:00
|
|
|
|
2012-06-02 16:04:18 +02:00
|
|
|
// 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
|
2002-06-07 13:19:05 +00:00
|
|
|
sal_Bool ApplyAutoColor( Font* pFnt = 0 );
|
2000-09-18 23:08:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
2010-10-14 08:30:41 +02:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|