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

sal_uInt16: constify and simplify

Change-Id: I120c19a4fd5bccc3d2d070cc0d52d5155fa5a037
üst fa772f7f
...@@ -75,7 +75,7 @@ SwParagraphNumTabPage::SwParagraphNumTabPage(Window* pParent, const SfxItemSet& ...@@ -75,7 +75,7 @@ SwParagraphNumTabPage::SwParagraphNumTabPage(Window* pParent, const SfxItemSet&
( 0 != ( pObjSh = SfxObjectShell::Current()) && ( 0 != ( pObjSh = SfxObjectShell::Current()) &&
0 != (pItem = pObjSh->GetItem(SID_HTML_MODE)))) 0 != (pItem = pObjSh->GetItem(SID_HTML_MODE))))
{ {
sal_uInt16 nHtmlMode = ((const SfxUInt16Item*)pItem)->GetValue(); const sal_uInt16 nHtmlMode = ((const SfxUInt16Item*)pItem)->GetValue();
if (HTMLMODE_ON & nHtmlMode) if (HTMLMODE_ON & nHtmlMode)
m_pCountParaFram->Hide(); m_pCountParaFram->Hide();
...@@ -107,7 +107,7 @@ bool SwParagraphNumTabPage::FillItemSet( SfxItemSet& rSet ) ...@@ -107,7 +107,7 @@ bool SwParagraphNumTabPage::FillItemSet( SfxItemSet& rSet )
{ {
if( m_pOutlineLvLB->GetSelectEntryPos() != m_pOutlineLvLB->GetSavedValue()) if( m_pOutlineLvLB->GetSelectEntryPos() != m_pOutlineLvLB->GetSavedValue())
{ {
sal_uInt16 aOutlineLv = m_pOutlineLvLB->GetSelectEntryPos(); const sal_uInt16 aOutlineLv = m_pOutlineLvLB->GetSelectEntryPos();
const SfxUInt16Item* pOldOutlineLv = (const SfxUInt16Item*)GetOldItem( rSet, SID_ATTR_PARA_OUTLINE_LEVEL); const SfxUInt16Item* pOldOutlineLv = (const SfxUInt16Item*)GetOldItem( rSet, SID_ATTR_PARA_OUTLINE_LEVEL);
SfxUInt16Item* pOutlineLv = (SfxUInt16Item*)pOldOutlineLv->Clone(); SfxUInt16Item* pOutlineLv = (SfxUInt16Item*)pOldOutlineLv->Clone();
pOutlineLv->SetValue( aOutlineLv ); pOutlineLv->SetValue( aOutlineLv );
...@@ -221,12 +221,10 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet& rSet ) ...@@ -221,12 +221,10 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet& rSet )
eItemState = rSet.GetItemState( FN_NUMBER_NEWSTART_AT); eItemState = rSet.GetItemState( FN_NUMBER_NEWSTART_AT);
if( eItemState > SFX_ITEM_AVAILABLE ) if( eItemState > SFX_ITEM_AVAILABLE )
{ {
sal_uInt16 nNewStart = ((const SfxUInt16Item&)rSet.Get(FN_NUMBER_NEWSTART_AT)).GetValue(); const sal_uInt16 nNewStart = ((const SfxUInt16Item&)rSet.Get(FN_NUMBER_NEWSTART_AT)).GetValue();
m_pNewStartNumberCB->Check(USHRT_MAX != nNewStart); const bool bNotMax = USHRT_MAX != nNewStart;
if(USHRT_MAX == nNewStart) m_pNewStartNumberCB->Check(bNotMax);
nNewStart = 1; m_pNewStartNF->SetValue(bNotMax ? nNewStart : 1);
m_pNewStartNF->SetValue(nNewStart);
m_pNewStartNumberCB->EnableTriState(false); m_pNewStartNumberCB->EnableTriState(false);
} }
else else
......
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