diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2019-04-03 22:05:44 +0900 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2019-04-03 17:11:21 +0200 |
commit | 478ecc26a65188e332df2ce0ba108474c735dfd1 (patch) | |
tree | 5e5695216da365cfe29f2b963679243e128e6276 /cui | |
parent | 3e6b3d75a698e0c005c88f9e8ca86e7978a402a6 (diff) |
various cleanups - no behavior change
Change-Id: I28749d31ba272f26df9b79201cb106911692f6f7
Reviewed-on: https://gerrit.libreoffice.org/70199
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/tabpages/tparea.cxx | 77 | ||||
-rw-r--r-- | cui/source/tabpages/tphatch.cxx | 6 |
2 files changed, 44 insertions, 39 deletions
diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx index c4d2c3e40864..ca97d0a07080 100644 --- a/cui/source/tabpages/tparea.cxx +++ b/cui/source/tabpages/tparea.cxx @@ -428,54 +428,59 @@ void SvxAreaTabPage::CreatePage( sal_Int32 nId, SfxTabPage* pTab ) { if(nId == SOLID ) { - static_cast<SvxColorTabPage*>(pTab)->SetColorList( m_pColorList ); - static_cast<SvxColorTabPage*>(pTab)->SetColorChgd( m_pnColorListState ); - static_cast<SvxColorTabPage*>(pTab)->Construct(); - static_cast<SvxColorTabPage*>(pTab)->ActivatePage( m_rXFSet ); - static_cast<SvxColorTabPage*>(pTab)->Reset(&m_rXFSet); - static_cast<SvxColorTabPage*>(pTab)->Show(); + auto* pColorTab = static_cast<SvxColorTabPage*>(pTab); + pColorTab->SetColorList(m_pColorList); + pColorTab->SetColorChgd(m_pnColorListState); + pColorTab->Construct(); + pColorTab->ActivatePage(m_rXFSet); + pColorTab->Reset(&m_rXFSet); + pColorTab->Show(); } else if(nId == GRADIENT) { - static_cast<SvxGradientTabPage*>(pTab)->SetColorList( m_pColorList ); - static_cast<SvxGradientTabPage*>(pTab)->SetGradientList( m_pGradientList ); - static_cast<SvxGradientTabPage*>(pTab)->SetGrdChgd( m_pnGradientListState ); - static_cast<SvxGradientTabPage*>(pTab)->SetColorChgd( m_pnColorListState ); - static_cast<SvxGradientTabPage*>(pTab)->Construct(); - static_cast<SvxGradientTabPage*>(pTab)->ActivatePage( m_rXFSet ); - static_cast<SvxGradientTabPage*>(pTab)->Reset(&m_rXFSet); - static_cast<SvxGradientTabPage*>(pTab)->Show(); + auto* pGradientTab = static_cast<SvxGradientTabPage*>(pTab); + pGradientTab->SetColorList(m_pColorList); + pGradientTab->SetGradientList(m_pGradientList); + pGradientTab->SetGrdChgd(m_pnGradientListState); + pGradientTab->SetColorChgd(m_pnColorListState); + pGradientTab->Construct(); + pGradientTab->ActivatePage(m_rXFSet); + pGradientTab->Reset(&m_rXFSet); + pGradientTab->Show(); } else if(nId == HATCH) { - static_cast<SvxHatchTabPage*>(pTab)->SetColorList( m_pColorList ); - static_cast<SvxHatchTabPage*>(pTab)->SetHatchingList( m_pHatchingList ); - static_cast<SvxHatchTabPage*>(pTab)->SetHtchChgd( m_pnHatchingListState ); - static_cast<SvxHatchTabPage*>(pTab)->SetColorChgd( m_pnColorListState ); - static_cast<SvxHatchTabPage*>(pTab)->Construct(); - static_cast<SvxHatchTabPage*>(pTab)->ActivatePage( m_rXFSet ); - static_cast<SvxHatchTabPage*>(pTab)->Reset(&m_rXFSet); - static_cast<SvxHatchTabPage*>(pTab)->Show(); + auto* pHatchTab = static_cast<SvxHatchTabPage*>(pTab); + pHatchTab->SetColorList(m_pColorList); + pHatchTab->SetHatchingList(m_pHatchingList); + pHatchTab->SetHtchChgd(m_pnHatchingListState); + pHatchTab->SetColorChgd(m_pnColorListState); + pHatchTab->Construct(); + pHatchTab->ActivatePage(m_rXFSet); + pHatchTab->Reset(&m_rXFSet); + pHatchTab->Show(); } else if(nId == BITMAP) { - static_cast<SvxBitmapTabPage*>(pTab)->SetBitmapList( m_pBitmapList ); - static_cast<SvxBitmapTabPage*>(pTab)->SetBmpChgd( m_pnBitmapListState ); - static_cast<SvxBitmapTabPage*>(pTab)->Construct(); - static_cast<SvxBitmapTabPage*>(pTab)->ActivatePage( m_rXFSet ); - static_cast<SvxBitmapTabPage*>(pTab)->Reset(&m_rXFSet); - static_cast<SvxBitmapTabPage*>(pTab)->Show(); + auto* pBitmapTab = static_cast<SvxBitmapTabPage*>(pTab); + pBitmapTab->SetBitmapList(m_pBitmapList); + pBitmapTab->SetBmpChgd(m_pnBitmapListState); + pBitmapTab->Construct(); + pBitmapTab->ActivatePage(m_rXFSet); + pBitmapTab->Reset(&m_rXFSet); + pBitmapTab->Show(); } else if(nId == PATTERN) { - static_cast<SvxPatternTabPage*>(pTab)->SetColorList( m_pColorList ); - static_cast<SvxPatternTabPage*>(pTab)->SetPatternList( m_pPatternList ); - static_cast<SvxPatternTabPage*>(pTab)->SetPtrnChgd( m_pnPatternListState ); - static_cast<SvxPatternTabPage*>(pTab)->SetColorChgd( m_pnColorListState ); - static_cast<SvxPatternTabPage*>(pTab)->Construct(); - static_cast<SvxPatternTabPage*>(pTab)->ActivatePage( m_rXFSet ); - static_cast<SvxPatternTabPage*>(pTab)->Reset( &m_rXFSet ); - static_cast<SvxPatternTabPage*>(pTab)->Show(); + auto* pPatternTab = static_cast<SvxPatternTabPage*>(pTab); + pPatternTab->SetColorList(m_pColorList); + pPatternTab->SetPatternList(m_pPatternList); + pPatternTab->SetPtrnChgd(m_pnPatternListState); + pPatternTab->SetColorChgd(m_pnColorListState); + pPatternTab->Construct(); + pPatternTab->ActivatePage(m_rXFSet); + pPatternTab->Reset(&m_rXFSet); + pPatternTab->Show(); } } diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx index c63738672414..f70c96b0eec5 100644 --- a/cui/source/tabpages/tphatch.cxx +++ b/cui/source/tabpages/tphatch.cxx @@ -389,9 +389,9 @@ void SvxHatchTabPage::ChangeHatchHdl_Impl() m_xLbLineColor->SetNoSelection(); m_xLbLineColor->SelectEntry( pHatch->GetColor() ); SetMetricValue( *m_xMtrDistance, pHatch->GetDistance(), m_ePoolUnit ); - long mHatchAngle = pHatch->GetAngle() / 10; - m_xMtrAngle->set_value(mHatchAngle, FieldUnit::NONE); - m_xSliderAngle->set_value(mHatchAngle); + long nHatchAngle = pHatch->GetAngle() / 10; + m_xMtrAngle->set_value(nHatchAngle, FieldUnit::NONE); + m_xSliderAngle->set_value(nHatchAngle); // fill ItemSet and pass it on to m_aCtlPreview m_rXFSet.Put( XFillHatchItem( OUString(), *pHatch ) ); |