cui/source/inc/backgrnd.hxx | 4 ++ cui/source/inc/cuitabarea.hxx | 2 - cui/source/tabpages/backgrnd.cxx | 68 ++++++++++++++++++++++++++++++------ sc/source/ui/attrdlg/attrdlg.cxx | 4 ++ sc/source/ui/docshell/docsh4.cxx | 3 + sc/source/ui/styleui/styledlg.cxx | 8 +++- sc/source/ui/view/formatsh.cxx | 3 + sc/source/ui/view/tabvwsha.cxx | 4 -- sd/source/ui/dlg/dlgchar.cxx | 2 - sd/source/ui/dlg/prltempl.cxx | 2 - sd/source/ui/dlg/tabtempl.cxx | 2 - sd/source/ui/func/fuchar.cxx | 2 - sw/source/ui/dialog/uiregionsw.cxx | 4 -- sw/source/ui/fmtui/tmpdlg.cxx | 8 ++-- sw/source/uibase/shells/tabsh.cxx | 4 -- sw/source/uibase/shells/textsh1.cxx | 11 ----- 16 files changed, 86 insertions(+), 45 deletions(-)
New commits: commit 0dfb0f09f5582a33d16c5ad8659fab198d530b31 Author: Jim Raykowski <[email protected]> AuthorDate: Fri Jul 6 01:42:20 2018 -0800 Commit: Samuel Mehrbrodt <[email protected]> CommitDate: Mon Nov 5 08:45:18 2018 +0100 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 <[email protected]> diff --git a/cui/source/inc/backgrnd.hxx b/cui/source/inc/backgrnd.hxx index dd0b61788e51..8f02659118b6 100644 --- a/cui/source/inc/backgrnd.hxx +++ b/cui/source/inc/backgrnd.hxx @@ -158,7 +158,10 @@ class SvxBkgTabPage : public SvxAreaTabPage { 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 @@ public: 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 b16a7063e9b1..19c52a601f25 100644 --- a/cui/source/inc/cuitabarea.hxx +++ b/cui/source/inc/cuitabarea.hxx @@ -215,7 +215,6 @@ public: class SvxAreaTabPage : public SfxTabPage { - using TabPage::ActivatePage; static const sal_uInt16 pAreaRanges[]; private: ScopedVclPtr<SfxTabPage> m_pFillTabPage; @@ -264,6 +263,7 @@ private: 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 00b60945d36b..b41680e22c81 100644 --- a/cui/source/tabpages/backgrnd.cxx +++ b/cui/source/tabpages/backgrnd.cxx @@ -1346,8 +1346,10 @@ void SvxBackgroundTabPage::PageCreated(const SfxAllItemSet& aSet) } 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 @@ void SvxBkgTabPage::dispose() 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 @@ bool SvxBkgTabPage::FillItemSet( SfxItemSet* rCoreSet ) } 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 @@ void SvxBkgTabPage::PageCreated(const SfxAllItemSet& aSet) 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 d49b0ea01d08..be163f7d03cc 100644 --- a/sc/source/ui/attrdlg/attrdlg.cxx +++ b/sc/source/ui/attrdlg/attrdlg.cxx @@ -82,6 +82,10 @@ void ScAttrDlg::PageCreated(const OString& rPageId, SfxTabPage& rTabPage) 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 56dde155c812..b24470891f00 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -117,6 +117,8 @@ using namespace ::com::sun::star; #include <sfx2/notebookbar/SfxNotebookBar.hxx> #include <helpids.h> +#include <svx/xdef.hxx> + void ScDocShell::ReloadAllLinks() { m_aDocument.SetLinkFormulaNeedingCheck(false); @@ -1689,6 +1691,7 @@ void ScDocShell::ExecutePageStyle( const SfxViewShell& rCaller, 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 2315186b75c7..f0b261841650 100644 --- a/sc/source/ui/styleui/styledlg.cxx +++ b/sc/source/ui/styleui/styledlg.cxx @@ -56,7 +56,7 @@ ScStyleDlg::ScStyleDlg(weld::Window* pParent, { 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 @@ ScStyleDlg::ScStyleDlg(weld::Window* pParent, 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 @@ void ScStyleDlg::PageCreated(const OString& rPageId, SfxTabPage& rTabPage) 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 0ee2c0e65925..7868e43b1d81 100644 --- a/sc/source/ui/view/formatsh.cxx +++ b/sc/source/ui/view/formatsh.cxx @@ -842,6 +842,9 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq ) 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 963cad98983f..93ca656d4059 100644 --- a/sc/source/ui/view/tabvwsha.cxx +++ b/sc/source/ui/view/tabvwsha.cxx @@ -484,10 +484,6 @@ void ScTabViewShell::ExecuteCellFormatDlg(SfxRequest& rReq, const OString &rName 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 5901dd1fe4c8..298e0e69ae01 100644 --- a/sd/source/ui/dlg/dlgchar.cxx +++ b/sd/source/ui/dlg/dlgchar.cxx @@ -41,7 +41,7 @@ SdCharDlg::SdCharDlg(weld::Window* pParent, const SfxItemSet* pAttr, 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 4c01aaeb9f57..68f2faf5476c 100644 --- a/sd/source/ui/dlg/prltempl.cxx +++ b/sd/source/ui/dlg/prltempl.cxx @@ -146,7 +146,7 @@ SdPresLayoutTemplateDlg::SdPresLayoutTemplateDlg(SfxObjectShell const * pDocSh, 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 333283f5532c..9edd2d5a9207 100644 --- a/sd/source/ui/dlg/tabtempl.cxx +++ b/sd/source/ui/dlg/tabtempl.cxx @@ -71,7 +71,7 @@ SdTabTemplateDlg::SdTabTemplateDlg(weld::Window* pParent, 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 4ad60edfdfa9..1e00b5803ac6 100644 --- a/sd/source/ui/func/fuchar.cxx +++ b/sd/source/ui/func/fuchar.cxx @@ -68,7 +68,7 @@ void FuChar::DoExecute( SfxRequest& rReq ) 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 433986cb4026..db86dd7bc182 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 @@ IMPL_LINK_NOARG(SwEditRegionDlg, OptionsHdl, Button*, void) 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 c9370c1e5e9e..43a520866966 100644 --- a/sw/source/ui/fmtui/tmpdlg.cxx +++ b/sw/source/ui/fmtui/tmpdlg.cxx @@ -129,9 +129,9 @@ SwTemplateDlg::SwTemplateDlg(vcl::Window* pParent, 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 @@ SwTemplateDlg::SwTemplateDlg(vcl::Window* pParent, 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 579a35df411b..b8da4958ede3 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 @@ void SwTableShell::Execute(SfxRequest &rReq) 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 4b0dc1e3ceb4..5a77cbefec63 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 @@ void sw_CharDialog(SwWrtShell &rWrtSh, bool bUseDialog, sal_uInt16 nSlot, const 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 @@ static void sw_CharDialogResult(const SfxItemSet* pSet, SwWrtShell &rWrtSh, std: 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; _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
