[Libreoffice-commits] core.git: cui/source vcl/source
Tomaž Vajngerl (via logerrit)
logerrit at kemper.freedesktop.org
Wed Apr 3 15:11:48 UTC 2019
cui/source/tabpages/tparea.cxx | 77 +++++++++++++++++++++-------------------
cui/source/tabpages/tphatch.cxx | 6 +--
vcl/source/image/Image.cxx | 2 -
3 files changed, 45 insertions(+), 40 deletions(-)
New commits:
commit 478ecc26a65188e332df2ce0ba108474c735dfd1
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Wed Apr 3 22:05:44 2019 +0900
Commit: Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Wed Apr 3 17:11:21 2019 +0200
various cleanups - no behavior change
Change-Id: I28749d31ba272f26df9b79201cb106911692f6f7
Reviewed-on: https://gerrit.libreoffice.org/70199
Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
Tested-by: Tomaž Vajngerl <quikee at gmail.com>
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 ) );
diff --git a/vcl/source/image/Image.cxx b/vcl/source/image/Image.cxx
index 99e3aeae9431..e52583b99bd9 100644
--- a/vcl/source/image/Image.cxx
+++ b/vcl/source/image/Image.cxx
@@ -120,7 +120,7 @@ void Image::Draw(OutputDevice* pOutDev, const Point& rPos, DrawImageFlags nStyle
Size aOutSize = pSize ? *pSize : pOutDev->PixelToLogic(mpImplData->getSizePixel());
- BitmapEx aRenderBmp = mpImplData->getBitmapExForHiDPI(!!(nStyle & DrawImageFlags::Disable));
+ BitmapEx aRenderBmp = mpImplData->getBitmapExForHiDPI(bool(nStyle & DrawImageFlags::Disable));
if (!(nStyle & DrawImageFlags::Disable) &&
(nStyle & (DrawImageFlags::ColorTransform | DrawImageFlags::Highlight |
More information about the Libreoffice-commits
mailing list