22#include <svx/svxids.hrc>
35#define TBL_DEST_CELL 0
40 SID_ATTR_BRUSH, SID_ATTR_BRUSH,
41 SID_ATTR_BRUSH_CHAR, SID_ATTR_BRUSH_CHAR
51 return SID_ATTR_BRUSH;
55 return SID_ATTR_BRUSH_ROW;
59 return SID_ATTR_BRUSH_TABLE;
67 bCharBackColor(false),
79 if (
auto pItem = pDocSh->
GetItem( SID_COLOR_TABLE ))
80 pColorTable = pItem->GetColorList();
82 if ( !pColorTable.is() )
87 if (
auto pItem = pDocSh->
GetItem( SID_BITMAP_LIST ) )
88 pBitmapList = pItem->GetBitmapList();
107 return DeactivateRC::KeepPage;
112 return DeactivateRC::LeavePage;
123 sal_uInt16 nDestValue = pDestItem->GetValue();
134 sal_uInt16 nSlot = SID_ATTR_BRUSH;
138 nSlot = SID_ATTR_BRUSH_CHAR;
140 nSlot = SID_ATTR_CHAR_BACK_COLOR;
142 sal_uInt16 nWhich =
GetWhich(nSlot);
147 case drawing::FillStyle_NONE:
151 if ( SID_ATTR_CHAR_BACK_COLOR == nSlot )
164 case drawing::FillStyle_SOLID:
167 if ( SID_ATTR_CHAR_BACK_COLOR == nSlot )
179 case drawing::FillStyle_BITMAP:
182 if ( GraphicType::NONE != aBrushItem->GetGraphicObject()->GetType() )
183 rCoreSet->
Put( std::move(aBrushItem) );
193 if (nSlot != SID_ATTR_BRUSH)
199 rCoreSet->
Put(aBrushItem);
202 if (nSlot != SID_ATTR_BRUSH_ROW)
207 rCoreSet->
Put(aBrushItem);
210 if (nSlot != SID_ATTR_BRUSH_TABLE)
215 rCoreSet->
Put(aBrushItem);
219 if (
m_xTblLBox->get_value_changed_from_saved())
229 auto xRet = std::make_unique<SvxBkgTabPage>(pPage, pController, *rAttrs);
230 xRet->SetOptimalSize(pController);
240 if ( nFlags & SvxBackgroundTabFlags::SHOW_TBLCTL )
243 m_xTblLBox = m_xBuilder->weld_combo_box(
"tablelb");
247 if ((nFlags & SvxBackgroundTabFlags::SHOW_HIGHLIGHTING) ||
248 (nFlags & SvxBackgroundTabFlags::SHOW_CHAR_BKGCOLOR))
250 bHighlighting = bool(nFlags & SvxBackgroundTabFlags::SHOW_HIGHLIGHTING);
251 bCharBackColor = bool(nFlags & SvxBackgroundTabFlags::SHOW_CHAR_BKGCOLOR);
253 if (nFlags & SvxBackgroundTabFlags::SHOW_SELECTOR)
287 sal_Int32 nSelPos = rBox.get_active();
288 if (m_nActPos == nSelPos)
295 if (SfxItemState::SET == maSet.GetItemState(nWhich))
302 SelectFillType(*m_xBtnNone, &maSet);
307 drawing::FillStyle eXFS = drawing::FillStyle_NONE;
311 eXFS = aFillStyleItem.GetValue();
316 case drawing::FillStyle_NONE:
318 SelectFillType(*m_xBtnNone, &maSet);
321 case drawing::FillStyle_SOLID:
323 SelectFillType(*m_xBtnColor, &maSet);
327 static_cast<SvxColorTabPage*
>(GetFillTabPage())->SetCtlPreviewOld(*m_pResetSet);
330 case drawing::FillStyle_BITMAP:
332 SelectFillType(*m_xBtnBitmap, &maSet);
IMPL_LINK(SvxBkgTabPage, TblDestinationHdl_Impl, weld::ComboBox &, rBox, void)
static sal_uInt16 lcl_GetTableDestSlot(sal_Int32 nTblDest)
sal_uInt32 GetValue() const
sal_uInt16 GetWhich(sal_uInt16 nSlot, bool bDeep=true) const
SfxItemPool * GetPool() const
virtual std::unique_ptr< SfxItemSet > Clone(bool bItems=true, SfxItemPool *pToPool=nullptr) const
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem * GetItem(sal_uInt16 nWhich, bool bSearchInParent=true) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
bool Set(const SfxItemSet &, bool bDeep=true)
static SAL_WARN_UNUSED_RESULT SfxObjectShell * Current()
const SfxPoolItem * GetItem(sal_uInt16 nSlotId) const
SfxOkDialogController * GetDialogController() const
sal_uInt16 GetWhich(sal_uInt16 nSlot, bool bDeep=true) const
std::unique_ptr< weld::Toggleable > m_xBtnPattern
virtual bool FillItemSet(SfxItemSet *) override
std::unique_ptr< weld::Toggleable > m_xBtnBitmap
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
virtual void ActivatePage(const SfxItemSet &rSet) override
std::unique_ptr< weld::Toggleable > m_xBtnHatch
void SetBitmapList(XBitmapListRef const &pBmpLst)
void SetColorList(XColorListRef const &pColorList)
virtual void Reset(const SfxItemSet *) override
void SetOptimalSize(weld::DialogController *pController)
bool IsBtnClicked() const
virtual void PageCreated(const SfxAllItemSet &aSet) override
std::unique_ptr< weld::Toggleable > m_xBtnGradient
class SvxBackgroundTabPage -----------------------------------------—
std::unique_ptr< SfxItemSet > m_pResetSet
static const WhichRangesContainer pPageRanges
virtual void PageCreated(const SfxAllItemSet &aSet) override
std::unique_ptr< weld::ComboBox > m_xTblLBox
SvxBkgTabPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rInAttrs)
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
virtual ~SvxBkgTabPage() override
virtual bool FillItemSet(SfxItemSet *) override
virtual void ActivatePage(const SfxItemSet &) override
virtual void Reset(const SfxItemSet *) override
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *)
const Color & GetValue() const
const model::ComplexColor & getComplexColor() const
const Color & GetColorValue() const
static XColorListRef CreateStdColorList()
constexpr ::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
#define LINK(Instance, Class, Member)
static constexpr auto Items
SVXCORE_DLLPUBLIC std::unique_ptr< SvxBrushItem > getSvxBrushItemFromSourceSet(const SfxItemSet &rSourceSet, sal_uInt16 nBackgroundID, bool bSearchInParents=true, bool bXMLImportHack=false)
SVXCORE_DLLPUBLIC void setSvxBrushItemAsFillAttributesToTargetSet(const SvxBrushItem &rBrush, SfxItemSet &rToSet)
constexpr TypedWhichId< XFillColorItem > XATTR_FILLCOLOR(XATTR_FILL_FIRST+1)
constexpr TypedWhichId< XFillStyleItem > XATTR_FILLSTYLE(XATTR_FILL_FIRST)