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