diff options
author | Noel <noelgrandin@gmail.com> | 2020-09-30 09:39:36 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-09-30 11:48:48 +0200 |
commit | 7ced53424a21ab264374d97aacdfb4ec166c8171 (patch) | |
tree | a119f33d08617939ed0a8c8dc4870c7832443506 /svx/source/tbxctrls | |
parent | 6b709ad5d46dc33f29ec28183cea40cf9e77e2af (diff) |
loplugin:reducevarscope in svx
Change-Id: I88fdaa74c4944f9ffc81db6df08a29283362375a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103647
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/tbxctrls')
-rw-r--r-- | svx/source/tbxctrls/StylesPreviewWindow.cxx | 4 | ||||
-rw-r--r-- | svx/source/tbxctrls/tbcontrl.cxx | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/svx/source/tbxctrls/StylesPreviewWindow.cxx b/svx/source/tbxctrls/StylesPreviewWindow.cxx index 6bd4f54ecba8..a36cd5203263 100644 --- a/svx/source/tbxctrls/StylesPreviewWindow.cxx +++ b/svx/source/tbxctrls/StylesPreviewWindow.cxx @@ -451,7 +451,6 @@ void StylesPreviewWindow_Base::UpdateStylesList() m_aAllStyles = m_aDefaultStyles; SfxObjectShell* pDocShell = SfxObjectShell::Current(); - const SfxStyleFamily eFamily = SfxStyleFamily::Para; SfxStyleSheetBasePool* pStyleSheetPool = nullptr; if (pDocShell) @@ -459,7 +458,8 @@ void StylesPreviewWindow_Base::UpdateStylesList() if (pStyleSheetPool) { - auto xIter = pStyleSheetPool->CreateIterator(eFamily, SfxStyleSearchBits::UserDefined); + auto xIter = pStyleSheetPool->CreateIterator(SfxStyleFamily::Para, + SfxStyleSearchBits::UserDefined); SfxStyleSheetBase* pStyle = xIter->First(); diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 6b0f393bf28a..6d46b52ac94d 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -1336,7 +1336,7 @@ void SvxStyleBox_Base::CalcOptimalExtraUserWidth(vcl::RenderContext& rRenderCont // when the color is R=G=B=128 the DecreaseContrast make 128 the need an exception Color SvxStyleBox_Base::TestColorsVisible(const Color &FontCol, const Color &BackCol) { - const sal_uInt8 ChgVal = 60; // increase/decrease the Contrast + constexpr sal_uInt8 ChgVal = 60; // increase/decrease the Contrast Color retCol = FontCol; if ((FontCol.IsDark() == BackCol.IsDark()) && (FontCol.IsBright() == BackCol.IsBright())) |