67 if (
aArr[
i] == nUsage )
75 return SvxPageUsage::NONE;
81 if( pParent ==
nullptr )
82 throw ::com::sun::star::lang::IllegalArgumentException(
"no parent window given to PageStylesPanel::Create",
nullptr, 0);
83 if( pBindings ==
nullptr )
84 throw ::com::sun::star::lang::IllegalArgumentException(
"no SfxBindings given to PageStylesPanel::Create",
nullptr, 0);
86 return std::make_unique<PageStylesPanel>(pParent, pBindings);
93 PanelLayout(pParent,
"PageStylesPanel",
"modules/swriter/ui/pagestylespanel.ui"),
94 mpBindings( pBindings ),
98 maPageNumFormatControl( SID_ATTR_PAGE, *pBindings, *this ),
99 maBgColorControl( SID_ATTR_PAGE_COLOR, *pBindings, *this ),
100 maBgHatchingControl( SID_ATTR_PAGE_HATCH, *pBindings, *this ),
101 maBgGradientControl( SID_ATTR_PAGE_GRADIENT, *pBindings, *this ),
102 maBgBitmapControl( SID_ATTR_PAGE_BITMAP, *pBindings, *this ),
103 maBgFillStyleControl(SID_ATTR_PAGE_FILLSTYLE, *pBindings, *this),
105 mxBgHatchingLB(m_xBuilder->weld_combo_box(
"lbhatching")),
106 mxBgGradientLB(
new ColorListBox(m_xBuilder->weld_menu_button(
"lbgradient"), [
this]{ return GetFrameWeld(); })),
107 mxBgBitmapLB(m_xBuilder->weld_combo_box(
"lbbitmap")),
108 mxLayoutSelectLB(m_xBuilder->weld_combo_box(
"layoutbox")),
109 mxColumnCount(m_xBuilder->weld_combo_box(
"columnbox")),
111 mxBgFillType(m_xBuilder->weld_combo_box(
"bgselect")),
112 mxCustomEntry(m_xBuilder->weld_label(
"customlabel"))
161 const eFillStyle eXFS =
static_cast<eFillStyle
>(
mxBgFillType->get_active());
165 SAL_WARN(
"sw.ui",
"PageStylesPanel::Update(): no SfxObjectShell found");
225 OUString aBitmapName;
264 OUString aGradientName;
268 aGradient = pGradListItem->
GetGradientList()->GetGradient(0)->GetGradient();
269 aGradientName = pGradListItem->
GetGradientList()->GetGradient(0)->GetName();
286 aHatch = pHatchListItem->
GetHatchList()->GetHatch(0)->GetHatch();
287 aHatchName = pHatchListItem->
GetHatchList()->GetHatch(0)->GetName();
304 aGraphObj = pBmpListItem->
GetBitmapList()->GetBitmap(0)->GetGraphicObject();
305 aBmpName = pBmpListItem->
GetBitmapList()->GetBitmap(0)->GetName();
318 OUString aPatternName;
322 aGraphObj = pPatternListItem->
GetPatternList()->GetBitmap(0)->GetGraphicObject();
323 aPatternName = pPatternListItem->
GetPatternList()->GetBitmap(0)->GetName();
332 const sal_uInt16 nSid,
343 if ( eState >= SfxItemState::DEFAULT &&
366 if( eState >= SfxItemState::DEFAULT &&
379 case SID_ATTR_PAGE_COLOR:
381 if(eState >= SfxItemState::DEFAULT)
390 case SID_ATTR_PAGE_HATCH:
392 if(eState >= SfxItemState::DEFAULT)
401 case SID_ATTR_PAGE_GRADIENT:
403 if(eState >= SfxItemState::DEFAULT)
411 case SID_ATTR_PAGE_BITMAP:
413 if(eState >= SfxItemState::DEFAULT)
428 case SID_ATTR_PAGE_FILLSTYLE:
431 if (eState >= SfxItemState::DEFAULT)
435 css::drawing::FillStyle eXFS = pFillStyleItem->GetValue();
438 case drawing::FillStyle_NONE:
441 case drawing::FillStyle_SOLID:
444 case drawing::FillStyle_GRADIENT:
447 case drawing::FillStyle_HATCH:
450 case drawing::FillStyle_BITMAP:
471 sal_uInt16 nColumnType = mxColumnCount->get_active() + 1;
472 mpPageColumnItem->SetValue( nColumnType );
474 SfxCallMode::RECORD, { mpPageColumnItem.get() });
479 SvxNumType nEntryData = mxNumberSelectLB->get_active_id();
480 mpPageItem->SetNumType(nEntryData);
481 mpBindings->GetDispatcher()->ExecuteList(SID_ATTR_PAGE, SfxCallMode::RECORD, { mpPageItem.get() });
486 sal_uInt16 nUse = mxLayoutSelectLB->get_active();
488 mpBindings->GetDispatcher()->ExecuteList(SID_ATTR_PAGE, SfxCallMode::RECORD, { mpPageItem.get() });
493 const eFillStyle eXFS =
static_cast<eFillStyle
>(mxBgFillType->get_active());
507 XFillColorItem aItem( OUString(), mpBgColorItem->GetColorValue() );
514 XFillGradientItem aItem( mpBgGradientItem->GetName(), mpBgGradientItem->GetGradientValue() );
521 XFillHatchItem aItem( mpBgHatchItem->GetName(), mpBgHatchItem->GetHatchValue() );
529 XFillBitmapItem aItem( mpBgBitmapItem->GetName(), mpBgBitmapItem->GetGraphicObject() );
541 const eFillStyle eXFS =
static_cast<eFillStyle
>(
mxBgFillType->get_active());
547 auto aNamedColor =
mxBgColorLB->GetSelectedEntry();
571 const OUString aHatchName = pHatchListItem->
GetHatchList()->GetHatch(
nPos)->GetName();
583 OUString aBitmapName;
sfx2::sidebar::Panel * m_pPanel
virtual weld::Window * GetFrameWeld() const
SfxDispatcher * GetDispatcher() const
void Invalidate(sal_uInt16 nId)
const SfxPoolItem * ExecuteList(sal_uInt16 nSlot, SfxCallMode nCall, std::initializer_list< SfxPoolItem const * > args, std::initializer_list< SfxPoolItem const * > internalargs=std::initializer_list< SfxPoolItem const * >())
static SAL_WARN_UNUSED_RESULT SfxObjectShell * Current()
virtual SfxPoolItem * Clone(SfxItemPool *pPool=nullptr) const=0
const SfxPoolItem * GetItem(sal_uInt16 nSlotId) const
const XBitmapListRef & GetBitmapList() const
const XGradientListRef & GetGradientList() const
const XHatchListRef & GetHatchList() const
static void GetI18nNumbering(weld::ComboBox &rFmtLB, sal_uInt16 nDoNotRemove)
const XPatternListRef & GetPatternList() const
void setComplexColor(model::ComplexColor const &rComplexColor)
const basegfx::BColorStops & GetColorStops() const
#define SID_ATTR_PAGE_COLUMN
virtual SfxBindings & GetBindings() override
#define LINK(Instance, Class, Member)
#define SAL_WARN(area, stream)
#define SAL_N_ELEMENTS(arr)
SVX_DLLPUBLIC void Fill(weld::ComboBox &, const XHatchListRef &pList)
SVX_DLLPUBLIC void Fill(weld::ComboBox &rListBox)
constexpr OUStringLiteral PATTERN