summaryrefslogtreecommitdiff
path: root/sw/source/core/txtnode/fntcache.cxx
diff options
context:
space:
mode:
authorCarsten Driesner <cd@openoffice.org>2011-01-17 15:06:54 +0100
committerCarsten Driesner <cd@openoffice.org>2011-01-17 15:06:54 +0100
commit7f33ed417b2e29e5470724ea76967f64699a2662 (patch)
treeabfa1432c5ffffe4c7502d4ddcaee918c584c69c /sw/source/core/txtnode/fntcache.cxx
parent80731dbfcb48a2ffec30a4b2abe1ba8ada8f0169 (diff)
removetooltypes01: #i112600# Remove tools types from sw
Diffstat (limited to 'sw/source/core/txtnode/fntcache.cxx')
-rw-r--r--sw/source/core/txtnode/fntcache.cxx198
1 files changed, 99 insertions, 99 deletions
diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx
index 77b969433ed7..755e8bf1026e 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -80,7 +80,7 @@ SwFntCache *pFntCache = NULL;
// Letzter Font, der durch ChgFntCache eingestellt wurde.
SwFntObj *pLastFont = NULL;
// Die "MagicNumber", die den Fonts zur Identifizierung verpasst wird
-BYTE* pMagicNo = NULL;
+sal_uInt8* pMagicNo = NULL;
Color *pWaveCol = 0;
@@ -88,8 +88,8 @@ long SwFntObj::nPixWidth;
MapMode* SwFntObj::pPixMap = NULL;
OutputDevice* SwFntObj::pPixOut = NULL;
-extern USHORT UnMapDirection( USHORT nDir, const BOOL bVertFormat );
-USHORT GetDefaultFontHeight( SwDrawTextInfo &rInf )
+extern sal_uInt16 UnMapDirection( sal_uInt16 nDir, const sal_Bool bVertFormat );
+sal_uInt16 GetDefaultFontHeight( SwDrawTextInfo &rInf )
{
SwDocShell* pDocShell = rInf.GetShell()->GetDoc()->GetDocShell();
SfxStyleSheetBasePool* pBasePool = pDocShell->GetStyleSheetPool();
@@ -99,7 +99,7 @@ USHORT GetDefaultFontHeight( SwDrawTextInfo &rInf )
SfxStyleSheetBase* pStyle = pBasePool->Find( aString, (SfxStyleFamily)SFX_STYLE_FAMILY_PARA );
SfxItemSet& aTmpSet = pStyle->GetItemSet();
SvxFontHeightItem &aDefaultFontItem = (SvxFontHeightItem&)aTmpSet.Get(RES_CHRATR_CJK_FONTSIZE);
- return (USHORT)aDefaultFontItem.GetHeight();
+ return (sal_uInt16)aDefaultFontItem.GetHeight();
}
@@ -212,15 +212,15 @@ struct CalcLinePosData
SwDrawTextInfo& rInf;
Font& rFont;
xub_StrLen nCnt;
- const BOOL bSwitchH2V;
- const BOOL bSwitchL2R;
+ const sal_Bool bSwitchH2V;
+ const sal_Bool bSwitchL2R;
long nHalfSpace;
sal_Int32* pKernArray;
- const BOOL bBidiPor;
+ const sal_Bool bBidiPor;
CalcLinePosData( SwDrawTextInfo& _rInf, Font& _rFont,
- xub_StrLen _nCnt, const BOOL _bSwitchH2V, const BOOL _bSwitchL2R,
- long _nHalfSpace, sal_Int32* _pKernArray, const BOOL _bBidiPor) :
+ xub_StrLen _nCnt, const sal_Bool _bSwitchH2V, const sal_Bool _bSwitchL2R,
+ long _nHalfSpace, sal_Int32* _pKernArray, const sal_Bool _bBidiPor) :
rInf( _rInf ),
rFont( _rFont ),
nCnt( _nCnt ),
@@ -256,10 +256,10 @@ void lcl_calcLinePos( const CalcLinePosData &rData,
}
// determine start, end and length of wave line
- sal_Int32 nKernStart = nStart ? rData.pKernArray[ USHORT( nStart - 1 ) ] : 0;
- sal_Int32 nKernEnd = rData.pKernArray[ USHORT( nEnd - 1 ) ];
+ sal_Int32 nKernStart = nStart ? rData.pKernArray[ sal_uInt16( nStart - 1 ) ] : 0;
+ sal_Int32 nKernEnd = rData.pKernArray[ sal_uInt16( nEnd - 1 ) ];
- USHORT nDir = rData.bBidiPor ? 1800 :
+ sal_uInt16 nDir = rData.bBidiPor ? 1800 :
UnMapDirection( rData.rFont.GetOrientation(), rData.bSwitchH2V );
switch ( nDir )
@@ -301,7 +301,7 @@ void lcl_calcLinePos( const CalcLinePosData &rData,
/*************************************************************************
*
- * USHORT SwFntObj::GetFontAscent( const OutputDevice& rOut )
+ * sal_uInt16 SwFntObj::GetFontAscent( const OutputDevice& rOut )
*
* Ersterstellung AMA 7. Nov. 94
* Letzte Aenderung AMA 7. Nov. 94
@@ -311,9 +311,9 @@ void lcl_calcLinePos( const CalcLinePosData &rData,
* erzeugt werden.
*************************************************************************/
-USHORT SwFntObj::GetFontAscent( const ViewShell *pSh, const OutputDevice& rOut )
+sal_uInt16 SwFntObj::GetFontAscent( const ViewShell *pSh, const OutputDevice& rOut )
{
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
const OutputDevice& rRefDev = pSh ? pSh->GetRefDev() : rOut;
if ( pSh && lcl_IsFontAdjustNecessary( rOut, rRefDev ) )
@@ -330,7 +330,7 @@ USHORT SwFntObj::GetFontAscent( const ViewShell *pSh, const OutputDevice& rOut )
const Font aOldFnt( rRefDev.GetFont() );
((OutputDevice&)rRefDev).SetFont( *pPrtFont );
const FontMetric aOutMet( rRefDev.GetFontMetric() );
- nPrtAscent = (USHORT) aOutMet.GetAscent();
+ nPrtAscent = (sal_uInt16) aOutMet.GetAscent();
( (OutputDevice&)rRefDev).SetFont( aOldFnt );
}
@@ -348,7 +348,7 @@ USHORT SwFntObj::GetFontAscent( const ViewShell *pSh, const OutputDevice& rOut )
/*************************************************************************
*
- * USHORT SwFntObj::GetFontHeight( const OutputDevice* pOut )
+ * sal_uInt16 SwFntObj::GetFontHeight( const OutputDevice* pOut )
*
* Ersterstellung AMA 7. Nov. 94
* Letzte Aenderung AMA 7. Nov. 94
@@ -358,9 +358,9 @@ USHORT SwFntObj::GetFontAscent( const ViewShell *pSh, const OutputDevice& rOut )
* erzeugt werden.
*************************************************************************/
-USHORT SwFntObj::GetFontHeight( const ViewShell* pSh, const OutputDevice& rOut )
+sal_uInt16 SwFntObj::GetFontHeight( const ViewShell* pSh, const OutputDevice& rOut )
{
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
const OutputDevice& rRefDev = pSh ? pSh->GetRefDev() : rOut;
if ( pSh && lcl_IsFontAdjustNecessary( rOut, rRefDev ) )
@@ -376,12 +376,12 @@ USHORT SwFntObj::GetFontHeight( const ViewShell* pSh, const OutputDevice& rOut )
CreatePrtFont( rOut );
const Font aOldFnt( rRefDev.GetFont() );
((OutputDevice&)rRefDev).SetFont( *pPrtFont );
- nPrtHeight = static_cast<USHORT>(rRefDev.GetTextHeight());
+ nPrtHeight = static_cast<sal_uInt16>(rRefDev.GetTextHeight());
#if OSL_DEBUG_LEVEL > 1
// Check if vcl did not change the meading of GetTextHeight
const FontMetric aOutMet( rRefDev.GetFontMetric() );
- long nTmpPrtHeight = (USHORT)aOutMet.GetAscent() + aOutMet.GetDescent();
+ long nTmpPrtHeight = (sal_uInt16)aOutMet.GetAscent() + aOutMet.GetDescent();
(void) nTmpPrtHeight;
// #i106098#: do not compare with == here due to rounding error
ASSERT( abs(nTmpPrtHeight - nPrtHeight) < 3,
@@ -398,9 +398,9 @@ USHORT SwFntObj::GetFontHeight( const ViewShell* pSh, const OutputDevice& rOut )
return nRet;
}
-USHORT SwFntObj::GetFontLeading( const ViewShell *pSh, const OutputDevice& rOut )
+sal_uInt16 SwFntObj::GetFontLeading( const ViewShell *pSh, const OutputDevice& rOut )
{
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
if ( pSh )
{
@@ -412,7 +412,7 @@ USHORT SwFntObj::GetFontLeading( const ViewShell *pSh, const OutputDevice& rOut
((OutputDevice&)rOut).SetFont( aOldFnt );
bSymbol = RTL_TEXTENCODING_SYMBOL == aMet.GetCharSet();
GuessLeading( *pSh, aMet );
- nExtLeading = static_cast<USHORT>(aMet.GetExtLeading());
+ nExtLeading = static_cast<sal_uInt16>(aMet.GetExtLeading());
}
const IDocumentSettingAccess& rIDSA = *pSh->getIDocumentSettingAccess();
@@ -490,7 +490,7 @@ void SwFntObj::CreateScrFont( const ViewShell& rSh, const OutputDevice& rOut )
GuessLeading( rSh, aMet );
if ( USHRT_MAX == nExtLeading )
- nExtLeading = static_cast<USHORT>(aMet.GetExtLeading());
+ nExtLeading = static_cast<sal_uInt16>(aMet.GetExtLeading());
// reset the original reference device font
pPrt->SetFont( aOldPrtFnt );
@@ -528,9 +528,9 @@ void SwFntObj::CreateScrFont( const ViewShell& rSh, const OutputDevice& rOut )
nZoom = USHRT_MAX - 1;
}
- nScrAscent = (USHORT)pOut->GetFontMetric().GetAscent();
+ nScrAscent = (sal_uInt16)pOut->GetFontMetric().GetAscent();
if ( USHRT_MAX == nScrHeight )
- nScrHeight = (USHORT)pOut->GetTextHeight();
+ nScrHeight = (sal_uInt16)pOut->GetTextHeight();
// reset original output device font
pOut->SetFont( aOldOutFont );
@@ -563,7 +563,7 @@ void SwFntObj::GuessLeading( const ViewShell&
const Font aOldFnt( pWin->GetFont() );
pWin->SetFont( *pPrtFont );
const FontMetric aWinMet( pWin->GetFontMetric() );
- const USHORT nWinHeight = USHORT( aWinMet.GetSize().Height() );
+ const sal_uInt16 nWinHeight = sal_uInt16( aWinMet.GetSize().Height() );
if( pPrtFont->GetName().Search( aWinMet.GetName() ) < USHRT_MAX )
{
// Wenn das Leading auf dem Window auch 0 ist, dann
@@ -577,11 +577,11 @@ void SwFntObj::GuessLeading( const ViewShell&
if( nTmpLeading < 0 )
nGuessedLeading = 0;
else
- nGuessedLeading = USHORT(nTmpLeading);
+ nGuessedLeading = sal_uInt16(nTmpLeading);
}
else
{
- nGuessedLeading = USHORT(nTmpLeading);
+ nGuessedLeading = sal_uInt16(nTmpLeading);
// Manta-Hack #50153#:
// Wer beim Leading luegt, luegt moeglicherweise auch beim
// Ascent/Descent, deshalb wird hier ggf. der Font ein wenig
@@ -592,7 +592,7 @@ void SwFntObj::GuessLeading( const ViewShell&
{
ASSERT( nPrtAscent < USHRT_MAX, "GuessLeading: PrtAscent-Fault" );
if ( nPrtAscent < USHRT_MAX )
- nPrtAscent = nPrtAscent + (USHORT)(( 2 * nDiff ) / 5);
+ nPrtAscent = nPrtAscent + (sal_uInt16)(( 2 * nDiff ) / 5);
}
}
}
@@ -664,7 +664,7 @@ void SwFntObj::SetDevFont( const ViewShell *pSh, OutputDevice& rOut )
*
*************************************************************************/
-BYTE lcl_WhichPunctuation( xub_Unicode cChar )
+sal_uInt8 lcl_WhichPunctuation( xub_Unicode cChar )
{
if ( ( cChar < 0x3001 || cChar > 0x3002 ) &&
( cChar < 0x3008 || cChar > 0x3011 ) &&
@@ -744,7 +744,7 @@ static void lcl_DrawLineForWrongListData(
rInf.GetOut().Push();
const Color aCol( rInf.GetOut().GetLineColor() );
- const BOOL bColSave = aCol != aLineColor;
+ const sal_Bool bColSave = aCol != aLineColor;
if (bColSave)
rInf.GetOut().SetLineColor( aLineColor );
@@ -803,7 +803,7 @@ static void lcl_DrawLineForWrongListData(
else // draw wavy lines for spell or grammar errors
{
// get wavy line type to use
- USHORT nWave =
+ sal_uInt16 nWave =
WRONG_SHOW_MEDIUM < nHght ? WAVE_NORMAL :
( WRONG_SHOW_SMALL < nHght ? WAVE_SMALL : WAVE_FLAT );
@@ -835,9 +835,9 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
const IDocumentSettingAccess* pIDSA = rInf.GetShell()->getIDocumentSettingAccess();
// true if pOut is the printer and the printer has been used for formatting
- const BOOL bPrt = OUTDEV_PRINTER == rInf.GetOut().GetOutDevType() &&
+ const sal_Bool bPrt = OUTDEV_PRINTER == rInf.GetOut().GetOutDevType() &&
OUTDEV_PRINTER == rRefDev.GetOutDevType();
- const BOOL bBrowse = ( pWin &&
+ const sal_Bool bBrowse = ( pWin &&
pIDSA->get(IDocumentSettingAccess::BROWSE_MODE) &&
!rInf.GetShell()->GetViewOptions()->IsPrtFormat() &&
!rInf.GetBullet() &&
@@ -849,10 +849,10 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
// bDirectPrint indicates that we can enter the branch which calls
// the DrawText functions instead of calling the DrawTextArray functions
- const BOOL bDirectPrint = bPrt || bBrowse;
+ const sal_Bool bDirectPrint = bPrt || bBrowse;
// Condition for output font / refdev font adjustment
- const BOOL bUseScrFont =
+ const sal_Bool bUseScrFont =
lcl_IsFontAdjustNecessary( rInf.GetOut(), rRefDev );
Font* pTmpFont = bUseScrFont ? pScrFont : pPrtFont;
@@ -874,7 +874,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
#ifdef DBG_UTIL
- const BOOL bNoAdjust = bPrt ||
+ const sal_Bool bNoAdjust = bPrt ||
( pWin &&
pIDSA->get(IDocumentSettingAccess::BROWSE_MODE) &&
!rInf.GetShell()->GetViewOptions()->IsPrtFormat() );
@@ -948,11 +948,11 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
// wird die graue Wellenlinie des ExtendedAttributSets zunaechst
// in der Fontfarbe erscheinen.
- const BOOL bSwitchH2V = rInf.GetFrm() && rInf.GetFrm()->IsVertical();
- const BOOL bSwitchL2R = rInf.GetFrm() && rInf.GetFrm()->IsRightToLeft() &&
+ const sal_Bool bSwitchH2V = rInf.GetFrm() && rInf.GetFrm()->IsVertical();
+ const sal_Bool bSwitchL2R = rInf.GetFrm() && rInf.GetFrm()->IsRightToLeft() &&
! rInf.IsIgnoreFrmRTL();
- const ULONG nMode = rInf.GetOut().GetLayoutMode();
- const BOOL bBidiPor = ( bSwitchL2R !=
+ const sal_uLong nMode = rInf.GetOut().GetLayoutMode();
+ const sal_Bool bBidiPor = ( bSwitchL2R !=
( 0 != ( TEXT_LAYOUT_BIDI_RTL & nMode ) ) );
// be sure to have the correct layout mode at the printer
@@ -998,9 +998,9 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
if ( pGrid && GRID_LINES_CHARS == pGrid->GetGridType() && pGrid->IsSnapToChars())
{
//for textgrid refactor
- //const USHORT nGridWidth = pGrid->GetBaseHeight();
+ //const sal_uInt16 nGridWidth = pGrid->GetBaseHeight();
const SwDoc* pDoc = rInf.GetShell()->GetDoc();
- const USHORT nGridWidth = GETGRIDWIDTH(pGrid, pDoc);
+ const sal_uInt16 nGridWidth = GETGRIDWIDTH(pGrid, pDoc);
sal_Int32* pKernArray = new sal_Int32[rInf.GetLen()];
if ( pPrinter )
@@ -1012,7 +1012,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
long nWidthPerChar = pKernArray[ rInf.GetLen() - 1 ] / rInf.GetLen();
- const ULONG i = nWidthPerChar ?
+ const sal_uLong i = nWidthPerChar ?
( nWidthPerChar - 1 ) / nGridWidth + 1:
1;
@@ -1020,13 +1020,13 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
// position of first character, we take the printer position
long nCharWidth = pKernArray[ 0 ];
- ULONG nHalfWidth = nWidthPerChar / 2;
+ sal_uLong nHalfWidth = nWidthPerChar / 2;
long nNextFix;
// punctuation characters are not centered
xub_Unicode cChar = rInf.GetText().GetChar( rInf.GetIdx() );
- BYTE nType = lcl_WhichPunctuation( cChar );
+ sal_uInt8 nType = lcl_WhichPunctuation( cChar );
switch ( nType )
{
case SwScriptInfo::NONE :
@@ -1088,7 +1088,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
if ( pGrid && GRID_LINES_CHARS == pGrid->GetGridType() && !pGrid->IsSnapToChars() )
{
- const USHORT nDefaultFontHeight = GetDefaultFontHeight( rInf );
+ const sal_uInt16 nDefaultFontHeight = GetDefaultFontHeight( rInf );
const SwDoc* pDoc = rInf.GetShell()->GetDoc();
long nGridWidthAdd = GETGRIDWIDTH(pGrid, pDoc);
@@ -1114,14 +1114,14 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
if ( rInf.GetFont() && rInf.GetLen() )
{
const SwScriptInfo* pSI = rInf.GetScriptInfo();
- const BYTE nActual = rInf.GetFont()->GetActual();
+ const sal_uInt8 nActual = rInf.GetFont()->GetActual();
///Kana Compression
if( SW_CJK == nActual && rInf.GetKanaComp() &&
pSI && pSI->CountCompChg() &&
lcl_IsMonoSpaceFont( *(rInf.GetpOut()) ) )
{
pSI->Compress( pKernArray,rInf.GetIdx(), rInf.GetLen(),
- rInf.GetKanaComp(), (USHORT)aFont.GetSize().Height(),&aPos );
+ rInf.GetKanaComp(), (sal_uInt16)aFont.GetSize().Height(),&aPos );
bSpecialJust = sal_True;
}
///Asian Justification
@@ -1131,7 +1131,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
if ( LANGUAGE_KOREAN != aLang && LANGUAGE_KOREAN_JOHAB != aLang)
{
long nSpaceSum = nSpaceAdd;
- for ( USHORT nI = 0; nI < rInf.GetLen(); ++nI )
+ for ( sal_uInt16 nI = 0; nI < rInf.GetLen(); ++nI )
{
pKernArray[ nI ] += nSpaceSum;
nSpaceSum += nSpaceAdd;
@@ -1229,7 +1229,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
if ( bDirectPrint )
{
const Fraction aTmp( 1, 1 );
- BOOL bStretch = rInf.GetWidth() && ( rInf.GetLen() > 1 ) && bPrt
+ sal_Bool bStretch = rInf.GetWidth() && ( rInf.GetLen() > 1 ) && bPrt
&& ( aTmp != rInf.GetOut().GetMapMode().GetScaleX() );
if ( bSwitchL2R )
@@ -1286,7 +1286,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
if ( rInf.GetFont() && rInf.GetLen() )
{
const SwScriptInfo* pSI = rInf.GetScriptInfo();
- const BYTE nActual = rInf.GetFont()->GetActual();
+ const sal_uInt8 nActual = rInf.GetFont()->GetActual();
// Kana Compression
if ( SW_CJK == nActual && rInf.GetKanaComp() &&
@@ -1295,7 +1295,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
{
pSI->Compress( pKernArray, rInf.GetIdx(), rInf.GetLen(),
rInf.GetKanaComp(),
- (USHORT)aFont.GetSize().Height(), &aPos );
+ (sal_uInt16)aFont.GetSize().Height(), &aPos );
bSpecialJust = sal_True;
}
@@ -1307,7 +1307,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
if ( LANGUAGE_KOREAN != aLang && LANGUAGE_KOREAN_JOHAB != aLang )
{
long nSpaceSum = nSpaceAdd;
- for ( USHORT nI = 0; nI < rInf.GetLen(); ++nI )
+ for ( sal_uInt16 nI = 0; nI < rInf.GetLen(); ++nI )
{
pKernArray[ nI ] += nSpaceSum;
nSpaceSum += nSpaceAdd;
@@ -1439,7 +1439,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
pTmpFont->SetColor( aSaveColor );
}
- rInf.GetOut().DrawStretchText( aPos, (USHORT)nTmpWidth,
+ rInf.GetOut().DrawStretchText( aPos, (sal_uInt16)nTmpWidth,
rInf.GetText(), rInf.GetIdx(), rInf.GetLen() );
}
else
@@ -1455,9 +1455,9 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
{
const String* pStr = &rInf.GetText();
String aStr( aEmptyStr );
- BOOL bBullet = rInf.GetBullet();
+ sal_Bool bBullet = rInf.GetBullet();
if( bSymbol )
- bBullet = FALSE;
+ bBullet = sal_False;
sal_Int32 *pKernArray = new sal_Int32[ rInf.GetLen() ];
CreateScrFont( *rInf.GetShell(), rInf.GetOut() );
long nScrPos;
@@ -1482,7 +1482,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
}
else
{
-// BOOL bRestore = FALSE;
+// sal_Bool bRestore = sal_False;
// MapMode aOld( rInf.GetOut().GetMapMode() );
// if( rInf.GetZoom().GetNumerator() &&
// rInf.GetZoom() != aOld.GetScaleX() )
@@ -1491,7 +1491,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
// aNew.SetScaleX( rInf.GetZoom() );
// aNew.SetScaleY( rInf.GetZoom() );
// rInf.GetOut().SetMapMode( aNew );
-// bRestore = TRUE;
+// bRestore = sal_True;
// }
rInf.GetOut().GetTextArray( rInf.GetText(), pKernArray,
rInf.GetIdx(), rInf.GetLen() );
@@ -1507,7 +1507,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
if ( rInf.GetFont() && rInf.GetLen() )
{
- const BYTE nActual = rInf.GetFont()->GetActual();
+ const sal_uInt8 nActual = rInf.GetFont()->GetActual();
const SwScriptInfo* pSI = rInf.GetScriptInfo();
// Kana Compression
@@ -1518,10 +1518,10 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
Point aTmpPos( aPos );
pSI->Compress( pScrArray, rInf.GetIdx(), rInf.GetLen(),
rInf.GetKanaComp(),
- (USHORT)aFont.GetSize().Height(), &aTmpPos );
+ (sal_uInt16)aFont.GetSize().Height(), &aTmpPos );
pSI->Compress( pKernArray, rInf.GetIdx(), rInf.GetLen(),
rInf.GetKanaComp(),
- (USHORT)aFont.GetSize().Height(), &aPos );
+ (sal_uInt16)aFont.GetSize().Height(), &aPos );
}
// Asian Justification
@@ -1532,7 +1532,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
if ( LANGUAGE_KOREAN != aLang && LANGUAGE_KOREAN_JOHAB != aLang )
{
long nSpaceSum = nSpaceAdd;
- for ( USHORT nI = 0; nI < rInf.GetLen(); ++nI )
+ for ( sal_uInt16 nI = 0; nI < rInf.GetLen(); ++nI )
{
pKernArray[ nI ] += nSpaceSum;
pScrArray[ nI ] += nSpaceSum;
@@ -1633,12 +1633,12 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
xub_Unicode nCh;
// Bei Pairkerning waechst der Printereinfluss auf die Positionierung
- USHORT nMul = 3;
+ sal_uInt16 nMul = 3;
if ( pPrtFont->GetKerning() )
nMul = 1;
- const USHORT nDiv = nMul+1;
+ const sal_uInt16 nDiv = nMul+1;
// In nSpaceSum wird der durch Blocksatz auf die Spaces verteilte
// Zwischenraum aufsummiert.
@@ -1733,19 +1733,19 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
if ( rInf.GetOut().GetConnectMetaFile() )
rInf.GetOut().Push();
- USHORT nWave =
+ sal_uInt16 nWave =
WRONG_SHOW_MEDIUM < nHght ? WAVE_NORMAL :
( WRONG_SHOW_SMALL < nHght ? WAVE_SMALL :
WAVE_FLAT );
Color aCol( rInf.GetOut().GetLineColor() );
- BOOL bColSave = aCol != *pWaveCol;
+ sal_Bool bColSave = aCol != *pWaveCol;
if ( bColSave )
rInf.GetOut().SetLineColor( *pWaveCol );
Point aEnd;
- long nKernVal = pKernArray[ USHORT( rInf.GetLen() - 1 ) ];
+ long nKernVal = pKernArray[ sal_uInt16( rInf.GetLen() - 1 ) ];
- USHORT nDir = bBidiPor ?
+ sal_uInt16 nDir = bBidiPor ?
1800 :
UnMapDirection(
GetFont()->GetOrientation(),
@@ -1878,7 +1878,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
/*************************************************************************
*
* Size SwFntObj::GetTextSize( const OutputDevice *pOut, const String &rTxt,
- * const USHORT nIdx, const USHORT nLen, const short nKern = 0 );
+ * const sal_uInt16 nIdx, const sal_uInt16 nLen, const short nKern = 0 );
*
* Ersterstellung AMA 16. Dez. 94
* Letzte Aenderung AMA 16. Dez. 94
@@ -1907,7 +1907,7 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf )
if ( pGrid && GRID_LINES_CHARS == pGrid->GetGridType() && pGrid->IsSnapToChars() )
{
const SwDoc* pDoc = rInf.GetShell()->GetDoc();
- const USHORT nGridWidth = GETGRIDWIDTH(pGrid, pDoc);
+ const sal_uInt16 nGridWidth = GETGRIDWIDTH(pGrid, pDoc);
OutputDevice* pOutDev;
@@ -1931,7 +1931,7 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf )
long nWidthPerChar = aTxtSize.Width() / nLn;
- const ULONG i = nWidthPerChar ?
+ const sal_uLong i = nWidthPerChar ?
( nWidthPerChar - 1 ) / nGridWidth + 1:
1;
@@ -1948,7 +1948,7 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf )
GETGRID( rInf.GetFrm()->FindPageFrm() )
if ( pGrid && GRID_LINES_CHARS == pGrid->GetGridType() && !pGrid->IsSnapToChars() )
{
- const USHORT nDefaultFontHeight = GetDefaultFontHeight( rInf );
+ const sal_uInt16 nDefaultFontHeight = GetDefaultFontHeight( rInf );
const SwDoc* pDoc = rInf.GetShell()->GetDoc();
long nGridWidthAdd = GETGRIDWIDTH(pGrid, pDoc);
@@ -1977,7 +1977,7 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf )
}
}
- const BOOL bCompress = rInf.GetKanaComp() && nLn &&
+ const sal_Bool bCompress = rInf.GetKanaComp() && nLn &&
rInf.GetFont() &&
SW_CJK == rInf.GetFont()->GetActual() &&
rInf.GetScriptInfo() &&
@@ -2006,7 +2006,7 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf )
if( bCompress )
rInf.SetKanaDiff( rInf.GetScriptInfo()->Compress( pKernArray,
rInf.GetIdx(), nLn, rInf.GetKanaComp(),
- (USHORT)aFont.GetSize().Height() ) );
+ (sal_uInt16)aFont.GetSize().Height() ) );
else
rInf.SetKanaDiff( 0 );
@@ -2029,10 +2029,10 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf )
xub_Unicode nCh;
// Bei Pairkerning waechst der Printereinfluss auf die Positionierung
- USHORT nMul = 3;
+ sal_uInt16 nMul = 3;
if ( pPrtFont->GetKerning() )
nMul = 1;
- const USHORT nDiv = nMul+1;
+ const sal_uInt16 nDiv = nMul+1;
for( xub_StrLen i=1; i<nCnt; i++ )
{
nCh = rInf.GetText().GetChar( rInf.GetIdx() + i );
@@ -2070,7 +2070,7 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf )
rInf.GetIdx(), nLn );
rInf.SetKanaDiff( rInf.GetScriptInfo()->Compress( pKernArray,
rInf.GetIdx(), nLn, rInf.GetKanaComp(),
- (USHORT) aFont.GetSize().Height() ) );
+ (sal_uInt16) aFont.GetSize().Height() ) );
aTxtSize.Width() = pKernArray[ nLn - 1 ];
delete[] pKernArray;
}
@@ -2121,7 +2121,7 @@ xub_StrLen SwFntObj::GetCrsrOfst( SwDrawTextInfo &rInf )
const SwScriptInfo* pSI = rInf.GetScriptInfo();
if ( rInf.GetFont() && rInf.GetLen() )
{
- const BYTE nActual = rInf.GetFont()->GetActual();
+ const sal_uInt8 nActual = rInf.GetFont()->GetActual();
// Kana Compression
if ( SW_CJK == nActual && rInf.GetKanaComp() &&
@@ -2130,7 +2130,7 @@ xub_StrLen SwFntObj::GetCrsrOfst( SwDrawTextInfo &rInf )
{
pSI->Compress( pKernArray, rInf.GetIdx(), rInf.GetLen(),
rInf.GetKanaComp(),
- (USHORT) aFont.GetSize().Height() );
+ (sal_uInt16) aFont.GetSize().Height() );
}
// Asian Justification
@@ -2141,7 +2141,7 @@ xub_StrLen SwFntObj::GetCrsrOfst( SwDrawTextInfo &rInf )
if ( LANGUAGE_KOREAN != aLang && LANGUAGE_KOREAN_JOHAB != aLang )
{
long nSpaceSum = nSpaceAdd;
- for ( USHORT nI = 0; nI < rInf.GetLen(); ++nI )
+ for ( sal_uInt16 nI = 0; nI < rInf.GetLen(); ++nI )
{
pKernArray[ nI ] += nSpaceSum;
nSpaceSum += nSpaceAdd;
@@ -2195,17 +2195,17 @@ xub_StrLen SwFntObj::GetCrsrOfst( SwDrawTextInfo &rInf )
if ( pGrid && GRID_LINES_CHARS == pGrid->GetGridType() && pGrid->IsSnapToChars() )
{
const SwDoc* pDoc = rInf.GetShell()->GetDoc();
- const USHORT nGridWidth = GETGRIDWIDTH(pGrid, pDoc);
+ const sal_uInt16 nGridWidth = GETGRIDWIDTH(pGrid, pDoc);
long nWidthPerChar = pKernArray[ rInf.GetLen() - 1 ] / rInf.GetLen();
- ULONG i = nWidthPerChar ?
+ sal_uLong i = nWidthPerChar ?
( nWidthPerChar - 1 ) / nGridWidth + 1:
1;
nWidthPerChar = i * nGridWidth;
- nCnt = (USHORT)(rInf.GetOfst() / nWidthPerChar);
+ nCnt = (sal_uInt16)(rInf.GetOfst() / nWidthPerChar);
if ( 2 * ( rInf.GetOfst() - nCnt * nWidthPerChar ) > nWidthPerChar )
++nCnt;
@@ -2222,7 +2222,7 @@ xub_StrLen SwFntObj::GetCrsrOfst( SwDrawTextInfo &rInf )
if ( pGrid && GRID_LINES_CHARS == pGrid->GetGridType() && !pGrid->IsSnapToChars() )
{
- const USHORT nDefaultFontHeight = GetDefaultFontHeight( rInf );
+ const sal_uInt16 nDefaultFontHeight = GetDefaultFontHeight( rInf );
const SwDoc* pDoc = rInf.GetShell()->GetDoc();
long nGridWidthAdd = GETGRIDWIDTH(pGrid, pDoc);
@@ -2314,8 +2314,8 @@ xub_StrLen SwFntObj::GetCrsrOfst( SwDrawTextInfo &rInf )
|*************************************************************************/
SwFntAccess::SwFntAccess( const void* &rMagic,
- USHORT &rIndex, const void *pOwn, ViewShell *pSh,
- BOOL bCheck ) :
+ sal_uInt16 &rIndex, const void *pOwn, ViewShell *pSh,
+ sal_Bool bCheck ) :
SwCacheAccess( *pFntCache, rMagic, rIndex ),
pShell( pSh )
{
@@ -2332,12 +2332,12 @@ SwFntAccess::SwFntAccess( const void* &rMagic,
}
else
// Hier ist der Font nicht bekannt, muss also gesucht werden.
- bCheck = FALSE;
+ bCheck = sal_False;
{
OutputDevice* pOut = 0;
- USHORT nZoom = USHRT_MAX;
+ sal_uInt16 nZoom = USHRT_MAX;
// Get the reference device
if ( pSh )
@@ -2433,7 +2433,7 @@ xub_StrLen SwFont::GetTxtBreak( SwDrawTextInfo& rInf, long nTextWidth )
{
ChgFnt( rInf.GetShell(), rInf.GetOut() );
- const BOOL bCompress = rInf.GetKanaComp() && rInf.GetLen() &&
+ const sal_Bool bCompress = rInf.GetKanaComp() && rInf.GetLen() &&
SW_CJK == GetActual() &&
rInf.GetScriptInfo() &&
rInf.GetScriptInfo()->CountCompChg() &&
@@ -2442,10 +2442,10 @@ xub_StrLen SwFont::GetTxtBreak( SwDrawTextInfo& rInf, long nTextWidth )
ASSERT( !bCompress || ( rInf.GetScriptInfo() && rInf.GetScriptInfo()->
CountCompChg()), "Compression without info" );
- USHORT nTxtBreak = 0;
+ sal_uInt16 nTxtBreak = 0;
long nKern = 0;
- USHORT nLn = ( rInf.GetLen() == STRING_LEN ? rInf.GetText().Len()
+ sal_uInt16 nLn = ( rInf.GetLen() == STRING_LEN ? rInf.GetText().Len()
: rInf.GetLen() );
if ( rInf.GetFrm() && nLn && rInf.SnapToGrid() &&
@@ -2455,7 +2455,7 @@ xub_StrLen SwFont::GetTxtBreak( SwDrawTextInfo& rInf, long nTextWidth )
if ( pGrid && GRID_LINES_CHARS == pGrid->GetGridType() && pGrid->IsSnapToChars() )
{
const SwDoc* pDoc = rInf.GetShell()->GetDoc();
- const USHORT nGridWidth = GETGRIDWIDTH(pGrid, pDoc);
+ const sal_uInt16 nGridWidth = GETGRIDWIDTH(pGrid, pDoc);
sal_Int32* pKernArray = new sal_Int32[rInf.GetLen()];
rInf.GetOut().GetTextArray( rInf.GetText(), pKernArray,
@@ -2463,7 +2463,7 @@ xub_StrLen SwFont::GetTxtBreak( SwDrawTextInfo& rInf, long nTextWidth )
long nWidthPerChar = pKernArray[ rInf.GetLen() - 1 ] / rInf.GetLen();
- const ULONG i = nWidthPerChar ?
+ const sal_uLong i = nWidthPerChar ?
( nWidthPerChar - 1 ) / nGridWidth + 1:
1;
@@ -2488,7 +2488,7 @@ xub_StrLen SwFont::GetTxtBreak( SwDrawTextInfo& rInf, long nTextWidth )
GETGRID( rInf.GetFrm()->FindPageFrm() )
if ( pGrid && GRID_LINES_CHARS == pGrid->GetGridType() && !pGrid->IsSnapToChars() )
{
- const USHORT nDefaultFontHeight = GetDefaultFontHeight( rInf );
+ const sal_uInt16 nDefaultFontHeight = GetDefaultFontHeight( rInf );
const SwDoc* pDoc = rInf.GetShell()->GetDoc();
long nGridWidthAdd = GETGRIDWIDTH(pGrid, pDoc);
@@ -2593,7 +2593,7 @@ xub_StrLen SwFont::GetTxtBreak( SwDrawTextInfo& rInf, long nTextWidth )
rInf.GetOut().GetTextArray( rInf.GetText(), pKernArray,
rInf.GetIdx(), nLn );
if( rInf.GetScriptInfo()->Compress( pKernArray, rInf.GetIdx(), nLn,
- rInf.GetKanaComp(), (USHORT)GetHeight( nActual ) ) )
+ rInf.GetKanaComp(), (sal_uInt16)GetHeight( nActual ) ) )
{
long nKernAdd = nKern;
xub_StrLen nTmpBreak = nTxtBreak;
@@ -2660,7 +2660,7 @@ sal_Bool SwDrawTextInfo::ApplyAutoColor( Font* pFont )
/// OD 21.08.2002 #99657#
/// There is a user defined setting for the background, if there
/// is a background brush and its color is *not* "no fill"/"auto fill".
- if( GetFrm()->GetBackgroundBrush( pItem, pCol, aOrigBackRect, FALSE ) )
+ if( GetFrm()->GetBackgroundBrush( pItem, pCol, aOrigBackRect, sal_False ) )
{
if ( !pCol )
{