summaryrefslogtreecommitdiff
path: root/sw/source/ui/table
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2014-03-19 21:51:05 +0100
committerMatteo Casalin <matteo.casalin@yahoo.com>2014-03-24 23:22:06 +0100
commita46c4bf3c2454f81b4889e86c50ff901192b1bd7 (patch)
tree3a07324d3f577a944e3af193a20a0dadad0382bc /sw/source/ui/table
parentc7363cb6d1d31f2a7d40a76e62b5934629a1a8a1 (diff)
sal_uInt16 to size_t/long
Change-Id: I9284ef8c51f9639ad4f7c0c4b4f65019a4ca524b
Diffstat (limited to 'sw/source/ui/table')
-rw-r--r--sw/source/ui/table/tautofmt.cxx16
1 files changed, 6 insertions, 10 deletions
diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx
index 5b134fd5ea60..63a453cb26bc 100644
--- a/sw/source/ui/table/tautofmt.cxx
+++ b/sw/source/ui/table/tautofmt.cxx
@@ -297,7 +297,7 @@ IMPL_LINK_NOARG(SwAutoFormatDlg, AddHdl)
if ( !aFormatName.isEmpty() )
{
- sal_uInt16 n;
+ size_t n;
for( n = 0; n < pTableTbl->size(); ++n )
if( (*pTableTbl)[n].GetName() == aFormatName )
break;
@@ -396,7 +396,7 @@ IMPL_LINK_NOARG(SwAutoFormatDlg, RenameHdl)
if ( !aFormatName.isEmpty() )
{
- sal_uInt16 n;
+ size_t n;
for( n = 0; n < pTableTbl->size(); ++n )
if ((*pTableTbl)[n].GetName() == aFormatName)
break;
@@ -668,7 +668,7 @@ MAKENUMSTR:
sal_uInt8 nFmtIndex = GetFormatIndex( nCol, nRow );
Rectangle cellRect = maArray.GetCellRect( nCol, nRow );
Point aPos = cellRect.TopLeft();
- sal_uInt16 nRightX = 0;
+ long nRightX = 0;
Size theMaxStrSize( cellRect.GetWidth() - FRAME_OFFSET,
cellRect.GetHeight() - FRAME_OFFSET );
@@ -702,20 +702,16 @@ MAKENUMSTR:
aStrSize = aScriptedText.GetTextSize();
}
- nRightX = (sal_uInt16)( cellRect.GetWidth()
- - aStrSize.Width()
- - FRAME_OFFSET );
+ nRightX = cellRect.GetWidth() - aStrSize.Width() - FRAME_OFFSET;
// vertical (always centering):
- aPos.Y() += (nRowHeight - (sal_uInt16)aStrSize.Height()) / 2;
+ aPos.Y() += (nRowHeight - aStrSize.Height()) / 2;
// horizontal
if( mbRTL )
aPos.X() += nRightX;
else if (aCurData.IsJustify())
{
- sal_uInt16 nHorPos = (sal_uInt16)
- ((cellRect.GetWidth()-aStrSize.Width())/2);
const SvxAdjustItem& rAdj = aCurData.GetBoxFmt(nFmtIndex).GetAdjust();
switch ( rAdj.GetAdjust() )
{
@@ -726,7 +722,7 @@ MAKENUMSTR:
aPos.X() += nRightX;
break;
default:
- aPos.X() += nHorPos;
+ aPos.X() += (cellRect.GetWidth() - aStrSize.Width())/2;
break;
}
}