summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2014-07-22 17:14:17 +0200
committerMatteo Casalin <matteo.casalin@yahoo.com>2014-07-22 23:50:43 +0200
commit2a6b9c93af295a6746372bc6ce462a02492f616d (patch)
tree743607c6395ab97935c5110a137521c5f734c8c5
parent1a6bc665eb727763265483132db43aee87288deb (diff)
Massive KSHORT/MSHORT to sal_uInt16
Change-Id: I82a899ef0cad19d62c41753ffdce07d8e33d6c9d
-rw-r--r--sw/source/core/access/accportions.cxx2
-rw-r--r--sw/source/core/access/accportions.hxx2
-rw-r--r--sw/source/core/inc/SwPortionHandler.hxx2
-rw-r--r--sw/source/core/inc/txtfly.hxx8
-rw-r--r--sw/source/core/inc/txttypes.hxx8
-rw-r--r--sw/source/core/text/frmcrsr.cxx20
-rw-r--r--sw/source/core/text/frmform.cxx16
-rw-r--r--sw/source/core/text/frminf.cxx4
-rw-r--r--sw/source/core/text/frmpaint.cxx12
-rw-r--r--sw/source/core/text/guess.cxx4
-rw-r--r--sw/source/core/text/guess.hxx6
-rw-r--r--sw/source/core/text/inftxt.cxx12
-rw-r--r--sw/source/core/text/inftxt.hxx56
-rw-r--r--sw/source/core/text/itradj.cxx32
-rw-r--r--sw/source/core/text/itratr.cxx12
-rw-r--r--sw/source/core/text/itratr.hxx4
-rw-r--r--sw/source/core/text/itrcrsr.cxx38
-rw-r--r--sw/source/core/text/itrform2.cxx64
-rw-r--r--sw/source/core/text/itrform2.hxx6
-rw-r--r--sw/source/core/text/itrpaint.cxx4
-rw-r--r--sw/source/core/text/itrtxt.cxx2
-rw-r--r--sw/source/core/text/itrtxt.hxx44
-rw-r--r--sw/source/core/text/noteurl.cxx8
-rw-r--r--sw/source/core/text/pordrop.hxx32
-rw-r--r--sw/source/core/text/porexp.cxx10
-rw-r--r--sw/source/core/text/porexp.hxx6
-rw-r--r--sw/source/core/text/porfld.cxx36
-rw-r--r--sw/source/core/text/porfld.hxx18
-rw-r--r--sw/source/core/text/porfly.cxx4
-rw-r--r--sw/source/core/text/porfly.hxx10
-rw-r--r--sw/source/core/text/porftn.hxx8
-rw-r--r--sw/source/core/text/porglue.cxx16
-rw-r--r--sw/source/core/text/porglue.hxx20
-rw-r--r--sw/source/core/text/porhyph.hxx6
-rw-r--r--sw/source/core/text/porlay.cxx18
-rw-r--r--sw/source/core/text/porlay.hxx6
-rw-r--r--sw/source/core/text/porlin.cxx22
-rw-r--r--sw/source/core/text/porlin.hxx26
-rw-r--r--sw/source/core/text/pormulti.cxx34
-rw-r--r--sw/source/core/text/pormulti.hxx14
-rw-r--r--sw/source/core/text/porref.cxx2
-rw-r--r--sw/source/core/text/porref.hxx4
-rw-r--r--sw/source/core/text/porrst.cxx20
-rw-r--r--sw/source/core/text/porrst.hxx10
-rw-r--r--sw/source/core/text/portab.hxx16
-rw-r--r--sw/source/core/text/portox.cxx2
-rw-r--r--sw/source/core/text/portox.hxx4
-rw-r--r--sw/source/core/text/portxt.cxx12
-rw-r--r--sw/source/core/text/portxt.hxx10
-rw-r--r--sw/source/core/text/possiz.hxx28
-rw-r--r--sw/source/core/text/redlnitr.cxx12
-rw-r--r--sw/source/core/text/redlnitr.hxx2
-rw-r--r--sw/source/core/text/txtcache.cxx14
-rw-r--r--sw/source/core/text/txtdrop.cxx58
-rw-r--r--sw/source/core/text/txtfld.cxx6
-rw-r--r--sw/source/core/text/txtfly.cxx28
-rw-r--r--sw/source/core/text/txtfrm.cxx46
-rw-r--r--sw/source/core/text/txtftn.cxx22
-rw-r--r--sw/source/core/text/txthyph.cxx10
-rw-r--r--sw/source/core/text/txttab.cxx42
-rw-r--r--sw/source/core/text/widorp.cxx8
-rw-r--r--sw/source/core/text/widorp.hxx6
-rw-r--r--sw/source/core/text/wrong.cxx14
-rw-r--r--sw/source/core/text/xmldump.cxx2
64 files changed, 511 insertions, 519 deletions
diff --git a/sw/source/core/access/accportions.cxx b/sw/source/core/access/accportions.cxx
index 0f402a242d7b..1928903471c5 100644
--- a/sw/source/core/access/accportions.cxx
+++ b/sw/source/core/access/accportions.cxx
@@ -228,7 +228,7 @@ void SwAccessiblePortionData::Special(
bLastIsSpecial = true;
}
-void SwAccessiblePortionData::LineBreak(KSHORT /*nWidth*/)
+void SwAccessiblePortionData::LineBreak(sal_uInt16 /*nWidth*/)
{
OSL_ENSURE( !bFinished, "We are already done!" );
diff --git a/sw/source/core/access/accportions.hxx b/sw/source/core/access/accportions.hxx
index 0ceab1a7e48a..ff7b8ca66e95 100644
--- a/sw/source/core/access/accportions.hxx
+++ b/sw/source/core/access/accportions.hxx
@@ -99,7 +99,7 @@ public:
// SwPortionHandler methods
virtual void Text(sal_uInt16 nLength, sal_uInt16 nType, sal_Int32 nHeight = 0, sal_Int32 nWidth = 0) SAL_OVERRIDE;
virtual void Special(sal_uInt16 nLength, const OUString& rText, sal_uInt16 nType, sal_Int32 nHeight = 0, sal_Int32 nWidth = 0) SAL_OVERRIDE;
- virtual void LineBreak(KSHORT nWidth) SAL_OVERRIDE;
+ virtual void LineBreak(sal_uInt16 nWidth) SAL_OVERRIDE;
virtual void Skip(sal_uInt16 nLength) SAL_OVERRIDE;
virtual void Finish() SAL_OVERRIDE;
diff --git a/sw/source/core/inc/SwPortionHandler.hxx b/sw/source/core/inc/SwPortionHandler.hxx
index c30498cf94e7..a4d56c113885 100644
--- a/sw/source/core/inc/SwPortionHandler.hxx
+++ b/sw/source/core/inc/SwPortionHandler.hxx
@@ -75,7 +75,7 @@ public:
/** line break. This method is called whenever a line break in the
* layout occurs.
*/
- virtual void LineBreak(KSHORT nWidth) = 0;
+ virtual void LineBreak(sal_uInt16 nWidth) = 0;
/** skip characters. The SwTxtFrame may only display partially
* display a certain paragraph (e.g. when the paragaph is split
diff --git a/sw/source/core/inc/txtfly.hxx b/sw/source/core/inc/txtfly.hxx
index 4ff7c5703573..9352755b404b 100644
--- a/sw/source/core/inc/txtfly.hxx
+++ b/sw/source/core/inc/txtfly.hxx
@@ -59,7 +59,7 @@ class SwContourCache
const SdrObject *pSdrObj[ POLY_CNT ];
TextRanger *pTextRanger[ POLY_CNT ];
long nPntCnt;
- MSHORT nObjCnt;
+ sal_uInt16 nObjCnt;
const SwRect ContourRect( const SwFmt* pFmt, const SdrObject* pObj,
const SwTxtFrm* pFrm, const SwRect &rLine, const long nXPos,
const bool bRight );
@@ -67,9 +67,9 @@ class SwContourCache
public:
SwContourCache();
~SwContourCache();
- const SdrObject* GetObject( MSHORT nPos ) const{ return pSdrObj[ nPos ]; }
- MSHORT GetCount() const { return nObjCnt; }
- void ClrObject( MSHORT nPos );
+ const SdrObject* GetObject( sal_uInt16 nPos ) const{ return pSdrObj[ nPos ]; }
+ sal_uInt16 GetCount() const { return nObjCnt; }
+ void ClrObject( sal_uInt16 nPos );
/**
Computes the rectangle that will cover the object in the given line.
diff --git a/sw/source/core/inc/txttypes.hxx b/sw/source/core/inc/txttypes.hxx
index c835b6bfd7b0..1dd5bff630fe 100644
--- a/sw/source/core/inc/txttypes.hxx
+++ b/sw/source/core/inc/txttypes.hxx
@@ -21,14 +21,6 @@
#include "swtypes.hxx"
-// Ueberpruefte USHORTs, z.B. Indizes auf Arrays oder garantiert kleine
-// Integerwerte, auch von aussen vorgegebene
-#define MSHORT sal_uInt16
-#define MSHRT_MAX USHRT_MAX
-// Koordinaten: Breite, Hoehe und Offsets in X-/Y-Richtung sowie Ascent etc.
-#define KSHORT sal_uInt16
-#define KSHRT_MAX USHRT_MAX
-
// Portiontypen
#define POR_LIN 0x0000
#define POR_FLYCNT 0x0001
diff --git a/sw/source/core/text/frmcrsr.cxx b/sw/source/core/text/frmcrsr.cxx
index 0aecaab906f3..c02754c8d2eb 100644
--- a/sw/source/core/text/frmcrsr.cxx
+++ b/sw/source/core/text/frmcrsr.cxx
@@ -527,8 +527,8 @@ struct SwFillData
long Right() const { return aFrm.Right(); }
long Bottom() const { return aFrm.Bottom(); }
SwFillCrsrPos &Fill() const { return *pCMS->pFill; }
- void SetTab( MSHORT nNew ) { pCMS->pFill->nTabCnt = nNew; }
- void SetSpace( MSHORT nNew ) { pCMS->pFill->nSpaceCnt = nNew; }
+ void SetTab( sal_uInt16 nNew ) { pCMS->pFill->nTabCnt = nNew; }
+ void SetSpace( sal_uInt16 nNew ) { pCMS->pFill->nSpaceCnt = nNew; }
void SetOrient( const sal_Int16 eNew ){ pCMS->pFill->eOrient = eNew; }
};
@@ -651,7 +651,7 @@ bool SwTxtFrm::_GetCrsrOfst(SwPosition* pPos, const Point& rPoint,
bool SwTxtFrm::GetCrsrOfst(SwPosition* pPos, Point& rPoint,
SwCrsrMoveState* pCMS, bool ) const
{
- MSHORT nChgFrm = 2;
+ sal_uInt16 nChgFrm = 2;
if( pCMS )
{
if( MV_UPDOWN == pCMS->eState )
@@ -1302,7 +1302,7 @@ void SwTxtFrm::FillCrsrPos( SwFillData& rFill ) const
(SwColumnFrm*)GetUpper()->GetUpper()->GetUpper()->Lower(); // The 1st column
// The first SwFrm in BodyFrm of the first column
const SwFrm* pFrm = ((SwLayoutFrm*)pTmp->Lower())->Lower();
- MSHORT nNextCol = 0;
+ sal_uInt16 nNextCol = 0;
// In which column do we end up in?
while( rFill.X() > pTmp->Frm().Right() && pTmp->GetNext() )
{
@@ -1356,7 +1356,7 @@ void SwTxtFrm::FillCrsrPos( SwFillData& rFill ) const
}
SwFont *pFnt;
SwTxtFmtColl* pColl = GetTxtNode()->GetTxtColl();
- MSHORT nFirst = GetTxtNode()->GetSwAttrSet().GetULSpace().GetLower();
+ sal_uInt16 nFirst = GetTxtNode()->GetSwAttrSet().GetULSpace().GetLower();
SwTwips nDiff = rFill.Y() - Frm().Bottom();
if( nDiff < nFirst )
nDiff = -1;
@@ -1494,7 +1494,7 @@ void SwTxtFrm::FillCrsrPos( SwFillData& rFill ) const
{
nIndent /= nSpace;
nIndent *= nSpace;
- rFill.SetTab( MSHORT( nIndent ) );
+ rFill.SetTab( sal_uInt16( nIndent ) );
rRect.Left( nIndent + rFill.Left() );
}
else
@@ -1508,9 +1508,9 @@ void SwTxtFrm::FillCrsrPos( SwFillData& rFill ) const
rFill.nLineWidth += rFill.bFirstLine ? nLeft : nTxtLeft;
SwTwips nLeftTab = nLeft;
SwTwips nRightTab = nLeft;
- MSHORT nSpaceCnt = 0;
- MSHORT nTabCnt = 0;
- MSHORT nIdx = 0;
+ sal_uInt16 nSpaceCnt = 0;
+ sal_uInt16 nTabCnt = 0;
+ sal_uInt16 nIdx = 0;
do
{
nLeftTab = nRightTab;
@@ -1530,7 +1530,7 @@ void SwTxtFrm::FillCrsrPos( SwFillData& rFill ) const
const SvxTabStopItem& rTab =
(const SvxTabStopItem &)pSet->
GetPool()->GetDefaultItem( RES_PARATR_TABSTOP );
- MSHORT nDefTabDist = (MSHORT)rTab[0].GetTabPos();
+ sal_uInt16 nDefTabDist = (sal_uInt16)rTab[0].GetTabPos();
nRightTab = nLeftTab - nTxtLeft;
nRightTab /= nDefTabDist;
nRightTab = nRightTab * nDefTabDist + nTxtLeft;
diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx
index 9796be72215b..8df90fedc228 100644
--- a/sw/source/core/text/frmform.cxx
+++ b/sw/source/core/text/frmform.cxx
@@ -55,14 +55,14 @@
class FormatLevel
{
- static MSHORT nLevel;
+ static sal_uInt16 nLevel;
public:
inline FormatLevel() { ++nLevel; }
inline ~FormatLevel() { --nLevel; }
- inline MSHORT GetLevel() const { return nLevel; }
+ inline sal_uInt16 GetLevel() const { return nLevel; }
static bool LastLevel() { return 10 < nLevel; }
};
-MSHORT FormatLevel::nLevel = 0;
+sal_uInt16 FormatLevel::nLevel = 0;
void ValidateTxt( SwFrm *pFrm ) // Friend of frame
{
@@ -1114,8 +1114,8 @@ bool SwTxtFrm::FormatLine( SwTxtFormatter &rLine, const bool bPrev )
SwParaPortion *pPara = rLine.GetInfo().GetParaPortion();
const SwLineLayout *pOldCur = rLine.GetCurr();
const sal_Int32 nOldLen = pOldCur->GetLen();
- const KSHORT nOldAscent = pOldCur->GetAscent();
- const KSHORT nOldHeight = pOldCur->Height();
+ const sal_uInt16 nOldAscent = pOldCur->GetAscent();
+ const sal_uInt16 nOldHeight = pOldCur->Height();
const SwTwips nOldWidth = pOldCur->Width() + pOldCur->GetHangingMargin();
const bool bOldHyph = pOldCur->IsEndHyph();
SwTwips nOldTop = 0;
@@ -1575,7 +1575,7 @@ void SwTxtFrm::FormatOnceMore( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf )
return;
// If necessary the pPara
- KSHORT nOld = ((const SwTxtMargin&)rLine).GetDropHeight();
+ sal_uInt16 nOld = ((const SwTxtMargin&)rLine).GetDropHeight();
bool bShrink = false;
bool bGrow = false;
bool bGoOn = rLine.IsOnceMore();
@@ -1594,7 +1594,7 @@ void SwTxtFrm::FormatOnceMore( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf )
bGoOn = rLine.IsOnceMore();
if( bGoOn )
{
- const KSHORT nNew = ((const SwTxtMargin&)rLine).GetDropHeight();
+ const sal_uInt16 nNew = ((const SwTxtMargin&)rLine).GetDropHeight();
if( nOld == nNew )
bGoOn = false;
else
@@ -1869,7 +1869,7 @@ bool SwTxtFrm::FormatQuick( bool bForceQuickFormat )
const SwTwips nDbgY = Frm().Top();
(void)nDbgY;
// nStopAt allows CV to alter it
- static MSHORT nStopAt = 0;
+ static sal_uInt16 nStopAt = 0;
if( nStopAt == GetFrmId() )
{
int i = GetFrmId();
diff --git a/sw/source/core/text/frminf.cxx b/sw/source/core/text/frminf.cxx
index fe7aea58cc02..e679cbdd9df2 100644
--- a/sw/source/core/text/frminf.cxx
+++ b/sw/source/core/text/frminf.cxx
@@ -79,7 +79,7 @@ bool SwTxtFrmInfo::IsFilled( const sal_uInt8 nPercent ) const
long nWidth = pFrm->Prt().Width();
nWidth *= nPercent;
nWidth /= 100;
- return KSHORT(nWidth) <= pLay->Width();
+ return sal_uInt16(nWidth) <= pLay->Width();
}
// Where does the text start (without whitespace)? (document global)
@@ -193,7 +193,7 @@ void SwTxtFrmInfo::GetSpaces( SwPaM &rPam, bool bWithLineBreak ) const
if( nPos < aLine.GetEnd() )
{
- MSHORT nOff = !bWithLineBreak && CH_BREAK ==
+ sal_uInt16 nOff = !bWithLineBreak && CH_BREAK ==
aLine.GetInfo().GetChar( aLine.GetEnd() - 1 )
? 1 : 0;
pPam = AddPam( pPam, pFrm, nPos, aLine.GetEnd() - nPos - nOff );
diff --git a/sw/source/core/text/frmpaint.cxx b/sw/source/core/text/frmpaint.cxx
index cccdaf87d5a3..06f08b5b297d 100644
--- a/sw/source/core/text/frmpaint.cxx
+++ b/sw/source/core/text/frmpaint.cxx
@@ -69,7 +69,7 @@ class SwExtraPainter
SwTwips nX;
SwTwips nRedX;
sal_uLong nLineNr;
- MSHORT nDivider;
+ sal_uInt16 nDivider;
bool bGoLeft;
bool bLineNum;
inline bool IsClipChg() { return aClip.IsChg(); }
@@ -110,7 +110,7 @@ SwExtraPainter::SwExtraPainter( const SwTxtFrm *pFrm, SwViewShell *pVwSh,
if( aRect.Bottom() > nBottom )
aRect.Bottom( nBottom );
}
- MSHORT nVirtPageNum = 0;
+ sal_uInt16 nVirtPageNum = 0;
if( bLineNum )
{
/* Initializes the Members necessary for line numbering:
@@ -371,7 +371,7 @@ void SwTxtFrm::PaintExtraData( const SwRect &rRect ) const
if( bLineNum &&
( aExtra.HasNumber() || aExtra.HasDivider() ) )
{
- KSHORT nTmpHeight, nTmpAscent;
+ sal_uInt16 nTmpHeight, nTmpAscent;
aLine.CalcAscentAndHeight( nTmpAscent, nTmpHeight );
aExtra.PaintExtra( aLine.Y(), nTmpAscent,
nTmpHeight, bRed );
@@ -387,7 +387,7 @@ void SwTxtFrm::PaintExtraData( const SwRect &rRect ) const
}
else
{
- if ( MSHRT_MAX == pIDRA->GetRedlinePos(rTxtNode, USHRT_MAX) )
+ if ( USHRT_MAX == pIDRA->GetRedlinePos(rTxtNode, USHRT_MAX) )
bRedLine = false;
if( bLineNum && rLineInf.IsCountBlankLines() &&
@@ -485,8 +485,8 @@ bool SwTxtFrm::PaintEmpty( const SwRect &rRect, bool bCheck ) const
const IDocumentRedlineAccess* pIDRA = rTxtNode.getIDocumentRedlineAccess();
if( IDocumentRedlineAccess::IsShowChanges( pIDRA->GetRedlineMode() ) )
{
- MSHORT nRedlPos = pIDRA->GetRedlinePos( rTxtNode, USHRT_MAX );
- if( MSHRT_MAX != nRedlPos )
+ sal_uInt16 nRedlPos = pIDRA->GetRedlinePos( rTxtNode, USHRT_MAX );
+ if( USHRT_MAX != nRedlPos )
{
SwAttrHandler aAttrHandler;
aAttrHandler.Init( rTxtNode.GetSwAttrSet(),
diff --git a/sw/source/core/text/guess.cxx b/sw/source/core/text/guess.cxx
index 459ba53d053c..44deb6a36a68 100644
--- a/sw/source/core/text/guess.cxx
+++ b/sw/source/core/text/guess.cxx
@@ -46,7 +46,7 @@ using namespace ::com::sun::star::linguistic2;
// returns true if no line break has to be performed
// otherwise possible break or hyphenation position is determined
bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
- const KSHORT nPorHeight )
+ const sal_uInt16 nPorHeight )
{
nCutPos = rInf.GetIdx();
@@ -81,7 +81,7 @@ bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
if( !nMaxLen )
return false;
- KSHORT nItalic = 0;
+ sal_uInt16 nItalic = 0;
if( ITALIC_NONE != rInf.GetFont()->GetItalic() && !rInf.NotEOL() )
{
bool bAddItalic = true;
diff --git a/sw/source/core/text/guess.hxx b/sw/source/core/text/guess.hxx
index 3b489d930bf7..6cba5a4aca94 100644
--- a/sw/source/core/text/guess.hxx
+++ b/sw/source/core/text/guess.hxx
@@ -35,7 +35,7 @@ class SwTxtGuess
sal_Int32 nBreakPos; // start index of break position
sal_Int32 nFieldDiff; // absolut positions can be wrong if we
// a field in the text has been expanded
- KSHORT nBreakWidth; // width of the broken portion
+ sal_uInt16 nBreakWidth; // width of the broken portion
public:
inline SwTxtGuess(): pHanging( NULL ), nCutPos(0), nBreakStart(0),
nBreakPos(0), nFieldDiff(0), nBreakWidth(0)
@@ -44,12 +44,12 @@ public:
// true, if current portion still fits to current line
bool Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
- const KSHORT nHeight );
+ const sal_uInt16 nHeight );
bool AlternativeSpelling( const SwTxtFormatInfo &rInf, const sal_Int32 nPos );
inline SwHangingPortion* GetHangingPortion() const { return pHanging; }
inline void ClearHangingPortion() { pHanging = NULL; }
- inline KSHORT BreakWidth() const { return nBreakWidth; }
+ inline sal_uInt16 BreakWidth() const { return nBreakWidth; }
inline sal_Int32 CutPos() const { return nCutPos; }
inline sal_Int32 BreakStart() const { return nBreakStart; }
inline sal_Int32 BreakPos() const {return nBreakPos; }
diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx
index a1edc44ede24..2a89571683c2 100644
--- a/sw/source/core/text/inftxt.cxx
+++ b/sw/source/core/text/inftxt.cxx
@@ -149,7 +149,7 @@ void SwLineInfo::CtorInitLineInfo( const SwAttrSet& rAttrSet,
pSpace = &rAttrSet.GetLineSpacing();
nVertAlign = rAttrSet.GetParaVertAlign().GetValue();
- nDefTabStop = MSHRT_MAX;
+ nDefTabStop = USHRT_MAX;
}
void SwTxtInfo::CtorInitTxtInfo( SwTxtFrm *pFrm )
@@ -919,7 +919,7 @@ void SwTxtPaintInfo::DrawSpecial(const SwLinePortion &rPor, sal_Unicode cChar, c
{
if( OnWin() )
{
- KSHORT nOldWidth = rPor.Width();
+ sal_uInt16 nOldWidth = rPor.Width();
OUString sChar( cChar );
SwPosSize aSize( GetTxtSize( sChar ) );
@@ -959,7 +959,7 @@ void SwTxtPaintInfo::DrawLineBreak( const SwLinePortion &rPor ) const
{
if( OnWin() )
{
- KSHORT nOldWidth = rPor.Width();
+ sal_uInt16 nOldWidth = rPor.Width();
((SwLinePortion&)rPor).Width( LINE_BREAK_WIDTH );
SwRect aRect;
@@ -1207,7 +1207,7 @@ void SwTxtPaintInfo::DrawBorder( const SwLinePortion &rPor ) const
}
void SwTxtPaintInfo::DrawViewOpt( const SwLinePortion &rPor,
- const MSHORT nWhich ) const
+ const sal_uInt16 nWhich ) const
{
if( OnWin() && !IsMulti() )
{
@@ -1455,7 +1455,7 @@ SwTxtFormatInfo::SwTxtFormatInfo( const SwTxtFormatInfo& rInf,
nLeft = rInf.nLeft;
nRight = rInf.nRight;
nFirst = rInf.nLeft;
- nRealWidth = KSHORT(nActWidth);
+ nRealWidth = sal_uInt16(nActWidth);
nWidth = nRealWidth;
nLineHeight = 0;
nLineNettoHeight = 0;
@@ -1492,7 +1492,7 @@ SwTxtFormatInfo::SwTxtFormatInfo( const SwTxtFormatInfo& rInf,
bool SwTxtFormatInfo::_CheckFtnPortion( SwLineLayout* pCurr )
{
- const KSHORT nHeight = pCurr->GetRealHeight();
+ const sal_uInt16 nHeight = pCurr->GetRealHeight();
for( SwLinePortion *pPor = pCurr->GetPortion(); pPor; pPor = pPor->GetPortion() )
{
if( pPor->IsFtnPortion() && nHeight > ((SwFtnPortion*)pPor)->Orig() )
diff --git a/sw/source/core/text/inftxt.hxx b/sw/source/core/text/inftxt.hxx
index 5364cd7d841e..d0b4c065523f 100644
--- a/sw/source/core/text/inftxt.hxx
+++ b/sw/source/core/text/inftxt.hxx
@@ -78,7 +78,7 @@ class SwLineInfo
SvxTabStopItem* pRuler;
const SvxLineSpacingItem *pSpace;
sal_uInt16 nVertAlign;
- KSHORT nDefTabStop;
+ sal_uInt16 nDefTabStop;
bool bListTabStopIncluded;
long nListTabStopPosition;
@@ -92,8 +92,8 @@ public:
const SvxTabStop *GetTabStop( const SwTwips nSearchPos,
const SwTwips nRight ) const;
inline const SvxLineSpacingItem *GetLineSpacing() const { return pSpace; }
- inline KSHORT GetDefTabStop() const { return nDefTabStop; }
- inline void SetDefTabStop( KSHORT nNew ) const
+ inline sal_uInt16 GetDefTabStop() const { return nDefTabStop; }
+ inline void SetDefTabStop( sal_uInt16 nNew ) const
{ ( (SwLineInfo*)this )->nDefTabStop = nNew; }
// vertical alignment
@@ -288,7 +288,7 @@ public:
inline sal_Unicode GetChar( const sal_Int32 nPos ) const
{ if (m_pTxt && nPos < m_pTxt->getLength()) return (*m_pTxt)[ nPos ]; return 0; }
- KSHORT GetTxtHeight() const;
+ sal_uInt16 GetTxtHeight() const;
SwPosSize GetTxtSize( OutputDevice* pOut, const SwScriptInfo* pSI,
const OUString& rTxt, const sal_Int32 nIdx,
@@ -309,7 +309,7 @@ public:
const sal_uInt16 nComp,
sal_Int32& rExtraCharPos ) const;
- KSHORT GetAscent() const;
+ sal_uInt16 GetAscent() const;
inline sal_Int32 GetIdx() const { return m_nIdx; }
inline void SetIdx( const sal_Int32 nNew ) { m_nIdx = nNew; }
@@ -362,9 +362,9 @@ public:
// Feature: Kana Compression
- inline MSHORT GetKanaIdx() const { return m_nKanaIdx; }
+ inline sal_uInt16 GetKanaIdx() const { return m_nKanaIdx; }
inline void ResetKanaIdx(){ m_nKanaIdx = 0; }
- inline void SetKanaIdx( MSHORT nNew ) { m_nKanaIdx = nNew; }
+ inline void SetKanaIdx( sal_uInt16 nNew ) { m_nKanaIdx = nNew; }
inline void IncKanaIdx() { ++m_nKanaIdx; }
inline void SetKanaComp( std::deque<sal_uInt16> *pNew ){ m_pKanaComp = pNew; }
inline std::deque<sal_uInt16>* GetpKanaComp() const { return m_pKanaComp; }
@@ -389,7 +389,7 @@ class SwTxtPaintInfo : public SwTxtSizeInfo
Point aPos; // Paint position
SwRect aPaintRect; // Original paint rect (from Layout paint)
- MSHORT nSpaceIdx;
+ sal_uInt16 nSpaceIdx;
void _DrawText( const OUString &rText, const SwLinePortion &rPor,
const sal_Int32 nIdx, const sal_Int32 nLen,
const bool bKern, const bool bWrong = false,
@@ -455,7 +455,7 @@ public:
void DrawRedArrow( const SwLinePortion &rPor ) const;
void DrawPostIts( const SwLinePortion &rPor, bool bScript ) const;
void DrawBackground( const SwLinePortion &rPor ) const;
- void DrawViewOpt( const SwLinePortion &rPor, const MSHORT nWhich ) const;
+ void DrawViewOpt( const SwLinePortion &rPor, const sal_uInt16 nWhich ) const;
void DrawBackBrush( const SwLinePortion &rPor ) const;
/**
@@ -493,9 +493,9 @@ public:
// STUFF FOR JUSTIFIED ALIGNMENT
- inline MSHORT GetSpaceIdx() const { return nSpaceIdx; }
+ inline sal_uInt16 GetSpaceIdx() const { return nSpaceIdx; }
inline void ResetSpaceIdx(){nSpaceIdx = 0; }
- inline void SetSpaceIdx( MSHORT nNew ) { nSpaceIdx = nNew; }
+ inline void SetSpaceIdx( sal_uInt16 nNew ) { nSpaceIdx = nNew; }
inline void IncSpaceIdx() { ++nSpaceIdx; }
inline void RemoveFirstSpaceAdd() { pSpaceAdd->erase( pSpaceAdd->begin() ); }
inline long GetSpaceAdd() const
@@ -536,11 +536,11 @@ class SwTxtFormatInfo : public SwTxtPaintInfo
SwTwips nLeft; // Left margin
SwTwips nRight; // Right margin
SwTwips nFirst; // EZE
- KSHORT nRealWidth; // "real" line width
- KSHORT nWidth; // "virtual" line width
- KSHORT nLineHeight; // Final height after CalcLine
- KSHORT nLineNettoHeight; // line height without spacing
- KSHORT nForcedLeftMargin; // Shift of left margin due to frame
+ sal_uInt16 nRealWidth; // "real" line width
+ sal_uInt16 nWidth; // "virtual" line width
+ sal_uInt16 nLineHeight; // Final height after CalcLine
+ sal_uInt16 nLineNettoHeight; // line height without spacing
+ sal_uInt16 nForcedLeftMargin; // Shift of left margin due to frame
sal_Int16 nMinLeading; // minimum number of chars before hyphenation point
sal_Int16 nMinTrailing; // minimum number of chars after hyphenation point
@@ -588,8 +588,8 @@ public:
SwTxtFormatInfo( const SwTxtFormatInfo& rInf, SwLineLayout& rLay,
SwTwips nActWidth );
- inline KSHORT Width() const { return nWidth; }
- inline void Width( const KSHORT nNew ) { nWidth = nNew; }
+ inline sal_uInt16 Width() const { return nWidth; }
+ inline void Width( const sal_uInt16 nNew ) { nWidth = nNew; }
void Init();
// Returns the first changed position of the paragraph
@@ -602,10 +602,10 @@ public:
inline void Right( const SwTwips nNew ) { nRight = nNew; }
inline SwTwips First() const { return nFirst; }
inline void First( const SwTwips nNew ) { nFirst = nNew; }
- inline KSHORT RealWidth() const { return nRealWidth; }
- inline void RealWidth( const KSHORT nNew ) { nRealWidth = nNew; }
- inline KSHORT ForcedLeftMargin() const { return nForcedLeftMargin; }
- inline void ForcedLeftMargin( const KSHORT nN ) { nForcedLeftMargin = nN; }
+ inline sal_uInt16 RealWidth() const { return nRealWidth; }
+ inline void RealWidth( const sal_uInt16 nNew ) { nRealWidth = nNew; }
+ inline sal_uInt16 ForcedLeftMargin() const { return nForcedLeftMargin; }
+ inline void ForcedLeftMargin( const sal_uInt16 nN ) { nForcedLeftMargin = nN; }
inline sal_uInt8 &MaxHyph() { return nMaxHyph; }
inline const sal_uInt8 &MaxHyph() const { return nMaxHyph; }
@@ -650,10 +650,10 @@ public:
inline void SetLineStart( const sal_Int32 nNew ) { nLineStart = nNew; }
// these are used during fly calculation
- inline KSHORT GetLineHeight() const { return nLineHeight; }
- inline void SetLineHeight( const KSHORT nNew ) { nLineHeight = nNew; }
- inline KSHORT GetLineNettoHeight() const { return nLineNettoHeight; }
- inline void SetLineNettoHeight( const KSHORT nNew ) { nLineNettoHeight = nNew; }
+ inline sal_uInt16 GetLineHeight() const { return nLineHeight; }
+ inline void SetLineHeight( const sal_uInt16 nNew ) { nLineHeight = nNew; }
+ inline sal_uInt16 GetLineNettoHeight() const { return nLineNettoHeight; }
+ inline void SetLineNettoHeight( const sal_uInt16 nNew ) { nLineNettoHeight = nNew; }
inline const SwLinePortion *GetUnderflow() const { return pUnderflow; }
inline SwLinePortion *GetUnderflow() { return pUnderflow; }
@@ -766,14 +766,14 @@ public:
~SwFontSave();
};
-inline KSHORT SwTxtSizeInfo::GetAscent() const
+inline sal_uInt16 SwTxtSizeInfo::GetAscent() const
{
SAL_WARN_IF( !GetOut(), "sw.core", "SwTxtSizeInfo::GetAscent() without m_pOut" );
return ((SwFont*)GetFont())->GetAscent( m_pVsh, *GetOut() );
}
-inline KSHORT SwTxtSizeInfo::GetTxtHeight() const
+inline sal_uInt16 SwTxtSizeInfo::GetTxtHeight() const
{
SAL_WARN_IF( !GetOut(), "sw.core", "SwTxtSizeInfo::GetTxtHeight() without m_pOut" );
diff --git a/sw/source/core/text/itradj.cxx b/sw/source/core/text/itradj.cxx
index b2ad8a232166..82fb1a7c63e3 100644
--- a/sw/source/core/text/itradj.cxx
+++ b/sw/source/core/text/itradj.cxx
@@ -258,7 +258,7 @@ void SwTxtAdjuster::CalcNewBlock( SwLineLayout *pCurrent,
pCurrent->InitSpaceAdd();
sal_Int32 nGluePortion = 0;
sal_Int32 nCharCnt = 0;
- MSHORT nSpaceIdx = 0;
+ sal_uInt16 nSpaceIdx = 0;
// i60591: hennerdrews
SwScriptInfo& rSI = GetInfo().GetParaPortion()->GetScriptInfo();
@@ -404,7 +404,7 @@ SwTwips SwTxtAdjuster::CalcKanaAdj( SwLineLayout* pCurrent )
pCurrent->SetKanaComp( pNewKana );
const sal_uInt16 nNull = 0;
- MSHORT nKanaIdx = 0;
+ sal_uInt16 nKanaIdx = 0;
long nKanaDiffSum = 0;
SwTwips nRepaintOfst = 0;
SwTwips nX = 0;
@@ -544,7 +544,7 @@ SwMarginPortion *SwTxtAdjuster::CalcRightMargin( SwLineLayout *pCurrent,
const sal_uInt16 nRealHeight = GetLineHeight();
const sal_uInt16 nLineHeight = pCurrent->Height();
- KSHORT nPrtWidth = pCurrent->PrtWidth();
+ sal_uInt16 nPrtWidth = pCurrent->PrtWidth();
SwLinePortion *pLast = pCurrent->FindLastPortion();
if( GetInfo().IsMulti() )
@@ -575,7 +575,7 @@ SwMarginPortion *SwTxtAdjuster::CalcRightMargin( SwLineLayout *pCurrent,
pLast->Append( pRight );
if( long( nPrtWidth )< nRealWidth )
- pRight->PrtWidth( KSHORT( nRealWidth - nPrtWidth ) );
+ pRight->PrtWidth( sal_uInt16( nRealWidth - nPrtWidth ) );
// pCurrent->Width() is set to the real size, because we attach the
// MarginPortions.
@@ -584,7 +584,7 @@ SwMarginPortion *SwTxtAdjuster::CalcRightMargin( SwLineLayout *pCurrent,
// implicitly. GetLeftMarginAdjust() and IsJustified() think they have a
// line filled with chars.
- pCurrent->PrtWidth( KSHORT( nRealWidth ) );
+ pCurrent->PrtWidth( sal_uInt16( nRealWidth ) );
return pRight;
}
@@ -698,7 +698,7 @@ SwFlyPortion *SwTxtAdjuster::CalcFlyPortion( const long nRealWidth,
{
SwTxtFly aTxtFly( GetTxtFrm() );
- const KSHORT nCurrWidth = pCurr->PrtWidth();
+ const sal_uInt16 nCurrWidth = pCurr->PrtWidth();
SwFlyPortion *pFlyPortion = 0;
SwRect aLineVert( rCurrRect );
@@ -725,12 +725,12 @@ SwFlyPortion *SwTxtAdjuster::CalcFlyPortion( const long nRealWidth,
aLocal.Left( nCurrWidth );
// If the rect is wider than the line, we adjust it to the right size
- KSHORT nLocalWidth = KSHORT( aLocal.Left() + aLocal.Width() );
+ sal_uInt16 nLocalWidth = sal_uInt16( aLocal.Left() + aLocal.Width() );
if( nRealWidth < long( nLocalWidth ) )
aLocal.Width( nRealWidth - aLocal.Left() );
GetInfo().GetParaPortion()->SetFly( true );
pFlyPortion = new SwFlyPortion( aLocal );
- pFlyPortion->Height( KSHORT( rCurrRect.Height() ) );
+ pFlyPortion->Height( sal_uInt16( rCurrRect.Height() ) );
// The Width could be smaller than the FixWidth, thus:
pFlyPortion->AdjFixWidth();
}
@@ -743,7 +743,7 @@ void SwTxtAdjuster::CalcDropAdjust()
OSL_ENSURE( 1<GetDropLines() && SVX_ADJUST_LEFT!=GetAdjust() && SVX_ADJUST_BLOCK!=GetAdjust(),
"CalcDropAdjust: No reason for DropAdjustment." );
- const MSHORT nLineNumber = GetLineNr();
+ const sal_uInt16 nLineNumber = GetLineNr();
// 1) Skip dummies
Top();
@@ -773,10 +773,10 @@ void SwTxtAdjuster::CalcDropAdjust()
if( pRight && pRight != pLeft )
{
// 5) Calculate nMinLeft. Who is the most to left?
- const KSHORT nDropLineStart =
- KSHORT(GetLineStart()) + pLeft->Width() + pDropPor->Width();
- KSHORT nMinLeft = nDropLineStart;
- for( MSHORT i = 1; i < GetDropLines(); ++i )
+ const sal_uInt16 nDropLineStart =
+ sal_uInt16(GetLineStart()) + pLeft->Width() + pDropPor->Width();
+ sal_uInt16 nMinLeft = nDropLineStart;
+ for( sal_uInt16 i = 1; i < GetDropLines(); ++i )
{
if( NextLine() )
{
@@ -790,8 +790,8 @@ void SwTxtAdjuster::CalcDropAdjust()
nMinLeft = 0;
else
{
- const KSHORT nLineStart =
- KSHORT(GetLineStart()) + pMar->Width();
+ const sal_uInt16 nLineStart =
+ sal_uInt16(GetLineStart()) + pMar->Width();
if( nMinLeft > nLineStart )
nMinLeft = nLineStart;
}
@@ -827,7 +827,7 @@ void SwTxtAdjuster::CalcDropRepaint()
SwRepaint &rRepaint = GetInfo().GetParaPortion()->GetRepaint();
if( rRepaint.Top() > Y() )
rRepaint.Top( Y() );
- for( MSHORT i = 1; i < GetDropLines(); ++i )
+ for( sal_uInt16 i = 1; i < GetDropLines(); ++i )
NextLine();
const SwTwips nBottom = Y() + GetLineHeight() - 1;
if( rRepaint.Bottom() < nBottom )
diff --git a/sw/source/core/text/itratr.cxx b/sw/source/core/text/itratr.cxx
index c808f43049f3..c6729f9bff10 100644
--- a/sw/source/core/text/itratr.cxx
+++ b/sw/source/core/text/itratr.cxx
@@ -149,7 +149,7 @@ bool SwAttrIter::SeekStartAndChgAttrIter( OutputDevice* pOut, const bool bParaFo
{
pRedln->Clear( pFnt );
if( !bParaFont )
- nChgCnt = nChgCnt + pRedln->Seek( *pFnt, 0, MSHRT_MAX );
+ nChgCnt = nChgCnt + pRedln->Seek( *pFnt, 0, USHRT_MAX );
else
pRedln->Reset();
}
@@ -438,7 +438,7 @@ static void lcl_MinMaxNode( SwFrmFmt* pNd, SwMinMaxNodeArgs* pIn )
{
long nMin, nMax;
SwHTMLTableLayout *pLayout = 0;
- MSHORT nWhich = pNd->Which();
+ sal_uInt16 nWhich = pNd->Which();
if( RES_DRAWFRMFMT != nWhich )
{
// Does the frame contain a table at the start or the end?
@@ -608,7 +608,7 @@ void SwTxtNode::GetMinMaxSize( sal_uLong nIndex, sal_uLong& rMin, sal_uLong &rMa
aIter.SeekAndChgAttrIter( nIdx, pOut );
sal_Int32 nLen = m_Text.getLength();
long nAktWidth = 0;
- MSHORT nAdd = 0;
+ sal_uInt16 nAdd = 0;
SwMinMaxArgs aArg( pOut, pSh, rMin, rMax, rAbsMin );
while( nIdx < nLen )
{
@@ -701,12 +701,12 @@ void SwTxtNode::GetMinMaxSize( sal_uLong nIndex, sal_uLong& rMin, sal_uLong &rMa
{
// This is a hack for the wollowing situation: In the paragraph there's a
// text frame with relative size. Then let's take 0.5 cm as minimum width
- // and KSHRT_MAX as maximum width
+ // and USHRT_MAX as maximum width
// It were cleaner and maybe necessary later on to iterate over the content
// of the text frame and call GetMinMaxSize recursively
nAktWidth = FLYINCNT_MIN_WIDTH; // 0.5 cm
- if( (long)rMax < KSHRT_MAX )
- rMax = KSHRT_MAX;
+ if( (long)rMax < USHRT_MAX )
+ rMax = USHRT_MAX;
}
else
nAktWidth = pFrmFmt->GetFrmSize().GetWidth();
diff --git a/sw/source/core/text/itratr.hxx b/sw/source/core/text/itratr.hxx
index 8e0323d6f60e..4d0c06a8b25b 100644
--- a/sw/source/core/text/itratr.hxx
+++ b/sw/source/core/text/itratr.hxx
@@ -48,14 +48,14 @@ protected:
private:
OutputDevice *pLastOut;
- MSHORT nChgCnt;
+ sal_uInt16 nChgCnt;
SwRedlineItr *pRedln;
size_t nStartIndex;
size_t nEndIndex;
sal_Int32 nPos;
sal_uInt8 nPropFont;
const void* aMagicNo[ SW_SCRIPTS ];
- MSHORT aFntIdx[ SW_SCRIPTS ];
+ sal_uInt16 aFntIdx[ SW_SCRIPTS ];
const SwTxtNode* m_pTxtNode;
void SeekFwd( const sal_Int32 nPos );
diff --git a/sw/source/core/text/itrcrsr.cxx b/sw/source/core/text/itrcrsr.cxx
index da2fc68e2ec9..eddda735b5ab 100644
--- a/sw/source/core/text/itrcrsr.cxx
+++ b/sw/source/core/text/itrcrsr.cxx
@@ -256,7 +256,7 @@ void SwTxtMargin::CtorInitTxtMargin( SwTxtFrm *pNewFrm, SwTxtSizeInfo *pNewInf )
break;
case SVX_LINE_SPACE_MIN:
{
- if( nFirstLineOfs < KSHORT( pSpace->GetLineHeight() ) )
+ if( nFirstLineOfs < sal_uInt16( pSpace->GetLineHeight() ) )
nFirstLineOfs = pSpace->GetLineHeight();
break;
}
@@ -281,7 +281,7 @@ void SwTxtMargin::CtorInitTxtMargin( SwTxtFrm *pNewFrm, SwTxtSizeInfo *pNewInf )
nTmp /= 100;
if( !nTmp )
++nTmp;
- nFirstLineOfs = (KSHORT)nTmp;
+ nFirstLineOfs = (sal_uInt16)nTmp;
break;
}
case SVX_INTER_LINE_SPACE_FIX:
@@ -416,14 +416,14 @@ bool SwTxtCursor::GetEndCharRect( SwRect* pOrig, const sal_Int32 nOfst,
// If necessary, as catch up, do the adjustment
GetAdjusted();
- KSHORT nX = 0;
- KSHORT nLast = 0;
+ sal_uInt16 nX = 0;
+ sal_uInt16 nLast = 0;
SwLinePortion *pPor = pCurr->GetFirstPortion();
- KSHORT nTmpHeight, nTmpAscent;
+ sal_uInt16 nTmpHeight, nTmpAscent;
CalcAscentAndHeight( nTmpAscent, nTmpHeight );
- KSHORT nPorHeight = nTmpHeight;
- KSHORT nPorAscent = nTmpAscent;
+ sal_uInt16 nPorHeight = nTmpHeight;
+ sal_uInt16 nPorAscent = nTmpAscent;
// Search for the last Text/EndPortion of the line
while( pPor )
@@ -473,7 +473,7 @@ void SwTxtCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst,
SwTxtSizeInfo aInf( GetInfo(), &aText, nStart );
if( GetPropFont() )
aInf.GetFont()->SetProportion( GetPropFont() );
- KSHORT nTmpAscent, nTmpHeight; // Line height
+ sal_uInt16 nTmpAscent, nTmpHeight; // Line height
CalcAscentAndHeight( nTmpAscent, nTmpHeight );
const Size aCharSize( 1, nTmpHeight );
const Point aCharPos;
@@ -499,15 +499,15 @@ void SwTxtCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst,
}
else
{
- KSHORT nPorHeight = nTmpHeight;
- KSHORT nPorAscent = nTmpAscent;
+ sal_uInt16 nPorHeight = nTmpHeight;
+ sal_uInt16 nPorAscent = nTmpAscent;
SwTwips nX = 0;
SwTwips nTmpFirst = 0;
SwLinePortion *pPor = pCurr->GetFirstPortion();
SwBidiPortion* pLastBidiPor = 0;
SwTwips nLastBidiPorWidth = 0;
std::deque<sal_uInt16>* pKanaComp = pCurr->GetpKanaComp();
- MSHORT nSpaceIdx = 0;
+ sal_uInt16 nSpaceIdx = 0;
size_t nKanaIdx = 0;
long nSpaceAdd = pCurr->IsSpaceAdd() ? pCurr->GetLLSpaceAdd( 0 ) : 0;
@@ -945,7 +945,7 @@ void SwTxtCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst,
SwFldPortion *pTmp = (SwFldPortion*)pPor;
while( pTmp->HasFollow() && pTmp->GetExp().isEmpty() )
{
- KSHORT nAddX = pTmp->Width();
+ sal_uInt16 nAddX = pTmp->Width();
SwLinePortion *pNext = pTmp->GetPortion();
while( pNext && !pNext->InFldGrp() )
{
@@ -1281,7 +1281,7 @@ sal_Int32 SwTxtCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
// Until here everything in document coordinates.
x -= nLeftMargin;
- KSHORT nX = KSHORT( x );
+ sal_uInt16 nX = sal_uInt16( x );
// If there are attribute changes in the line, search for the paragraph,
// in which nX is situated.
@@ -1292,7 +1292,7 @@ sal_Int32 SwTxtCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
std::deque<sal_uInt16> *pKanaComp = pCurr->GetpKanaComp();
sal_Int32 nOldIdx = GetInfo().GetIdx();
- MSHORT nSpaceIdx = 0;
+ sal_uInt16 nSpaceIdx = 0;
size_t nKanaIdx = 0;
long nSpaceAdd = pCurr->IsSpaceAdd() ? pCurr->GetLLSpaceAdd( 0 ) : 0;
short nKanaComp = pKanaComp ? (*pKanaComp)[0] : 0;
@@ -1300,7 +1300,7 @@ sal_Int32 SwTxtCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
// nWidth is the width of the line, or the width of
// the paragraph with the font change, in which nX is situated.
- KSHORT nWidth = pPor->Width();
+ sal_uInt16 nWidth = pPor->Width();
if ( pCurr->IsSpaceAdd() || pKanaComp )
{
if ( pPor->InSpaceGrp() && nSpaceAdd )
@@ -1330,7 +1330,7 @@ sal_Int32 SwTxtCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
}
}
- KSHORT nWidth30;
+ sal_uInt16 nWidth30;
if ( pPor->IsPostItsPortion() )
nWidth30 = 30 + pPor->GetViewWidth( GetInfo() ) / 2;
else
@@ -1460,7 +1460,7 @@ sal_Int32 SwTxtCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
--nCurrStart;
else
{
- KSHORT nHeight = pPor->Height();
+ sal_uInt16 nHeight = pPor->Height();
if ( !nHeight || nHeight > nWidth )
nHeight = nWidth;
if( nChgNode && nWidth - nHeight/2 > nX )
@@ -1480,7 +1480,7 @@ sal_Int32 SwTxtCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
( pPor->IsMultiPortion() &&
((SwMultiPortion*)pPor)->IsBidi() ) )
{
- KSHORT nHeight = 0;
+ sal_uInt16 nHeight = 0;
if( !bFieldInfo )
{
nHeight = pPor->Height();
@@ -1567,7 +1567,7 @@ sal_Int32 SwTxtCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
nTmpY = pPor->Height() - nTmpY;
if( nTmpY < 0 )
nTmpY = 0;
- nX = (KSHORT)nTmpY;
+ nX = (sal_uInt16)nTmpY;
}
if( ((SwMultiPortion*)pPor)->HasBrackets() )
diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index 8e03566b14ac..537e1632ee44 100644
--- a/sw/source/core/text/itrform2.cxx
+++ b/sw/source/core/text/itrform2.cxx
@@ -135,7 +135,7 @@ void SwTxtFormatter::Insert( SwLineLayout *pLay )
pCurr = pLay;
}
-KSHORT SwTxtFormatter::GetFrmRstHeight() const
+sal_uInt16 SwTxtFormatter::GetFrmRstHeight() const
{
// We want the rest height relative to the page.
// If we're in a table, then pFrm->GetUpper() is not the page.
@@ -149,7 +149,7 @@ KSHORT SwTxtFormatter::GetFrmRstHeight() const
if( 0 > nHeight )
return pCurr->Height();
else
- return KSHORT( nHeight );
+ return sal_uInt16( nHeight );
}
SwLinePortion *SwTxtFormatter::Underflow( SwTxtFormatInfo &rInf )
@@ -277,7 +277,7 @@ SwLinePortion *SwTxtFormatter::Underflow( SwTxtFormatInfo &rInf )
{
if( pPor->InTxtGrp() && !pPor->InExpGrp() )
{
- MSHORT nOldWhich = pCurr->GetWhichPor();
+ sal_uInt16 nOldWhich = pCurr->GetWhichPor();
*(SwLinePortion*)pCurr = *pPor;
pCurr->SetPortion( pPor->GetPortion() );
pCurr->SetWhichPor( nOldWhich );
@@ -1493,8 +1493,8 @@ sal_Int32 SwTxtFormatter::FormatLine(const sal_Int32 nStartPos)
// Recycling muss bei geaenderter Zeilenhoehe unterdrueckt werden
// und auch bei geaendertem Ascent (Absenken der Grundlinie).
- const KSHORT nOldHeight = pCurr->Height();
- const KSHORT nOldAscent = pCurr->GetAscent();
+ const sal_uInt16 nOldHeight = pCurr->Height();
+ const sal_uInt16 nOldAscent = pCurr->GetAscent();
pCurr->SetEndHyph( false );
pCurr->SetMidHyph( false );
@@ -1574,7 +1574,7 @@ sal_Int32 SwTxtFormatter::FormatLine(const sal_Int32 nStartPos)
if ( IsFlyInCntBase() && (!IsQuick() || (pPorTmp && pPorTmp->IsFlyCntPortion() && !pPorTmp->GetPortion() &&
pCurr->Height() > pPorTmp->Height())))
{
- KSHORT nTmpAscent, nTmpHeight;
+ sal_uInt16 nTmpAscent, nTmpHeight;
CalcAscentAndHeight( nTmpAscent, nTmpHeight );
AlignFlyInCntBase( Y() + long( nTmpAscent ) );
pCurr->CalcLine( *this, GetInfo() );
@@ -1691,7 +1691,7 @@ void SwTxtFormatter::RecalcRealHeight()
void SwTxtFormatter::CalcRealHeight( bool bNewLine )
{
- KSHORT nLineHeight = pCurr->Height();
+ sal_uInt16 nLineHeight = pCurr->Height();
pCurr->SetClipping( false );
SwTextGridItem const*const pGrid(GetGridItem(pFrm->FindPageFrm()));
@@ -1707,7 +1707,7 @@ void SwTxtFormatter::CalcRealHeight( bool bNewLine )
while ( pCurr->Height() > nLineHeight )
nLineHeight = nLineHeight + nLineDist;
- KSHORT nAsc = pCurr->GetAscent() +
+ sal_uInt16 nAsc = pCurr->GetAscent() +
( bRubyTop ?
( nLineHeight - pCurr->Height() + nRubyHeight ) / 2 :
( nLineHeight - pCurr->Height() - nRubyHeight ) / 2 );
@@ -1754,11 +1754,11 @@ void SwTxtFormatter::CalcRealHeight( bool bNewLine )
nTmp /= 100;
if( !nTmp )
++nTmp;
- nLineHeight = (KSHORT)nTmp;
+ nLineHeight = (sal_uInt16)nTmp;
/*
//@TODO figure out how WW maps ascent and descent
//in case of prop line spacing <100%
- KSHORT nAsc = ( 4 * nLineHeight ) / 5; // 80%
+ sal_uInt16 nAsc = ( 4 * nLineHeight ) / 5; // 80%
if( nAsc < pCurr->GetAscent() ||
nLineHeight - nAsc < pCurr->Height() -
pCurr->GetAscent() )
@@ -1772,14 +1772,14 @@ void SwTxtFormatter::CalcRealHeight( bool bNewLine )
break;
case SVX_LINE_SPACE_MIN:
{
- if( nLineHeight < KSHORT( pSpace->GetLineHeight() ) )
+ if( nLineHeight < sal_uInt16( pSpace->GetLineHeight() ) )
nLineHeight = pSpace->GetLineHeight();
break;
}
case SVX_LINE_SPACE_FIX:
{
nLineHeight = pSpace->GetLineHeight();
- KSHORT nAsc = ( 4 * nLineHeight ) / 5; // 80%
+ sal_uInt16 nAsc = ( 4 * nLineHeight ) / 5; // 80%
if( nAsc < pCurr->GetAscent() ||
nLineHeight - nAsc < pCurr->Height() - pCurr->GetAscent() )
pCurr->SetClipping( true );
@@ -1807,7 +1807,7 @@ void SwTxtFormatter::CalcRealHeight( bool bNewLine )
nTmp /= 100;
if( !nTmp )
++nTmp;
- nLineHeight = (KSHORT)nTmp;
+ nLineHeight = (sal_uInt16)nTmp;
break;
}
case SVX_INTER_LINE_SPACE_FIX:
@@ -1819,7 +1819,7 @@ void SwTxtFormatter::CalcRealHeight( bool bNewLine )
}
}
#if OSL_DEBUG_LEVEL > 1
- KSHORT nDummy = nLineHeight + 1;
+ sal_uInt16 nDummy = nLineHeight + 1;
(void)nDummy;
#endif
@@ -1830,7 +1830,7 @@ void SwTxtFormatter::CalcRealHeight( bool bNewLine )
if ( bVert )
nTmpY = pFrm->SwitchHorizontalToVertical( nTmpY );
nTmpY = (*fnRect->fnYDiff)( nTmpY, RegStart() );
- KSHORT nDiff = KSHORT( nTmpY % RegDiff() );
+ sal_uInt16 nDiff = sal_uInt16( nTmpY % RegDiff() );
if( nDiff )
nLineHeight += RegDiff() - nDiff;
}
@@ -1869,7 +1869,7 @@ void SwTxtFormatter::FeedInf( SwTxtFormatInfo &rInf ) const
rInf.Right( nTmpRight );
rInf.First( nTmpFirst );
- rInf.RealWidth( KSHORT(rInf.Right()) - KSHORT(GetLeftMargin()) );
+ rInf.RealWidth( sal_uInt16(rInf.Right()) - sal_uInt16(GetLeftMargin()) );
rInf.Width( rInf.RealWidth() );
if( ((SwTxtFormatter*)this)->GetRedln() )
{
@@ -1896,7 +1896,7 @@ bool SwTxtFormatter::CalcOnceMore()
{
if( pDropFmt )
{
- const KSHORT nOldDrop = GetDropHeight();
+ const sal_uInt16 nOldDrop = GetDropHeight();
CalcDropHeight( pDropFmt->GetLines() );
bOnceMore = nOldDrop != GetDropHeight();
}
@@ -2026,8 +2026,8 @@ void SwTxtFormatter::UpdatePos( SwLineLayout *pCurrent, Point aStart,
long nTmpAscent, nTmpDescent, nFlyAsc, nFlyDesc;
pCurrent->MaxAscentDescent( nTmpAscent, nTmpDescent, nFlyAsc, nFlyDesc );
- KSHORT nTmpHeight = pCurrent->GetRealHeight();
- KSHORT nAscent = pCurrent->GetAscent() + nTmpHeight - pCurrent->Height();
+ sal_uInt16 nTmpHeight = pCurrent->GetRealHeight();
+ sal_uInt16 nAscent = pCurrent->GetAscent() + nTmpHeight - pCurrent->Height();
objectpositioning::AsCharFlags nFlags = AS_CHAR_ULSPACE;
if( GetMulti() )
{
@@ -2219,9 +2219,9 @@ bool SwTxtFormatter::ChkFlyUnderflow( SwTxtFormatInfo &rInf ) const
{
// To be evaluated during reformat of this line:
// RealHeight including spacing
- rInf.SetLineHeight( KSHORT(nHeight) );
+ rInf.SetLineHeight( sal_uInt16(nHeight) );
// Height without extra spacing
- rInf.SetLineNettoHeight( KSHORT( pCurr->Height() ) );
+ rInf.SetLineNettoHeight( sal_uInt16( pCurr->Height() ) );
return true;
}
}
@@ -2231,8 +2231,8 @@ bool SwTxtFormatter::ChkFlyUnderflow( SwTxtFormatInfo &rInf ) const
// The fly portion is not intersected by a fly anymore
if ( ! aInter.IsOver( aLine ) )
{
- rInf.SetLineHeight( KSHORT(nHeight) );
- rInf.SetLineNettoHeight( KSHORT( pCurr->Height() ) );
+ rInf.SetLineHeight( sal_uInt16(nHeight) );
+ rInf.SetLineNettoHeight( sal_uInt16( pCurr->Height() ) );
return true;
}
else
@@ -2246,8 +2246,8 @@ bool SwTxtFormatter::ChkFlyUnderflow( SwTxtFormatInfo &rInf ) const
if( ! aInter.HasArea() ||
((SwFlyPortion*)pPos)->GetFixWidth() != aInter.Width() )
{
- rInf.SetLineHeight( KSHORT(nHeight) );
- rInf.SetLineNettoHeight( KSHORT( pCurr->Height() ) );
+ rInf.SetLineHeight( sal_uInt16(nHeight) );
+ rInf.SetLineNettoHeight( sal_uInt16( pCurr->Height() ) );
return true;
}
}
@@ -2386,7 +2386,7 @@ void SwTxtFormatter::CalcFlyWidth( SwTxtFormatInfo &rInf )
// created: here and in MakeFlyDummies.
// IsDummy() is evaluated in IsFirstTxtLine(), when moving lines
// and in relation with DropCaps.
- pFly->Height( KSHORT(aInter.Height()) );
+ pFly->Height( sal_uInt16(aInter.Height()) );
// nNextTop now contains the margin's bottom edge, which we avoid
// or the next margin's top edge, which we need to respect.
@@ -2398,11 +2398,11 @@ void SwTxtFormatter::CalcFlyWidth( SwTxtFormatInfo &rInf )
if( nNextTop > aInter.Bottom() )
{
SwTwips nH = nNextTop - aInter.Top();
- if( nH < KSHRT_MAX )
- pFly->Height( KSHORT( nH ) );
+ if( nH < USHRT_MAX )
+ pFly->Height( sal_uInt16( nH ) );
}
if( nAscent < pFly->Height() )
- pFly->SetAscent( KSHORT(nAscent) );
+ pFly->SetAscent( sal_uInt16(nAscent) );
else
pFly->SetAscent( pFly->Height() );
}
@@ -2416,9 +2416,9 @@ void SwTxtFormatter::CalcFlyWidth( SwTxtFormatInfo &rInf )
}
else
{
- pFly->Height( KSHORT(aInter.Height()) );
+ pFly->Height( sal_uInt16(aInter.Height()) );
if( nAscent < pFly->Height() )
- pFly->SetAscent( KSHORT(nAscent) );
+ pFly->SetAscent( sal_uInt16(nAscent) );
else
pFly->SetAscent( pFly->Height() );
}
@@ -2492,7 +2492,7 @@ SwFlyCntPortion *SwTxtFormatter::NewFlyCntPortion( SwTxtFormatInfo &rInf,
// we use this one when calculating the base, or the frame would be positioned
// too much to the top, sliding down after all causing a repaint in an area
// he actually never was in.
- KSHORT nAscent = 0;
+ sal_uInt16 nAscent = 0;
const bool bTxtFrmVertical = GetInfo().GetTxtFrm()->IsVertical();
diff --git a/sw/source/core/text/itrform2.hxx b/sw/source/core/text/itrform2.hxx
index ba15c19a2acf..c046a8eb6054 100644
--- a/sw/source/core/text/itrform2.hxx
+++ b/sw/source/core/text/itrform2.hxx
@@ -134,11 +134,11 @@ class SwTxtFormatter : public SwTxtPainter
void InsertPortion( SwTxtFormatInfo &rInf, SwLinePortion *pPor ) const;
// Guess height for the DropPortion
- void GuessDropHeight( const MSHORT nLines );
+ void GuessDropHeight( const sal_uInt16 nLines );
public:
// Calculate the height for the DropPortion
- void CalcDropHeight( const MSHORT nLines );
+ void CalcDropHeight( const sal_uInt16 nLines );
// Calculates the paragraphs bottom, takes anchored objects within it into
// account which have a wrap setting of "wrap at 1st paragraph"
@@ -188,7 +188,7 @@ public:
void Insert( SwLineLayout *pLine );
// The remaining height to the page border
- KSHORT GetFrmRstHeight() const;
+ sal_uInt16 GetFrmRstHeight() const;
// How wide would you be without any bounds (Flys etc.)?
SwTwips _CalcFitToContent( );
diff --git a/sw/source/core/text/itrpaint.cxx b/sw/source/core/text/itrpaint.cxx
index 5679010627f9..c9f8ff1ca140 100644
--- a/sw/source/core/text/itrpaint.cxx
+++ b/sw/source/core/text/itrpaint.cxx
@@ -94,7 +94,7 @@ SwLinePortion *SwTxtPainter::CalcPaintOfst( const SwRect &rPaint )
// nPaintOfst wurde exakt auf das Ende eingestellt, deswegen <=
// nPaintOfst ist dokumentglobal, deswegen nLeftMar aufaddieren
- // const KSHORT nLeftMar = KSHORT(GetLeftMargin());
+ // const sal_uInt16 nLeftMar = sal_uInt16(GetLeftMargin());
// 8310: painten von LineBreaks in leeren Zeilen.
if( nPaintOfst && pCurr->Width() )
{
@@ -177,7 +177,7 @@ void SwTxtPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
&& GetDropLines() >= GetLineNr();
}
- KSHORT nTmpHeight, nTmpAscent;
+ sal_uInt16 nTmpHeight, nTmpAscent;
CalcAscentAndHeight( nTmpAscent, nTmpHeight );
// bClip decides if there's a need to clip
diff --git a/sw/source/core/text/itrtxt.cxx b/sw/source/core/text/itrtxt.cxx
index d417d336f834..0aa7075eff01 100644
--- a/sw/source/core/text/itrtxt.cxx
+++ b/sw/source/core/text/itrtxt.cxx
@@ -62,7 +62,7 @@ void SwTxtIter::Init()
nLineNr = 1;
}
-void SwTxtIter::CalcAscentAndHeight( KSHORT &rAscent, KSHORT &rHeight ) const
+void SwTxtIter::CalcAscentAndHeight( sal_uInt16 &rAscent, sal_uInt16 &rHeight ) const
{
rHeight = GetLineHeight();
rAscent = pCurr->GetAscent() + rHeight - pCurr->Height();
diff --git a/sw/source/core/text/itrtxt.hxx b/sw/source/core/text/itrtxt.hxx
index 49064f16c846..70db16c7ddcc 100644
--- a/sw/source/core/text/itrtxt.hxx
+++ b/sw/source/core/text/itrtxt.hxx
@@ -40,8 +40,8 @@ protected:
SwTwips nY;
SwTwips nRegStart; // The register's start position (Y)
sal_Int32 nStart; // Start in the text string, end = pCurr->GetLen()
- KSHORT nRegDiff; // Register's line distance
- MSHORT nLineNr; // Line number
+ sal_uInt16 nRegDiff; // Register's line distance
+ sal_uInt16 nLineNr; // Line number
bool bPrev : 1;
bool bRegisterOn : 1; // Keep in register
bool bOneBlock : 1; // Justified text: Dispose single words
@@ -84,13 +84,13 @@ public:
inline const SwLineLayout *GetNext() const { return pCurr->GetNext(); }
const SwLineLayout *GetPrev();
inline sal_Int32 GetLength() const { return pCurr->GetLen(); }
- inline MSHORT GetLineNr() const { return nLineNr; }
+ inline sal_uInt16 GetLineNr() const { return nLineNr; }
inline sal_Int32 GetStart() const { return nStart; }
inline sal_Int32 GetEnd() const { return GetStart() + GetLength(); }
inline SwTwips Y() const { return nY; }
inline SwTwips RegStart() const { return nRegStart; }
- inline KSHORT RegDiff() const { return nRegDiff; }
+ inline sal_uInt16 RegDiff() const { return nRegDiff; }
inline bool IsRegisterOn() const { return bRegisterOn; }
inline SwTxtInfo &GetInfo() { return *pInf; }
@@ -113,8 +113,8 @@ public:
// Truncates all after pCurr
void TruncLines( bool bNoteFollow = false );
- inline KSHORT GetLineHeight() const { return pCurr->GetRealHeight(); }
- void CalcAscentAndHeight( KSHORT &rAscent, KSHORT &rHeight ) const;
+ inline sal_uInt16 GetLineHeight() const { return pCurr->GetRealHeight(); }
+ void CalcAscentAndHeight( sal_uInt16 &rAscent, sal_uInt16 &rHeight ) const;
// Lots of trouble for querying pCurr == pPara
inline bool IsFirstTxtLine() const
@@ -144,11 +144,11 @@ private:
SwTwips nLeft;
SwTwips nRight;
SwTwips nFirst;
- KSHORT nDropLeft;
- KSHORT nDropHeight;
- KSHORT nDropDescent;
- MSHORT nDropLines;
- MSHORT nAdjust;
+ sal_uInt16 nDropLeft;
+ sal_uInt16 nDropHeight;
+ sal_uInt16 nDropDescent;
+ sal_uInt16 nDropLines;
+ sal_uInt16 nAdjust;
// #i91133#
SwTwips mnTabLeft;
@@ -156,7 +156,7 @@ protected:
// For FormatQuoVadis
inline void Right( const SwTwips nNew ) { nRight = nNew; }
// For CalcFlyAdjust
- inline void SetDropLeft( const KSHORT nNew ) { nDropLeft = nNew; }
+ inline void SetDropLeft( const sal_uInt16 nNew ) { nDropLeft = nNew; }
void CtorInitTxtMargin( SwTxtFrm *pFrm, SwTxtSizeInfo *pInf );
inline SwTxtMargin(SwTxtNode* pTxtNode)
@@ -188,9 +188,9 @@ public:
inline bool IsOneBlock() const { return bOneBlock; }
inline bool IsLastBlock() const { return bLastBlock; }
inline bool IsLastCenter() const { return bLastCenter; }
- inline MSHORT GetAdjust() const { return nAdjust; }
- inline KSHORT GetLineWidth() const
- { return KSHORT( Right() - GetLeftMargin() + 1 ); }
+ inline sal_uInt16 GetAdjust() const { return nAdjust; }
+ inline sal_uInt16 GetLineWidth() const
+ { return sal_uInt16( Right() - GetLeftMargin() + 1 ); }
inline SwTwips GetLeftMin() const { return nFirst < nLeft ? nFirst : nLeft; }
inline bool HasNegFirst() const { return nFirst < nLeft; }
@@ -200,13 +200,13 @@ public:
return mnTabLeft;
}
// DropCaps
- inline MSHORT GetDropLines() const { return nDropLines; }
- inline void SetDropLines( const MSHORT nNew ) { nDropLines = nNew; }
- inline KSHORT GetDropLeft() const { return nDropLeft; }
- inline KSHORT GetDropHeight() const { return nDropHeight; }
- inline void SetDropHeight( const KSHORT nNew ) { nDropHeight = nNew; }
- inline KSHORT GetDropDescent() const { return nDropDescent; }
- inline void SetDropDescent( const KSHORT nNew ) { nDropDescent = nNew; }
+ inline sal_uInt16 GetDropLines() const { return nDropLines; }
+ inline void SetDropLines( const sal_uInt16 nNew ) { nDropLines = nNew; }
+ inline sal_uInt16 GetDropLeft() const { return nDropLeft; }
+ inline sal_uInt16 GetDropHeight() const { return nDropHeight; }
+ inline void SetDropHeight( const sal_uInt16 nNew ) { nDropHeight = nNew; }
+ inline sal_uInt16 GetDropDescent() const { return nDropDescent; }
+ inline void SetDropDescent( const sal_uInt16 nNew ) { nDropDescent = nNew; }
void DropInit();
// Returns the TxtPos for start and end of the current line without whitespace
diff --git a/sw/source/core/text/noteurl.cxx b/sw/source/core/text/noteurl.cxx
index d19bc203a792..3d9c0650ac2c 100644
--- a/sw/source/core/text/noteurl.cxx
+++ b/sw/source/core/text/noteurl.cxx
@@ -31,8 +31,8 @@ SwNoteURL *pNoteURL = NULL;
void SwNoteURL::InsertURLNote( const OUString& rURL, const OUString& rTarget,
const SwRect& rRect )
{
- MSHORT i;
- MSHORT nCount = aList.size();
+ sal_uInt16 i;
+ sal_uInt16 nCount = aList.size();
for( i = 0; i < nCount; i++ )
if( rRect == aList[i].GetRect() )
break;
@@ -47,11 +47,11 @@ void SwNoteURL::FillImageMap( ImageMap *pMap, const Point &rPos,
const MapMode& rMap )
{
OSL_ENSURE( pMap, "FillImageMap: No ImageMap, no cookies!" );
- MSHORT nCount = Count();
+ sal_uInt16 nCount = Count();
if( nCount )
{
MapMode aMap( MAP_100TH_MM );
- for( MSHORT i = 0; i < nCount; ++i )
+ for( sal_uInt16 i = 0; i < nCount; ++i )
{
const SwURLNote &rNote = GetURLNote( i );
SwRect aSwRect( rNote.GetRect() );
diff --git a/sw/source/core/text/pordrop.hxx b/sw/source/core/text/pordrop.hxx
index a56d28b684e9..815e9eb07beb 100644
--- a/sw/source/core/text/pordrop.hxx
+++ b/sw/source/core/text/pordrop.hxx
@@ -62,36 +62,36 @@ class SwDropPortion : public SwTxtPortion
{
friend class SwDropCapCache;
SwDropPortionPart* pPart; // due to script/attribute changes
- MSHORT nLines; // Line count
- KSHORT nDropHeight; // Height
- KSHORT nDropDescent; // Distance to the next line
- KSHORT nDistance; // Distance to the text
- KSHORT nFix; // Fixed position
+ sal_uInt16 nLines; // Line count
+ sal_uInt16 nDropHeight; // Height
+ sal_uInt16 nDropDescent; // Distance to the next line
+ sal_uInt16 nDistance; // Distance to the text
+ sal_uInt16 nFix; // Fixed position
short nX; // X PaintOffset
short nY; // Y Offset
bool FormatTxt( SwTxtFormatInfo &rInf );
void PaintTxt( const SwTxtPaintInfo &rInf ) const;
- inline void Fix( const KSHORT nNew ) { nFix = nNew; }
+ inline void Fix( const sal_uInt16 nNew ) { nFix = nNew; }
public:
- SwDropPortion( const MSHORT nLineCnt,
- const KSHORT nDropHeight,
- const KSHORT nDropDescent,
- const KSHORT nDistance );
+ SwDropPortion( const sal_uInt16 nLineCnt,
+ const sal_uInt16 nDropHeight,
+ const sal_uInt16 nDropDescent,
+ const sal_uInt16 nDistance );
virtual ~SwDropPortion();
virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE;
void PaintDrop( const SwTxtPaintInfo &rInf ) const;
virtual bool Format( SwTxtFormatInfo &rInf ) SAL_OVERRIDE;
virtual SwPosSize GetTxtSize( const SwTxtSizeInfo &rInfo ) const SAL_OVERRIDE;
- virtual sal_Int32 GetCrsrOfst( const MSHORT nOfst ) const SAL_OVERRIDE;
+ virtual sal_Int32 GetCrsrOfst( const sal_uInt16 nOfst ) const SAL_OVERRIDE;
- inline MSHORT GetLines() const { return nLines; }
- inline KSHORT GetDistance() const { return nDistance; }
- inline KSHORT GetDropHeight() const { return nDropHeight; }
- inline KSHORT GetDropDescent() const { return nDropDescent; }
- inline KSHORT GetDropLeft() const { return Width() + nFix; }
+ inline sal_uInt16 GetLines() const { return nLines; }
+ inline sal_uInt16 GetDistance() const { return nDistance; }
+ inline sal_uInt16 GetDropHeight() const { return nDropHeight; }
+ inline sal_uInt16 GetDropDescent() const { return nDropDescent; }
+ inline sal_uInt16 GetDropLeft() const { return Width() + nFix; }
inline SwDropPortionPart* GetPart() const { return pPart; }
inline void SetPart( SwDropPortionPart* pNew ) { pPart = pNew; }
diff --git a/sw/source/core/text/porexp.cxx b/sw/source/core/text/porexp.cxx
index 14190ab7896c..88630be8f6fa 100644
--- a/sw/source/core/text/porexp.cxx
+++ b/sw/source/core/text/porexp.cxx
@@ -22,7 +22,7 @@
#include <inftxt.hxx>
#include <porexp.hxx>
-sal_Int32 SwExpandPortion::GetCrsrOfst( const MSHORT nOfst ) const
+sal_Int32 SwExpandPortion::GetCrsrOfst( const sal_uInt16 nOfst ) const
{ return SwLinePortion::GetCrsrOfst( nOfst ); }
bool SwExpandPortion::GetExpTxt( const SwTxtSizeInfo&, OUString &rTxt ) const
@@ -104,7 +104,7 @@ SwLinePortion *SwBlankPortion::Compress() { return this; }
// dann duerfen keine Underflows generiert werden!
// Komplikationen bei Flys...
-MSHORT SwBlankPortion::MayUnderflow( const SwTxtFormatInfo &rInf,
+sal_uInt16 SwBlankPortion::MayUnderflow( const SwTxtFormatInfo &rInf,
sal_Int32 nIdx, bool bUnderflow ) const
{
if( rInf.StopUnderflow() )
@@ -153,7 +153,7 @@ MSHORT SwBlankPortion::MayUnderflow( const SwTxtFormatInfo &rInf,
// Format end of Line
void SwBlankPortion::FormatEOL( SwTxtFormatInfo &rInf )
{
- MSHORT nMay = MayUnderflow( rInf, rInf.GetIdx() - nLineLength, true );
+ sal_uInt16 nMay = MayUnderflow( rInf, rInf.GetIdx() - nLineLength, true );
if( nMay )
{
if( nMay > 1 )
@@ -216,11 +216,11 @@ void SwPostItsPortion::Paint( const SwTxtPaintInfo &rInf ) const
rInf.DrawPostIts( *this, IsScript() );
}
-KSHORT SwPostItsPortion::GetViewWidth( const SwTxtSizeInfo &rInf ) const
+sal_uInt16 SwPostItsPortion::GetViewWidth( const SwTxtSizeInfo &rInf ) const
{
// Nicht zu fassen: PostIts sind immer zu sehen.
return rInf.OnWin() ?
- (KSHORT)rInf.GetOpt().GetPostItsWidth( rInf.GetOut() ) : 0;
+ (sal_uInt16)rInf.GetOpt().GetPostItsWidth( rInf.GetOut() ) : 0;
}
bool SwPostItsPortion::Format( SwTxtFormatInfo &rInf )
diff --git a/sw/source/core/text/porexp.hxx b/sw/source/core/text/porexp.hxx
index 6a2e99d56ecc..4e637ed9a0db 100644
--- a/sw/source/core/text/porexp.hxx
+++ b/sw/source/core/text/porexp.hxx
@@ -27,7 +27,7 @@ class SwExpandPortion : public SwTxtPortion
public:
inline SwExpandPortion() { SetWhichPor( POR_EXP ); }
virtual bool Format( SwTxtFormatInfo &rInf ) SAL_OVERRIDE;
- virtual sal_Int32 GetCrsrOfst( const MSHORT nOfst ) const SAL_OVERRIDE;
+ virtual sal_Int32 GetCrsrOfst( const sal_uInt16 nOfst ) const SAL_OVERRIDE;
virtual bool GetExpTxt( const SwTxtSizeInfo &rInf, OUString &rTxt ) const SAL_OVERRIDE;
virtual SwPosSize GetTxtSize( const SwTxtSizeInfo &rInfo ) const SAL_OVERRIDE;
virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE;
@@ -55,7 +55,7 @@ public:
virtual void FormatEOL( SwTxtFormatInfo &rInf ) SAL_OVERRIDE;
virtual bool Format( SwTxtFormatInfo &rInf ) SAL_OVERRIDE;
virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE;
- MSHORT MayUnderflow( const SwTxtFormatInfo &rInf, sal_Int32 nIdx,
+ sal_uInt16 MayUnderflow( const SwTxtFormatInfo &rInf, sal_Int32 nIdx,
bool bUnderflow ) const;
// Accessibility: pass information about this portion to the PortionHandler
@@ -71,7 +71,7 @@ public:
SwPostItsPortion( bool bScrpt );
virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE;
virtual bool Format( SwTxtFormatInfo &rInf ) SAL_OVERRIDE;
- virtual KSHORT GetViewWidth( const SwTxtSizeInfo &rInf ) const SAL_OVERRIDE;
+ virtual sal_uInt16 GetViewWidth( const SwTxtSizeInfo &rInf ) const SAL_OVERRIDE;
virtual bool GetExpTxt( const SwTxtSizeInfo &rInf, OUString &rTxt ) const SAL_OVERRIDE;
bool IsScript() const { return bScript; }
OUTPUT_OPERATOR_OVERRIDE
diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx
index 9c1574c798db..aed4bc8c348e 100644
--- a/sw/source/core/text/porfld.cxx
+++ b/sw/source/core/text/porfld.cxx
@@ -116,7 +116,7 @@ SwFldPortion::~SwFldPortion()
pBlink->Delete( this );
}
-KSHORT SwFldPortion::GetViewWidth( const SwTxtSizeInfo &rInf ) const
+sal_uInt16 SwFldPortion::GetViewWidth( const SwTxtSizeInfo &rInf ) const
{
// even though this is const, nViewWidth should be computed at the very end:
SwFldPortion* pThis = (SwFldPortion*)this;
@@ -323,7 +323,7 @@ bool SwFldPortion::Format( SwTxtFormatInfo &rInf )
// gesetzt und wird in nRest uebertragen. Ansonsten bleibt die
// Laenge erhalten und wuerde auch in nRest einfliessen!
SetLen(0);
- const MSHORT nFollow = IsFollow() ? 0 : 1;
+ const sal_uInt16 nFollow = IsFollow() ? 0 : 1;
// So komisch es aussieht, die Abfrage auf GetLen() muss wegen der
// ExpandPortions _hinter_ aDiffTxt (vgl. SoftHyphs)
@@ -492,7 +492,7 @@ SwNumberPortion::SwNumberPortion( const OUString &rExpand,
SwFont *pFont,
const bool bLft,
const bool bCntr,
- const KSHORT nMinDst,
+ const sal_uInt16 nMinDst,
const bool bLabelAlignmentPosAndSpaceModeActive )
: SwFldPortion( rExpand, pFont ),
nFixWidth(0),
@@ -505,7 +505,7 @@ SwNumberPortion::SwNumberPortion( const OUString &rExpand,
SetCenter( bCntr );
}
-sal_Int32 SwNumberPortion::GetCrsrOfst( const MSHORT ) const
+sal_Int32 SwNumberPortion::GetCrsrOfst( const sal_uInt16 ) const
{
return 0;
}
@@ -587,10 +587,10 @@ bool SwNumberPortion::Format( SwTxtFormatInfo &rInf )
if ( rInf.IsMulti() )
{
if ( Height() < nDiff )
- Height( KSHORT( nDiff ) );
+ Height( sal_uInt16( nDiff ) );
}
else if( Width() < nDiff )
- Width( KSHORT(nDiff) );
+ Width( sal_uInt16(nDiff) );
}
return bFull;
}
@@ -625,7 +625,7 @@ void SwNumberPortion::Paint( const SwTxtPaintInfo &rInf ) const
}
// calculate the width of the number portion, including follows
- const KSHORT nOldWidth = Width();
+ const sal_uInt16 nOldWidth = Width();
sal_uInt16 nSumWidth = 0;
sal_uInt16 nOffset = 0;
@@ -674,7 +674,7 @@ void SwNumberPortion::Paint( const SwTxtPaintInfo &rInf ) const
// logical const: reset width
SwLinePortion *pThis = (SwLinePortion*)this;
bPaintSpace = bPaintSpace && nFixWidth < nOldWidth;
- KSHORT nSpaceOffs = nFixWidth;
+ sal_uInt16 nSpaceOffs = nFixWidth;
pThis->Width( nFixWidth );
if( ( IsLeft() && ! rInf.GetTxtFrm()->IsRightToLeft() ) ||
@@ -690,7 +690,7 @@ void SwNumberPortion::Paint( const SwTxtPaintInfo &rInf ) const
if( IsCenter() )
{
/* #110778# a / 2 * 2 == a is not a tautology */
- KSHORT nTmpOffset = nOffset;
+ sal_uInt16 nTmpOffset = nOffset;
nOffset /= 2;
if( nOffset < nMinDist )
nOffset = nTmpOffset - nMinDist;
@@ -731,7 +731,7 @@ SwBulletPortion::SwBulletPortion( const sal_Unicode cBullet,
SwFont *pFont,
const bool bLft,
const bool bCntr,
- const KSHORT nMinDst,
+ const sal_uInt16 nMinDst,
const bool bLabelAlignmentPosAndSpaceModeActive )
: SwNumberPortion( OUString(cBullet) + rBulletFollowedBy,
pFont, bLft, bCntr, nMinDst,
@@ -747,7 +747,7 @@ SwGrfNumPortion::SwGrfNumPortion(
const OUString& rGraphicFollowedBy,
const SvxBrushItem* pGrfBrush,
const SwFmtVertOrient* pGrfOrient, const Size& rGrfSize,
- const bool bLft, const bool bCntr, const KSHORT nMinDst,
+ const bool bLft, const bool bCntr, const sal_uInt16 nMinDst,
const bool bLabelAlignmentPosAndSpaceModeActive ) :
SwNumberPortion( rGraphicFollowedBy, NULL, bLft, bCntr, nMinDst,
bLabelAlignmentPosAndSpaceModeActive ),
@@ -778,7 +778,7 @@ SwGrfNumPortion::SwGrfNumPortion(
Width( static_cast<sal_uInt16>(rGrfSize.Width() + 2 * GRFNUM_SECURE) );
nFixWidth = Width();
nGrfHeight = rGrfSize.Height() + 2 * GRFNUM_SECURE;
- Height( KSHORT(nGrfHeight) );
+ Height( sal_uInt16(nGrfHeight) );
bNoPaint = false;
}
@@ -807,7 +807,7 @@ bool SwGrfNumPortion::Format( SwTxtFormatInfo &rInf )
{
SetHide( false );
// Width( nFixWidth );
- KSHORT nFollowedByWidth( 0 );
+ sal_uInt16 nFollowedByWidth( 0 );
if ( mbLabelAlignmentPosAndSpaceModeActive )
{
SwFldPortion::Format( rInf );
@@ -824,7 +824,7 @@ bool SwGrfNumPortion::Format( SwTxtFormatInfo &rInf )
if( bFull )
{
- Width( rInf.Width() - (KSHORT)rInf.X() );
+ Width( rInf.Width() - (sal_uInt16)rInf.X() );
if( bFly )
{
SetLen( 0 );
@@ -859,7 +859,7 @@ bool SwGrfNumPortion::Format( SwTxtFormatInfo &rInf )
}
if( Width() < nDiff )
- Width( KSHORT(nDiff) );
+ Width( sal_uInt16(nDiff) );
return bFull;
}
@@ -888,7 +888,7 @@ void SwGrfNumPortion::Paint( const SwTxtPaintInfo &rInf ) const
if( nFixWidth < Width() && !bTmpLeft )
{
- KSHORT nOffset = Width() - nFixWidth;
+ sal_uInt16 nOffset = Width() - nFixWidth;
if( nOffset < nMinDist )
nOffset = 0;
else
@@ -907,7 +907,7 @@ void SwGrfNumPortion::Paint( const SwTxtPaintInfo &rInf ) const
if( bReplace )
{
- KSHORT nTmpH = GetPortion() ? GetPortion()->GetAscent() : 120;
+ sal_uInt16 nTmpH = GetPortion() ? GetPortion()->GetAscent() : 120;
aSize = Size( nTmpH, nTmpH );
aPos.Y() = rInf.Y() - nTmpH;
}
@@ -1298,7 +1298,7 @@ bool SwCombinedPortion::Format( SwTxtFormatInfo &rInf )
return bFull;
}
-KSHORT SwCombinedPortion::GetViewWidth( const SwTxtSizeInfo &rInf ) const
+sal_uInt16 SwCombinedPortion::GetViewWidth( const SwTxtSizeInfo &rInf ) const
{
if( !GetLen() ) // for the dummy part at the end of the line, where
return 0; // the combined portion doesn't fit.
diff --git a/sw/source/core/text/porfld.hxx b/sw/source/core/text/porfld.hxx
index 25adb3602a01..ec74bb2e5b87 100644
--- a/sw/source/core/text/porfld.hxx
+++ b/sw/source/core/text/porfld.hxx
@@ -36,7 +36,7 @@ protected:
SwFont *pFnt; // For multi-line fields
sal_Int32 nNextOffset; // Offset of the follow in the original string
sal_Int32 nNextScriptChg;
- KSHORT nViewWidth; // Screen width for empty fields
+ sal_uInt16 nViewWidth; // Screen width for empty fields
bool bFollow : 1; // 2nd or later part of a field
bool bLeft : 1; // Used by SwNumberPortion
bool bHide : 1; // Used by SwNumberPortion
@@ -72,7 +72,7 @@ public:
// Empty fields are also allowed
virtual SwLinePortion *Compress() SAL_OVERRIDE;
- virtual KSHORT GetViewWidth( const SwTxtSizeInfo &rInf ) const SAL_OVERRIDE;
+ virtual sal_uInt16 GetViewWidth( const SwTxtSizeInfo &rInf ) const SAL_OVERRIDE;
inline bool IsFollow() const { return bFollow; }
inline void SetFollow( bool bNew ) { bFollow = bNew; }
@@ -126,8 +126,8 @@ public:
class SwNumberPortion : public SwFldPortion
{
protected:
- KSHORT nFixWidth; // See Glues
- KSHORT nMinDist; // Minimal distance to the text
+ sal_uInt16 nFixWidth; // See Glues
+ sal_uInt16 nMinDist; // Minimal distance to the text
bool mbLabelAlignmentPosAndSpaceModeActive;
public:
@@ -135,10 +135,10 @@ public:
SwFont *pFnt,
const bool bLeft,
const bool bCenter,
- const KSHORT nMinDst,
+ const sal_uInt16 nMinDst,
const bool bLabelAlignmentPosAndSpaceModeActive );
virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE;
- virtual sal_Int32 GetCrsrOfst( const MSHORT nOfst ) const SAL_OVERRIDE;
+ virtual sal_Int32 GetCrsrOfst( const sal_uInt16 nOfst ) const SAL_OVERRIDE;
virtual bool Format( SwTxtFormatInfo &rInf ) SAL_OVERRIDE;
// Field cloner for SplitGlue
@@ -156,7 +156,7 @@ public:
SwFont *pFnt,
const bool bLeft,
const bool bCenter,
- const KSHORT nMinDst,
+ const sal_uInt16 nMinDst,
const bool bLabelAlignmentPosAndSpaceModeActive );
OUTPUT_OPERATOR_OVERRIDE
};
@@ -176,7 +176,7 @@ public:
const Size& rGrfSize,
const bool bLeft,
const bool bCenter,
- const KSHORT nMinDst,
+ const sal_uInt16 nMinDst,
const bool bLabelAlignmentPosAndSpaceModeActive );
virtual ~SwGrfNumPortion();
virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE;
@@ -220,7 +220,7 @@ public:
SwCombinedPortion( const OUString &rExpand );
virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE;
virtual bool Format( SwTxtFormatInfo &rInf ) SAL_OVERRIDE;
- virtual KSHORT GetViewWidth( const SwTxtSizeInfo &rInf ) const SAL_OVERRIDE;
+ virtual sal_uInt16 GetViewWidth( const SwTxtSizeInfo &rInf ) const SAL_OVERRIDE;
OUTPUT_OPERATOR_OVERRIDE
};
diff --git a/sw/source/core/text/porfly.cxx b/sw/source/core/text/porfly.cxx
index 9423539437d7..6a4656f6e9e8 100644
--- a/sw/source/core/text/porfly.cxx
+++ b/sw/source/core/text/porfly.cxx
@@ -412,7 +412,7 @@ void SwFlyCntPortion::SetBase( const SwTxtFrm& rFrm, const Point &rBase,
}
}
-sal_Int32 SwFlyCntPortion::GetFlyCrsrOfst( const KSHORT nOfst,
+sal_Int32 SwFlyCntPortion::GetFlyCrsrOfst( const sal_uInt16 nOfst,
const Point &rPoint, SwPosition *pPos, SwCrsrMoveState* pCMS ) const
{
// Da die FlyCnt nicht an der Seite haengen, wird ihr
@@ -426,7 +426,7 @@ sal_Int32 SwFlyCntPortion::GetFlyCrsrOfst( const KSHORT nOfst,
return 0;
}
-sal_Int32 SwFlyCntPortion::GetCrsrOfst( const KSHORT nOfst ) const
+sal_Int32 SwFlyCntPortion::GetCrsrOfst( const sal_uInt16 nOfst ) const
{
// OSL_ENSURE( !this, "SwFlyCntPortion::GetCrsrOfst: use GetFlyCrsrOfst()" );
return SwLinePortion::GetCrsrOfst( nOfst );
diff --git a/sw/source/core/text/porfly.hxx b/sw/source/core/text/porfly.hxx
index 3508258f752b..1921c1b2dd68 100644
--- a/sw/source/core/text/porfly.hxx
+++ b/sw/source/core/text/porfly.hxx
@@ -30,12 +30,12 @@ struct SwCrsrMoveState;
class SwFlyPortion : public SwFixPortion
{
- KSHORT nBlankWidth;
+ sal_uInt16 nBlankWidth;
public:
inline SwFlyPortion( const SwRect &rFlyRect )
: SwFixPortion(rFlyRect), nBlankWidth( 0 ) { SetWhichPor( POR_FLY ); }
- inline KSHORT GetBlankWidth( ) const { return nBlankWidth; }
- inline void SetBlankWidth( const KSHORT nNew ) { nBlankWidth = nNew; }
+ inline sal_uInt16 GetBlankWidth( ) const { return nBlankWidth; }
+ inline void SetBlankWidth( const sal_uInt16 nNew ) { nBlankWidth = nNew; }
virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE;
virtual bool Format( SwTxtFormatInfo &rInf ) SAL_OVERRIDE;
OUTPUT_OPERATOR_OVERRIDE
@@ -49,7 +49,7 @@ class SwFlyCntPortion : public SwLinePortion
bool bDraw : 1; // DrawContact?
bool bMax : 1; // Line adjustment and height == line height
sal_uInt8 nAlign : 3; // Line adjustment? No, above, middle, bottom
- virtual sal_Int32 GetCrsrOfst( const KSHORT nOfst ) const SAL_OVERRIDE;
+ virtual sal_Int32 GetCrsrOfst( const sal_uInt16 nOfst ) const SAL_OVERRIDE;
public:
// OD 29.07.2003 #110978# - use new datatype for parameter <nFlags>
@@ -79,7 +79,7 @@ public:
long nLnAscent, long nLnDescent,
long nFlyAscent, long nFlyDescent,
objectpositioning::AsCharFlags nFlags );
- sal_Int32 GetFlyCrsrOfst( const KSHORT nOfst, const Point &rPoint,
+ sal_Int32 GetFlyCrsrOfst( const sal_uInt16 nOfst, const Point &rPoint,
SwPosition *pPos, SwCrsrMoveState* pCMS ) const;
virtual bool Format( SwTxtFormatInfo &rInf ) SAL_OVERRIDE;
virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE;
diff --git a/sw/source/core/text/porftn.hxx b/sw/source/core/text/porftn.hxx
index f2cf83fb605c..51d5f755008b 100644
--- a/sw/source/core/text/porftn.hxx
+++ b/sw/source/core/text/porftn.hxx
@@ -27,14 +27,14 @@ class SwTxtFtn;
class SwFtnPortion : public SwFldPortion
{
SwTxtFtn *pFtn;
- KSHORT nOrigHeight;
+ sal_uInt16 nOrigHeight;
// #i98418#
bool mbPreferredScriptTypeSet;
sal_uInt8 mnPreferredScriptType;
public:
SwFtnPortion( const OUString &rExpand, SwTxtFtn *pFtn,
- KSHORT nOrig = KSHRT_MAX );
- KSHORT& Orig() { return nOrigHeight; }
+ sal_uInt16 nOrig = USHRT_MAX );
+ sal_uInt16& Orig() { return nOrigHeight; }
virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE;
virtual bool GetExpTxt( const SwTxtSizeInfo &rInf, OUString &rTxt ) const SAL_OVERRIDE;
@@ -84,7 +84,7 @@ class SwErgoSumPortion : public SwFldPortion
{
public:
SwErgoSumPortion( const OUString &rExp, const OUString& rStr );
- virtual sal_Int32 GetCrsrOfst( const KSHORT nOfst ) const SAL_OVERRIDE;
+ virtual sal_Int32 GetCrsrOfst( const sal_uInt16 nOfst ) const SAL_OVERRIDE;
virtual bool Format( SwTxtFormatInfo &rInf ) SAL_OVERRIDE;
// Field cloner for SplitGlue
diff --git a/sw/source/core/text/porglue.cxx b/sw/source/core/text/porglue.cxx
index 6ea87bc1d2ed..66a4396de4cd 100644
--- a/sw/source/core/text/porglue.cxx
+++ b/sw/source/core/text/porglue.cxx
@@ -27,14 +27,14 @@
#include "porfly.hxx"
#include <comphelper/string.hxx>
-SwGluePortion::SwGluePortion( const KSHORT nInitFixWidth )
+SwGluePortion::SwGluePortion( const sal_uInt16 nInitFixWidth )
: nFixWidth( nInitFixWidth )
{
PrtWidth( nFixWidth );
SetWhichPor( POR_GLUE );
}
-sal_Int32 SwGluePortion::GetCrsrOfst( const KSHORT nOfst ) const
+sal_Int32 SwGluePortion::GetCrsrOfst( const sal_uInt16 nOfst ) const
{
if( !GetLen() || nOfst > GetLen() || !Width() )
return SwLinePortion::GetCrsrOfst( nOfst );
@@ -131,19 +131,19 @@ void SwGluePortion::Join( SwGluePortion *pVictim )
// Wir erwarten ein framelokales SwRect !
SwFixPortion::SwFixPortion( const SwRect &rRect )
- :SwGluePortion( KSHORT(rRect.Width()) ), nFix( KSHORT(rRect.Left()) )
+ :SwGluePortion( sal_uInt16(rRect.Width()) ), nFix( sal_uInt16(rRect.Left()) )
{
- Height( KSHORT(rRect.Height()) );
+ Height( sal_uInt16(rRect.Height()) );
SetWhichPor( POR_FIX );
}
-SwFixPortion::SwFixPortion(const KSHORT nFixedWidth, const KSHORT nFixedPos)
+SwFixPortion::SwFixPortion(const sal_uInt16 nFixedWidth, const sal_uInt16 nFixedPos)
: SwGluePortion(nFixedWidth), nFix(nFixedPos)
{
SetWhichPor( POR_FIX );
}
-SwMarginPortion::SwMarginPortion( const KSHORT nFixedWidth )
+SwMarginPortion::SwMarginPortion( const sal_uInt16 nFixedWidth )
:SwGluePortion( nFixedWidth )
{
SetWhichPor( POR_MARGIN );
@@ -182,8 +182,8 @@ void SwMarginPortion::AdjustRight( const SwLineLayout *pCurr )
pRight->MoveAllGlue( pLeft );
pRight = 0;
}
- KSHORT nRightGlue = pRight && 0 < pRight->GetPrtGlue()
- ? KSHORT(pRight->GetPrtGlue()) : 0;
+ sal_uInt16 nRightGlue = pRight && 0 < pRight->GetPrtGlue()
+ ? sal_uInt16(pRight->GetPrtGlue()) : 0;
// 2) balance left and right Glue
// But not for tabs ...
if( pLeft && nRightGlue && !pRight->InTabGrp() )
diff --git a/sw/source/core/text/porglue.hxx b/sw/source/core/text/porglue.hxx
index 9c8568633635..e3cbb134911e 100644
--- a/sw/source/core/text/porglue.hxx
+++ b/sw/source/core/text/porglue.hxx
@@ -27,21 +27,21 @@ class SwLineLayout;
class SwGluePortion : public SwLinePortion
{
private:
- KSHORT nFixWidth;
+ sal_uInt16 nFixWidth;
public:
- SwGluePortion( const KSHORT nInitFixWidth );
+ SwGluePortion( const sal_uInt16 nInitFixWidth );
void Join( SwGluePortion *pVictim );
inline short GetPrtGlue() const;
- inline KSHORT GetFixWidth() const { return nFixWidth; }
- inline void SetFixWidth( const KSHORT nNew ) { nFixWidth = nNew; }
+ inline sal_uInt16 GetFixWidth() const { return nFixWidth; }
+ inline void SetFixWidth( const sal_uInt16 nNew ) { nFixWidth = nNew; }
void MoveGlue( SwGluePortion *pTarget, const short nPrtGlue );
inline void MoveAllGlue( SwGluePortion *pTarget );
inline void MoveHalfGlue( SwGluePortion *pTarget );
inline void AdjFixWidth();
virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE;
- virtual sal_Int32 GetCrsrOfst( const KSHORT nOfst ) const SAL_OVERRIDE;
+ virtual sal_Int32 GetCrsrOfst( const sal_uInt16 nOfst ) const SAL_OVERRIDE;
virtual SwPosSize GetTxtSize( const SwTxtSizeInfo &rInfo ) const SAL_OVERRIDE;
virtual bool GetExpTxt( const SwTxtSizeInfo &rInf, OUString &rTxt ) const SAL_OVERRIDE;
@@ -50,19 +50,19 @@ public:
class SwFixPortion : public SwGluePortion
{
- KSHORT nFix; // The width offset in the line
+ sal_uInt16 nFix; // The width offset in the line
public:
SwFixPortion( const SwRect &rFlyRect );
- SwFixPortion( const KSHORT nFixWidth, const KSHORT nFixPos );
- inline void Fix( const KSHORT nNewFix ) { nFix = nNewFix; }
- inline KSHORT Fix() const { return nFix; }
+ SwFixPortion( const sal_uInt16 nFixWidth, const sal_uInt16 nFixPos );
+ inline void Fix( const sal_uInt16 nNewFix ) { nFix = nNewFix; }
+ inline sal_uInt16 Fix() const { return nFix; }
OUTPUT_OPERATOR_OVERRIDE
};
class SwMarginPortion : public SwGluePortion
{
public:
- SwMarginPortion( const KSHORT nFixWidth );
+ SwMarginPortion( const sal_uInt16 nFixWidth );
void AdjustRight( const SwLineLayout* pCurr );
OUTPUT_OPERATOR_OVERRIDE
};
diff --git a/sw/source/core/text/porhyph.hxx b/sw/source/core/text/porhyph.hxx
index 47c7707c2fdf..996e4ec863a2 100644
--- a/sw/source/core/text/porhyph.hxx
+++ b/sw/source/core/text/porhyph.hxx
@@ -58,8 +58,8 @@ public:
class SwSoftHyphPortion : public SwHyphPortion
{
bool bExpand;
- KSHORT nViewWidth;
- KSHORT nHyphWidth;
+ sal_uInt16 nViewWidth;
+ sal_uInt16 nHyphWidth;
public:
SwSoftHyphPortion();
@@ -71,7 +71,7 @@ public:
inline void SetExpand( const bool bNew ) { bExpand = bNew; }
bool IsExpand() const { return bExpand; }
- virtual KSHORT GetViewWidth( const SwTxtSizeInfo &rInf ) const SAL_OVERRIDE;
+ virtual sal_uInt16 GetViewWidth( const SwTxtSizeInfo &rInf ) const SAL_OVERRIDE;
// Accessibility: pass information about this portion to the PortionHandler
virtual void HandlePortion( SwPortionHandler& rPH ) const SAL_OVERRIDE;
diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx
index 0a650df04a0f..a080fb44c236 100644
--- a/sw/source/core/text/porlay.cxx
+++ b/sw/source/core/text/porlay.cxx
@@ -251,11 +251,11 @@ static bool lcl_HasOnlyBlanks( const OUString& rTxt, sal_Int32 nStt, sal_Int32 n
// Swapped out from FormatLine()
void SwLineLayout::CalcLine( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf )
{
- const KSHORT nLineWidth = rInf.RealWidth();
+ const sal_uInt16 nLineWidth = rInf.RealWidth();
- KSHORT nFlyAscent = 0;
- KSHORT nFlyHeight = 0;
- KSHORT nFlyDescent = 0;
+ sal_uInt16 nFlyAscent = 0;
+ sal_uInt16 nFlyHeight = 0;
+ sal_uInt16 nFlyDescent = 0;
bool bOnlyPostIts = true;
SetHanging( false );
@@ -286,11 +286,11 @@ void SwLineLayout::CalcLine( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf )
}
else
{
- KSHORT nLineHeight = Height();
+ sal_uInt16 nLineHeight = Height();
Init( GetPortion() );
SwLinePortion *pPos = pPortion;
SwLinePortion *pLast = this;
- KSHORT nMaxDescent = 0;
+ sal_uInt16 nMaxDescent = 0;
// A group is a segment in the portion chain of pCurr or a fixed
// portion spanning to the end or the next fixed portion
@@ -347,8 +347,8 @@ void SwLineLayout::CalcLine( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf )
// We had an attribute change: Sum up/build maxima of length and mass
- KSHORT nPosHeight = pPos->Height();
- KSHORT nPosAscent = pPos->GetAscent();
+ sal_uInt16 nPosHeight = pPos->Height();
+ sal_uInt16 nPosAscent = pPos->GetAscent();
SAL_WARN_IF( nPosHeight < nPosAscent,
"sw.core", "SwLineLayout::CalcLine: bad ascent or height" );
@@ -381,7 +381,7 @@ void SwLineLayout::CalcLine( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf )
{
if( pPos->InNumberGrp() )
{
- KSHORT nTmp = rInf.GetFont()->GetAscent(
+ sal_uInt16 nTmp = rInf.GetFont()->GetAscent(
rInf.GetVsh(), *rInf.GetOut() );
if( nTmp > nPosAscent )
{
diff --git a/sw/source/core/text/porlay.hxx b/sw/source/core/text/porlay.hxx
index 64c8082d7908..3784cdaad445 100644
--- a/sw/source/core/text/porlay.hxx
+++ b/sw/source/core/text/porlay.hxx
@@ -82,7 +82,7 @@ private:
SwLineLayout *pNext; // The next Line
std::vector<long>* pLLSpaceAdd; // Used for justified alignment
std::deque<sal_uInt16>* pKanaComp; // Used for Kana compression
- KSHORT nRealHeight; // The height resulting from line spacing and register
+ sal_uInt16 nRealHeight; // The height resulting from line spacing and register
bool bFormatAdj : 1;
bool bDummy : 1;
bool bFntChg : 1;
@@ -155,8 +155,8 @@ public:
// Collects the data for the line
void CalcLine( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf );
- inline void SetRealHeight( KSHORT nNew ) { nRealHeight = nNew; }
- inline KSHORT GetRealHeight() const { return nRealHeight; }
+ inline void SetRealHeight( sal_uInt16 nNew ) { nRealHeight = nNew; }
+ inline sal_uInt16 GetRealHeight() const { return nRealHeight; }
// Creates the glue chain for short lines
SwMarginPortion *CalcLeftMargin();
diff --git a/sw/source/core/text/porlin.cxx b/sw/source/core/text/porlin.cxx
index 24712bb2f965..1e4ae55abcbb 100644
--- a/sw/source/core/text/porlin.cxx
+++ b/sw/source/core/text/porlin.cxx
@@ -31,7 +31,7 @@
bool ChkChain( SwLinePortion *pStart )
{
SwLinePortion *pPor = pStart->GetPortion();
- MSHORT nCount = 0;
+ sal_uInt16 nCount = 0;
while( pPor )
{
++nCount;
@@ -63,7 +63,7 @@ SwLinePortion *SwLinePortion::Compress()
return GetLen() || Width() ? this : 0;
}
-KSHORT SwLinePortion::GetViewWidth( const SwTxtSizeInfo & ) const
+sal_uInt16 SwLinePortion::GetViewWidth( const SwTxtSizeInfo & ) const
{
return 0;
}
@@ -84,18 +84,18 @@ void SwLinePortion::PrePaint( const SwTxtPaintInfo& rInf,
OSL_ENSURE( rInf.OnWin(), "SwLinePortion::PrePaint: don't prepaint on a printer");
OSL_ENSURE( !Width(), "SwLinePortion::PrePaint: For Width()==0 only!");
- const KSHORT nViewWidth = GetViewWidth( rInf );
+ const sal_uInt16 nViewWidth = GetViewWidth( rInf );
if( ! nViewWidth )
return;
- const KSHORT nHalfView = nViewWidth / 2;
+ const sal_uInt16 nHalfView = nViewWidth / 2;
sal_uInt16 nLastWidth = pLast->Width();
if ( pLast->InSpaceGrp() && rInf.GetSpaceAdd() )
nLastWidth = nLastWidth + (sal_uInt16)pLast->CalcSpacing( rInf.GetSpaceAdd(), rInf );
- KSHORT nPos;
+ sal_uInt16 nPos;
SwTxtPaintInfo aInf( rInf );
const bool bBidiPor = ( rInf.GetTxtFrm()->IsRightToLeft() ) !=
@@ -108,25 +108,25 @@ void SwLinePortion::PrePaint( const SwTxtPaintInfo& rInf,
switch ( nDir )
{
case 0 :
- nPos = KSHORT( rInf.X() );
+ nPos = sal_uInt16( rInf.X() );
if( nLastWidth > nHalfView )
nPos += nLastWidth - nHalfView;
aInf.X( nPos );
break;
case 900 :
- nPos = KSHORT( rInf.Y() );
+ nPos = sal_uInt16( rInf.Y() );
if( nLastWidth > nHalfView )
nPos -= nLastWidth + nHalfView;
aInf.Y( nPos );
break;
case 1800 :
- nPos = KSHORT( rInf.X() );
+ nPos = sal_uInt16( rInf.X() );
if( nLastWidth > nHalfView )
nPos -= nLastWidth + nHalfView;
aInf.X( nPos );
break;
case 2700 :
- nPos = KSHORT( rInf.Y() );
+ nPos = sal_uInt16( rInf.Y() );
if( nLastWidth > nHalfView )
nPos += nLastWidth - nHalfView;
aInf.Y( nPos );
@@ -222,7 +222,7 @@ SwLinePortion *SwLinePortion::FindPrevPortion( const SwLinePortion *pRoot )
return pPos;
}
-sal_Int32 SwLinePortion::GetCrsrOfst( const KSHORT nOfst ) const
+sal_Int32 SwLinePortion::GetCrsrOfst( const sal_uInt16 nOfst ) const
{
if( nOfst > ( PrtWidth() / 2 ) )
return GetLen();
@@ -249,7 +249,7 @@ bool SwLinePortion::Format( SwTxtFormatInfo &rInf )
const SwLinePortion *pLast = rInf.GetLast();
Height( pLast->Height() );
SetAscent( pLast->GetAscent() );
- const KSHORT nNewWidth = static_cast<sal_uInt16>(rInf.X() + PrtWidth());
+ const sal_uInt16 nNewWidth = static_cast<sal_uInt16>(rInf.X() + PrtWidth());
// Nur Portions mit echter Breite koennen ein true zurueckliefern
// Notizen beispielsweise setzen niemals bFull==true
if( rInf.Width() <= nNewWidth && PrtWidth() && ! IsKernPortion() )
diff --git a/sw/source/core/text/porlin.hxx b/sw/source/core/text/porlin.hxx
index 1d27b8df317b..cb866570d355 100644
--- a/sw/source/core/text/porlin.hxx
+++ b/sw/source/core/text/porlin.hxx
@@ -63,11 +63,11 @@ protected:
SwLinePortion *pPortion;
// Count of chars and spaces on the line
sal_Int32 nLineLength;
- KSHORT nAscent; // Maximum ascender
+ sal_uInt16 nAscent; // Maximum ascender
SwLinePortion();
private:
- MSHORT nWhichPor; // Who's who?
+ sal_uInt16 nWhichPor; // Who's who?
bool m_bJoinBorderWithPrev;
bool m_bJoinBorderWithNext;
@@ -84,13 +84,13 @@ public:
inline sal_Int32 GetLen() const { return nLineLength; }
inline void SetLen( const sal_Int32 nLen ) { nLineLength = nLen; }
inline void SetPortion( SwLinePortion *pNew ){ pPortion = pNew; }
- inline KSHORT &GetAscent() { return nAscent; }
- inline KSHORT GetAscent() const { return nAscent; }
- inline void SetAscent( const KSHORT nNewAsc ) { nAscent = nNewAsc; }
- inline void PrtWidth( KSHORT nNewWidth ) { Width( nNewWidth ); }
- inline KSHORT PrtWidth() const { return Width(); }
- inline void AddPrtWidth( const KSHORT nNew ) { Width( Width() + nNew ); }
- inline void SubPrtWidth( const KSHORT nNew ) { Width( Width() - nNew ); }
+ inline sal_uInt16 &GetAscent() { return nAscent; }
+ inline sal_uInt16 GetAscent() const { return nAscent; }
+ inline void SetAscent( const sal_uInt16 nNewAsc ) { nAscent = nNewAsc; }
+ inline void PrtWidth( sal_uInt16 nNewWidth ) { Width( nNewWidth ); }
+ inline sal_uInt16 PrtWidth() const { return Width(); }
+ inline void AddPrtWidth( const sal_uInt16 nNew ) { Width( Width() + nNew ); }
+ inline void SubPrtWidth( const sal_uInt16 nNew ) { Width( Width() - nNew ); }
inline const SwPosSize &PrtSize() const { return *this; }
@@ -103,8 +103,8 @@ public:
// Returns 0, if there's no payload
virtual SwLinePortion *Compress();
- inline void SetWhichPor( const MSHORT nNew ) { nWhichPor = nNew; }
- inline MSHORT GetWhichPor( ) const { return nWhichPor; }
+ inline void SetWhichPor( const sal_uInt16 nNew ) { nWhichPor = nNew; }
+ inline sal_uInt16 GetWhichPor( ) const { return nWhichPor; }
// Group queries
inline bool InTxtGrp() const { return nWhichPor & PORGRP_TXT; }
@@ -155,7 +155,7 @@ public:
SwLinePortion *FindPrevPortion( const SwLinePortion *pRoot );
SwLinePortion *FindLastPortion();
- virtual sal_Int32 GetCrsrOfst( const KSHORT nOfst ) const;
+ virtual sal_Int32 GetCrsrOfst( const sal_uInt16 nOfst ) const;
virtual SwPosSize GetTxtSize( const SwTxtSizeInfo &rInfo ) const;
void CalcTxtSize( const SwTxtSizeInfo &rInfo );
@@ -172,7 +172,7 @@ public:
virtual bool GetExpTxt( const SwTxtSizeInfo &rInf, OUString &rTxt ) const;
// For SwFldPortion, SwSoftHyphPortion
- virtual KSHORT GetViewWidth( const SwTxtSizeInfo &rInf ) const;
+ virtual sal_uInt16 GetViewWidth( const SwTxtSizeInfo &rInf ) const;
// for text- and multi-portions
virtual long CalcSpacing( long nSpaceAdd, const SwTxtSizeInfo &rInf ) const;
diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx
index 51fc583ddf3f..ebd76e1e4a65 100644
--- a/sw/source/core/text/pormulti.cxx
+++ b/sw/source/core/text/pormulti.cxx
@@ -100,10 +100,10 @@ void SwMultiPortion::CalcSize( SwTxtFormatter& rLine, SwTxtFormatInfo &rInf )
} while ( pLay );
if( HasBrackets() )
{
- KSHORT nTmp = ((SwDoubleLinePortion*)this)->GetBrackets()->nHeight;
+ sal_uInt16 nTmp = ((SwDoubleLinePortion*)this)->GetBrackets()->nHeight;
if( nTmp > Height() )
{
- KSHORT nAdd = ( nTmp - Height() ) / 2;
+ sal_uInt16 nAdd = ( nTmp - Height() ) / 2;
GetRoot().SetAscent( GetRoot().GetAscent() + nAdd );
GetRoot().Height( GetRoot().Height() + nAdd );
Height( nTmp );
@@ -329,7 +329,7 @@ void SwDoubleLinePortion::PaintBracket( SwTxtPaintInfo &rInf,
sal_Unicode cCh = bOpen ? pBracket->cPre : pBracket->cPost;
if( !cCh )
return;
- KSHORT nChWidth = bOpen ? PreWidth() : PostWidth();
+ sal_uInt16 nChWidth = bOpen ? PreWidth() : PostWidth();
if( !nChWidth )
return;
if( !bOpen )
@@ -411,7 +411,7 @@ void SwDoubleLinePortion::FormatBrackets( SwTxtFormatInfo &rInf, SwTwips& nMaxWi
pTmpFnt->SetActual( pBracket->nPostScript );
SwFontSave aSave( rInf, pTmpFnt );
SwPosSize aSize = rInf.GetTxtSize( aStr );
- KSHORT nTmpAsc = rInf.GetAscent();
+ sal_uInt16 nTmpAsc = rInf.GetAscent();
if( nTmpAsc > pBracket->nAscent )
{
pBracket->nHeight += nTmpAsc - pBracket->nAscent;
@@ -504,7 +504,7 @@ bool SwDoubleLinePortion::ChgSpaceAdd( SwLineLayout* pCurr,
if( nMyBlank )
nMultiSpace /= nMyBlank;
- if( nMultiSpace < KSHRT_MAX * SPACING_PRECISION_FACTOR )
+ if( nMultiSpace < USHRT_MAX * SPACING_PRECISION_FACTOR )
{
// pCurr->SetLLSpaceAdd( nMultiSpace, 0 );
// #i65711# SetLLSpaceAdd replaces the first value,
@@ -635,8 +635,8 @@ void SwRubyPortion::_Adjust( SwTxtFormatInfo &rInf )
pCurr = GetRoot().GetNext();
rInf.SetIdx( nOldIdx + GetRoot().GetLen() );
}
- KSHORT nLeft = 0; // the space in front of the first letter
- KSHORT nRight = 0; // the space at the end of the last letter
+ sal_uInt16 nLeft = 0; // the space in front of the first letter
+ sal_uInt16 nRight = 0; // the space at the end of the last letter
sal_uInt16 nSub = 0;
switch ( nAdjustment )
{
@@ -1167,7 +1167,7 @@ class SwSpaceManipulator
SwTxtPaintInfo& rInfo;
SwMultiPortion& rMulti;
std::vector<long>* pOldSpaceAdd;
- MSHORT nOldSpIdx;
+ sal_uInt16 nOldSpIdx;
long nSpaceAdd;
bool bSpaceChg;
sal_uInt8 nOldDir;
@@ -1304,7 +1304,7 @@ void SwTxtPainter::PaintMultiPortion( const SwRect &rPaint,
// old values must be saved and restored at the end
sal_Int32 nOldLen = GetInfo().GetLen();
- KSHORT nOldX = KSHORT(GetInfo().X());
+ sal_uInt16 nOldX = sal_uInt16(GetInfo().X());
long nOldY = GetInfo().Y();
sal_Int32 nOldIdx = GetInfo().GetIdx();
@@ -1338,7 +1338,7 @@ void SwTxtPainter::PaintMultiPortion( const SwRect &rPaint,
GetInfo().SetIdx( nTmpOldIdx );
}
- KSHORT nTmpX = KSHORT(GetInfo().X());
+ sal_uInt16 nTmpX = sal_uInt16(GetInfo().X());
SwLineLayout* pLay = &rMulti.GetRoot();// the first line of the multiportion
SwLinePortion* pPor = pLay->GetFirstPortion();//first portion of these line
@@ -1624,14 +1624,14 @@ bool SwTxtFormatter::BuildMultiPortion( SwTxtFormatInfo &rInf,
SwMultiPortion& rMulti )
{
SwTwips nMaxWidth = rInf.Width();
- KSHORT nOldX = 0;
+ sal_uInt16 nOldX = 0;
if( rMulti.HasBrackets() )
{
sal_Int32 nOldIdx = rInf.GetIdx();
rInf.SetIdx( ((SwDoubleLinePortion&)rMulti).GetBrackets()->nStart );
SeekAndChg( rInf );
- nOldX = KSHORT(GetInfo().X());
+ nOldX = sal_uInt16(GetInfo().X());
((SwDoubleLinePortion&)rMulti).FormatBrackets( rInf, nMaxWidth );
rInf.SetIdx( nOldIdx );
}
@@ -1761,8 +1761,8 @@ bool SwTxtFormatter::BuildMultiPortion( SwTxtFormatInfo &rInf,
bRet = false;
FormatReset( aInf );
aInf.X( nTmpX );
- aInf.Width( KSHORT(nActWidth) );
- aInf.RealWidth( KSHORT(nActWidth) );
+ aInf.Width( sal_uInt16(nActWidth) );
+ aInf.RealWidth( sal_uInt16(nActWidth) );
aInf.SetFirstMulti( bFirstMulti );
aInf.SetNumDone( rInf.IsNumDone() );
aInf.SetFtnDone( rInf.IsFtnDone() );
@@ -1950,8 +1950,8 @@ bool SwTxtFormatter::BuildMultiPortion( SwTxtFormatInfo &rInf,
else if( nAsc < 0 )
nAsc = 0;
rMulti.Width( rMulti.Height() );
- rMulti.Height( KSHORT(nH) );
- rMulti.SetAscent( KSHORT(nAsc) );
+ rMulti.Height( sal_uInt16(nH) );
+ rMulti.SetAscent( sal_uInt16(nAsc) );
bRet = ( rInf.GetPos().X() + rMulti.Width() > rInf.Width() ) &&
nStartIdx != rInf.GetLineStart();
}
@@ -2284,7 +2284,7 @@ SwTxtCursorSave::~SwTxtCursorSave()
{
if( bSpaceChg )
SwDoubleLinePortion::ResetSpaceAdd( pTxtCrsr->pCurr );
- pTxtCrsr->pCurr->Width( KSHORT(nWidth) );
+ pTxtCrsr->pCurr->Width( sal_uInt16(nWidth) );
pTxtCrsr->pCurr = pCurr;
pTxtCrsr->nStart = nStart;
pTxtCrsr->SetPropFont( nOldProp );
diff --git a/sw/source/core/text/pormulti.hxx b/sw/source/core/text/pormulti.hxx
index 054b6347a55c..ca6d8045e0e3 100644
--- a/sw/source/core/text/pormulti.hxx
+++ b/sw/source/core/text/pormulti.hxx
@@ -54,10 +54,10 @@ struct SwMultiCreator
struct SwBracket
{
sal_Int32 nStart; // Start of text attribute determins the font
- KSHORT nAscent; // Ascent of the brackets
- KSHORT nHeight; // Height of them
- KSHORT nPreWidth; // Width of the opening bracket
- KSHORT nPostWidth; // Width of the closing bracket
+ sal_uInt16 nAscent; // Ascent of the brackets
+ sal_uInt16 nHeight; // Height of them
+ sal_uInt16 nPreWidth; // Width of the opening bracket
+ sal_uInt16 nPostWidth; // Width of the closing bracket
sal_Unicode cPre; // Initial character, e.g. '('
sal_Unicode cPost; // Final character, e.g. ')'
sal_uInt8 nPreScript; // Script of the initial character
@@ -165,11 +165,11 @@ public:
void SetBrackets( const SwDoubleLinePortion& rDouble );
void PaintBracket( SwTxtPaintInfo& rInf, long nSpaceAdd, bool bOpen ) const;
void FormatBrackets( SwTxtFormatInfo &rInf, SwTwips& nMaxWidth );
- inline KSHORT PreWidth() const { return pBracket->nPreWidth; };
- inline KSHORT PostWidth() const { return pBracket->nPostWidth; }
+ inline sal_uInt16 PreWidth() const { return pBracket->nPreWidth; };
+ inline sal_uInt16 PostWidth() const { return pBracket->nPostWidth; }
inline void ClearBrackets()
{ pBracket->nPreWidth = pBracket->nPostWidth=0; Width( 0 ); }
- inline KSHORT BracketWidth(){ return PreWidth() + PostWidth(); }
+ inline sal_uInt16 BracketWidth(){ return PreWidth() + PostWidth(); }
void CalcBlanks( SwTxtFormatInfo &rInf );
static void ResetSpaceAdd( SwLineLayout* pCurr );
diff --git a/sw/source/core/text/porref.cxx b/sw/source/core/text/porref.cxx
index b9679a6fbd8c..b51fa720957f 100644
--- a/sw/source/core/text/porref.cxx
+++ b/sw/source/core/text/porref.cxx
@@ -40,7 +40,7 @@ SwIsoRefPortion::SwIsoRefPortion() : nViewWidth(0)
SetWhichPor( POR_ISOREF );
}
-KSHORT SwIsoRefPortion::GetViewWidth( const SwTxtSizeInfo &rInf ) const
+sal_uInt16 SwIsoRefPortion::GetViewWidth( const SwTxtSizeInfo &rInf ) const
{
// Although we are const, nViewWidth should be calculated in the last
// moment possible
diff --git a/sw/source/core/text/porref.hxx b/sw/source/core/text/porref.hxx
index b41fbe2db957..e3ed4d9c39d0 100644
--- a/sw/source/core/text/porref.hxx
+++ b/sw/source/core/text/porref.hxx
@@ -31,14 +31,14 @@ public:
class SwIsoRefPortion : public SwRefPortion
{
- KSHORT nViewWidth;
+ sal_uInt16 nViewWidth;
public:
SwIsoRefPortion();
virtual bool Format( SwTxtFormatInfo &rInf ) SAL_OVERRIDE;
virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE;
virtual SwLinePortion *Compress() SAL_OVERRIDE;
- virtual KSHORT GetViewWidth( const SwTxtSizeInfo &rInf ) const SAL_OVERRIDE;
+ virtual sal_uInt16 GetViewWidth( const SwTxtSizeInfo &rInf ) const SAL_OVERRIDE;
// Accessibility: pass information about this portion to the PortionHandler
virtual void HandlePortion( SwPortionHandler& rPH ) const SAL_OVERRIDE;
diff --git a/sw/source/core/text/porrst.cxx b/sw/source/core/text/porrst.cxx
index e34f0f8915d7..56280f323ac1 100644
--- a/sw/source/core/text/porrst.cxx
+++ b/sw/source/core/text/porrst.cxx
@@ -72,10 +72,10 @@ SwBreakPortion::SwBreakPortion( const SwLinePortion &rPortion )
SetWhichPor( POR_BRK );
}
-sal_Int32 SwBreakPortion::GetCrsrOfst( const KSHORT ) const
+sal_Int32 SwBreakPortion::GetCrsrOfst( const sal_uInt16 ) const
{ return 0; }
-KSHORT SwBreakPortion::GetViewWidth( const SwTxtSizeInfo & ) const
+sal_uInt16 SwBreakPortion::GetViewWidth( const SwTxtSizeInfo & ) const
{ return 0; }
SwLinePortion *SwBreakPortion::Compress()
@@ -241,8 +241,8 @@ SwTwips SwTxtFrm::EmptyHeight() const
const IDocumentRedlineAccess* pIDRA = rTxtNode.getIDocumentRedlineAccess();
if( IDocumentRedlineAccess::IsShowChanges( pIDRA->GetRedlineMode() ) )
{
- MSHORT nRedlPos = pIDRA->GetRedlinePos( rTxtNode, USHRT_MAX );
- if( MSHRT_MAX != nRedlPos )
+ sal_uInt16 nRedlPos = pIDRA->GetRedlinePos( rTxtNode, USHRT_MAX );
+ if( USHRT_MAX != nRedlPos )
{
SwAttrHandler aAttrHandler;
aAttrHandler.Init( GetTxtNode()->GetSwAttrSet(),
@@ -319,7 +319,7 @@ bool SwTxtFrm::FormatEmpty()
ClearPara();
ResetBlinkPor();
}
- SetCacheIdx( MSHRT_MAX );
+ SetCacheIdx( USHRT_MAX );
if( !IsEmpty() )
{
SetEmpty( true );
@@ -336,7 +336,7 @@ bool SwTxtFrm::FormatEmpty()
return true;
}
-bool SwTxtFrm::FillRegister( SwTwips& rRegStart, KSHORT& rRegDiff )
+bool SwTxtFrm::FillRegister( SwTwips& rRegStart, sal_uInt16& rRegDiff )
{
const SwFrm *pFrm = this;
rRegDiff = 0;
@@ -388,7 +388,7 @@ bool SwTxtFrm::FillRegister( SwTwips& rRegStart, KSHORT& rRegDiff )
aFnt.ChgFnt( pSh, *pOut );
rRegDiff = aFnt.GetHeight( pSh, *pOut );
- KSHORT nNettoHeight = rRegDiff;
+ sal_uInt16 nNettoHeight = rRegDiff;
switch( rSpace.GetLineSpaceRule() )
{
@@ -396,7 +396,7 @@ bool SwTxtFrm::FillRegister( SwTwips& rRegStart, KSHORT& rRegDiff )
break;
case SVX_LINE_SPACE_MIN:
{
- if( rRegDiff < KSHORT( rSpace.GetLineHeight() ) )
+ if( rRegDiff < sal_uInt16( rSpace.GetLineHeight() ) )
rRegDiff = rSpace.GetLineHeight();
break;
}
@@ -416,7 +416,7 @@ bool SwTxtFrm::FillRegister( SwTwips& rRegStart, KSHORT& rRegDiff )
nTmp /= 100;
if( !nTmp )
++nTmp;
- rRegDiff = (KSHORT)nTmp;
+ rRegDiff = (sal_uInt16)nTmp;
nNettoHeight = rRegDiff;
break;
}
@@ -525,7 +525,7 @@ bool SwControlCharPortion::Format( SwTxtFormatInfo &rInf )
return false;
}
-KSHORT SwControlCharPortion::GetViewWidth( const SwTxtSizeInfo& rInf ) const
+sal_uInt16 SwControlCharPortion::GetViewWidth( const SwTxtSizeInfo& rInf ) const
{
if( !mnViewWidth )
mnViewWidth = rInf.GetTxtSize(OUString(' ')).Width();
diff --git a/sw/source/core/text/porrst.hxx b/sw/source/core/text/porrst.hxx
index f16093d35c09..df15859c0690 100644
--- a/sw/source/core/text/porrst.hxx
+++ b/sw/source/core/text/porrst.hxx
@@ -42,8 +42,8 @@ public:
virtual SwLinePortion *Compress() SAL_OVERRIDE;
virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE;
virtual bool Format( SwTxtFormatInfo &rInf ) SAL_OVERRIDE;
- virtual KSHORT GetViewWidth( const SwTxtSizeInfo &rInf ) const SAL_OVERRIDE;
- virtual sal_Int32 GetCrsrOfst( const MSHORT nOfst ) const SAL_OVERRIDE;
+ virtual sal_uInt16 GetViewWidth( const SwTxtSizeInfo &rInf ) const SAL_OVERRIDE;
+ virtual sal_Int32 GetCrsrOfst( const sal_uInt16 nOfst ) const SAL_OVERRIDE;
// Accessibility: pass information about this portion to the PortionHandler
virtual void HandlePortion( SwPortionHandler& rPH ) const SAL_OVERRIDE;
@@ -97,12 +97,12 @@ public:
// The SwHangingPortion is the corresponding textportion to do that.
class SwHangingPortion : public SwTxtPortion
{
- KSHORT nInnerWidth;
+ sal_uInt16 nInnerWidth;
public:
inline SwHangingPortion( SwPosSize aSize ) : nInnerWidth( aSize.Width() )
{ SetWhichPor( POR_HNG ); SetLen( 1 ); Height( aSize.Height() ); }
- inline KSHORT GetInnerWidth() const { return nInnerWidth; }
+ inline sal_uInt16 GetInnerWidth() const { return nInnerWidth; }
};
// Used to hide text
@@ -134,7 +134,7 @@ public:
virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE;
virtual bool Format( SwTxtFormatInfo &rInf ) SAL_OVERRIDE;
- virtual KSHORT GetViewWidth( const SwTxtSizeInfo& rInf ) const SAL_OVERRIDE;
+ virtual sal_uInt16 GetViewWidth( const SwTxtSizeInfo& rInf ) const SAL_OVERRIDE;
};
#endif
diff --git a/sw/source/core/text/portab.hxx b/sw/source/core/text/portab.hxx
index de8afaf29784..aa0ba81e94e3 100644
--- a/sw/source/core/text/portab.hxx
+++ b/sw/source/core/text/portab.hxx
@@ -23,20 +23,20 @@
class SwTabPortion : public SwFixPortion
{
- const KSHORT nTabPos;
+ const sal_uInt16 nTabPos;
const sal_Unicode cFill;
const bool bAutoTabStop;
// Format() branches either into PreFormat() or PostFormat()
bool PreFormat( SwTxtFormatInfo &rInf );
public:
- SwTabPortion( const KSHORT nTabPos, const sal_Unicode cFill = '\0', const bool bAutoTab = true );
+ SwTabPortion( const sal_uInt16 nTabPos, const sal_Unicode cFill = '\0', const bool bAutoTab = true );
virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE;
virtual bool Format( SwTxtFormatInfo &rInf ) SAL_OVERRIDE;
virtual void FormatEOL( SwTxtFormatInfo &rInf ) SAL_OVERRIDE;
bool PostFormat( SwTxtFormatInfo &rInf );
inline bool IsFilled() const { return 0 != cFill; }
- inline KSHORT GetTabPos() const { return nTabPos; }
+ inline sal_uInt16 GetTabPos() const { return nTabPos; }
inline bool IsAutoTabStop() const { return bAutoTabStop; }
// Accessibility: pass information about this portion to the PortionHandler
@@ -48,7 +48,7 @@ public:
class SwTabLeftPortion : public SwTabPortion
{
public:
- inline SwTabLeftPortion( const KSHORT nTabPosVal, const sal_Unicode cFillChar='\0', bool bAutoTab = true )
+ inline SwTabLeftPortion( const sal_uInt16 nTabPosVal, const sal_Unicode cFillChar='\0', bool bAutoTab = true )
: SwTabPortion( nTabPosVal, cFillChar, bAutoTab )
{ SetWhichPor( POR_TABLEFT ); }
OUTPUT_OPERATOR_OVERRIDE
@@ -57,7 +57,7 @@ public:
class SwTabRightPortion : public SwTabPortion
{
public:
- inline SwTabRightPortion( const KSHORT nTabPosVal, const sal_Unicode cFillChar='\0' )
+ inline SwTabRightPortion( const sal_uInt16 nTabPosVal, const sal_Unicode cFillChar='\0' )
: SwTabPortion( nTabPosVal, cFillChar )
{ SetWhichPor( POR_TABRIGHT ); }
OUTPUT_OPERATOR_OVERRIDE
@@ -66,7 +66,7 @@ public:
class SwTabCenterPortion : public SwTabPortion
{
public:
- inline SwTabCenterPortion( const KSHORT nTabPosVal, const sal_Unicode cFillChar='\0' )
+ inline SwTabCenterPortion( const sal_uInt16 nTabPosVal, const sal_Unicode cFillChar='\0' )
: SwTabPortion( nTabPosVal, cFillChar )
{ SetWhichPor( POR_TABCENTER ); }
OUTPUT_OPERATOR_OVERRIDE
@@ -84,7 +84,7 @@ class SwTabDecimalPortion : public SwTabPortion
sal_uInt16 mnWidthOfPortionsUpTpDecimalPosition;
public:
- inline SwTabDecimalPortion( const KSHORT nTabPosVal, const sal_Unicode cTab,
+ inline SwTabDecimalPortion( const sal_uInt16 nTabPosVal, const sal_Unicode cTab,
const sal_Unicode cFillChar = '\0' )
: SwTabPortion( nTabPosVal, cFillChar ),
mcTab(cTab),
@@ -108,7 +108,7 @@ public:
class SwAutoTabDecimalPortion : public SwTabDecimalPortion
{
public:
- inline SwAutoTabDecimalPortion( const KSHORT nTabPosVal, const sal_Unicode cTab,
+ inline SwAutoTabDecimalPortion( const sal_uInt16 nTabPosVal, const sal_Unicode cTab,
const sal_Unicode cFillChar = '\0' )
: SwTabDecimalPortion( nTabPosVal, cTab, cFillChar )
{ SetLen( 0 ); }
diff --git a/sw/source/core/text/portox.cxx b/sw/source/core/text/portox.cxx
index d92584fa1615..a45376e1f9b5 100644
--- a/sw/source/core/text/portox.cxx
+++ b/sw/source/core/text/portox.cxx
@@ -40,7 +40,7 @@ SwIsoToxPortion::SwIsoToxPortion() : nViewWidth(0)
SetWhichPor( POR_ISOTOX );
}
-KSHORT SwIsoToxPortion::GetViewWidth( const SwTxtSizeInfo &rInf ) const
+sal_uInt16 SwIsoToxPortion::GetViewWidth( const SwTxtSizeInfo &rInf ) const
{
// Although we are const, nViewWidth should be calculated in the last
// moment possible
diff --git a/sw/source/core/text/portox.hxx b/sw/source/core/text/portox.hxx
index 6f05325a6ec6..0f6483fc8e1a 100644
--- a/sw/source/core/text/portox.hxx
+++ b/sw/source/core/text/portox.hxx
@@ -32,14 +32,14 @@ public:
class SwIsoToxPortion : public SwToxPortion
{
- KSHORT nViewWidth;
+ sal_uInt16 nViewWidth;
public:
SwIsoToxPortion();
virtual bool Format( SwTxtFormatInfo &rInf ) SAL_OVERRIDE;
virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE;
virtual SwLinePortion *Compress() SAL_OVERRIDE;
- virtual KSHORT GetViewWidth( const SwTxtSizeInfo &rInf ) const SAL_OVERRIDE;
+ virtual sal_uInt16 GetViewWidth( const SwTxtSizeInfo &rInf ) const SAL_OVERRIDE;
// Accessibility: pass information about this portion to the PortionHandler
virtual void HandlePortion( SwPortionHandler& rPH ) const SAL_OVERRIDE;
diff --git a/sw/source/core/text/portxt.cxx b/sw/source/core/text/portxt.cxx
index 420403e6ef7d..60db2763a473 100644
--- a/sw/source/core/text/portxt.cxx
+++ b/sw/source/core/text/portxt.cxx
@@ -219,7 +219,7 @@ void SwTxtPortion::BreakCut( SwTxtFormatInfo &rInf, const SwTxtGuess &rGuess )
// The word/char is larger than the line
// Special case 1: The word is larger than the line
// We truncate ...
- const KSHORT nLineWidth = (KSHORT)(rInf.Width() - rInf.X());
+ const sal_uInt16 nLineWidth = (sal_uInt16)(rInf.Width() - rInf.X());
sal_Int32 nLen = rGuess.CutPos() - rInf.GetIdx();
if( nLen )
{
@@ -233,7 +233,7 @@ void SwTxtPortion::BreakCut( SwTxtFormatInfo &rInf, const SwTxtGuess &rGuess )
// changing these values requires also changing them in
// guess.cxx
- KSHORT nItalic = 0;
+ sal_uInt16 nItalic = 0;
if( ITALIC_NONE != rInf.GetFont()->GetItalic() && !rInf.NotEOL() )
{
nItalic = Height() / 12;
@@ -395,7 +395,7 @@ bool SwTxtPortion::_Format( SwTxtFormatInfo &rInf )
Width( aGuess.BreakWidth() );
else
// this actually should not happen
- Width( KSHORT(rInf.Width() - rInf.X()) );
+ Width( sal_uInt16(rInf.Width() - rInf.X()) );
SetLen( aGuess.BreakPos() - rInf.GetIdx() );
@@ -476,7 +476,7 @@ void SwTxtPortion::FormatEOL( SwTxtFormatInfo &rInf )
// First set ourselves and the insert, because there could be
// a SwLineLayout
- KSHORT nBlankSize;
+ sal_uInt16 nBlankSize;
if( nHoleLen == GetLen() )
nBlankSize = Width();
else
@@ -491,7 +491,7 @@ void SwTxtPortion::FormatEOL( SwTxtFormatInfo &rInf )
}
}
-sal_Int32 SwTxtPortion::GetCrsrOfst( const KSHORT nOfst ) const
+sal_Int32 SwTxtPortion::GetCrsrOfst( const sal_uInt16 nOfst ) const
{
OSL_ENSURE( !this, "SwTxtPortion::GetCrsrOfst: don't use this method!" );
return SwLinePortion::GetCrsrOfst( nOfst );
@@ -746,7 +746,7 @@ SwPosSize SwTxtInputFldPortion::GetTxtSize( const SwTxtSizeInfo &rInf ) const
return rInf.GetTxtSize();
}
-KSHORT SwTxtInputFldPortion::GetViewWidth( const SwTxtSizeInfo &rInf ) const
+sal_uInt16 SwTxtInputFldPortion::GetViewWidth( const SwTxtSizeInfo &rInf ) const
{
if( !Width()
&& ContainsOnlyDummyChars()
diff --git a/sw/source/core/text/portxt.hxx b/sw/source/core/text/portxt.hxx
index 647100ac2d75..51ed3f129d56 100644
--- a/sw/source/core/text/portxt.hxx
+++ b/sw/source/core/text/portxt.hxx
@@ -38,7 +38,7 @@ public:
virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE;
virtual bool Format( SwTxtFormatInfo &rInf ) SAL_OVERRIDE;
virtual void FormatEOL( SwTxtFormatInfo &rInf ) SAL_OVERRIDE;
- virtual sal_Int32 GetCrsrOfst( const KSHORT nOfst ) const SAL_OVERRIDE;
+ virtual sal_Int32 GetCrsrOfst( const sal_uInt16 nOfst ) const SAL_OVERRIDE;
virtual SwPosSize GetTxtSize( const SwTxtSizeInfo &rInfo ) const SAL_OVERRIDE;
virtual bool GetExpTxt( const SwTxtSizeInfo &rInf, OUString &rTxt ) const SAL_OVERRIDE;
virtual long CalcSpacing( long nSpaceAdd, const SwTxtSizeInfo &rInf ) const SAL_OVERRIDE;
@@ -62,7 +62,7 @@ public:
virtual bool Format( SwTxtFormatInfo &rInf ) SAL_OVERRIDE;
virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE;
- virtual KSHORT GetViewWidth( const SwTxtSizeInfo &rInf ) const SAL_OVERRIDE;
+ virtual sal_uInt16 GetViewWidth( const SwTxtSizeInfo &rInf ) const SAL_OVERRIDE;
virtual bool GetExpTxt( const SwTxtSizeInfo &rInf, OUString &rTxt ) const SAL_OVERRIDE;
virtual SwPosSize GetTxtSize( const SwTxtSizeInfo &rInfo ) const SAL_OVERRIDE;
@@ -74,11 +74,11 @@ private:
class SwHolePortion : public SwLinePortion
{
- KSHORT nBlankWidth;
+ sal_uInt16 nBlankWidth;
public:
SwHolePortion( const SwTxtPortion &rPor );
- inline KSHORT GetBlankWidth( ) const { return nBlankWidth; }
- inline void SetBlankWidth( const KSHORT nNew ) { nBlankWidth = nNew; }
+ inline sal_uInt16 GetBlankWidth( ) const { return nBlankWidth; }
+ inline void SetBlankWidth( const sal_uInt16 nNew ) { nBlankWidth = nNew; }
virtual SwLinePortion *Compress() SAL_OVERRIDE;
virtual bool Format( SwTxtFormatInfo &rInf ) SAL_OVERRIDE;
virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE;
diff --git a/sw/source/core/text/possiz.hxx b/sw/source/core/text/possiz.hxx
index 980a7bf0bd90..20b7bc279755 100644
--- a/sw/source/core/text/possiz.hxx
+++ b/sw/source/core/text/possiz.hxx
@@ -25,17 +25,17 @@
// Compared to the SV sizes SwPosSize is always positive
class SwPosSize
{
- KSHORT nWidth;
- KSHORT nHeight;
+ sal_uInt16 nWidth;
+ sal_uInt16 nHeight;
public:
- inline SwPosSize( const KSHORT nW = 0, const KSHORT nH = 0 )
+ inline SwPosSize( const sal_uInt16 nW = 0, const sal_uInt16 nH = 0 )
: nWidth(nW), nHeight(nH) { }
inline SwPosSize( const Size &rSize )
- : nWidth(KSHORT(rSize.Width())), nHeight(KSHORT(rSize.Height())){ }
- inline KSHORT Height() const { return nHeight; }
- inline void Height( const KSHORT nNew ) { nHeight = nNew; }
- inline KSHORT Width() const { return nWidth; }
- inline void Width( const KSHORT nNew ) { nWidth = nNew; }
+ : nWidth(sal_uInt16(rSize.Width())), nHeight(sal_uInt16(rSize.Height())){ }
+ inline sal_uInt16 Height() const { return nHeight; }
+ inline void Height( const sal_uInt16 nNew ) { nHeight = nNew; }
+ inline sal_uInt16 Width() const { return nWidth; }
+ inline void Width( const sal_uInt16 nNew ) { nWidth = nNew; }
inline Size SvLSize() const { return Size( nWidth, nHeight ); }
inline void SvLSize( const Size &rSize );
@@ -53,20 +53,20 @@ inline SwPosSize &SwPosSize::operator=(const SwPosSize &rSize )
inline void SwPosSize::SvLSize( const Size &rSize )
{
- nWidth = KSHORT(rSize.Width());
- nHeight = KSHORT(rSize.Height());
+ nWidth = sal_uInt16(rSize.Width());
+ nHeight = sal_uInt16(rSize.Height());
}
inline void SwPosSize::SvXSize( const Size &rSize )
{
- nHeight = KSHORT(rSize.Width());
- nWidth = KSHORT(rSize.Height());
+ nHeight = sal_uInt16(rSize.Width());
+ nWidth = sal_uInt16(rSize.Height());
}
inline SwPosSize &SwPosSize::operator=( const Size &rSize )
{
- nWidth = KSHORT(rSize.Width());
- nHeight = KSHORT(rSize.Height());
+ nWidth = sal_uInt16(rSize.Width());
+ nHeight = sal_uInt16(rSize.Height());
return *this;
}
diff --git a/sw/source/core/text/redlnitr.cxx b/sw/source/core/text/redlnitr.cxx
index 7fdc70127cf7..15917b888a6a 100644
--- a/sw/source/core/text/redlnitr.cxx
+++ b/sw/source/core/text/redlnitr.cxx
@@ -248,7 +248,7 @@ short SwRedlineItr::_Seek(SwFont& rFnt, sal_Int32 nNew, sal_Int32 nOld)
FillHints( pRed->GetAuthor(), pRed->GetType() );
SfxWhichIter aIter( *pSet );
- MSHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while( nWhich )
{
const SfxPoolItem* pItem;
@@ -278,7 +278,7 @@ short SwRedlineItr::_Seek(SwFont& rFnt, sal_Int32 nNew, sal_Int32 nOld)
return nRet + EnterExtend( rFnt, nNew );
}
-void SwRedlineItr::FillHints( MSHORT nAuthor, RedlineType_t eType )
+void SwRedlineItr::FillHints( sal_uInt16 nAuthor, RedlineType_t eType )
{
switch ( eType )
{
@@ -363,7 +363,7 @@ bool SwRedlineItr::_ChkSpecialUnderline() const
// below the base line
for (size_t i = 0; i < m_Hints.size(); ++i)
{
- MSHORT nWhich = m_Hints[i]->Which();
+ sal_uInt16 nWhich = m_Hints[i]->Which();
if( RES_CHRATR_UNDERLINE == nWhich ||
RES_CHRATR_ESCAPEMENT == nWhich )
return true;
@@ -441,11 +441,11 @@ short SwExtend::Enter(SwFont& rFnt, sal_Int32 nNew)
bool SwExtend::_Leave(SwFont& rFnt, sal_Int32 nNew)
{
OSL_ENSURE( Inside(), "SwExtend: Leave without Enter" );
- MSHORT nOldAttr = rArr[ nPos - nStart ];
+ sal_uInt16 nOldAttr = rArr[ nPos - nStart ];
nPos = nNew;
if( Inside() )
{ // We stayed within the ExtendText-section
- MSHORT nAttr = rArr[ nPos - nStart ];
+ sal_uInt16 nAttr = rArr[ nPos - nStart ];
if( nOldAttr != nAttr ) // Is there an (inner) change of attributes?
{
rFnt = *pFnt;
@@ -472,7 +472,7 @@ sal_Int32 SwExtend::Next( sal_Int32 nNext )
else if( nPos < nEnd )
{
sal_Int32 nIdx = nPos - nStart;
- MSHORT nAttr = rArr[ nIdx ];
+ sal_uInt16 nAttr = rArr[ nIdx ];
while( ++nIdx < (sal_Int32)rArr.size() && nAttr == rArr[ nIdx ] )
; //nothing
nIdx = nIdx + nStart;
diff --git a/sw/source/core/text/redlnitr.hxx b/sw/source/core/text/redlnitr.hxx
index 9ea5e207df27..48fe9d8a1101 100644
--- a/sw/source/core/text/redlnitr.hxx
+++ b/sw/source/core/text/redlnitr.hxx
@@ -72,7 +72,7 @@ class SwRedlineItr
void _Clear( SwFont* pFnt );
bool _ChkSpecialUnderline() const;
- void FillHints( MSHORT nAuthor, RedlineType_t eType );
+ void FillHints( sal_uInt16 nAuthor, RedlineType_t eType );
short _Seek( SwFont& rFnt, sal_Int32 nNew, sal_Int32 nOld );
sal_Int32 _GetNextRedln( sal_Int32 nNext );
short EnterExtend( SwFont& rFnt, sal_Int32 nNew )
diff --git a/sw/source/core/text/txtcache.cxx b/sw/source/core/text/txtcache.cxx
index 7e8a5929a36d..b6d1db0377c4 100644
--- a/sw/source/core/text/txtcache.cxx
+++ b/sw/source/core/text/txtcache.cxx
@@ -72,20 +72,20 @@ bool SwTxtFrm::_HasPara() const
return true;
}
else
- ((SwTxtFrm*)this)->nCacheIdx = MSHRT_MAX;
+ ((SwTxtFrm*)this)->nCacheIdx = USHRT_MAX;
return false;
}
SwParaPortion *SwTxtFrm::GetPara()
{
- if ( GetCacheIdx() != MSHRT_MAX )
+ if ( GetCacheIdx() != USHRT_MAX )
{ SwTxtLine *pLine = (SwTxtLine*)SwTxtFrm::GetTxtCache()->
Get( this, GetCacheIdx(), false );
if ( pLine )
return pLine->GetPara();
else
- nCacheIdx = MSHRT_MAX;
+ nCacheIdx = USHRT_MAX;
}
return 0;
}
@@ -93,7 +93,7 @@ SwParaPortion *SwTxtFrm::GetPara()
void SwTxtFrm::ClearPara()
{
OSL_ENSURE( !IsLocked(), "+SwTxtFrm::ClearPara: this is locked." );
- if ( !IsLocked() && GetCacheIdx() != MSHRT_MAX )
+ if ( !IsLocked() && GetCacheIdx() != USHRT_MAX )
{
SwTxtLine *pTxtLine = (SwTxtLine*)SwTxtFrm::GetTxtCache()->
Get( this, GetCacheIdx(), false );
@@ -103,13 +103,13 @@ void SwTxtFrm::ClearPara()
pTxtLine->SetPara( 0 );
}
else
- nCacheIdx = MSHRT_MAX;
+ nCacheIdx = USHRT_MAX;
}
}
void SwTxtFrm::SetPara( SwParaPortion *pNew, bool bDelete )
{
- if ( GetCacheIdx() != MSHRT_MAX )
+ if ( GetCacheIdx() != USHRT_MAX )
{
// Only change the information, the CacheObj stays there
SwTxtLine *pTxtLine = (SwTxtLine*)SwTxtFrm::GetTxtCache()->
@@ -123,7 +123,7 @@ void SwTxtFrm::SetPara( SwParaPortion *pNew, bool bDelete )
else
{
OSL_ENSURE( !pNew, "+SetPara: Losing SwParaPortion" );
- nCacheIdx = MSHRT_MAX;
+ nCacheIdx = USHRT_MAX;
}
}
else if ( pNew )
diff --git a/sw/source/core/text/txtdrop.cxx b/sw/source/core/text/txtdrop.cxx
index 73d1afd83203..9cc06fca5b3f 100644
--- a/sw/source/core/text/txtdrop.cxx
+++ b/sw/source/core/text/txtdrop.cxx
@@ -96,10 +96,10 @@ SwDropPortionPart::~SwDropPortionPart()
}
// SwDropPortion CTor, DTor
-SwDropPortion::SwDropPortion( const MSHORT nLineCnt,
- const KSHORT nDrpHeight,
- const KSHORT nDrpDescent,
- const KSHORT nDist )
+SwDropPortion::SwDropPortion( const sal_uInt16 nLineCnt,
+ const sal_uInt16 nDrpHeight,
+ const sal_uInt16 nDrpDescent,
+ const sal_uInt16 nDist )
: pPart( 0 ),
nLines( nLineCnt ),
nDropHeight(nDrpHeight),
@@ -244,8 +244,8 @@ void SwDropPortion::PaintTxt( const SwTxtPaintInfo &rInf ) const
const SwDropPortionPart* pCurrPart = GetPart();
const sal_Int32 nOldLen = GetLen();
- const KSHORT nOldWidth = Width();
- const KSHORT nOldAscent = GetAscent();
+ const sal_uInt16 nOldWidth = Width();
+ const sal_uInt16 nOldAscent = GetAscent();
const SwTwips nBasePosY = rInf.Y();
((SwTxtPaintInfo&)rInf).Y( nBasePosY + nY );
@@ -293,11 +293,11 @@ void SwDropPortion::PaintDrop( const SwTxtPaintInfo &rInf ) const
return;
// set the lying values
- const KSHORT nOldHeight = Height();
- const KSHORT nOldWidth = Width();
- const KSHORT nOldAscent = GetAscent();
+ const sal_uInt16 nOldHeight = Height();
+ const sal_uInt16 nOldWidth = Width();
+ const sal_uInt16 nOldAscent = GetAscent();
const SwTwips nOldPosY = rInf.Y();
- const KSHORT nOldPosX = (KSHORT)rInf.X();
+ const sal_uInt16 nOldPosX = (sal_uInt16)rInf.X();
const SwParaPortion *pPara = rInf.GetParaPortion();
const Point aOutPos( nOldPosX + nX, nOldPosY - pPara->GetAscent()
- pPara->GetRealHeight() + pPara->Height() );
@@ -418,18 +418,18 @@ SwPosSize SwDropPortion::GetTxtSize( const SwTxtSizeInfo &rInf ) const
return aPosSize;
}
-sal_Int32 SwDropPortion::GetCrsrOfst( const KSHORT ) const
+sal_Int32 SwDropPortion::GetCrsrOfst( const sal_uInt16 ) const
{
return 0;
}
-void SwTxtFormatter::CalcDropHeight( const MSHORT nLines )
+void SwTxtFormatter::CalcDropHeight( const sal_uInt16 nLines )
{
const SwLinePortion *const pOldCurr = GetCurr();
- KSHORT nDropHght = 0;
- KSHORT nAscent = 0;
- KSHORT nHeight = 0;
- KSHORT nDropLns = 0;
+ sal_uInt16 nDropHght = 0;
+ sal_uInt16 nAscent = 0;
+ sal_uInt16 nHeight = 0;
+ sal_uInt16 nDropLns = 0;
const bool bRegisterOld = IsRegisterOn();
bRegisterOn = false;
@@ -483,11 +483,11 @@ void SwTxtFormatter::CalcDropHeight( const MSHORT nLines )
// We assume hat the font height doesn't change and that at first there
// are at least as many lines, as the DropCap-setting claims
-void SwTxtFormatter::GuessDropHeight( const MSHORT nLines )
+void SwTxtFormatter::GuessDropHeight( const sal_uInt16 nLines )
{
OSL_ENSURE( nLines, "GuessDropHeight: Give me more Lines!" );
- KSHORT nAscent = 0;
- KSHORT nHeight = 0;
+ sal_uInt16 nAscent = 0;
+ sal_uInt16 nHeight = 0;
SetDropLines( nLines );
if ( GetDropLines() > 1 )
{
@@ -609,7 +609,7 @@ void SwTxtPainter::PaintDropPortion()
// MarginPortion und Adjustment!
const SwLinePortion *pPor = pCurr->GetFirstPortion();
- KSHORT nX = 0;
+ sal_uInt16 nX = 0;
while( pPor && !pPor->IsDropPortion() )
{
nX = nX + pPor->Width();
@@ -618,7 +618,7 @@ void SwTxtPainter::PaintDropPortion()
Point aLineOrigin( GetTopLeft() );
aLineOrigin.X() += nX;
- KSHORT nTmpAscent, nTmpHeight;
+ sal_uInt16 nTmpAscent, nTmpHeight;
CalcAscentAndHeight( nTmpAscent, nTmpHeight );
aLineOrigin.Y() += nTmpAscent;
GetInfo().SetIdx( GetStart() );
@@ -639,9 +639,9 @@ class SwDropCapCache
long aMagicNo[ DROP_CACHE_SIZE ];
OUString aTxt[ DROP_CACHE_SIZE ];
sal_uInt16 aFactor[ DROP_CACHE_SIZE ];
- KSHORT aWishedHeight[ DROP_CACHE_SIZE ];
+ sal_uInt16 aWishedHeight[ DROP_CACHE_SIZE ];
short aDescent[ DROP_CACHE_SIZE ];
- MSHORT nIndex;
+ sal_uInt16 nIndex;
public:
SwDropCapCache();
~SwDropCapCache(){}
@@ -663,7 +663,7 @@ void SwDropPortion::DeleteDropCapCache()
void SwDropCapCache::CalcFontSize( SwDropPortion* pDrop, SwTxtFormatInfo &rInf )
{
const void* pFntNo = 0;
- MSHORT nTmpIdx = 0;
+ sal_uInt16 nTmpIdx = 0;
OSL_ENSURE( pDrop->GetPart(),"DropPortion without part during font calculation");
@@ -721,7 +721,7 @@ void SwDropCapCache::CalcFontSize( SwDropPortion* pDrop, SwTxtFormatInfo &rInf )
// save keys for cache
aMagicNo[ nTmpIdx ] = sal_IntPtr(pFntNo);
aTxt[ nTmpIdx ] = aStr;
- aWishedHeight[ nTmpIdx ] = KSHORT(nWishedHeight);
+ aWishedHeight[ nTmpIdx ] = sal_uInt16(nWishedHeight);
// save initial scaling factor
aFactor[ nTmpIdx ] = (sal_uInt16)nFactor;
}
@@ -729,7 +729,7 @@ void SwDropCapCache::CalcFontSize( SwDropPortion* pDrop, SwTxtFormatInfo &rInf )
bool bGrow = ( pDrop->GetLen() != 0 );
// for growing control
- long nMax = KSHRT_MAX;
+ long nMax = USHRT_MAX;
long nMin = 0;
#if OSL_DEBUG_LEVEL > 1
long nGrow = 0;
@@ -800,7 +800,7 @@ void SwDropCapCache::CalcFontSize( SwDropPortion* pDrop, SwTxtFormatInfo &rInf )
if ( bHaveGlyphRect )
{
FontMetric aWinMet( pWin->GetFontMetric() );
- nAscent = (KSHORT) aWinMet.GetAscent();
+ nAscent = (sal_uInt16) aWinMet.GetAscent();
}
else
// We do not have a window or our window could not
@@ -1019,8 +1019,8 @@ bool SwDropPortion::Format( SwTxtFormatInfo &rInf )
nDistance = 0;
else
{
- const KSHORT nWant = Width() + GetDistance();
- const KSHORT nRest = (sal_uInt16)(rInf.Width() - rInf.X());
+ const sal_uInt16 nWant = Width() + GetDistance();
+ const sal_uInt16 nRest = (sal_uInt16)(rInf.Width() - rInf.X());
if( ( nWant > nRest ) ||
lcl_IsDropFlyInter( rInf, Width() + GetDistance(), nDropHeight ) )
nDistance = 0;
diff --git a/sw/source/core/text/txtfld.cxx b/sw/source/core/text/txtfld.cxx
index 9b13c2b0a99a..c8d7fbda5572 100644
--- a/sw/source/core/text/txtfld.cxx
+++ b/sw/source/core/text/txtfld.cxx
@@ -157,8 +157,8 @@ SwExpandPortion *SwTxtFormatter::NewFldPortion( SwTxtFormatInfo &rInf,
const SwRootFrm* pTmpRootFrm = pSh->GetLayout();
const bool bVirt = pTmpRootFrm->IsVirtPageNum();
- MSHORT nVirtNum = pFrame->GetVirtPageNum();
- MSHORT nNumPages = pTmpRootFrm->GetPageNum();
+ sal_uInt16 nVirtNum = pFrame->GetVirtPageNum();
+ sal_uInt16 nNumPages = pTmpRootFrm->GetPageNum();
sal_Int16 nNumFmt = -1;
if(SVX_NUM_PAGEDESC == pFld->GetFormat())
nNumFmt = pFrame->FindPageFrm()->GetPageDesc()->GetNumType().GetNumberingType();
@@ -455,7 +455,7 @@ SwNumberPortion *SwTxtFormatter::NewNumberPortion( SwTxtFormatInfo &rInf ) const
const bool bCenter = SVX_ADJUST_CENTER == rNumFmt.GetNumAdjust();
const bool bLabelAlignmentPosAndSpaceModeActive(
rNumFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT );
- const KSHORT nMinDist = bLabelAlignmentPosAndSpaceModeActive
+ const sal_uInt16 nMinDist = bLabelAlignmentPosAndSpaceModeActive
? 0 : rNumFmt.GetCharTextDistance();
if( SVX_NUM_BITMAP == rNumFmt.GetNumberingType() )
diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx
index fd40d7886327..e7f7699c82db 100644
--- a/sw/source/core/text/txtfly.cxx
+++ b/sw/source/core/text/txtfly.cxx
@@ -130,11 +130,11 @@ SwContourCache::SwContourCache() :
SwContourCache::~SwContourCache()
{
- for( MSHORT i = 0; i < nObjCnt; delete pTextRanger[ i++ ] )
+ for( sal_uInt16 i = 0; i < nObjCnt; delete pTextRanger[ i++ ] )
;
}
-void SwContourCache::ClrObject( MSHORT nPos )
+void SwContourCache::ClrObject( sal_uInt16 nPos )
{
assert(pTextRanger[nPos] && "ClrObject: Already cleared. Good Bye!");
nPntCnt -= pTextRanger[ nPos ]->GetPointCount();
@@ -149,7 +149,7 @@ void SwContourCache::ClrObject( MSHORT nPos )
void ClrContourCache( const SdrObject *pObj )
{
if( pContourCache && pObj )
- for( MSHORT i = 0; i < pContourCache->GetCount(); ++i )
+ for( sal_uInt16 i = 0; i < pContourCache->GetCount(); ++i )
if( pObj == pContourCache->GetObject( i ) )
{
pContourCache->ClrObject( i );
@@ -161,7 +161,7 @@ void ClrContourCache()
{
if( pContourCache )
{
- for( MSHORT i = 0; i < pContourCache->GetCount();
+ for( sal_uInt16 i = 0; i < pContourCache->GetCount();
delete pContourCache->pTextRanger[ i++ ] )
;
pContourCache->nObjCnt = 0;
@@ -208,7 +208,7 @@ const SwRect SwContourCache::ContourRect( const SwFmt* pFmt,
const long nXPos, const bool bRight )
{
SwRect aRet;
- MSHORT nPos = 0; // Suche im Cache ...
+ sal_uInt16 nPos = 0; // Suche im Cache ...
while( nPos < GetCount() && pObj != pSdrObj[ nPos ] )
++nPos;
if( GetCount() == nPos ) // nicht gefunden
@@ -281,10 +281,10 @@ const SwRect SwContourCache::ContourRect( const SwFmt* pFmt,
LongDqPtr pTmp = pTextRanger[ 0 ]->GetTextRanges( aRange );
- MSHORT nCount;
+ sal_uInt16 nCount;
if( 0 != ( nCount = pTmp->size() ) )
{
- MSHORT nIdx = 0;
+ sal_uInt16 nIdx = 0;
while( nIdx < nCount && (*pTmp)[ nIdx ] < nXPos )
++nIdx;
bool bOdd = (nIdx % 2);
@@ -434,7 +434,7 @@ bool SwTxtFly::IsAnyObj( const SwRect &rRect ) const
if( pSorted ) // bOn actually makes sure that we have objects on the side,
// but who knows who deleted somehting in the meantime?
{
- for ( MSHORT i = 0; i < pSorted->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pSorted->Count(); ++i )
{
const SwAnchoredObject* pObj = (*pSorted)[i];
@@ -503,8 +503,8 @@ bool SwTxtFly::DrawTextOpaque( SwDrawTextInfo &rInf )
SwAnchoredObjList::size_type nCount( bOn ? GetAnchoredObjList()->size() : 0 );
if ( bOn && nCount > 0 )
{
- MSHORT nHellId = pPage->getRootFrm()->GetCurrShell()->getIDocumentDrawModelAccess()->GetHellId();
- for( MSHORT i = 0; i < nCount; ++i )
+ sal_uInt16 nHellId = pPage->getRootFrm()->GetCurrShell()->getIDocumentDrawModelAccess()->GetHellId();
+ for( sal_uInt16 i = 0; i < nCount; ++i )
{
// #i68520#
const SwAnchoredObject* pTmpAnchoredObj = (*mpAnchoredObjList)[i];
@@ -568,7 +568,7 @@ bool SwTxtFly::DrawTextOpaque( SwDrawTextInfo &rInf )
{
// What a huge effort ...
SwSaveClip aClipVout( rInf.GetpOut() );
- for( MSHORT i = 0; i < aRegion.size(); ++i )
+ for( sal_uInt16 i = 0; i < aRegion.size(); ++i )
{
SwRect &rRect = aRegion[i];
if( rRect != aRegion.GetOrigin() )
@@ -592,8 +592,8 @@ void SwTxtFly::DrawFlyRect( OutputDevice* pOut, const SwRect &rRect,
SwAnchoredObjList::size_type nCount( bOn ? GetAnchoredObjList()->size() : 0 );
if ( bOn && nCount > 0 )
{
- MSHORT nHellId = pPage->getRootFrm()->GetCurrShell()->getIDocumentDrawModelAccess()->GetHellId();
- for( MSHORT i = 0; i < nCount; ++i )
+ sal_uInt16 nHellId = pPage->getRootFrm()->GetCurrShell()->getIDocumentDrawModelAccess()->GetHellId();
+ for( sal_uInt16 i = 0; i < nCount; ++i )
{
// #i68520#
const SwAnchoredObject* pAnchoredObjTmp = (*mpAnchoredObjList)[i];
@@ -635,7 +635,7 @@ void SwTxtFly::DrawFlyRect( OutputDevice* pOut, const SwRect &rRect,
}
}
- for( MSHORT i = 0; i < aRegion.size(); ++i )
+ for( sal_uInt16 i = 0; i < aRegion.size(); ++i )
{
if ( bNoGraphic )
{
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index 48649953dedf..42c27be2a5c5 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -347,7 +347,7 @@ SwTxtFrm::SwTxtFrm(SwTxtNode * const pNode, SwFrm* pSib )
, mnHeightOfLastLine( 0 ) // OD 2004-03-17 #i11860#
, mnAdditionalFirstLineOffset( 0 )
, nOfst( 0 )
- , nCacheIdx( MSHRT_MAX )
+ , nCacheIdx( USHRT_MAX )
, bLocked( false )
, bWidow( false )
, bJustWidow( false )
@@ -377,7 +377,7 @@ const OUString& SwTxtFrm::GetTxt() const
void SwTxtFrm::ResetPreps()
{
- if ( GetCacheIdx() != MSHRT_MAX )
+ if ( GetCacheIdx() != USHRT_MAX )
{
SwParaPortion *pPara;
if( 0 != (pPara = GetPara()) )
@@ -842,14 +842,14 @@ static void lcl_ModifyOfst( SwTxtFrm* pFrm, sal_Int32 nPos, sal_Int32 nLen )
// Related: fdo#56031 filter out attribute changes that don't matter for
// humans/a11y to stop flooding the destination mortal with useless noise
-static bool isA11yRelevantAttribute(MSHORT nWhich)
+static bool isA11yRelevantAttribute(sal_uInt16 nWhich)
{
return nWhich != RES_CHRATR_RSID;
}
static bool hasA11yRelevantAttribute( const std::vector<sal_uInt16>& nWhich )
{
- for( std::vector<MSHORT>::const_iterator nItr = nWhich.begin();
+ for( std::vector<sal_uInt16>::const_iterator nItr = nWhich.begin();
nItr < nWhich.end(); ++nItr )
if ( isA11yRelevantAttribute( *nItr ) )
return true;
@@ -859,7 +859,7 @@ static bool hasA11yRelevantAttribute( const std::vector<sal_uInt16>& nWhich )
void SwTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
{
- const MSHORT nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
+ const sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
// modifications concerning frame attributes are processed by the base class
if( IsInRange( aFrmFmtSetRange, nWhich ) || RES_FMT_CHG == nWhich )
@@ -969,7 +969,7 @@ void SwTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
nLen = 1;
_InvalidateRange( SwCharRange( nPos, nLen) );
- MSHORT nTmp = ((SwUpdateAttr*)pNew)->getWhichAttr();
+ sal_uInt16 nTmp = ((SwUpdateAttr*)pNew)->getWhichAttr();
if( ! nTmp || RES_TXTATR_CHARFMT == nTmp || RES_TXTATR_AUTOFMT == nTmp ||
RES_FMT_CHG == nTmp || RES_ATTRSET_CHG == nTmp )
@@ -1054,7 +1054,7 @@ void SwTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
SwAttrSet& rNewSet = *((SwAttrSetChg*)pNew)->GetChgSet();
const SfxPoolItem* pItem = 0;
int nClear = 0;
- MSHORT nCount = rNewSet.Count();
+ sal_uInt16 nCount = rNewSet.Count();
if( SFX_ITEM_SET == rNewSet.GetItemState( RES_TXTATR_FTN, false, &pItem ))
{
@@ -1132,7 +1132,7 @@ void SwTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
SwSortedObjs *pObjs = GetDrawObjs();
for ( int i = 0; GetDrawObjs() && i < int(pObjs->Count()); ++i )
{
- SwAnchoredObject* pAnchoredObj = (*pObjs)[MSHORT(i)];
+ SwAnchoredObject* pAnchoredObj = (*pObjs)[sal_uInt16(i)];
if ( pAnchoredObj->ISA(SwFlyFrm) )
{
SwFlyFrm *pFly = static_cast<SwFlyFrm*>(pAnchoredObj);
@@ -1320,7 +1320,7 @@ bool SwTxtFrm::GetInfo( SfxPoolItem &rHnt ) const
return true;
}
-void SwTxtFrm::PrepWidows( const MSHORT nNeed, bool bNotify )
+void SwTxtFrm::PrepWidows( const sal_uInt16 nNeed, bool bNotify )
{
OSL_ENSURE(GetFollow() && nNeed, "+SwTxtFrm::Prepare: lost all friends");
@@ -1329,7 +1329,7 @@ void SwTxtFrm::PrepWidows( const MSHORT nNeed, bool bNotify )
return;
pPara->SetPrepWidows();
- MSHORT nHave = nNeed;
+ sal_uInt16 nHave = nNeed;
// Wir geben ein paar Zeilen ab und schrumpfen im CalcPreps()
SWAP_IF_NOT_SWAPPED( this )
@@ -1495,7 +1495,7 @@ void SwTxtFrm::Prepare( const PrepareHint ePrep, const void* pVoid,
if( pPara->IsPrepMustFit() )
return;
// see comment in WidowsAndOrphans::FindOrphans and CalcPreps()
- PrepWidows( *(const MSHORT *)pVoid, bNotify );
+ PrepWidows( *(const sal_uInt16 *)pVoid, bNotify );
break;
case PREP_FTN :
@@ -1578,7 +1578,7 @@ void SwTxtFrm::Prepare( const PrepareHint ePrep, const void* pVoid,
// fliesst die Ftn in jedem Fall auch mit. Damit sie nicht im
// Weg steht, schicken wir uns ein ADJUST_FRM.
// pVoid != 0 bedeutet MoveBwd()
- const MSHORT nWhich = pHt->Which();
+ const sal_uInt16 nWhich = pHt->Which();
if( RES_TXTATR_FIELD == nWhich ||
(HasFtn() && pVoid && RES_TXTATR_FTN == nWhich))
InvalidateRange( SwCharRange( nStart, 1 ), 1 );
@@ -1620,7 +1620,7 @@ void SwTxtFrm::Prepare( const PrepareHint ePrep, const void* pVoid,
if ( GetDrawObjs() )
{
const sal_uInt32 nCnt = GetDrawObjs()->Count();
- for ( MSHORT i = 0; i < nCnt; ++i )
+ for ( sal_uInt16 i = 0; i < nCnt; ++i )
{
SwAnchoredObject* pAnchoredObj = (*GetDrawObjs())[i];
// #i28701# - consider all
@@ -1957,7 +1957,7 @@ bool SwTxtFrm::WouldFit( SwTwips &rMaxHeight, bool &bSplit, bool bTst )
return bRet;
}
-KSHORT SwTxtFrm::GetParHeight() const
+sal_uInt16 SwTxtFrm::GetParHeight() const
{
OSL_ENSURE( ! IsVertical() || ! IsSwapped(),
"SwTxtFrm::GetParHeight with swapped frame" );
@@ -1965,11 +1965,11 @@ KSHORT SwTxtFrm::GetParHeight() const
if( !HasPara() )
{ // Fuer nichtleere Absaetze ist dies ein Sonderfall, da koennen wir
// bei UnderSized ruhig nur 1 Twip mehr anfordern.
- KSHORT nRet = (KSHORT)Prt().SSize().Height();
+ sal_uInt16 nRet = (sal_uInt16)Prt().SSize().Height();
if( IsUndersized() )
{
if( IsEmpty() || GetTxt().isEmpty() )
- nRet = (KSHORT)EmptyHeight();
+ nRet = (sal_uInt16)EmptyHeight();
else
++nRet;
}
@@ -1978,7 +1978,7 @@ KSHORT SwTxtFrm::GetParHeight() const
// FME, OD 08.01.2004 #i11859# - refactoring and improve code
const SwLineLayout* pLineLayout = GetPara();
- KSHORT nHeight = pLineLayout ? pLineLayout->GetRealHeight() : 0;
+ sal_uInt16 nHeight = pLineLayout ? pLineLayout->GetRealHeight() : 0;
if( GetOfst() && !IsFollow() ) // Ist dieser Absatz gescrollt? Dann ist unsere
nHeight *= 2; // bisherige Hoehe mind. eine Zeilenhoehe zu gering
// OD 2004-03-04 #115793#
@@ -2334,24 +2334,24 @@ long SwTxtFrm::GetLineSpace( const bool _bNoPropLineSpace ) const
return nRet;
}
-KSHORT SwTxtFrm::FirstLineHeight() const
+sal_uInt16 SwTxtFrm::FirstLineHeight() const
{
if ( !HasPara() )
{
if( IsEmpty() && IsValid() )
- return IsVertical() ? (KSHORT)Prt().Width() : (KSHORT)Prt().Height();
- return KSHRT_MAX;
+ return IsVertical() ? (sal_uInt16)Prt().Width() : (sal_uInt16)Prt().Height();
+ return USHRT_MAX;
}
const SwParaPortion *pPara = GetPara();
if ( !pPara )
- return KSHRT_MAX;
+ return USHRT_MAX;
return pPara->Height();
}
-MSHORT SwTxtFrm::GetLineCount( sal_Int32 nPos )
+sal_uInt16 SwTxtFrm::GetLineCount( sal_Int32 nPos )
{
- MSHORT nRet = 0;
+ sal_uInt16 nRet = 0;
SwTxtFrm *pFrm = this;
do
{
diff --git a/sw/source/core/text/txtftn.cxx b/sw/source/core/text/txtftn.cxx
index 528c3e974d20..c14eb8962b70 100644
--- a/sw/source/core/text/txtftn.cxx
+++ b/sw/source/core/text/txtftn.cxx
@@ -793,11 +793,11 @@ SwFtnPortion *SwTxtFormatter::NewFtnPortion( SwTxtFormatInfo &rInf,
SWAP_IF_SWAPPED( pFrm )
- KSHORT nReal;
+ sal_uInt16 nReal;
{
- KSHORT nOldReal = pCurr->GetRealHeight();
- KSHORT nOldAscent = pCurr->GetAscent();
- KSHORT nOldHeight = pCurr->Height();
+ sal_uInt16 nOldReal = pCurr->GetRealHeight();
+ sal_uInt16 nOldAscent = pCurr->GetAscent();
+ sal_uInt16 nOldHeight = pCurr->Height();
((SwTxtFormatter*)this)->CalcRealHeight();
nReal = pCurr->GetRealHeight();
if( nReal < nOldReal )
@@ -972,7 +972,7 @@ SwNumberPortion *SwTxtFormatter::NewFtnNumPortion( SwTxtFormatInfo &rInf ) const
OUString lcl_GetPageNumber( const SwPageFrm* pPage )
{
OSL_ENSURE( pPage, "GetPageNumber: Homeless TxtFrm" );
- MSHORT nVirtNum = pPage->GetVirtPageNum();
+ sal_uInt16 nVirtNum = pPage->GetVirtPageNum();
const SvxNumberType& rNum = pPage->GetPageDesc()->GetNumType();
return rNum.GetNumStr( nVirtNum );
}
@@ -1054,7 +1054,7 @@ sal_Int32 SwTxtFormatter::FormatQuoVadis( const sal_Int32 nOffset )
// natuerlich da, wo wir unseren Quovadis Text reinsetzen wollen.
// Erst mal sehen, ob es so schlimm ist:
SwLinePortion *pPor = pCurr->GetFirstPortion();
- KSHORT nLastLeft = 0;
+ sal_uInt16 nLastLeft = 0;
while( pPor )
{
if ( pPor->IsFlyPortion() )
@@ -1065,7 +1065,7 @@ sal_Int32 SwTxtFormatter::FormatQuoVadis( const sal_Int32 nOffset )
// Das alte Spiel: wir wollen, dass die Zeile an einer bestimmten
// Stelle umbricht, also beeinflussen wir die Width.
// nLastLeft ist jetzt quasi der rechte Rand.
- const KSHORT nOldRealWidth = rInf.RealWidth();
+ const sal_uInt16 nOldRealWidth = rInf.RealWidth();
rInf.RealWidth( nOldRealWidth - nLastLeft );
OUString aErgo = lcl_GetPageNumber( pErgoFrm->FindPageFrm() );
@@ -1187,7 +1187,7 @@ sal_Int32 SwTxtFormatter::FormatQuoVadis( const sal_Int32 nOffset )
pCurrPor = pQuo;
}
- pCurr->Width( pCurr->Width() + KSHORT( nQuoWidth ) );
+ pCurr->Width( pCurr->Width() + sal_uInt16( nQuoWidth ) );
// Und noch einmal adjustieren wegen des Adjustment und nicht zu Letzt
// wegen folgendem Sonderfall: In der Zeile hat der DummUser durchgaengig
@@ -1205,7 +1205,7 @@ sal_Int32 SwTxtFormatter::FormatQuoVadis( const sal_Int32 nOffset )
// Oszillationen verwendet.
void SwTxtFormatter::MakeDummyLine()
{
- KSHORT nRstHeight = GetFrmRstHeight();
+ sal_uInt16 nRstHeight = GetFrmRstHeight();
if( pCurr && nRstHeight > pCurr->Height() )
{
SwLineLayout *pLay = new SwLineLayout;
@@ -1306,7 +1306,7 @@ SwFtnSave::~SwFtnSave()
}
SwFtnPortion::SwFtnPortion( const OUString &rExpand,
- SwTxtFtn *pFootn, KSHORT nReal )
+ SwTxtFtn *pFootn, sal_uInt16 nReal )
: SwFldPortion( rExpand, 0 )
, pFtn(pFootn)
, nOrigHeight( nReal )
@@ -1452,7 +1452,7 @@ SwErgoSumPortion::SwErgoSumPortion(const OUString &rExp, const OUString& rStr)
SetWhichPor( POR_ERGOSUM );
}
-sal_Int32 SwErgoSumPortion::GetCrsrOfst( const KSHORT ) const
+sal_Int32 SwErgoSumPortion::GetCrsrOfst( const sal_uInt16 ) const
{
return 0;
}
diff --git a/sw/source/core/text/txthyph.cxx b/sw/source/core/text/txthyph.cxx
index e2eb32badb06..778c5e863ea5 100644
--- a/sw/source/core/text/txthyph.cxx
+++ b/sw/source/core/text/txthyph.cxx
@@ -36,7 +36,7 @@ using namespace ::com::sun::star::linguistic2;
using namespace ::com::sun::star::i18n;
Reference< XHyphenatedWord > SwTxtFormatInfo::HyphWord(
- const OUString &rTxt, const MSHORT nMinTrail )
+ const OUString &rTxt, const sal_uInt16 nMinTrail )
{
if( rTxt.getLength() < 4 || m_pFnt->IsSymbol(m_pVsh) )
return 0;
@@ -225,7 +225,7 @@ bool SwTxtFormatter::Hyphenate( SwInterHyphInfo &rHyphInf )
return false;
OUString aSelTxt( rInf.GetTxt().copy(nWrdStart, nLen) );
- MSHORT nMinTrail = 0;
+ sal_uInt16 nMinTrail = 0;
if( nWrdStart + nLen > nEnd )
nMinTrail = nWrdStart + nLen - nEnd - 1;
@@ -298,9 +298,9 @@ bool SwTxtPortion::CreateHyphen( SwTxtFormatInfo &rInf, SwTxtGuess &rGuess )
aHyphPor.SetLen( 1 );
static const void* pLastMagicNo = 0;
- static KSHORT aMiniCacheH = 0, aMiniCacheW = 0;
+ static sal_uInt16 aMiniCacheH = 0, aMiniCacheW = 0;
const void* pTmpMagic;
- MSHORT nFntIdx;
+ sal_uInt16 nFntIdx;
rInf.GetFont()->GetMagic( pTmpMagic, nFntIdx, rInf.GetFont()->GetActual() );
if( !pLastMagicNo || pLastMagicNo != pTmpMagic ) {
pLastMagicNo = pTmpMagic;
@@ -396,7 +396,7 @@ SwSoftHyphPortion::SwSoftHyphPortion() :
SetWhichPor( POR_SOFTHYPH );
}
-KSHORT SwSoftHyphPortion::GetViewWidth( const SwTxtSizeInfo &rInf ) const
+sal_uInt16 SwSoftHyphPortion::GetViewWidth( const SwTxtSizeInfo &rInf ) const
{
// Wir stehen zwar im const, aber nViewWidth sollte erst im letzten
// Moment errechnet werden:
diff --git a/sw/source/core/text/txttab.cxx b/sw/source/core/text/txttab.cxx
index 314f16345173..ea406f08da5e 100644
--- a/sw/source/core/text/txttab.cxx
+++ b/sw/source/core/text/txttab.cxx
@@ -42,7 +42,7 @@
const SvxTabStop *SwLineInfo::GetTabStop( const SwTwips nSearchPos,
const SwTwips nRight ) const
{
- for( MSHORT i = 0; i < pRuler->Count(); ++i )
+ for( sal_uInt16 i = 0; i < pRuler->Count(); ++i )
{
const SvxTabStop &rTabStop = pRuler->operator[](i);
if( rTabStop.GetTabPos() > SwTwips(nRight) )
@@ -65,7 +65,7 @@ SwTabPortion *SwTxtFormatter::NewTabPortion( SwTxtFormatInfo &rInf, bool bAuto )
sal_Unicode cDec = 0;
SvxTabAdjust eAdj;
- KSHORT nNewTabPos;
+ sal_uInt16 nNewTabPos;
bool bAutoTabStop = true;
{
const bool bRTL = pFrm->IsRightToLeft();
@@ -148,14 +148,14 @@ SwTabPortion *SwTxtFormatter::NewTabPortion( SwTxtFormatInfo &rInf, bool bAuto )
}
else
{
- KSHORT nDefTabDist = aLineInf.GetDefTabStop();
- if( KSHRT_MAX == nDefTabDist )
+ sal_uInt16 nDefTabDist = aLineInf.GetDefTabStop();
+ if( USHRT_MAX == nDefTabDist )
{
const SvxTabStopItem& rTab =
(const SvxTabStopItem &)pFrm->GetAttrSet()->
GetPool()->GetDefaultItem( RES_PARATR_TABSTOP );
if( rTab.Count() )
- nDefTabDist = (KSHORT)rTab[0].GetTabPos();
+ nDefTabDist = (sal_uInt16)rTab[0].GetTabPos();
else
nDefTabDist = SVX_TAB_DEFDIST;
aLineInf.SetDefTabStop( nDefTabDist );
@@ -249,7 +249,7 @@ SwTabPortion *SwTxtFormatter::NewTabPortion( SwTxtFormatInfo &rInf, bool bAuto )
nNextPos += bRTL ? nLinePos - nTabLeft : nTabLeft - nLinePos;
OSL_ENSURE( nNextPos >= 0, "GetTabStop: Don't go back!" );
- nNewTabPos = KSHORT(nNextPos);
+ nNewTabPos = sal_uInt16(nNextPos);
}
SwTabPortion *pTabPor = 0;
@@ -293,7 +293,7 @@ SwTabPortion *SwTxtFormatter::NewTabPortion( SwTxtFormatInfo &rInf, bool bAuto )
}
// Die Basisklasse wird erstmal ohne alles initialisiert.
-SwTabPortion::SwTabPortion( const KSHORT nTabPosition, const sal_Unicode cFillChar, const bool bAutoTab )
+SwTabPortion::SwTabPortion( const sal_uInt16 nTabPosition, const sal_Unicode cFillChar, const bool bAutoTab )
: SwFixPortion( 0, 0 ), nTabPos(nTabPosition), cFill(cFillChar), bAutoTabStop( bAutoTab )
{
nLineLength = 1;
@@ -362,7 +362,7 @@ bool SwTabPortion::PreFormat( SwTxtFormatInfo &rInf )
if( ! bFull && 0 == nDir )
{
- const MSHORT nWhich = GetWhichPor();
+ const sal_uInt16 nWhich = GetWhichPor();
switch( nWhich )
{
case POR_TABRIGHT:
@@ -434,24 +434,24 @@ bool SwTabPortion::PostFormat( SwTxtFormatInfo &rInf )
const bool bTabOverMargin = rInf.GetTxtFrm()->GetTxtNode()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::TAB_OVER_MARGIN);
// If the tab position is larger than the right margin, it gets scaled down by default.
// However, if compat mode enabled, we allow tabs to go over the margin: the rest of the paragraph is not broken into lines.
- const KSHORT nRight = bTabOverMargin ? GetTabPos() : std::min(GetTabPos(), rInf.Width());
+ const sal_uInt16 nRight = bTabOverMargin ? GetTabPos() : std::min(GetTabPos(), rInf.Width());
const SwLinePortion *pPor = GetPortion();
- KSHORT nPorWidth = 0;
+ sal_uInt16 nPorWidth = 0;
while( pPor )
{
nPorWidth = nPorWidth + pPor->Width();
pPor = pPor->GetPortion();
}
- const MSHORT nWhich = GetWhichPor();
+ const sal_uInt16 nWhich = GetWhichPor();
OSL_ENSURE( POR_TABLEFT != nWhich, "SwTabPortion::PostFormat: already formatted" );
const bool bTabCompat = rInf.GetTxtFrm()->GetTxtNode()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::TAB_COMPAT);
// #127428# Abandon dec. tab position if line is full
if ( bTabCompat && POR_TABDECIMAL == nWhich )
{
- KSHORT nPrePorWidth = static_cast<const SwTabDecimalPortion*>(this)->GetWidthOfPortionsUpToDecimalPosition();
+ sal_uInt16 nPrePorWidth = static_cast<const SwTabDecimalPortion*>(this)->GetWidthOfPortionsUpToDecimalPosition();
// no value was set => no decimal character was found
if ( USHRT_MAX != nPrePorWidth )
@@ -469,18 +469,18 @@ bool SwTabPortion::PostFormat( SwTxtFormatInfo &rInf )
{
// centered tabs are problematic:
// We have to detect how much fits into the line.
- KSHORT nNewWidth = nPorWidth /2;
+ sal_uInt16 nNewWidth = nPorWidth /2;
if( nNewWidth > rInf.Width() - nRight )
nNewWidth = nPorWidth - (rInf.Width() - nRight);
nPorWidth = nNewWidth;
}
- const KSHORT nDiffWidth = nRight - Fix();
+ const sal_uInt16 nDiffWidth = nRight - Fix();
if( nDiffWidth > nPorWidth )
{
- const KSHORT nOldWidth = GetFixWidth();
- const KSHORT nAdjDiff = nDiffWidth - nPorWidth;
+ const sal_uInt16 nOldWidth = GetFixWidth();
+ const sal_uInt16 nAdjDiff = nDiffWidth - nPorWidth;
if( nAdjDiff > GetFixWidth() )
PrtWidth( nAdjDiff );
// Dont be afraid: we have to move rInf further.
@@ -507,7 +507,7 @@ void SwTabPortion::Paint( const SwTxtPaintInfo &rInf ) const
!rInf.GetOpt().IsReadonly() && \
SwViewOption::IsFieldShadings() )
{
- const KSHORT nTmpWidth = PrtWidth();
+ const sal_uInt16 nTmpWidth = PrtWidth();
((SwTabPortion*)this)->PrtWidth( GetFixWidth() );
rInf.DrawViewOpt( *this, POR_TAB );
((SwTabPortion*)this)->PrtWidth( nTmpWidth );
@@ -555,12 +555,12 @@ void SwTabPortion::Paint( const SwTxtPaintInfo &rInf ) const
if( rInf.GetFont()->IsPaintBlank() )
{
// tabs with filling / filled tabs
- const KSHORT nCharWidth = rInf.GetTxtSize(OUString(' ')).Width();
+ const sal_uInt16 nCharWidth = rInf.GetTxtSize(OUString(' ')).Width();
// robust:
if( nCharWidth )
{
// 6864: always with kerning, also on printer!
- KSHORT nChar = Width() / nCharWidth;
+ sal_uInt16 nChar = Width() / nCharWidth;
OUStringBuffer aBuf;
comphelper::string::padToLength(aBuf, nChar, ' ');
rInf.DrawText(aBuf.makeStringAndClear(), *this, 0, nChar, true);
@@ -571,13 +571,13 @@ void SwTabPortion::Paint( const SwTxtPaintInfo &rInf ) const
if( IsFilled() )
{
// tabs with filling / filled tabs
- const KSHORT nCharWidth = rInf.GetTxtSize(OUString(cFill)).Width();
+ const sal_uInt16 nCharWidth = rInf.GetTxtSize(OUString(cFill)).Width();
OSL_ENSURE( nCharWidth, "!SwTabPortion::Paint: sophisticated tabchar" );
// robust:
if( nCharWidth )
{
// 6864: always with kerning, also on printer!
- KSHORT nChar = Width() / nCharWidth;
+ sal_uInt16 nChar = Width() / nCharWidth;
if ( cFill == '_' )
++nChar; // to avoid gaps (Bug 13430)
OUStringBuffer aBuf;
diff --git a/sw/source/core/text/widorp.cxx b/sw/source/core/text/widorp.cxx
index 2e3213c22ac6..78ad39bb79d9 100644
--- a/sw/source/core/text/widorp.cxx
+++ b/sw/source/core/text/widorp.cxx
@@ -313,7 +313,7 @@ bool WidowsAndOrphans::FindBreak( SwTxtFrm *pFrame, SwTxtMargin &rLine,
SWAP_IF_SWAPPED( pFrm )
bool bRet = true;
- MSHORT nOldOrphans = nOrphLines;
+ sal_uInt16 nOldOrphans = nOrphLines;
if( bHasToFit )
nOrphLines = 0;
rLine.Bottom();
@@ -459,7 +459,7 @@ bool WidowsAndOrphans::FindWidows( SwTxtFrm *pFrame, SwTxtMargin &rLine )
// bei uns durchaus mehrere Zeilen ergeben koennten.
// Dafuer behaelt CalcFollow solange die Kontrolle, bis der Follow alle
// notwendigen Zeilen bekommen hat.
- MSHORT nNeed = 1; // frueher: nWidLines - rLine.GetLineNr();
+ sal_uInt16 nNeed = 1; // frueher: nWidLines - rLine.GetLineNr();
// Special case: Master cannot give lines to follow
// #i91421#
@@ -487,10 +487,10 @@ bool WidowsAndOrphans::WouldFit( SwTxtMargin &rLine, SwTwips &rMaxHeight, bool b
// We expect that rLine is set to the last line
OSL_ENSURE( !rLine.GetNext(), "WouldFit: aLine::Bottom missed!" );
- MSHORT nLineCnt = rLine.GetLineNr();
+ sal_uInt16 nLineCnt = rLine.GetLineNr();
// First satisfy the Orphans-rule and the wish for initials ...
- const MSHORT nMinLines = std::max( GetOrphansLines(), rLine.GetDropLines() );
+ const sal_uInt16 nMinLines = std::max( GetOrphansLines(), rLine.GetDropLines() );
if ( nLineCnt < nMinLines )
return false;
diff --git a/sw/source/core/text/widorp.hxx b/sw/source/core/text/widorp.hxx
index 6e6a43530db2..117c6886c388 100644
--- a/sw/source/core/text/widorp.hxx
+++ b/sw/source/core/text/widorp.hxx
@@ -59,15 +59,15 @@ public:
class WidowsAndOrphans : public SwTxtFrmBreak
{
private:
- MSHORT nWidLines, nOrphLines;
+ sal_uInt16 nWidLines, nOrphLines;
public:
WidowsAndOrphans( SwTxtFrm *pFrm, const SwTwips nRst = 0,
bool bCheckKeep = true );
bool FindWidows( SwTxtFrm *pFrm, SwTxtMargin &rLine );
- MSHORT GetWidowsLines() const
+ sal_uInt16 GetWidowsLines() const
{ return nWidLines; }
- MSHORT GetOrphansLines() const
+ sal_uInt16 GetOrphansLines() const
{ return nOrphLines; }
void ClrOrphLines(){ nOrphLines = 0; }
diff --git a/sw/source/core/text/wrong.cxx b/sw/source/core/text/wrong.cxx
index 2f32c73f9b4d..bc8ce1de3b55 100644
--- a/sw/source/core/text/wrong.cxx
+++ b/sw/source/core/text/wrong.cxx
@@ -99,7 +99,7 @@ void SwWrongList::ClearList()
*/
bool SwWrongList::InWrongWord( sal_Int32 &rChk, sal_Int32 &rLn ) const
{
- const MSHORT nPos = GetWrongPos( rChk );
+ const sal_uInt16 nPos = GetWrongPos( rChk );
if ( nPos >= Count() )
return false;
const sal_Int32 nWrPos = Pos( nPos );
@@ -123,7 +123,7 @@ bool SwWrongList::InWrongWord( sal_Int32 &rChk, sal_Int32 &rLn ) const
*/
bool SwWrongList::Check( sal_Int32 &rChk, sal_Int32 &rLn ) const
{
- MSHORT nPos = GetWrongPos( rChk );
+ sal_uInt16 nPos = GetWrongPos( rChk );
rLn += rChk;
if( nPos == Count() )
@@ -269,11 +269,11 @@ void SwWrongList::SetInvalid( sal_Int32 nBegin, sal_Int32 nEnd )
*/
void SwWrongList::Move( sal_Int32 nPos, sal_Int32 nDiff )
{
- MSHORT i = GetWrongPos( nPos );
+ sal_uInt16 i = GetWrongPos( nPos );
if( nDiff < 0 )
{
const sal_Int32 nEnd = nPos - nDiff;
- MSHORT nLst = i;
+ sal_uInt16 nLst = i;
bool bJump = false;
while( nLst < Count() && Pos( nLst ) < nEnd )
++nLst;
@@ -356,14 +356,14 @@ void SwWrongList::Move( sal_Int32 nPos, sal_Int32 nDiff )
@return <true> if ???
*/
bool SwWrongList::Fresh( sal_Int32 &rStart, sal_Int32 &rEnd, sal_Int32 nPos,
- sal_Int32 nLen, MSHORT nIndex, sal_Int32 nCursorPos )
+ sal_Int32 nLen, sal_uInt16 nIndex, sal_Int32 nCursorPos )
{
// length of word must be greater than 0 and cursor position must be outside the word
bool bRet = nLen && ( nCursorPos > nPos + nLen || nCursorPos < nPos );
sal_Int32 nWrPos = 0;
sal_Int32 nWrEnd = rEnd;
- MSHORT nCnt = nIndex;
+ sal_uInt16 nCnt = nIndex;
if( nCnt < Count() )
{
nWrPos = Pos( nCnt );
@@ -442,7 +442,7 @@ bool SwWrongList::InvalidateWrong( )
SwWrongList* SwWrongList::SplitList( sal_Int32 nSplitPos )
{
SwWrongList *pRet = NULL;
- MSHORT nLst = 0;
+ sal_uInt16 nLst = 0;
while( nLst < Count() && Pos( nLst ) < nSplitPos )
++nLst;
if( nLst )
diff --git a/sw/source/core/text/xmldump.cxx b/sw/source/core/text/xmldump.cxx
index 54c066bf98f6..f64d36ba3603 100644
--- a/sw/source/core/text/xmldump.cxx
+++ b/sw/source/core/text/xmldump.cxx
@@ -175,7 +175,7 @@ class XmlPortionDumper:public SwPortionHandler
ofs += nLength;
}
- virtual void LineBreak( KSHORT nWidth ) SAL_OVERRIDE
+ virtual void LineBreak( sal_uInt16 nWidth ) SAL_OVERRIDE
{
xmlTextWriterStartElement( writer, BAD_CAST( "LineBreak" ) );
if (nWidth > 0)