tdf#105225 new background tab page
This patch allows the new background/highlighting tab page and derived
from area tab page to work correctly in the same tab dialog. It also
provides a cleaner way to use the new background tab page by setting
brush item as fill attributes to target set in the background tab page
created method.
Previously if the new background tab page and the area tab page were
used in the same tab page dialog one would affect the other due to the
same use of pool fill items. This patch makes a local copy of the
attribute item set passed and then passes that set along to the parent
class area tab page on each activation/deactivation.
Tab page dialogs that use both the background and area tab pages are:
Writer Paragraph Styles, Impress Presentations Styles and Drawing/
Graphics Styles, and Draw Drawing/Graphics Styles.
All new background tab page merged patches have been reworked in this
patch and remaining old background tab pages, with the exception of
Report Design, have been replaced by the new tab page.
Change-Id: I47f9ae10a0fd967729ff6e83c1a312aa49e1d13c
Reviewed-on: https://gerrit.libreoffice.org/57102
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
diff --git a/cui/source/inc/backgrnd.hxx b/cui/source/inc/backgrnd.hxx
index dd0b6178..8f02659 100644
--- a/cui/source/inc/backgrnd.hxx
+++ b/cui/source/inc/backgrnd.hxx
@@ -158,7 +158,10 @@
{
std::unique_ptr<weld::ComboBox> m_xTblLBox;
bool bHighlighting : 1;
bool bCharBackColor : 1;
SfxItemSet maSet;
public:
using SvxAreaTabPage::ActivatePage;
using SvxAreaTabPage::DeactivatePage;
SvxBkgTabPage(TabPageParent pParent, const SfxItemSet& rInAttrs);
@@ -167,6 +170,7 @@
static VclPtr<SfxTabPage> Create( TabPageParent, const SfxItemSet* );
virtual bool FillItemSet( SfxItemSet* ) override;
virtual void ActivatePage( const SfxItemSet& ) override;
virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
virtual void PageCreated( const SfxAllItemSet& aSet ) override;
};
diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index b16a706..19c52a60 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -215,7 +215,6 @@
class SvxAreaTabPage : public SfxTabPage
{
using TabPage::ActivatePage;
static const sal_uInt16 pAreaRanges[];
private:
ScopedVclPtr<SfxTabPage> m_pFillTabPage;
@@ -264,6 +263,7 @@
DeactivateRC DeactivatePage_Impl( SfxItemSet* pSet );
public:
using TabPage::ActivatePage;
using TabPage::DeactivatePage;
SvxAreaTabPage(TabPageParent pParent, const SfxItemSet& rInAttrs);
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index 00b6094..b41680e 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -1346,8 +1346,10 @@
}
SvxBkgTabPage::SvxBkgTabPage(TabPageParent pParent, const SfxItemSet& rInAttrs)
: SvxAreaTabPage(pParent, rInAttrs)
, bHighlighting(false)
: SvxAreaTabPage(pParent, rInAttrs),
bHighlighting(false),
bCharBackColor(false),
maSet(rInAttrs)
{
m_xBtnGradient->hide();
m_xBtnHatch->hide();
@@ -1389,9 +1391,14 @@
SvxAreaTabPage::dispose();
}
void SvxBkgTabPage::ActivatePage( const SfxItemSet& )
{
SvxAreaTabPage::ActivatePage( maSet );
}
DeactivateRC SvxBkgTabPage::DeactivatePage( SfxItemSet* _pSet )
{
if ( DeactivateRC::KeepPage == SvxAreaTabPage::DeactivatePage( _pSet ) )
if ( DeactivateRC::KeepPage == SvxAreaTabPage::DeactivatePage( &maSet ) )
return DeactivateRC::KeepPage;
if ( _pSet )
@@ -1420,26 +1427,46 @@
}
else if ( bHighlighting )
nSlot = SID_ATTR_BRUSH_CHAR;
else if( bCharBackColor )
nSlot = SID_ATTR_CHAR_BACK_COLOR;
sal_uInt16 nWhich = GetWhich(nSlot);
drawing::FillStyle eFillType = rCoreSet->Get( XATTR_FILLSTYLE ).GetValue();
drawing::FillStyle eFillType = maSet.Get( XATTR_FILLSTYLE ).GetValue();
switch( eFillType )
{
case drawing::FillStyle_NONE:
{
rCoreSet->Put( SvxBrushItem( COL_TRANSPARENT, nWhich ) );
if ( SID_ATTR_CHAR_BACK_COLOR == nSlot )
{
maSet.Put( SvxBackgroundColorItem( COL_TRANSPARENT, nWhich ) );
rCoreSet->Put( SvxBackgroundColorItem( COL_TRANSPARENT, nWhich ) );
}
else
{
maSet.Put( SvxBrushItem( COL_TRANSPARENT, nWhich ) );
rCoreSet->Put( SvxBrushItem( COL_TRANSPARENT, nWhich ) );
}
break;
}
case drawing::FillStyle_SOLID:
{
XFillColorItem aColorItem( rCoreSet->Get( XATTR_FILLCOLOR ) );
rCoreSet->Put( SvxBrushItem( aColorItem.GetColorValue(), nWhich ) );
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 ) );
}
else
{
maSet.Put( SvxBrushItem( aColorItem.GetColorValue(), nWhich ) );
rCoreSet->Put( SvxBrushItem( aColorItem.GetColorValue(), nWhich ) );
}
break;
}
case drawing::FillStyle_BITMAP:
{
SvxBrushItem aBrushItem( getSvxBrushItemFromSourceSet( *rCoreSet, nWhich ) );
SvxBrushItem aBrushItem( getSvxBrushItemFromSourceSet( maSet, nWhich ) );
if ( GraphicType::NONE != aBrushItem.GetGraphicObject()->GetType() ) // no selection so use current
rCoreSet->Put( aBrushItem );
break;
@@ -1469,12 +1496,31 @@
m_xTblLBox->set_active(0);
m_xTblLBox->show();
}
else if (nFlags & SvxBackgroundTabFlags::SHOW_HIGHLIGHTING)
if ((nFlags & SvxBackgroundTabFlags::SHOW_HIGHLIGHTING) ||
(nFlags & SvxBackgroundTabFlags::SHOW_CHAR_BKGCOLOR))
{
bHighlighting = bool(nFlags & SvxBackgroundTabFlags::SHOW_HIGHLIGHTING);
else if (nFlags & SvxBackgroundTabFlags::SHOW_SELECTOR)
bCharBackColor = bool(nFlags & SvxBackgroundTabFlags::SHOW_CHAR_BKGCOLOR);
}
if (nFlags & SvxBackgroundTabFlags::SHOW_SELECTOR)
m_xBtnBitmap->show();
}
SvxAreaTabPage::PageCreated( aSet );
if ( bCharBackColor )
{
sal_uInt16 nWhich(maSet.GetPool()->GetWhich(SID_ATTR_CHAR_BACK_COLOR));
Color aBackColor(static_cast<const SvxBackgroundColorItem&>(maSet.Get(nWhich)).GetValue());
SvxBrushItem aBrushItem(SvxBrushItem(aBackColor, SID_ATTR_BRUSH_CHAR));
setSvxBrushItemAsFillAttributesToTargetSet(aBrushItem, maSet);
}
else
{
sal_uInt16 nWhich(maSet.GetPool()->GetWhich(bHighlighting ? SID_ATTR_BRUSH_CHAR : SID_ATTR_BRUSH));
SvxBrushItem aBrushItem(static_cast<const SvxBrushItem&>(maSet.Get(nWhich)));
setSvxBrushItemAsFillAttributesToTargetSet(aBrushItem, maSet);
}
SvxAreaTabPage::PageCreated(aSet);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/attrdlg/attrdlg.cxx b/sc/source/ui/attrdlg/attrdlg.cxx
index d49b0ea..be163f7 100644
--- a/sc/source/ui/attrdlg/attrdlg.cxx
+++ b/sc/source/ui/attrdlg/attrdlg.cxx
@@ -82,6 +82,10 @@
aSet.Put (SvxFontListItem(static_cast<const SvxFontListItem*>(pInfoItem)->GetFontList(), SID_ATTR_CHAR_FONTLIST ));
rTabPage.PageCreated(aSet);
}
else if (rPageId == "background")
{
rTabPage.PageCreated(aSet);
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index 56dde15..b244708 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -117,6 +117,8 @@
#include <sfx2/notebookbar/SfxNotebookBar.hxx>
#include <helpids.h>
#include <svx/xdef.hxx>
void ScDocShell::ReloadAllLinks()
{
m_aDocument.SetLinkFormulaNeedingCheck(false);
@@ -1689,6 +1691,7 @@
aOldData.InitFromStyle( pStyleSheet );
SfxItemSet& rStyleSet = pStyleSheet->GetItemSet();
rStyleSet.MergeRange( XATTR_FILL_FIRST, XATTR_FILL_LAST );
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
diff --git a/sc/source/ui/styleui/styledlg.cxx b/sc/source/ui/styleui/styledlg.cxx
index 2315186..f0b2618 100644
--- a/sc/source/ui/styleui/styledlg.cxx
+++ b/sc/source/ui/styleui/styledlg.cxx
@@ -56,7 +56,7 @@
{
AddTabPage("page", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PAGE ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_PAGE ) );
AddTabPage("borders", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ) );
AddTabPage("background", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ) );
AddTabPage("background", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BKG ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ) );
AddTabPage("header", &ScHeaderPage::Create, &ScHeaderPage::GetRanges );
AddTabPage("footer", &ScFooterPage::Create, &ScFooterPage::GetRanges );
AddTabPage("sheet", &ScTablePage::Create, &ScTablePage::GetRanges );
@@ -75,7 +75,7 @@
else
RemoveTabPage("asiantypo");
AddTabPage("borders", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ));
AddTabPage("background", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ));
AddTabPage("background", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BKG ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ));
AddTabPage("protection", &ScTabPageProtection::Create, &ScTabPageProtection::GetRanges);
}
}
@@ -126,6 +126,10 @@
aSet.Put (SvxFontListItem(static_cast<const SvxFontListItem&>(*pInfoItem).GetFontList(), SID_ATTR_CHAR_FONTLIST));
rTabPage.PageCreated(aSet);
}
else if (rPageId == "background")
{
rTabPage.PageCreated(aSet);
}
}
}
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index 0ee2c0e..7868e43 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -842,6 +842,9 @@
pTabViewShell->SetInFormatDialog(true);
SfxItemSet& rStyleSet = pStyleSheet->GetItemSet();
rStyleSet.MergeRange( XATTR_FILL_FIRST, XATTR_FILL_LAST );
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
pDlg.disposeAndReset(pFact->CreateScStyleDlg(rReq.GetFrameWeld(), *pStyleSheet, bPage));
diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx
index 963cad9..93ca656 100644
--- a/sc/source/ui/view/tabvwsha.cxx
+++ b/sc/source/ui/view/tabvwsha.cxx
@@ -484,10 +484,6 @@
pOldSet->MergeRange(XATTR_FILLSTYLE, XATTR_FILLCOLOR);
sal_uInt16 nWhich = pOldSet->GetPool()->GetWhich( SID_ATTR_BRUSH );
SvxBrushItem aBrushItem(static_cast<const SvxBrushItem&>(pOldSet->Get(nWhich)));
setSvxBrushItemAsFillAttributesToTargetSet(aBrushItem, *pOldSet);
pOldSet->MergeRange(SID_ATTR_BORDER_STYLES, SID_ATTR_BORDER_DEFAULT_WIDTH);
// We only allow these border line types.
diff --git a/sd/source/ui/dlg/dlgchar.cxx b/sd/source/ui/dlg/dlgchar.cxx
index 5901dd1..298e0e6 100644
--- a/sd/source/ui/dlg/dlgchar.cxx
+++ b/sd/source/ui/dlg/dlgchar.cxx
@@ -41,7 +41,7 @@
AddTabPage("RID_SVXPAGE_CHAR_NAME", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_CHAR_NAME), nullptr);
AddTabPage("RID_SVXPAGE_CHAR_EFFECTS", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_CHAR_EFFECTS), nullptr);
AddTabPage("RID_SVXPAGE_CHAR_POSITION", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_CHAR_POSITION), nullptr);
AddTabPage("RID_SVXPAGE_BACKGROUND", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_BACKGROUND), nullptr);
AddTabPage("RID_SVXPAGE_BACKGROUND", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_BKG), nullptr);
}
void SdCharDlg::PageCreated(const OString& rId, SfxTabPage &rPage)
diff --git a/sd/source/ui/dlg/prltempl.cxx b/sd/source/ui/dlg/prltempl.cxx
index 4c01aae..68f2faf 100644
--- a/sd/source/ui/dlg/prltempl.cxx
+++ b/sd/source/ui/dlg/prltempl.cxx
@@ -146,7 +146,7 @@
AddTabPage( "RID_SVXPAGE_TABULATOR", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_TABULATOR ), nullptr );
AddTabPage( "RID_SVXPAGE_PARA_ASIAN", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PARA_ASIAN ), nullptr );
AddTabPage( "RID_SVXPAGE_ALIGN_PARAGRAPH", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_ALIGN_PARAGRAPH ), nullptr );
AddTabPage( "RID_SVXPAGE_BACKGROUND", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), nullptr);
AddTabPage( "RID_SVXPAGE_BACKGROUND", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BKG ), nullptr);
SvtCJKOptions aCJKOptions;
if( !aCJKOptions.IsAsianTypographyEnabled() )
diff --git a/sd/source/ui/dlg/tabtempl.cxx b/sd/source/ui/dlg/tabtempl.cxx
index 333283f..9edd2d5 100644
--- a/sd/source/ui/dlg/tabtempl.cxx
+++ b/sd/source/ui/dlg/tabtempl.cxx
@@ -71,7 +71,7 @@
AddTabPage("transparency", RID_SVXPAGE_TRANSPARENCE);
AddTabPage("font", RID_SVXPAGE_CHAR_NAME);
AddTabPage("fonteffect", RID_SVXPAGE_CHAR_EFFECTS);
AddTabPage("background", RID_SVXPAGE_BACKGROUND);
AddTabPage("background", RID_SVXPAGE_BKG);
AddTabPage("indents", RID_SVXPAGE_STD_PARAGRAPH);
AddTabPage("text", RID_SVXPAGE_TEXTATTR);
AddTabPage("animation", RID_SVXPAGE_TEXTANIMATION);
diff --git a/sd/source/ui/func/fuchar.cxx b/sd/source/ui/func/fuchar.cxx
index 4ad60ed..1e00b58 100644
--- a/sd/source/ui/func/fuchar.cxx
+++ b/sd/source/ui/func/fuchar.cxx
@@ -68,7 +68,7 @@
SfxItemSet aEditAttr( mpDoc->GetPool() );
mpView->GetAttributes( aEditAttr );
SfxItemSet aNewAttr(mpViewShell->GetPool(), svl::Items<EE_ITEMS_START, EE_ITEMS_END>{});
SfxItemSet aNewAttr(mpViewShell->GetPool(), svl::Items<XATTR_FILLSTYLE, XATTR_FILLCOLOR, EE_ITEMS_START, EE_ITEMS_END>{});
aNewAttr.Put( aEditAttr, false );
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index 433986c..db86dd7 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -63,8 +63,6 @@
#include <svx/flagsdef.hxx>
#include <memory>
#include <svx/unobrushitemhelper.hxx>
using namespace ::com::sun::star;
namespace {
@@ -1072,8 +1070,6 @@
aSet.Put( pSectRepr->GetFrameDir() );
aSet.Put( pSectRepr->GetLRSpace() );
setSvxBrushItemAsFillAttributesToTargetSet(pSectRepr->GetBackground(), aSet);
const SwSectionFormats& rDocFormats = rSh.GetDoc()->GetSections();
SwSectionFormats aOrigArray(rDocFormats);
diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx
index c9370c1..43a5208 100644
--- a/sw/source/ui/fmtui/tmpdlg.cxx
+++ b/sw/source/ui/fmtui/tmpdlg.cxx
@@ -129,9 +129,9 @@
OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_TWOLINES ) , "GetTabPageRangesFunc fail!");
m_nAsianLayoutId = AddTabPage("asianlayout", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_TWOLINES ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_TWOLINES ));
OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), "GetTabPageCreatorFunc fail!");
OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BKG ), "GetTabPageCreatorFunc fail!");
OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ) , "GetTabPageRangesFunc fail!");
m_nBackgroundId = AddTabPage("background", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ));
m_nBackgroundId = AddTabPage("background", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BKG ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ));
SAL_WARN_IF(!pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), "sw.ui", "GetTabPageCreatorFunc fail!");
SAL_WARN_IF(!pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ), "sw.ui", "GetTabPageRangesFunc fail!");
@@ -177,9 +177,9 @@
OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_TWOLINES ) , "GetTabPageRangesFunc fail!");
m_nAsianLayoutId = AddTabPage("asianlayout", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_TWOLINES ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_TWOLINES ) );
OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), "GetTabPageCreatorFunc fail!");
OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BKG ), "GetTabPageCreatorFunc fail!");
OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ) , "GetTabPageRangesFunc fail!");
m_nBackgroundId = AddTabPage("highlighting", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ));
m_nBackgroundId = AddTabPage("highlighting", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BKG ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ));
OSL_ENSURE(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_TABULATOR), "GetTabPageCreatorFunc fail!");
OSL_ENSURE(pFact->GetTabPageRangesFunc(RID_SVXPAGE_TABULATOR), "GetTabPageRangesFunc fail!");
diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx
index 579a35d..b8da495 100644
--- a/sw/source/uibase/shells/tabsh.cxx
+++ b/sw/source/uibase/shells/tabsh.cxx
@@ -84,8 +84,6 @@
#include <memory>
#include <svx/unobrushitemhelper.hxx>
using ::editeng::SvxBorderLine;
using namespace ::com::sun::star;
@@ -590,8 +588,6 @@
else
aCoreSet.InvalidateItem( RES_BACKGROUND );
setSvxBrushItemAsFillAttributesToTargetSet(aBrush, aCoreSet);
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
VclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateSwTableTabDlg(GetView().GetFrameWeld(), &aCoreSet, &rSh));
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index 4b0dc1e..5a77cbe 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -120,9 +120,6 @@
#include <numrule.hxx>
#include <memory>
#include <svx/xattr.hxx>
#include <svx/unobrushitemhelper.hxx>
using namespace ::com::sun::star;
using namespace com::sun::star::beans;
using namespace ::com::sun::star::container;
@@ -178,10 +175,6 @@
VclPtr<SfxAbstractTabDialog> pDlg;
if ( bUseDialog && GetActiveView() )
{
sal_uInt16 nWhich = rWrtSh.GetView().GetPool().GetWhich( SID_ATTR_BRUSH_CHAR );
SvxBrushItem aBrushItem(static_cast<const SvxBrushItem&>(pCoreSet->Get(nWhich)));
setSvxBrushItemAsFillAttributesToTargetSet(aBrushItem, *pCoreSet);
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
pDlg.reset(pFact->CreateSwCharDlg(rWrtSh.GetView().GetFrameWeld(), rWrtSh.GetView(), *pCoreSet, SwCharDlgMode::Std));
@@ -226,10 +219,6 @@
SfxItemSet aTmpSet( *pSet );
::ConvertAttrGenToChar(aTmpSet, *pCoreSet);
// Clear these to prevent paragraph background being set.
aTmpSet.ClearItem( rWrtSh.GetView().GetPool().GetWhich( XATTR_FILLSTYLE ) );
aTmpSet.ClearItem( rWrtSh.GetView().GetPool().GetWhich( XATTR_FILLCOLOR ) );
const SfxPoolItem* pSelectionItem;
bool bInsert = false;
sal_Int32 nInsert = 0;