summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-08-11 11:51:09 +0100
committerMichael Stahl <mstahl@redhat.com>2017-08-17 13:45:19 +0200
commita407285747c65894bc858c4aa722a24e57caca31 (patch)
tree0c9f11b18ca89eac2b5afd45f8e508df43fd7a6b /sd
parent1d5f35218ef2176af445a0644bd329763b77feb4 (diff)
Resolves: tdf#110077 move the SvxBackgroundColorItem<->SvxBrushItem conversion
into the dialog itself Reviewed-on: https://gerrit.libreoffice.org/41029 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 6284804c2ccb3ad8bb6e1c1dac8d622f66b8c07d) Change-Id: I83db9f02145a4927257dd5691f82dad1a11eaea6 Reviewed-on: https://gerrit.libreoffice.org/41168 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/dlg/dlgchar.cxx2
-rw-r--r--sd/source/ui/func/fuchar.cxx26
2 files changed, 2 insertions, 26 deletions
diff --git a/sd/source/ui/dlg/dlgchar.cxx b/sd/source/ui/dlg/dlgchar.cxx
index bcf443767eea..cb37af495eac 100644
--- a/sd/source/ui/dlg/dlgchar.cxx
+++ b/sd/source/ui/dlg/dlgchar.cxx
@@ -65,7 +65,7 @@ void SdCharDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
}
else if (nId == mnCharBackground)
{
- aSet.Put(SfxUInt32Item(SID_FLAG_TYPE,static_cast<sal_uInt32>(SvxBackgroundTabFlags::SHOW_HIGHLIGHTING)));
+ aSet.Put(SfxUInt32Item(SID_FLAG_TYPE,static_cast<sal_uInt32>(SvxBackgroundTabFlags::SHOW_CHAR_BKGCOLOR)));
rPage.PageCreated(aSet);
}
}
diff --git a/sd/source/ui/func/fuchar.cxx b/sd/source/ui/func/fuchar.cxx
index 4a8aedd64ece..1ffa757f0879 100644
--- a/sd/source/ui/func/fuchar.cxx
+++ b/sd/source/ui/func/fuchar.cxx
@@ -68,33 +68,9 @@ void FuChar::DoExecute( SfxRequest& rReq )
SfxItemSet aEditAttr( mpDoc->GetPool() );
mpView->GetAttributes( aEditAttr );
- static const sal_uInt16 aRanges[] =
- {
- EE_ITEMS_START, EE_ITEMS_END,
- SID_ATTR_BRUSH_CHAR, SID_ATTR_BRUSH_CHAR,
- 0
- };
-
- SfxItemSet aNewAttr( mpViewShell->GetPool(),
- aRanges );
+ SfxItemSet aNewAttr(mpViewShell->GetPool(), EE_ITEMS_START, EE_ITEMS_END);
aNewAttr.Put( aEditAttr, false );
- // EE_CHAR_BKGCOLOR is SvxBackgroundColorItem, but char background tabpage
- // can only work with SvxBrushItems (it requires major undertaking to have
- // it support anything else). Do the following then:
- const SfxPoolItem* pItem;
- if ( aNewAttr.GetItemState( EE_CHAR_BKGCOLOR, true, &pItem ) == SfxItemState::SET )
- {
- // extract Color outta SvxBackColorItem
- Color aBackColor = static_cast<const SvxBackgroundColorItem*>(pItem)->GetValue();
- // make new SvxBrushItem with this Color
- SvxBrushItem aBrushItem( aBackColor, SID_ATTR_BRUSH_CHAR );
-
- aNewAttr.ClearItem( EE_CHAR_BKGCOLOR );
- // and stick it into the set
- aNewAttr.Put( aBrushItem );
- }
-
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact ? pFact->CreateSdTabCharDialog(mpViewShell->GetActiveWindow(), &aNewAttr, mpDoc->GetDocSh() ) : nullptr);
sal_uInt16 nResult = RET_CANCEL;