LibreOffice Module sw (master)  1
PageStylesPanel.cxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 #include <sal/config.h>
20 #include <svl/intitem.hxx>
21 #include <svx/colorbox.hxx>
22 #include <svx/drawitem.hxx>
23 #include <svx/xfillit0.hxx>
24 #include <svx/xflclit.hxx>
25 #include <svx/xflgrit.hxx>
26 #include <svx/xflhtit.hxx>
27 #include <svx/xbtmpit.hxx>
28 #include <svx/itemwin.hxx>
30 #include "PageStylesPanel.hxx"
31 #include <sfx2/sidebar/Panel.hxx>
32 #include <sfx2/dispatch.hxx>
33 #include <sfx2/bindings.hxx>
34 #include <sfx2/objsh.hxx>
35 #include <cmdid.h>
36 
37 using namespace ::com::sun::star;
38 
39 namespace sw::sidebar{
40 
41 namespace {
42 
43 enum eFillStyle
44 {
45  NONE,
46  SOLID,
47  GRADIENT,
48  HATCH,
49  BITMAP,
50  PATTERN
51 };
52 
53 }
54 
55 const SvxPageUsage aArr[] =
56 {
57  SvxPageUsage::All,
58  SvxPageUsage::Mirror,
59  SvxPageUsage::Right,
60  SvxPageUsage::Left
61 };
62 
63 
64 static sal_uInt16 PageUsageToPos_Impl( SvxPageUsage nUsage )
65 {
66  for ( size_t i = 0; i < SAL_N_ELEMENTS(aArr); ++i )
67  if ( aArr[i] == nUsage )
68  return i;
69  return 3;
70 }
71 
72 static SvxPageUsage PosToPageUsage_Impl( sal_uInt16 nPos )
73 {
74  if ( nPos >= SAL_N_ELEMENTS(aArr) )
75  return SvxPageUsage::NONE;
76  return aArr[nPos];
77 }
78 
79 std::unique_ptr<PanelLayout> PageStylesPanel::Create(weld::Widget* pParent, SfxBindings* pBindings)
80 {
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);
85 
86  return std::make_unique<PageStylesPanel>(pParent, pBindings);
87 }
88 
90  weld::Widget* pParent,
91  SfxBindings* pBindings
92  ) :
93  PanelLayout(pParent, "PageStylesPanel", "modules/swriter/ui/pagestylespanel.ui"),
94  mpBindings( pBindings ),
95  mpPageColumnItem( new SfxInt16Item(SID_ATTR_PAGE_COLUMN) ),
96  mpPageItem( new SvxPageItem(SID_ATTR_PAGE) ),
97  maPageColumnControl(SID_ATTR_PAGE_COLUMN, *pBindings, *this),
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),
104  mxBgColorLB(new ColorListBox(m_xBuilder->weld_menu_button("lbcolor"), [this]{ return GetFrameWeld(); })),
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")),
110  mxNumberSelectLB(new SvxPageNumberListBox(m_xBuilder->weld_combo_box("numberbox"))),
111  mxBgFillType(m_xBuilder->weld_combo_box("bgselect")),
112  mxCustomEntry(m_xBuilder->weld_label("customlabel"))
113 {
114  Initialize();
115 }
116 
118 {
119  mxColumnCount.reset();
120  mxNumberSelectLB.reset();
121  mxBgFillType.reset();
122  mxBgColorLB.reset();
123  mxBgHatchingLB.reset();
124  mxBgGradientLB.reset();
125  mxBgBitmapLB.reset();
126  mxLayoutSelectLB.reset();
127  mxCustomEntry.reset();
128 
136 }
137 
139 {
141 
142  aCustomEntry = mxCustomEntry->get_label();
144  mpBindings->Invalidate(SID_ATTR_PAGE);
145  mpBindings->Invalidate(SID_ATTR_PAGE_FILLSTYLE);
146  Update();
147 
148  mxColumnCount->connect_changed( LINK(this, PageStylesPanel, ModifyColumnCountHdl) );
149  SvxNumOptionsTabPageHelper::GetI18nNumbering(mxNumberSelectLB->get_widget(), ::std::numeric_limits<sal_uInt16>::max());
150  mxNumberSelectLB->connect_changed( LINK(this, PageStylesPanel, ModifyNumberingHdl) );
151  mxLayoutSelectLB->connect_changed( LINK(this, PageStylesPanel, ModifyLayoutHdl) );
152  mxBgFillType->connect_changed( LINK(this, PageStylesPanel, ModifyFillStyleHdl));
153  mxBgColorLB->SetSelectHdl( LINK(this, PageStylesPanel, ModifyFillColorListHdl));
154  mxBgGradientLB->SetSelectHdl( LINK(this, PageStylesPanel, ModifyFillColorListHdl));
155  mxBgHatchingLB->connect_changed( LINK(this, PageStylesPanel, ModifyFillColorHdl));
156  mxBgBitmapLB->connect_changed( LINK(this, PageStylesPanel, ModifyFillColorHdl));
157 }
158 
160 {
161  const eFillStyle eXFS = static_cast<eFillStyle>(mxBgFillType->get_active());
163  switch(eXFS)
164  {
165  case NONE:
166  {
167  mxBgColorLB->hide();
168  mxBgHatchingLB->hide();
169  mxBgGradientLB->hide();
170  mxBgBitmapLB->hide();
171  }
172  break;
173  case SOLID:
174  {
175  mxBgBitmapLB->hide();
176  mxBgGradientLB->hide();
177  mxBgHatchingLB->hide();
178  mxBgColorLB->show();
179  const Color aColor = GetColorSetOrDefault();
180  mxBgColorLB->SelectEntry(aColor);
181  }
182  break;
183  case GRADIENT:
184  {
185  mxBgBitmapLB->hide();
186  mxBgHatchingLB->hide();
187  mxBgColorLB->show();
188  mxBgGradientLB->show();
189 
190  const XGradient xGradient = GetGradientSetOrDefault();
191  const Color aStartColor = xGradient.GetStartColor();
192  mxBgColorLB->SelectEntry(aStartColor);
193  const Color aEndColor = xGradient.GetEndColor();
194  mxBgGradientLB->SelectEntry(aEndColor);
195  }
196  break;
197 
198  case HATCH:
199  {
200  mxBgColorLB->hide();
201  mxBgGradientLB->hide();
202  mxBgBitmapLB->hide();
203  mxBgHatchingLB->show();
204  mxBgHatchingLB->clear();
205  SvxFillAttrBox::Fill(*mxBgHatchingLB, pSh->GetItem(SID_HATCH_LIST)->GetHatchList());
206 
207  const OUString aHatchName = GetHatchingSetOrDefault();
208  mxBgHatchingLB->set_active_text( aHatchName );
209  }
210  break;
211 
212  case BITMAP:
213  case PATTERN:
214  {
215  mxBgColorLB->hide();
216  mxBgGradientLB->hide();
217  mxBgHatchingLB->hide();
218  mxBgBitmapLB->show();
219  mxBgBitmapLB->clear();
220  OUString aBitmapName;
221 
222  if( eXFS == BITMAP )
223  {
224  SvxFillAttrBox::Fill(*mxBgBitmapLB, pSh->GetItem(SID_BITMAP_LIST)->GetBitmapList());
225  aBitmapName = GetBitmapSetOrDefault();
226  }
227  else
228  {
229  SvxFillAttrBox::Fill(*mxBgBitmapLB, pSh->GetItem(SID_PATTERN_LIST)->GetPatternList());
230  aBitmapName = GetPatternSetOrDefault();
231  }
232 
233  mxBgBitmapLB->set_active_text( aBitmapName );
234  }
235  break;
236 
237  default:
238  break;
239  }
240 
241  // Need to do a relayouting, otherwise the panel size is not updated after show / hide controls
242  if (m_pPanel)
244 }
245 
247 {
248  if ( !mpBgColorItem )
249  mpBgColorItem.reset( new XFillColorItem( OUString(), Color(0x72, 0x9f, 0xcf) ) );
250 
251  return mpBgColorItem->GetColorValue();
252 }
253 
255 {
256  if( !mpBgGradientItem )
257  {
259  const SvxGradientListItem * pGradListItem = pSh->GetItem(SID_GRADIENT_LIST);
260  const XGradient aGradient = pGradListItem->GetGradientList()->GetGradient(0)->GetGradient();
261  const OUString aGradientName = pGradListItem->GetGradientList()->GetGradient(0)->GetName();
262 
263  mpBgGradientItem.reset( new XFillGradientItem( aGradientName, aGradient ) );
264  }
265 
266  return mpBgGradientItem->GetGradientValue();
267 }
268 
270 {
271  if( !mpBgHatchItem )
272  {
274  const SvxHatchListItem * pHatchListItem = pSh->GetItem(SID_HATCH_LIST);
275  const XHatch aHatch = pHatchListItem->GetHatchList()->GetHatch(0)->GetHatch();
276  const OUString aHatchName = pHatchListItem->GetHatchList()->GetHatch(0)->GetName();
277 
278  mpBgHatchItem.reset( new XFillHatchItem( aHatchName, aHatch ) );
279  }
280 
281  return mpBgHatchItem->GetName();
282 }
283 
285 {
286  if( !mpBgBitmapItem || mpBgBitmapItem->isPattern() )
287  {
289  const SvxBitmapListItem * pBmpListItem = pSh->GetItem(SID_BITMAP_LIST);
290  const GraphicObject aGraphObj = pBmpListItem->GetBitmapList()->GetBitmap(0)->GetGraphicObject();
291  const OUString aBmpName = pBmpListItem->GetBitmapList()->GetBitmap(0)->GetName();
292 
293  mpBgBitmapItem.reset( new XFillBitmapItem( aBmpName, aGraphObj ) );
294  }
295 
296  return mpBgBitmapItem->GetName();
297 }
298 
300 {
301  if( !mpBgBitmapItem || !mpBgBitmapItem->isPattern() )
302  {
304  const SvxPatternListItem * pPatternListItem = pSh->GetItem(SID_PATTERN_LIST);
305  const GraphicObject aGraphObj = pPatternListItem->GetPatternList()->GetBitmap(0)->GetGraphicObject();
306  const OUString aPatternName = pPatternListItem->GetPatternList()->GetBitmap(0)->GetName();
307 
308  mpBgBitmapItem.reset( new XFillBitmapItem( aPatternName, aGraphObj ) );
309  }
310 
311  return mpBgBitmapItem->GetName();
312 }
313 
315  const sal_uInt16 nSid,
316  const SfxItemState eState,
317  const SfxPoolItem* pState)
318 {
319  if (!mxColumnCount) //disposed
320  return;
321 
322  switch(nSid)
323  {
325  {
326  if ( eState >= SfxItemState::DEFAULT &&
327  dynamic_cast< const SfxInt16Item *>( pState ) )
328  {
329  mpPageColumnItem.reset( static_cast<SfxInt16Item*>(pState->Clone()) );
330  if(mpPageColumnItem->GetValue() <= 5)
331  {
332  mxColumnCount->set_active(mpPageColumnItem->GetValue() - 1);
333  int nIndex = mxColumnCount->find_text(aCustomEntry);
334  if (nIndex != -1)
335  mxColumnCount->remove(nIndex);
336  }
337  else
338  {
339  if (mxColumnCount->find_text(aCustomEntry) == -1)
340  mxColumnCount->append_text(aCustomEntry);
341  mxColumnCount->set_active_text(aCustomEntry);
342  }
343  }
344  }
345  break;
346 
347  case SID_ATTR_PAGE:
348  {
349  if( eState >= SfxItemState::DEFAULT &&
350  dynamic_cast< const SvxPageItem*>( pState ) )
351  {
352  mpPageItem.reset( static_cast<SvxPageItem*>(pState->Clone()) );
353  SvxNumType eNumType = mpPageItem->GetNumType();
354  mxNumberSelectLB->set_active_id(eNumType);
355 
356  SvxPageUsage nUse = mpPageItem->GetPageUsage();
357  mxLayoutSelectLB->set_active( PageUsageToPos_Impl( nUse ) );
358  }
359  }
360  break;
361 
362  case SID_ATTR_PAGE_COLOR:
363  {
364  if(eState >= SfxItemState::DEFAULT)
365  {
366  mxBgFillType->set_active( static_cast<sal_Int32>(SOLID) );
367  mpBgColorItem.reset(pState ? static_cast< XFillColorItem* >(pState->Clone()) : nullptr);
368  Update();
369  }
370  }
371  break;
372 
373  case SID_ATTR_PAGE_HATCH:
374  {
375  if(eState >= SfxItemState::DEFAULT)
376  {
377  mxBgFillType->set_active( static_cast<sal_Int32>(HATCH) );
378  mpBgHatchItem.reset(pState ? static_cast < XFillHatchItem* >(pState->Clone()) : nullptr);
379  Update();
380  }
381  }
382  break;
383 
384  case SID_ATTR_PAGE_GRADIENT:
385  {
386  if(eState >= SfxItemState::DEFAULT)
387  {
388  mxBgFillType->set_active( static_cast<sal_Int32>(GRADIENT) );
389  mpBgGradientItem.reset(pState ? static_cast< XFillGradientItem* >(pState->Clone()) : nullptr);
390  Update();
391  }
392  }
393  break;
394  case SID_ATTR_PAGE_BITMAP:
395  {
396  if(eState >= SfxItemState::DEFAULT)
397  {
398  mpBgBitmapItem.reset(pState ? static_cast< XFillBitmapItem* >(pState->Clone()) : nullptr);
399  if (mpBgBitmapItem)
400  {
401  if (mpBgBitmapItem->isPattern())
402  mxBgFillType->set_active( static_cast<sal_Int32>(PATTERN) );
403  else
404  mxBgFillType->set_active( static_cast<sal_Int32>(BITMAP) );
405  }
406  Update();
407  }
408  }
409  break;
410 
411  case SID_ATTR_PAGE_FILLSTYLE:
412  {
413  const XFillStyleItem* pFillStyleItem = nullptr;
414  if (eState >= SfxItemState::DEFAULT)
415  pFillStyleItem = dynamic_cast< const XFillStyleItem* >(pState);
416  if (pFillStyleItem)
417  {
418  css::drawing::FillStyle eXFS = pFillStyleItem->GetValue();
419  switch(eXFS)
420  {
421  case drawing::FillStyle_NONE:
422  mxBgFillType->set_active( static_cast<sal_Int32>(NONE) );
423  break;
424  case drawing::FillStyle_SOLID:
425  mxBgFillType->set_active( static_cast<sal_Int32>(SOLID) );
426  break;
427  case drawing::FillStyle_GRADIENT:
428  mxBgFillType->set_active( static_cast<sal_Int32>(GRADIENT) );
429  break;
430  case drawing::FillStyle_HATCH:
431  mxBgFillType->set_active( static_cast<sal_Int32>(HATCH) );
432  break;
433  case drawing::FillStyle_BITMAP:
434  if (mpBgBitmapItem->isPattern())
435  mxBgFillType->set_active( static_cast<sal_Int32>(PATTERN) );
436  else
437  mxBgFillType->set_active( static_cast<sal_Int32>(BITMAP) );
438  break;
439  default:
440  break;
441  }
442  Update();
443  }
444  }
445  break;
446 
447  default:
448  break;
449  }
450 }
451 
452 IMPL_LINK_NOARG( PageStylesPanel, ModifyColumnCountHdl, weld::ComboBox&, void )
453 {
454  sal_uInt16 nColumnType = mxColumnCount->get_active() + 1;
455  mpPageColumnItem->SetValue( nColumnType );
456  mpBindings->GetDispatcher()->ExecuteList(SID_ATTR_PAGE_COLUMN,
457  SfxCallMode::RECORD, { mpPageColumnItem.get() });
458 }
459 
460 IMPL_LINK_NOARG( PageStylesPanel, ModifyNumberingHdl, weld::ComboBox&, void )
461 {
462  SvxNumType nEntryData = mxNumberSelectLB->get_active_id();
463  mpPageItem->SetNumType(nEntryData);
464  mpBindings->GetDispatcher()->ExecuteList(SID_ATTR_PAGE, SfxCallMode::RECORD, { mpPageItem.get() });
465 }
466 
467 IMPL_LINK_NOARG( PageStylesPanel, ModifyLayoutHdl, weld::ComboBox&, void )
468 {
469  sal_uInt16 nUse = mxLayoutSelectLB->get_active();
470  mpPageItem->SetPageUsage(PosToPageUsage_Impl(nUse));
471  mpBindings->GetDispatcher()->ExecuteList(SID_ATTR_PAGE, SfxCallMode::RECORD, { mpPageItem.get() });
472 }
473 
474 IMPL_LINK_NOARG(PageStylesPanel, ModifyFillStyleHdl, weld::ComboBox&, void)
475 {
476  const eFillStyle eXFS = static_cast<eFillStyle>(mxBgFillType->get_active());
477  Update();
478 
479  switch (eXFS)
480  {
481  case NONE:
482  {
483  const XFillStyleItem aXFillStyleItem(drawing::FillStyle_NONE);
484  GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_PAGE_FILLSTYLE, SfxCallMode::RECORD, { &aXFillStyleItem });
485  }
486  break;
487 
488  case SOLID:
489  {
490  XFillColorItem aItem( OUString(), mpBgColorItem->GetColorValue() );
491  GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_PAGE_COLOR, SfxCallMode::RECORD, { &aItem });
492  }
493  break;
494 
495  case GRADIENT:
496  {
497  XFillGradientItem aItem( mpBgGradientItem->GetName(), mpBgGradientItem->GetGradientValue() );
498  GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_PAGE_GRADIENT, SfxCallMode::RECORD, { &aItem });
499  }
500  break;
501 
502  case HATCH:
503  {
504  XFillHatchItem aItem( mpBgHatchItem->GetName(), mpBgHatchItem->GetHatchValue() );
505  GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_PAGE_HATCH, SfxCallMode::RECORD, { &aItem });
506  }
507  break;
508 
509  case BITMAP:
510  case PATTERN:
511  {
512  XFillBitmapItem aItem( mpBgBitmapItem->GetName(), mpBgBitmapItem->GetGraphicObject() );
513  GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_PAGE_BITMAP, SfxCallMode::RECORD, { &aItem });
514  }
515  break;
516 
517  default:
518  break;
519  }
520 }
521 
523 {
524  const eFillStyle eXFS = static_cast<eFillStyle>(mxBgFillType->get_active());
526  switch(eXFS)
527  {
528  case SOLID:
529  {
530  XFillColorItem aItem(OUString(), mxBgColorLB->GetSelectEntryColor());
531  GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_PAGE_COLOR, SfxCallMode::RECORD, { &aItem });
532  }
533  break;
534  case GRADIENT:
535  {
536  XGradient aGradient;
537  aGradient.SetStartColor(mxBgColorLB->GetSelectEntryColor());
538  aGradient.SetEndColor(mxBgGradientLB->GetSelectEntryColor());
539 
540  XFillGradientItem aItem(aGradient);
541  GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_PAGE_GRADIENT, SfxCallMode::RECORD, { &aItem });
542  }
543  break;
544  case HATCH:
545  {
546  const SvxHatchListItem * pHatchListItem = pSh->GetItem(SID_HATCH_LIST);
547  sal_uInt16 nPos = mxBgHatchingLB->get_active();
548  XHatch aHatch = pHatchListItem->GetHatchList()->GetHatch(nPos)->GetHatch();
549  const OUString aHatchName = pHatchListItem->GetHatchList()->GetHatch(nPos)->GetName();
550 
551  XFillHatchItem aItem(aHatchName, aHatch);
552  GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_PAGE_HATCH, SfxCallMode::RECORD, { &aItem });
553  }
554  break;
555  case BITMAP:
556  case PATTERN:
557  {
558  sal_Int16 nPos = mxBgBitmapLB->get_active();
559  GraphicObject aBitmap;
560  OUString aBitmapName;
561 
562  if ( eXFS == BITMAP )
563  {
564  SvxBitmapListItem const * pBitmapListItem = pSh->GetItem(SID_BITMAP_LIST);
565  aBitmap = pBitmapListItem->GetBitmapList()->GetBitmap(nPos)->GetGraphicObject();
566  aBitmapName = pBitmapListItem->GetBitmapList()->GetBitmap(nPos)->GetName();
567  }
568  else
569  {
570  SvxPatternListItem const * pPatternListItem = pSh->GetItem(SID_PATTERN_LIST);
571  aBitmap = pPatternListItem->GetPatternList()->GetBitmap(nPos)->GetGraphicObject();
572  aBitmapName = pPatternListItem->GetPatternList()->GetBitmap(nPos)->GetName();
573  }
574 
575  XFillBitmapItem aItem(aBitmapName, aBitmap);
576  GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_PAGE_BITMAP, SfxCallMode::RECORD, { &aItem });
577  }
578  break;
579  default:
580  break;
581  }
582 }
583 
584 IMPL_LINK_NOARG(PageStylesPanel, ModifyFillColorHdl, weld::ComboBox&, void)
585 {
586  ModifyFillColor();
587 }
588 
589 IMPL_LINK_NOARG(PageStylesPanel, ModifyFillColorListHdl, ColorListBox&, void)
590 {
591  ModifyFillColor();
592 }
593 
594 }
595 
596 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unique_ptr< SvxPageNumberListBox > mxNumberSelectLB
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 * >())
sal_Int32 nIndex
const XPatternListRef & GetPatternList() const
std::unique_ptr< weld::ComboBox > mxBgBitmapLB
#define SID_ATTR_PAGE_COLUMN
Definition: cmdid.h:862
::sfx2::sidebar::ControllerItem maBgColorControl
virtual SfxPoolItem * Clone(SfxItemPool *pPool=nullptr) const =0
SVX_DLLPUBLIC void Fill(weld::ComboBox &, const XHatchListRef &pList)
void SetEndColor(const Color &rColor)
const XGradientListRef & GetGradientList() const
std::unique_ptr< weld::ComboBox > mxBgHatchingLB
sfx2::sidebar::Panel * m_pPanel
static SfxObjectShell * Current()
void Invalidate(sal_uInt16 nId)
SvxNumType
OUString const & GetPatternSetOrDefault()
::sfx2::sidebar::ControllerItem maPageNumFormatControl
const Color & GetStartColor() const
NONE
::sfx2::sidebar::ControllerItem maBgBitmapControl
::sfx2::sidebar::ControllerItem maPageColumnControl
std::unique_ptr< weld::ComboBox > mxLayoutSelectLB
std::unique_ptr< ColorListBox > mxBgColorLB
::std::unique_ptr< SfxInt16Item > mpPageColumnItem
XGradient const & GetGradientSetOrDefault()
#define SAL_N_ELEMENTS(arr)
weld::Window * GetFrameWeld(const SfxFrame *pFrame)
Definition: dialoghelp.cxx:19
const XHatchListRef & GetHatchList() const
const SfxPoolItem * GetItem(sal_uInt16 nSlotId) const
SVX_DLLPUBLIC void Fill(weld::ComboBox &rListBox)
void SetStartColor(const Color &rColor)
::std::unique_ptr< XFillGradientItem > mpBgGradientItem
int i
constexpr OUStringLiteral PATTERN
std::unique_ptr< weld::Label > mxCustomEntry
virtual void dispose()
::std::unique_ptr< XFillColorItem > mpBgColorItem
static sal_uInt16 PageUsageToPos_Impl(SvxPageUsage nUsage)
PageStylesPanel(weld::Widget *pParent, SfxBindings *pBindings)
const SvxPageUsage aArr[]
::std::unique_ptr< SvxPageItem > mpPageItem
IMPL_LINK_NOARG(PageColumnControl, MoreButtonClickHdl_Impl, weld::Button &, void)
virtual ~PageStylesPanel() override
const XBitmapListRef & GetBitmapList() const
::std::unique_ptr< XFillHatchItem > mpBgHatchItem
::sfx2::sidebar::ControllerItem maBgHatchingControl
SvxPageUsage
::sfx2::sidebar::ControllerItem maBgGradientControl
static SvxPageUsage PosToPageUsage_Impl(sal_uInt16 nPos)
static std::unique_ptr< PanelLayout > Create(weld::Widget *pParent, SfxBindings *pBindings)
SfxItemState
SfxBindings * GetBindings() const
std::unique_ptr< ColorListBox > mxBgGradientLB
eFillStyle
std::unique_ptr< weld::ComboBox > mxBgFillType
OUString const & GetBitmapSetOrDefault()
std::unique_ptr< weld::ComboBox > mxColumnCount
::sfx2::sidebar::ControllerItem maBgFillStyleControl
SfxDispatcher * GetDispatcher() const
virtual weld::Window * GetFrameWeld() const
static void GetI18nNumbering(weld::ComboBox &rFmtLB, sal_uInt16 nDoNotRemove)
virtual void NotifyItemUpdate(const sal_uInt16 nSId, const SfxItemState eState, const SfxPoolItem *pState) override
OUString const & GetHatchingSetOrDefault()
const Color & GetEndColor() const
sal_uInt16 nPos
::std::unique_ptr< XFillBitmapItem > mpBgBitmapItem