summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTamás Zolnai <tamas.zolnai@collabora.com>2017-08-18 20:07:16 +0200
committerKatarina Behrens <Katarina.Behrens@cib.de>2017-08-22 21:39:44 +0200
commitb6e16872490a12a6b0f9a214bb5e4eef8b236903 (patch)
tree8b47f26a0a5095c0ecee610a5c3a170c55d68c2e
parent4b0a2b0ab9e03f20c5cde4064447ffa15f19b90f (diff)
Related to tdf#109863: Crash when close slide style dialog with OK
Use item conversion implemented inside the background tab page. Change-Id: I4cb0fa60e6d2024a2e6e08e06af337d85b7f49fa Reviewed-on: https://gerrit.libreoffice.org/41266 Reviewed-by: Michael Stahl <mstahl@redhat.com> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de> Tested-by: Katarina Behrens <Katarina.Behrens@cib.de>
-rw-r--r--sd/source/ui/dlg/prltempl.cxx2
-rw-r--r--sd/source/ui/func/futempl.cxx20
2 files changed, 1 insertions, 21 deletions
diff --git a/sd/source/ui/dlg/prltempl.cxx b/sd/source/ui/dlg/prltempl.cxx
index ea873f8e802e..d261946720f6 100644
--- a/sd/source/ui/dlg/prltempl.cxx
+++ b/sd/source/ui/dlg/prltempl.cxx
@@ -280,7 +280,7 @@ void SdPresLayoutTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
}
else if (nId == mnBackground)
{
- 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/futempl.cxx b/sd/source/ui/func/futempl.cxx
index 51a074342c25..dade95970d5f 100644
--- a/sd/source/ui/func/futempl.cxx
+++ b/sd/source/ui/func/futempl.cxx
@@ -105,10 +105,6 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
SfxStyleSheetBase* pStyleSheet = nullptr;
const SfxPoolItem* pItem;
- static const sal_uInt16 aRanges[] = {
- EE_ITEMS_START, EE_ITEMS_END,
- SID_ATTR_BRUSH_CHAR, SID_ATTR_BRUSH_CHAR
- };
SfxStyleFamily nFamily = (SfxStyleFamily)USHRT_MAX;
if( pArgs && SfxItemState::SET == pArgs->GetItemState( SID_STYLE_FAMILY,
false, &pItem ))
@@ -305,15 +301,6 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
ScopedVclPtr<SfxAbstractTabDialog> pPresDlg;
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
bool bOldDocInOtherLanguage = false;
- SfxItemSet aNewAttr(mpViewShell->GetPool(), aRanges);
-
- if( aNewAttr.GetItemState( XATTR_FILLBACKGROUND, true, &pItem ) == SfxItemState::SET)
- {
- Color aBackColor = static_cast<const SvxBackgroundColorItem*>(pItem)->GetValue();
- SvxBrushItem aBrushItem(aBackColor, XATTR_FILLBACKGROUND);
- aNewAttr.ClearItem(XATTR_FILLBACKGROUND);
- aNewAttr.Put(aBrushItem);
- }
SfxStyleFamily eFamily = pStyleSheet->GetFamily();
@@ -414,13 +401,6 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
SfxItemSet aTempSet(*pOutSet);
static_cast<SdStyleSheet*>(pStyleSheet)->AdjustToFontHeight(aTempSet);
- const SvxBrushItem* pBrushItem = aTempSet.GetItem<SvxBrushItem>(XATTR_FILLBACKGROUND);
- if( pBrushItem )
- {
- SvxBackgroundColorItem aBackColorItem( pBrushItem->GetColor(), EE_CHAR_BKGCOLOR);
- aTempSet.ClearItem(XATTR_FILLBACKGROUND);
- aTempSet.Put(aBackColorItem);
- }
/* Special treatment: reset the INVALIDS to
NULL-Pointer (otherwise INVALIDs or pointer point
to DefaultItems in the template; both would