summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorGülşah Köse <gulsah.kose@collabora.com>2021-05-28 01:23:53 +0300
committerGülşah Köse <gulsah.kose@collabora.com>2021-05-31 11:36:18 +0200
commit936af331ba6f5073aeaa0f10f5f2af1def1d74c6 (patch)
treee145eb9a5f7b9fe05a7f7832cf6eb76388cc4662 /cui
parent7d34a7777cfeec112ab5cdabba059d01d8876be4 (diff)
Clean redundant SvxBackgroundColorItem and use SvxColorItem instead.
SvxBackgroundColorItem is just copied from SvxColorItem. There is nothing special to SvxBackgroundColorItem class. SvxColorItem is a generic item and it's used on many places related with colors. We can use SvxColorItem for background colors too. Change-Id: Iacea31a7557b806e95f5859ff60add9a2626ec05 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116282 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'cui')
-rw-r--r--cui/source/dialogs/SpellDialog.cxx2
-rw-r--r--cui/source/tabpages/backgrnd.cxx10
2 files changed, 6 insertions, 6 deletions
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx
index 338990b31628..b583fa03768e 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -1067,7 +1067,7 @@ bool SpellDialog::GetNextSentence_Impl(std::unique_ptr<UndoChangeGroupGuard>* pG
}
if (elem.bIsField)
- m_xSentenceED->SetAttrib(SvxBackgroundColorItem(COL_LIGHTGRAY, EE_CHAR_BKGCOLOR), nStartPosition, nEndPosition);
+ m_xSentenceED->SetAttrib(SvxColorItem(COL_LIGHTGRAY, EE_CHAR_BKGCOLOR), nStartPosition, nEndPosition);
m_xSentenceED->SetAttrib(SvxLanguageItem(elem.eLanguage, EE_CHAR_LANGUAGE), nStartPosition, nEndPosition);
nStartPosition = nEndPosition;
}
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index 38190271d778..3aac1fae51a7 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -153,8 +153,8 @@ bool SvxBkgTabPage::FillItemSet( SfxItemSet* rCoreSet )
{
if ( SID_ATTR_CHAR_BACK_COLOR == nSlot )
{
- maSet.Put( SvxBackgroundColorItem( COL_TRANSPARENT, nWhich ) );
- rCoreSet->Put( SvxBackgroundColorItem( COL_TRANSPARENT, nWhich ) );
+ maSet.Put( SvxColorItem( COL_TRANSPARENT, nWhich ) );
+ rCoreSet->Put( SvxColorItem( COL_TRANSPARENT, nWhich ) );
}
else
{
@@ -169,8 +169,8 @@ bool SvxBkgTabPage::FillItemSet( SfxItemSet* rCoreSet )
XFillColorItem aColorItem( maSet.Get( XATTR_FILLCOLOR ) );
if ( SID_ATTR_CHAR_BACK_COLOR == nSlot )
{
- maSet.Put( SvxBackgroundColorItem( aColorItem.GetColorValue(), nWhich ) );
- rCoreSet->Put( SvxBackgroundColorItem( aColorItem.GetColorValue(), nWhich ) );
+ maSet.Put( SvxColorItem( aColorItem.GetColorValue(), nWhich ) );
+ rCoreSet->Put( SvxColorItem( aColorItem.GetColorValue(), nWhich ) );
}
else
{
@@ -263,7 +263,7 @@ void SvxBkgTabPage::PageCreated(const SfxAllItemSet& aSet)
if ( bCharBackColor )
{
sal_uInt16 nWhich(maSet.GetPool()->GetWhich(SID_ATTR_CHAR_BACK_COLOR));
- Color aBackColor(static_cast<const SvxBackgroundColorItem&>(maSet.Get(nWhich)).GetValue());
+ Color aBackColor(static_cast<const SvxColorItem&>(maSet.Get(nWhich)).GetValue());
SvxBrushItem aBrushItem(SvxBrushItem(aBackColor, SID_ATTR_BRUSH_CHAR));
setSvxBrushItemAsFillAttributesToTargetSet(aBrushItem, maSet);
}