Kaydet (Commit) 0dcd33cf authored tarafından Matteo Casalin's avatar Matteo Casalin

sal_uInt16 to sal_Int32 and removed some unneeded casts

Change-Id: I122af4ed8a2504242f527cf98b26c9e1599497ea
üst c3251f70
...@@ -107,7 +107,7 @@ SwNumPositionTabPage::SwNumPositionTabPage(Window* pParent, ...@@ -107,7 +107,7 @@ SwNumPositionTabPage::SwNumPositionTabPage(Window* pParent,
m_pRelativeCB->Check(); m_pRelativeCB->Check();
m_pAlignLB->SetSelectHdl(LINK(this, SwNumPositionTabPage, EditModifyHdl)); m_pAlignLB->SetSelectHdl(LINK(this, SwNumPositionTabPage, EditModifyHdl));
m_pAlign2LB->SetSelectHdl(LINK(this, SwNumPositionTabPage, EditModifyHdl)); m_pAlign2LB->SetSelectHdl(LINK(this, SwNumPositionTabPage, EditModifyHdl));
for ( sal_uInt16 i = 0; i < m_pAlignLB->GetEntryCount(); ++i ) for ( sal_Int32 i = 0; i < m_pAlignLB->GetEntryCount(); ++i )
{ {
m_pAlign2LB->InsertEntry( m_pAlignLB->GetEntry( i ) ); m_pAlign2LB->InsertEntry( m_pAlignLB->GetEntry( i ) );
} }
...@@ -280,7 +280,7 @@ void SwNumPositionTabPage::InitControls() ...@@ -280,7 +280,7 @@ void SwNumPositionTabPage::InitControls()
if(bSameAdjust) if(bSameAdjust)
{ {
sal_uInt16 nPos = 1; // centered sal_Int32 nPos = 1; // centered
if(aNumFmtArr[nLvl]->GetNumAdjust() == SVX_ADJUST_LEFT) if(aNumFmtArr[nLvl]->GetNumAdjust() == SVX_ADJUST_LEFT)
nPos = 0; nPos = 0;
else if(aNumFmtArr[nLvl]->GetNumAdjust() == SVX_ADJUST_RIGHT) else if(aNumFmtArr[nLvl]->GetNumAdjust() == SVX_ADJUST_RIGHT)
...@@ -296,7 +296,7 @@ void SwNumPositionTabPage::InitControls() ...@@ -296,7 +296,7 @@ void SwNumPositionTabPage::InitControls()
if ( bSameLabelFollowedBy ) if ( bSameLabelFollowedBy )
{ {
sal_uInt16 nPos = 0; // LISTTAB sal_Int32 nPos = 0; // LISTTAB
if ( aNumFmtArr[nLvl]->GetLabelFollowedBy() == SvxNumberFormat::SPACE ) if ( aNumFmtArr[nLvl]->GetLabelFollowedBy() == SvxNumberFormat::SPACE )
{ {
nPos = 1; nPos = 1;
...@@ -567,7 +567,7 @@ IMPL_LINK_NOARG(SwNumPositionTabPage, EditModifyHdl) ...@@ -567,7 +567,7 @@ IMPL_LINK_NOARG(SwNumPositionTabPage, EditModifyHdl)
{ {
SwNumFmt aNumFmt(pActNum->Get(i)); SwNumFmt aNumFmt(pActNum->Get(i));
const sal_uInt16 nPos = m_pAlignLB->IsVisible() const sal_Int32 nPos = m_pAlignLB->IsVisible()
? m_pAlignLB->GetSelectEntryPos() ? m_pAlignLB->GetSelectEntryPos()
: m_pAlign2LB->GetSelectEntryPos(); : m_pAlign2LB->GetSelectEntryPos();
SvxAdjust eAdjust = SVX_ADJUST_CENTER; SvxAdjust eAdjust = SVX_ADJUST_CENTER;
...@@ -649,7 +649,7 @@ IMPL_LINK( SwNumPositionTabPage, DistanceHdl, MetricField *, pFld ) ...@@ -649,7 +649,7 @@ IMPL_LINK( SwNumPositionTabPage, DistanceHdl, MetricField *, pFld )
if(0 == i) if(0 == i)
{ {
long nTmp = aNumFmt.GetFirstLineOffset(); long nTmp = aNumFmt.GetFirstLineOffset();
aNumFmt.SetAbsLSpace( sal_uInt16(nValue - nTmp)); aNumFmt.SetAbsLSpace( nValue - nTmp );
} }
else else
{ {
...@@ -657,7 +657,7 @@ IMPL_LINK( SwNumPositionTabPage, DistanceHdl, MetricField *, pFld ) ...@@ -657,7 +657,7 @@ IMPL_LINK( SwNumPositionTabPage, DistanceHdl, MetricField *, pFld )
pActNum->Get( i - 1 ).GetFirstLineOffset() - pActNum->Get( i - 1 ).GetFirstLineOffset() -
pActNum->Get( i ).GetFirstLineOffset(); pActNum->Get( i ).GetFirstLineOffset();
aNumFmt.SetAbsLSpace( sal_uInt16(nValue + nTmp)); aNumFmt.SetAbsLSpace( nValue + nTmp );
} }
} }
else else
...@@ -667,15 +667,15 @@ IMPL_LINK( SwNumPositionTabPage, DistanceHdl, MetricField *, pFld ) ...@@ -667,15 +667,15 @@ IMPL_LINK( SwNumPositionTabPage, DistanceHdl, MetricField *, pFld )
} }
else if (pFld == m_pDistNumMF) else if (pFld == m_pDistNumMF)
{ {
aNumFmt.SetCharTextDistance( (short)nValue ); aNumFmt.SetCharTextDistance( nValue );
} }
else if (pFld == m_pIndentMF) else if (pFld == m_pIndentMF)
{ {
// now AbsLSpace also has to be modified by FirstLineOffset // now AbsLSpace also has to be modified by FirstLineOffset
long nDiff = nValue + aNumFmt.GetFirstLineOffset(); long nDiff = nValue + aNumFmt.GetFirstLineOffset();
long nAbsLSpace = aNumFmt.GetAbsLSpace(); long nAbsLSpace = aNumFmt.GetAbsLSpace();
aNumFmt.SetAbsLSpace(sal_uInt16(nAbsLSpace + nDiff)); aNumFmt.SetAbsLSpace( nAbsLSpace + nDiff );
aNumFmt.SetFirstLineOffset( -(short)nValue ); aNumFmt.SetFirstLineOffset( -nValue );
} }
pActNum->Set( i, aNumFmt ); pActNum->Set( i, aNumFmt );
...@@ -734,7 +734,7 @@ IMPL_LINK_NOARG(SwNumPositionTabPage, LabelFollowedByHdl_Impl) ...@@ -734,7 +734,7 @@ IMPL_LINK_NOARG(SwNumPositionTabPage, LabelFollowedByHdl_Impl)
// determine value to be set at the chosen list levels // determine value to be set at the chosen list levels
SvxNumberFormat::LabelFollowedBy eLabelFollowedBy = SvxNumberFormat::LISTTAB; SvxNumberFormat::LabelFollowedBy eLabelFollowedBy = SvxNumberFormat::LISTTAB;
{ {
const sal_uInt16 nPos = m_pLabelFollowedByLB->GetSelectEntryPos(); const sal_Int32 nPos = m_pLabelFollowedByLB->GetSelectEntryPos();
if ( nPos == 1 ) if ( nPos == 1 )
{ {
eLabelFollowedBy = SvxNumberFormat::SPACE; eLabelFollowedBy = SvxNumberFormat::SPACE;
...@@ -967,7 +967,7 @@ void SwSvxNumBulletTabDialog::PageCreated(sal_uInt16 nPageId, SfxTabPage& rPage) ...@@ -967,7 +967,7 @@ void SwSvxNumBulletTabDialog::PageCreated(sal_uInt16 nPageId, SfxTabPage& rPage)
::FillCharStyleListBox(rCharFmtLB, pDocShell); ::FillCharStyleListBox(rCharFmtLB, pDocShell);
std::vector<OUString> aList; std::vector<OUString> aList;
for(sal_uInt16 j = 0; j < rCharFmtLB.GetEntryCount(); j++) for(sal_Int32 j = 0; j < rCharFmtLB.GetEntryCount(); j++)
aList.push_back( rCharFmtLB.GetEntry(j) ); aList.push_back( rCharFmtLB.GetEntry(j) );
aSet.Put( SfxStringListItem( SID_CHAR_FMT_LIST_BOX,&aList ) ) ; aSet.Put( SfxStringListItem( SID_CHAR_FMT_LIST_BOX,&aList ) ) ;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment