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 <swtypes.hxx>
21 #include <svl/intitem.hxx>
22 #include <editeng/sizeitem.hxx>
23 #include <editeng/paperinf.hxx>
24 #include <svx/svxids.hrc>
25 #include <svx/colorbox.hxx>
26 #include <svx/dlgutil.hxx>
27 #include <svx/rulritem.hxx>
28 #include <svx/drawitem.hxx>
29 #include <svx/xfillit0.hxx>
30 #include <svx/xflclit.hxx>
31 #include <svx/xflgrit.hxx>
32 #include <svx/xflhtit.hxx>
33 #include <svx/xbtmpit.hxx>
35 #include "PageStylesPanel.hxx"
37 #include <sfx2/dispatch.hxx>
38 #include <sfx2/bindings.hxx>
39 #include <sfx2/viewsh.hxx>
40 #include <sfx2/objsh.hxx>
41 #include <cmdid.h>
42 
43 using namespace ::com::sun::star;
44 
45 namespace sw { namespace sidebar{
46 
48 {
55 };
56 
57 const SvxPageUsage aArr[] =
58 {
59  SvxPageUsage::All,
60  SvxPageUsage::Mirror,
61  SvxPageUsage::Right,
62  SvxPageUsage::Left
63 };
64 
65 
66 static sal_uInt16 PageUsageToPos_Impl( SvxPageUsage nUsage )
67 {
68  for ( size_t i = 0; i < SAL_N_ELEMENTS(aArr); ++i )
69  if ( aArr[i] == nUsage )
70  return i;
71  return 3;
72 }
73 
74 
75 static SvxPageUsage PosToPageUsage_Impl( sal_uInt16 nPos )
76 {
77  if ( nPos >= SAL_N_ELEMENTS(aArr) )
78  return SvxPageUsage::NONE;
79  return aArr[nPos];
80 }
81 
83  vcl::Window* pParent,
84  const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxFrame,
85  SfxBindings* pBindings)
86 {
87  if( pParent == nullptr )
88  throw ::com::sun::star::lang::IllegalArgumentException("no parent window given to PageStylesPanel::Create", nullptr, 0);
89  if( !rxFrame.is() )
90  throw ::com::sun::star::lang::IllegalArgumentException("no XFrame given to PageStylesPanel::Create", nullptr, 0);
91  if( pBindings == nullptr )
92  throw ::com::sun::star::lang::IllegalArgumentException("no SfxBindings given to PageStylesPanel::Create", nullptr, 0);
93 
94  return VclPtr<PageStylesPanel>::Create(pParent, rxFrame, pBindings);
95 }
96 
98  vcl::Window* pParent,
99  const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxFrame,
100  SfxBindings* pBindings
101  ) :
102  PanelLayout(pParent, "PageStylesPanel", "modules/swriter/ui/pagestylespanel.ui", rxFrame),
103  mpBindings( pBindings ),
104  mpPageColumnItem( new SfxInt16Item(SID_ATTR_PAGE_COLUMN) ),
105  mpPageItem( new SvxPageItem(SID_ATTR_PAGE) ),
106  maPageColumnControl(SID_ATTR_PAGE_COLUMN, *pBindings, *this),
107  maPageNumFormatControl( SID_ATTR_PAGE, *pBindings, *this ),
108  maBgColorControl( SID_ATTR_PAGE_COLOR, *pBindings, *this ),
109  maBgHatchingControl( SID_ATTR_PAGE_HATCH, *pBindings, *this ),
110  maBgGradientControl( SID_ATTR_PAGE_GRADIENT, *pBindings, *this ),
111  maBgBitmapControl( SID_ATTR_PAGE_BITMAP, *pBindings, *this ),
112  maBgFillStyleControl(SID_ATTR_PAGE_FILLSTYLE, *pBindings, *this),
113  aCustomEntry()
114 {
115  get(mpColumnCount, "columnbox");
116  get(mpNumberSelectLB, "numberbox");
117  get(mpBgFillType, "bgselect");
118  get(mpBgColorLB, "lbcolor");
119  get(mpBgHatchingLB, "lbhatching");
120  get(mpBgGradientLB, "lbgradient");
121  get(mpBgBitmapLB, "lbbitmap");
122  get(mpLayoutSelectLB, "layoutbox");
123  get(mpCustomEntry, "customlabel");
124 
125  Initialize();
126 }
127 
129 {
130  disposeOnce();
131 }
132 
134 {
143 
153 }
154 
156 {
159  mpBindings->Invalidate(SID_ATTR_PAGE);
160  mpBindings->Invalidate(SID_ATTR_PAGE_FILLSTYLE);
161  Update();
162 
163  mpColumnCount->SetSelectHdl( LINK(this, PageStylesPanel, ModifyColumnCountHdl) );
164  SvxNumOptionsTabPageHelper::GetI18nNumbering( *mpNumberSelectLB, ::std::numeric_limits<sal_uInt16>::max());
165  mpNumberSelectLB->SetSelectHdl( LINK(this, PageStylesPanel, ModifyNumberingHdl) );
166  mpLayoutSelectLB->SetSelectHdl( LINK(this, PageStylesPanel, ModifyLayoutHdl) );
167  mpBgFillType->SetSelectHdl( LINK(this, PageStylesPanel, ModifyFillStyleHdl));
168  mpBgColorLB->SetSelectHdl( LINK(this, PageStylesPanel, ModifyFillColorListHdl));
169  mpBgGradientLB->SetSelectHdl( LINK(this, PageStylesPanel, ModifyFillColorListHdl));
170  mpBgHatchingLB->SetSelectHdl( LINK(this, PageStylesPanel, ModifyFillColorHdl));
171  mpBgBitmapLB->SetSelectHdl( LINK(this, PageStylesPanel, ModifyFillColorHdl));
172 }
173 
175 {
176  const eFillStyle eXFS = static_cast<eFillStyle>(mpBgFillType->GetSelectedEntryPos());
178  switch(eXFS)
179  {
180  case NONE:
181  {
182  mpBgColorLB->Hide();
183  mpBgHatchingLB->Hide();
184  mpBgGradientLB->Hide();
185  mpBgBitmapLB->Hide();
186  }
187  break;
188  case SOLID:
189  {
190  mpBgBitmapLB->Hide();
191  mpBgGradientLB->Hide();
192  mpBgHatchingLB->Hide();
193  mpBgColorLB->Show();
194  const Color aColor = GetColorSetOrDefault();
195  mpBgColorLB->SelectEntry(aColor);
196  }
197  break;
198  case GRADIENT:
199  {
200  mpBgBitmapLB->Hide();
201  mpBgHatchingLB->Hide();
202  mpBgColorLB->Show();
203  mpBgGradientLB->Show();
204 
205  const XGradient xGradient = GetGradientSetOrDefault();
206  const Color aStartColor = xGradient.GetStartColor();
207  mpBgColorLB->SelectEntry(aStartColor);
208  const Color aEndColor = xGradient.GetEndColor();
209  mpBgGradientLB->SelectEntry(aEndColor);
210  }
211  break;
212 
213  case HATCH:
214  {
215  mpBgColorLB->Hide();
216  mpBgGradientLB->Hide();
217  mpBgBitmapLB->Hide();
218  mpBgHatchingLB->Show();
219  mpBgHatchingLB->Clear();
220  mpBgHatchingLB->Fill(pSh->GetItem(SID_HATCH_LIST)->GetHatchList());
221 
222  const OUString aHatchName = GetHatchingSetOrDefault();
223  mpBgHatchingLB->SelectEntry( aHatchName );
224  }
225  break;
226 
227  case BITMAP:
228  case PATTERN:
229  {
230  mpBgColorLB->Hide();
231  mpBgGradientLB->Hide();
232  mpBgHatchingLB->Hide();
233  mpBgBitmapLB->Show();
234  mpBgBitmapLB->Clear();
235  OUString aBitmapName;
236 
237  if( eXFS == BITMAP )
238  {
239  mpBgBitmapLB->Fill(pSh->GetItem(SID_BITMAP_LIST)->GetBitmapList());
240  aBitmapName = GetBitmapSetOrDefault();
241  }
242  else
243  {
244  mpBgBitmapLB->Fill(pSh->GetItem(SID_PATTERN_LIST)->GetPatternList());
245  aBitmapName = GetPatternSetOrDefault();
246  }
247 
248  mpBgBitmapLB->SelectEntry( aBitmapName );
249  }
250  break;
251 
252  default:
253  break;
254  }
255 }
256 
258 {
259  if ( !mpBgColorItem )
260  mpBgColorItem.reset( new XFillColorItem( OUString(), Color(0x72, 0x9f, 0xcf) ) );
261 
262  return mpBgColorItem->GetColorValue();
263 }
264 
266 {
267  if( !mpBgGradientItem )
268  {
270  const SvxGradientListItem * pGradListItem = pSh->GetItem(SID_GRADIENT_LIST);
271  const XGradient aGradient = pGradListItem->GetGradientList()->GetGradient(0)->GetGradient();
272  const OUString aGradientName = pGradListItem->GetGradientList()->GetGradient(0)->GetName();
273 
274  mpBgGradientItem.reset( new XFillGradientItem( aGradientName, aGradient ) );
275  }
276 
277  return mpBgGradientItem->GetGradientValue();
278 }
279 
281 {
282  if( !mpBgHatchItem )
283  {
285  const SvxHatchListItem * pHatchListItem = pSh->GetItem(SID_HATCH_LIST);
286  const XHatch aHatch = pHatchListItem->GetHatchList()->GetHatch(0)->GetHatch();
287  const OUString aHatchName = pHatchListItem->GetHatchList()->GetHatch(0)->GetName();
288 
289  mpBgHatchItem.reset( new XFillHatchItem( aHatchName, aHatch ) );
290  }
291 
292  return mpBgHatchItem->GetName();
293 }
294 
296 {
297  if( !mpBgBitmapItem || mpBgBitmapItem->isPattern() )
298  {
300  const SvxBitmapListItem * pBmpListItem = pSh->GetItem(SID_BITMAP_LIST);
301  const GraphicObject aGraphObj = pBmpListItem->GetBitmapList()->GetBitmap(0)->GetGraphicObject();
302  const OUString aBmpName = pBmpListItem->GetBitmapList()->GetBitmap(0)->GetName();
303 
304  mpBgBitmapItem.reset( new XFillBitmapItem( aBmpName, aGraphObj ) );
305  }
306 
307  return mpBgBitmapItem->GetName();
308 }
309 
311 {
312  if( !mpBgBitmapItem || !mpBgBitmapItem->isPattern() )
313  {
315  const SvxPatternListItem * pPatternListItem = pSh->GetItem(SID_PATTERN_LIST);
316  const GraphicObject aGraphObj = pPatternListItem->GetPatternList()->GetBitmap(0)->GetGraphicObject();
317  const OUString aPatternName = pPatternListItem->GetPatternList()->GetBitmap(0)->GetName();
318 
319  mpBgBitmapItem.reset( new XFillBitmapItem( aPatternName, aGraphObj ) );
320  }
321 
322  return mpBgBitmapItem->GetName();
323 }
324 
326  const sal_uInt16 nSid,
327  const SfxItemState eState,
328  const SfxPoolItem* pState,
329  const bool)
330 {
331  if(IsDisposed())
332  return;
333 
334  switch(nSid)
335  {
337  {
338  if ( eState >= SfxItemState::DEFAULT &&
339  dynamic_cast< const SfxInt16Item *>( pState ) )
340  {
341  mpPageColumnItem.reset( static_cast<SfxInt16Item*>(pState->Clone()) );
342  if(mpPageColumnItem->GetValue() <= 5)
343  {
346  }
347  else
348  {
352  }
353  }
354  }
355  break;
356 
357  case SID_ATTR_PAGE:
358  {
359  if( eState >= SfxItemState::DEFAULT &&
360  dynamic_cast< const SvxPageItem*>( pState ) )
361  {
362  mpPageItem.reset( static_cast<SvxPageItem*>(pState->Clone()) );
363  SvxNumType eNumType = mpPageItem->GetNumType();
364  mpNumberSelectLB->SetSelection(eNumType);
365 
366  SvxPageUsage nUse = mpPageItem->GetPageUsage();
368  }
369  }
370  break;
371 
372  case SID_ATTR_PAGE_COLOR:
373  {
374  if(eState >= SfxItemState::DEFAULT)
375  {
376  mpBgFillType->SelectEntryPos( static_cast<sal_Int32>(SOLID) );
377  mpBgColorItem.reset(pState ? static_cast< XFillColorItem* >(pState->Clone()) : nullptr);
378  Update();
379  }
380  }
381  break;
382 
383  case SID_ATTR_PAGE_HATCH:
384  {
385  if(eState >= SfxItemState::DEFAULT)
386  {
387  mpBgFillType->SelectEntryPos( static_cast<sal_Int32>(HATCH) );
388  mpBgHatchItem.reset(pState ? static_cast < XFillHatchItem* >(pState->Clone()) : nullptr);
389  Update();
390  }
391  }
392  break;
393 
394  case SID_ATTR_PAGE_GRADIENT:
395  {
396  if(eState >= SfxItemState::DEFAULT)
397  {
398  mpBgFillType->SelectEntryPos( static_cast<sal_Int32>(GRADIENT) );
399  mpBgGradientItem.reset(pState ? static_cast< XFillGradientItem* >(pState->Clone()) : nullptr);
400  Update();
401  }
402  }
403  break;
404  case SID_ATTR_PAGE_BITMAP:
405  {
406  if(eState >= SfxItemState::DEFAULT)
407  {
408  mpBgBitmapItem.reset(pState ? static_cast< XFillBitmapItem* >(pState->Clone()) : nullptr);
409  if (mpBgBitmapItem)
410  {
411  if (mpBgBitmapItem->isPattern())
412  mpBgFillType->SelectEntryPos( static_cast<sal_Int32>(PATTERN) );
413  else
414  mpBgFillType->SelectEntryPos( static_cast<sal_Int32>(BITMAP) );
415  }
416  Update();
417  }
418  }
419  break;
420 
421  case SID_ATTR_PAGE_FILLSTYLE:
422  {
423  const XFillStyleItem* pFillStyleItem = nullptr;
424  if (eState >= SfxItemState::DEFAULT)
425  pFillStyleItem = dynamic_cast< const XFillStyleItem* >(pState);
426  if (pFillStyleItem)
427  {
428  css::drawing::FillStyle eXFS = pFillStyleItem->GetValue();
429  switch(eXFS)
430  {
431  case drawing::FillStyle_NONE:
432  mpBgFillType->SelectEntryPos( static_cast<sal_Int32>(NONE) );
433  break;
434  case drawing::FillStyle_SOLID:
435  mpBgFillType->SelectEntryPos( static_cast<sal_Int32>(SOLID) );
436  break;
437  case drawing::FillStyle_GRADIENT:
438  mpBgFillType->SelectEntryPos( static_cast<sal_Int32>(GRADIENT) );
439  break;
440  case drawing::FillStyle_HATCH:
441  mpBgFillType->SelectEntryPos( static_cast<sal_Int32>(HATCH) );
442  break;
443  case drawing::FillStyle_BITMAP:
444  if (mpBgBitmapItem->isPattern())
445  mpBgFillType->SelectEntryPos( static_cast<sal_Int32>(PATTERN) );
446  else
447  mpBgFillType->SelectEntryPos( static_cast<sal_Int32>(BITMAP) );
448  break;
449  default:
450  break;
451  }
452  Update();
453  }
454  }
455  break;
456 
457  default:
458  break;
459  }
460 }
461 
462 IMPL_LINK_NOARG( PageStylesPanel, ModifyColumnCountHdl, ListBox&, void )
463 {
464  sal_uInt16 nColumnType = mpColumnCount->GetSelectedEntryPos() + 1;
465  mpPageColumnItem->SetValue( nColumnType );
466  mpBindings->GetDispatcher()->ExecuteList(SID_ATTR_PAGE_COLUMN,
467  SfxCallMode::RECORD, { mpPageColumnItem.get() });
468 }
469 
470 IMPL_LINK_NOARG( PageStylesPanel, ModifyNumberingHdl, ListBox&, void )
471 {
472  SvxNumType nEntryData = static_cast<SvxNumType>(reinterpret_cast<sal_uLong>(mpNumberSelectLB->GetSelectedEntryData()));
473  mpPageItem->SetNumType(nEntryData);
474  mpBindings->GetDispatcher()->ExecuteList(SID_ATTR_PAGE, SfxCallMode::RECORD, { mpPageItem.get() });
475 }
476 
477 IMPL_LINK_NOARG( PageStylesPanel, ModifyLayoutHdl, ListBox&, void )
478 {
479  sal_uInt16 nUse = mpLayoutSelectLB->GetSelectedEntryPos();
480  mpPageItem->SetPageUsage(PosToPageUsage_Impl(nUse));
481  mpBindings->GetDispatcher()->ExecuteList(SID_ATTR_PAGE, SfxCallMode::RECORD, { mpPageItem.get() });
482 }
483 
484 IMPL_LINK_NOARG(PageStylesPanel, ModifyFillStyleHdl, ListBox&, void)
485 {
486  const eFillStyle eXFS = static_cast<eFillStyle>(mpBgFillType->GetSelectedEntryPos());
487  Update();
488 
489  switch (eXFS)
490  {
491  case NONE:
492  {
493  const XFillStyleItem aXFillStyleItem(drawing::FillStyle_NONE);
494  GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_PAGE_FILLSTYLE, SfxCallMode::RECORD, { &aXFillStyleItem });
495  }
496  break;
497 
498  case SOLID:
499  {
500  XFillColorItem aItem( OUString(), mpBgColorItem->GetColorValue() );
501  GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_PAGE_COLOR, SfxCallMode::RECORD, { &aItem });
502  }
503  break;
504 
505  case GRADIENT:
506  {
507  XFillGradientItem aItem( mpBgGradientItem->GetName(), mpBgGradientItem->GetGradientValue() );
508  GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_PAGE_GRADIENT, SfxCallMode::RECORD, { &aItem });
509  }
510  break;
511 
512  case HATCH:
513  {
514  XFillHatchItem aItem( mpBgHatchItem->GetName(), mpBgHatchItem->GetHatchValue() );
515  GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_PAGE_HATCH, SfxCallMode::RECORD, { &aItem });
516  }
517  break;
518 
519  case BITMAP:
520  case PATTERN:
521  {
522  XFillBitmapItem aItem( mpBgBitmapItem->GetName(), mpBgBitmapItem->GetGraphicObject() );
523  GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_PAGE_BITMAP, SfxCallMode::RECORD, { &aItem });
524  }
525  break;
526 
527  default:
528  break;
529  }
530  mpBgFillType->Selected();
531 }
532 
534 {
535  const eFillStyle eXFS = static_cast<eFillStyle>(mpBgFillType->GetSelectedEntryPos());
537  switch(eXFS)
538  {
539  case SOLID:
540  {
541  XFillColorItem aItem(OUString(), mpBgColorLB->GetSelectEntryColor());
542  GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_PAGE_COLOR, SfxCallMode::RECORD, { &aItem });
543  }
544  break;
545  case GRADIENT:
546  {
547  XGradient aGradient;
550 
551  XFillGradientItem aItem(aGradient);
552  GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_PAGE_GRADIENT, SfxCallMode::RECORD, { &aItem });
553  }
554  break;
555  case HATCH:
556  {
557  const SvxHatchListItem * pHatchListItem = pSh->GetItem(SID_HATCH_LIST);
558  sal_uInt16 nPos = mpBgHatchingLB->GetSelectedEntryPos();
559  XHatch aHatch = pHatchListItem->GetHatchList()->GetHatch(nPos)->GetHatch();
560  const OUString aHatchName = pHatchListItem->GetHatchList()->GetHatch(nPos)->GetName();
561 
562  XFillHatchItem aItem(aHatchName, aHatch);
563  GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_PAGE_HATCH, SfxCallMode::RECORD, { &aItem });
564  }
565  break;
566  case BITMAP:
567  case PATTERN:
568  {
569  sal_Int16 nPos = mpBgBitmapLB->GetSelectedEntryPos();
570  GraphicObject aBitmap;
571  OUString aBitmapName;
572 
573  if ( eXFS == BITMAP )
574  {
575  SvxBitmapListItem const * pBitmapListItem = pSh->GetItem(SID_BITMAP_LIST);
576  aBitmap = pBitmapListItem->GetBitmapList()->GetBitmap(nPos)->GetGraphicObject();
577  aBitmapName = pBitmapListItem->GetBitmapList()->GetBitmap(nPos)->GetName();
578  }
579  else
580  {
581  SvxPatternListItem const * pPatternListItem = pSh->GetItem(SID_PATTERN_LIST);
582  aBitmap = pPatternListItem->GetPatternList()->GetBitmap(nPos)->GetGraphicObject();
583  aBitmapName = pPatternListItem->GetPatternList()->GetBitmap(nPos)->GetName();
584  }
585 
586  XFillBitmapItem aItem(aBitmapName, aBitmap);
587  GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_PAGE_BITMAP, SfxCallMode::RECORD, { &aItem });
588  }
589  break;
590  default:
591  break;
592  }
593 }
594 
595 IMPL_LINK_NOARG(PageStylesPanel, ModifyFillColorHdl, ListBox&, void)
596 {
597  ModifyFillColor();
598 }
599 
600 IMPL_LINK_NOARG(PageStylesPanel, ModifyFillColorListHdl, SvxColorListBox&, void)
601 {
602  ModifyFillColor();
603 }
604 
605 } }
606 
607 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
VclPtr< SvxFillAttrBox > mpBgHatchingLB
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 * >())
const XPatternListRef & GetPatternList() const
VclPtr< SvxColorListBox > mpBgColorLB
void SetSelectHdl(const Link< SvxColorListBox &, void > &rLink)
#define SID_ATTR_PAGE_COLUMN
Definition: cmdid.h:836
Color const & GetSelectEntryColor() const
::sfx2::sidebar::ControllerItem maBgColorControl
virtual SfxPoolItem * Clone(SfxItemPool *pPool=nullptr) const =0
sal_uIntPtr sal_uLong
void SetEndColor(const Color &rColor)
const XGradientListRef & GetGradientList() const
void RemoveEntry(const OUString &rStr)
static SfxObjectShell * Current()
VclPtr< SvxFillTypeBox > mpBgFillType
Dialog to specify the properties of date form field.
Definition: accfrmobj.cxx:38
VclPtr< ListBox > mpLayoutSelectLB
virtual void dispose() override
void Invalidate(sal_uInt16 nId)
#define LISTBOX_ENTRY_NOTFOUND
SvxNumType
OUString const & GetPatternSetOrDefault()
::sfx2::sidebar::ControllerItem maPageNumFormatControl
const Color & GetStartColor() const
void SelectEntry(const OUString &rStr, bool bSelect=true)
static VclPtr< vcl::Window > Create(vcl::Window *pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > &rxFrame, SfxBindings *pBindings)
VclPtr< FixedText > mpCustomEntry
::sfx2::sidebar::ControllerItem maBgBitmapControl
::sfx2::sidebar::ControllerItem maPageColumnControl
void Fill(const XHatchListRef &pList)
virtual OUString GetText() const
::std::unique_ptr< SfxInt16Item > mpPageColumnItem
XGradient const & GetGradientSetOrDefault()
#define SAL_N_ELEMENTS(arr)
VclPtr< PageNumberListBox > mpNumberSelectLB
const XHatchListRef & GetHatchList() const
const SfxPoolItem * GetItem(sal_uInt16 nSlotId) const
void SetStartColor(const Color &rColor)
::std::unique_ptr< XFillGradientItem > mpBgGradientItem
IMPL_LINK_NOARG(PageColumnControl, MoreButtonClickHdl_Impl, Button *, void)
::std::unique_ptr< XFillColorItem > mpBgColorItem
static sal_uInt16 PageUsageToPos_Impl(SvxPageUsage nUsage)
void SelectEntryPos(sal_Int32 nPos, bool bSelect=true)
int i
const SvxPageUsage aArr[]
PageStylesPanel(vcl::Window *pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > &rxFrame, SfxBindings *pBindings)
sal_Int32 InsertEntry(const OUString &rStr, sal_Int32 nPos=LISTBOX_APPEND)
::std::unique_ptr< SvxPageItem > mpPageItem
void SetSelectHdl(const Link< ListBox &, void > &rLink)
virtual ~PageStylesPanel() override
const XBitmapListRef & GetBitmapList() const
::std::unique_ptr< XFillHatchItem > mpBgHatchItem
::sfx2::sidebar::ControllerItem maBgHatchingControl
SvxPageUsage
void SelectEntry(const NamedColor &rColor)
VclPtr< SvxFillAttrBox > mpBgBitmapLB
virtual void dispose() override
::sfx2::sidebar::ControllerItem maBgGradientControl
sal_Int32 GetEntryPos(const OUString &rStr) const
static SvxPageUsage PosToPageUsage_Impl(sal_uInt16 nPos)
SfxItemState
SfxBindings * GetBindings() const
virtual void NotifyItemUpdate(const sal_uInt16 nSId, const SfxItemState eState, const SfxPoolItem *pState, const bool bIsEnabled) override
virtual void dispose() override
static VclPtr< reference_type > Create(Arg &&...arg)
OUString const & GetBitmapSetOrDefault()
::sfx2::sidebar::ControllerItem maBgFillStyleControl
VclPtr< SvxColorListBox > mpBgGradientLB
SfxDispatcher * GetDispatcher() const
static void GetI18nNumbering(ListBox &rFmtLB, sal_uInt16 nDoNotRemove)
OUString const & GetHatchingSetOrDefault()
sal_Int32 nPos
const Color & GetEndColor() const
void SetSelection(sal_uInt16)
::std::unique_ptr< XFillBitmapItem > mpBgBitmapItem