diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-10-21 13:38:33 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-10-22 14:14:48 +0200 |
commit | 7fb43031b7eec663768f5a4e78e60da86379df41 (patch) | |
tree | 026dd9b5a522aec8534763af074fc4a28ccfa58d /svx | |
parent | 61ea11e51ceeaec7bf197a076cf40d96bd65ad07 (diff) |
loplugin:constantparam
Change-Id: Ibfe70492683ff3ec208cee95d8a11155ec54f690
Reviewed-on: https://gerrit.libreoffice.org/81314
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/accessibility/AccessibleControlShape.cxx | 4 | ||||
-rw-r--r-- | svx/source/accessibility/DescriptionGenerator.cxx | 20 | ||||
-rw-r--r-- | svx/source/dialog/_contdlg.cxx | 2 | ||||
-rw-r--r-- | svx/source/dialog/txencbox.cxx | 5 | ||||
-rw-r--r-- | svx/source/tbxctrls/tbcontrl.cxx | 6 |
5 files changed, 11 insertions, 26 deletions
diff --git a/svx/source/accessibility/AccessibleControlShape.cxx b/svx/source/accessibility/AccessibleControlShape.cxx index 9342f26efe7a..9b36c9b51263 100644 --- a/svx/source/accessibility/AccessibleControlShape.cxx +++ b/svx/source/accessibility/AccessibleControlShape.cxx @@ -334,8 +334,8 @@ OUString if ( sDesc.isEmpty() ) { // no -> use the default aDG.Initialize (STR_ObjNameSingulUno); - aDG.AddProperty ("ControlBackground", DescriptionGenerator::PropertyType::Color, ""); - aDG.AddProperty ( "ControlBorder", DescriptionGenerator::PropertyType::Integer, ""); + aDG.AddProperty ("ControlBackground", DescriptionGenerator::PropertyType::Color); + aDG.AddProperty ( "ControlBorder", DescriptionGenerator::PropertyType::Integer); } // ensure that we are listening to the Name property m_bListeningForDesc = ensureListeningState( m_bListeningForDesc, true, lcl_getDescPropertyName() ); diff --git a/svx/source/accessibility/DescriptionGenerator.cxx b/svx/source/accessibility/DescriptionGenerator.cxx index 636baf66cefb..116925587c1b 100644 --- a/svx/source/accessibility/DescriptionGenerator.cxx +++ b/svx/source/accessibility/DescriptionGenerator.cxx @@ -121,22 +121,8 @@ OUString DescriptionGenerator::operator() () } -void DescriptionGenerator::AddProperty ( - const OUString& sPropertyName, - PropertyType aType, - const char* pLocalizedNameId) -{ - OUString sLocalizedName; - { - SolarMutexGuard aGuard; - sLocalizedName = SvxResId(pLocalizedNameId); - } - AddProperty (sPropertyName, aType, sLocalizedName); -} - - void DescriptionGenerator::AddProperty (const OUString& sPropertyName, - PropertyType aType, const OUString& sLocalizedName) + PropertyType aType) { uno::Reference<beans::XPropertyState> xState (mxShape, uno::UNO_QUERY); if (xState.is() @@ -160,10 +146,10 @@ void DescriptionGenerator::AddProperty (const OUString& sPropertyName, switch (aType) { case PropertyType::Color: - AddColor (sPropertyName, sLocalizedName); + AddColor (sPropertyName, ""); break; case PropertyType::Integer: - AddInteger (sPropertyName, sLocalizedName); + AddInteger (sPropertyName, ""); break; } } diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx index 13a3581257b7..01c1a28a17a9 100644 --- a/svx/source/dialog/_contdlg.cxx +++ b/svx/source/dialog/_contdlg.cxx @@ -163,7 +163,7 @@ tools::PolyPolygon SvxContourDlg::CreateAutoContour( const Graphic& rGraphic, aBmp.SetPrefSize( rGraphic.GetPrefSize() ); aBmp.SetPrefMapMode( rGraphic.GetPrefMapMode() ); - return tools::PolyPolygon( BitmapEx(aBmp).GetContour( bContourEdgeDetect, /*bContourVert*/false, pRect ) ); + return tools::PolyPolygon( BitmapEx(aBmp).GetContour( bContourEdgeDetect, pRect ) ); } // Loop through to super class, no virtual Methods to not become incompatible diff --git a/svx/source/dialog/txencbox.cxx b/svx/source/dialog/txencbox.cxx index 290e56359db9..87803d7d20b9 100644 --- a/svx/source/dialog/txencbox.cxx +++ b/svx/source/dialog/txencbox.cxx @@ -200,10 +200,9 @@ void SvxTextEncodingBox::FillFromTextEncodingTable( } void SvxTextEncodingTreeView::FillFromTextEncodingTable( - bool bExcludeImportSubsets, sal_uInt32 nExcludeInfoFlags, - sal_uInt32 nButIncludeInfoFlags ) + bool bExcludeImportSubsets, sal_uInt32 nExcludeInfoFlags ) { - std::vector<int> aRet(::FillFromTextEncodingTable(bExcludeImportSubsets, nExcludeInfoFlags, nButIncludeInfoFlags)); + std::vector<int> aRet(::FillFromTextEncodingTable(bExcludeImportSubsets, nExcludeInfoFlags, /*nButIncludeInfoFlags*/0)); m_xControl->freeze(); for (auto j : aRet) { diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index b3b6b51db395..b1230050bc06 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -3867,12 +3867,12 @@ void ColorListBox::EnsurePaletteManager() } } -void SvxColorListBox::SetSlotId(sal_uInt16 nSlotId, bool bShowNoneButton) +void SvxColorListBox::SetSlotId(sal_uInt16 nSlotId) { m_nSlotId = nSlotId; - m_bShowNoneButton = bShowNoneButton; + m_bShowNoneButton = false; m_xColorWindow.disposeAndClear(); - m_aSelectedColor = bShowNoneButton ? GetNoneColor() : GetAutoColor(m_nSlotId); + m_aSelectedColor = GetAutoColor(m_nSlotId); ShowPreview(m_aSelectedColor); createColorWindow(); } |