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