diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-08-11 11:51:09 +0100 |
---|---|---|
committer | Aron Budea <aron.budea@collabora.com> | 2018-02-05 15:36:43 +0100 |
commit | b0958ff8bf86b86682131b4da99da701a4a72adb (patch) | |
tree | 1a89ad3db16a9c3dc80169ce97f850029f980c7f /sd | |
parent | 81e6d59738c67e2050428bce9c0f490eebacb7f2 (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)
Reviewed-on: https://gerrit.libreoffice.org/41168
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
(cherry picked from commit a407285747c65894bc858c4aa722a24e57caca31)
Change-Id: I83db9f02145a4927257dd5691f82dad1a11eaea6
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/dlg/dlgchar.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/func/fuchar.cxx | 26 |
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 f5601b3f2cd3..5ffcfa0f7cf0 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; |