LibreOffice Module cui (master)  1
tpshadow.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 
20 #include <svx/colorbox.hxx>
21 #include <svx/svxids.hrc>
22 #include <svtools/unitconv.hxx>
23 
24 #include <svx/xfillit0.hxx>
25 #include <svx/xflclit.hxx>
26 #include <svx/xflgrit.hxx>
27 #include <svx/xflhtit.hxx>
28 #include <svx/xbtmpit.hxx>
29 #include <svx/sdmetitm.hxx>
30 #include <svx/sdooitm.hxx>
31 #include <svx/sdprcitm.hxx>
32 #include <svx/sdshcitm.hxx>
33 #include <svx/sdshitm.hxx>
34 #include <svx/sdshtitm.hxx>
35 #include <svx/sdsxyitm.hxx>
36 #include <svx/drawitem.hxx>
37 #include <svx/xfltrit.hxx>
38 #include <cuitabarea.hxx>
39 #include <svx/dlgutil.hxx>
40 #include <cuitabline.hxx>
41 
42 using namespace com::sun::star;
43 
44 const sal_uInt16 SvxShadowTabPage::pShadowRanges[] =
45 {
48  SID_ATTR_FILL_SHADOW,
49  SID_ATTR_FILL_SHADOW,
50  SID_ATTR_SHADOW_TRANSPARENCE,
51  SID_ATTR_SHADOW_YDISTANCE,
52  0
53 };
54 
56  : SvxTabPage(pParent, "cui/ui/shadowtabpage.ui", "ShadowTabPage", rInAttrs)
57  , m_rOutAttrs(rInAttrs)
58  , m_pnColorListState(nullptr)
59  , m_nPageType(PageType::Area)
60  , m_nDlgType(0)
61  , m_aXFillAttr(rInAttrs.GetPool())
62  , m_rXFSet(m_aXFillAttr.GetItemSet())
63  , m_aCtlPosition(this)
64  , m_xTsbShowShadow(m_xBuilder->weld_check_button("TSB_SHOW_SHADOW"))
65  , m_xGridShadow(m_xBuilder->weld_widget("gridSHADOW"))
66  , m_xMtrDistance(m_xBuilder->weld_metric_spin_button("MTR_FLD_DISTANCE", FieldUnit::CM))
67  , m_xLbShadowColor(new ColorListBox(m_xBuilder->weld_menu_button("LB_SHADOW_COLOR"), pParent.GetFrameWeld()))
68  , m_xMtrTransparent(m_xBuilder->weld_metric_spin_button("MTR_SHADOW_TRANSPARENT", FieldUnit::PERCENT))
69  , m_xCtlPosition(new weld::CustomWeld(*m_xBuilder, "CTL_POSITION", m_aCtlPosition))
70  , m_xCtlXRectPreview(new weld::CustomWeld(*m_xBuilder, "CTL_COLOR_PREVIEW", m_aCtlXRectPreview))
71 {
72  // this page needs ExchangeSupport
73  SetExchangeSupport();
74 
75  // adjust metric
76  FieldUnit eFUnit = GetModuleFieldUnit( rInAttrs );
77 
78  switch ( eFUnit )
79  {
80  case FieldUnit::M:
81  case FieldUnit::KM:
82  eFUnit = FieldUnit::MM;
83  break;
84  default: ;//prevent warning
85  }
86  SetFieldUnit( *m_xMtrDistance, eFUnit );
87 
88  // determine PoolUnit
89  SfxItemPool* pPool = m_rOutAttrs.GetPool();
90  DBG_ASSERT( pPool, "Where is the pool?" );
92 
93  // setting the output device
94  drawing::FillStyle eXFS = drawing::FillStyle_SOLID;
95  if( m_rOutAttrs.GetItemState( XATTR_FILLSTYLE ) != SfxItemState::DONTCARE )
96  {
97  eXFS = static_cast<const XFillStyleItem&>( m_rOutAttrs.
99  switch( eXFS )
100  {
101  case drawing::FillStyle_SOLID:
102  if( SfxItemState::DONTCARE != m_rOutAttrs.GetItemState( XATTR_FILLCOLOR ) )
103  {
105  }
106  break;
107 
108  case drawing::FillStyle_GRADIENT:
109  if( SfxItemState::DONTCARE != m_rOutAttrs.GetItemState( XATTR_FILLGRADIENT ) )
110  {
112  }
113  break;
114 
115  case drawing::FillStyle_HATCH:
116  if( SfxItemState::DONTCARE != m_rOutAttrs.GetItemState( XATTR_FILLHATCH ) )
117  {
119  }
120  break;
121 
122  case drawing::FillStyle_BITMAP:
123  {
124  if( SfxItemState::DONTCARE != m_rOutAttrs.GetItemState( XATTR_FILLBITMAP ) )
125  {
127  }
128  }
129  break;
130  case drawing::FillStyle_NONE : break;
131  default: break;
132  }
133  }
134  else
135  {
136  m_rXFSet.Put( XFillColorItem( OUString(), COL_LIGHTRED ) );
137  }
138 
139  if(drawing::FillStyle_NONE == eXFS)
140  {
141  // #i96350#
142  // fallback to solid fillmode when no fill mode is provided to have
143  // a reasonable shadow preview. The used color will be a set one or
144  // the default (currently blue8)
145  eXFS = drawing::FillStyle_SOLID;
146  }
147 
148  m_rXFSet.Put( XFillStyleItem( eXFS ) );
150 
151  m_xTsbShowShadow->connect_toggled(LINK( this, SvxShadowTabPage, ClickShadowHdl_Impl));
152  m_xLbShadowColor->SetSelectHdl( LINK( this, SvxShadowTabPage, SelectShadowHdl_Impl ) );
153  Link<weld::MetricSpinButton&,void> aLink = LINK( this, SvxShadowTabPage, ModifyShadowHdl_Impl );
154  m_xMtrTransparent->connect_value_changed(aLink);
155  m_xMtrDistance->connect_value_changed(aLink);
156 }
157 
159 {
160  disposeOnce();
161 }
162 
164 {
165  m_xCtlXRectPreview.reset();
166  m_xLbShadowColor.reset();
167  m_xCtlPosition.reset();
168  SvxTabPage::dispose();
169 }
170 
172 {
173  const SfxUInt16Item* pPageTypeItem = rSet.GetItem<SfxUInt16Item>(SID_PAGE_TYPE, false);
174  if (pPageTypeItem)
175  SetPageType(static_cast<PageType>(pPageTypeItem->GetValue()));
176 
177  if( m_nDlgType == 0 )
178  {
179  if( m_pColorList.is() )
180  {
181  // ColorList
182  if( *m_pnColorListState & ChangeType::CHANGED ||
183  *m_pnColorListState & ChangeType::MODIFIED )
184  {
185  if( *m_pnColorListState & ChangeType::CHANGED )
186  {
187  SvxAreaTabDialog* pArea = dynamic_cast< SvxAreaTabDialog* >( GetParentDialog() );
188  if( pArea )
189  {
190  m_pColorList = pArea->GetNewColorList();
191  }
192  else
193  {
194  SvxLineTabDialog* pLine = dynamic_cast< SvxLineTabDialog* >( GetParentDialog() );
195  if( pLine )
196  m_pColorList = pLine->GetNewColorList();
197  }
198  }
199 
200  SfxItemSet rAttribs( rSet );
201  // rSet contains shadow attributes too, but we want
202  // to use it for updating rectangle attributes only,
203  // so set the shadow to none here
204  SdrOnOffItem aItem( makeSdrShadowItem( false ));
205  rAttribs.Put( aItem );
206 
208  ModifyShadowHdl_Impl( *m_xMtrTransparent );
209  }
211  }
212  }
213 }
214 
215 
217 {
218  if( _pSet )
219  FillItemSet( _pSet );
220 
221  return DeactivateRC::LeavePage;
222 }
223 
224 
226 {
227  bool bModified = false;
228 
229  const SfxPoolItem* pOld = nullptr;
230 
231  if (m_xTsbShowShadow->get_state_changed_from_saved())
232  {
233  TriState eState = m_xTsbShowShadow->get_state();
234  assert(eState != TRISTATE_INDET);
235  // given how m_xTsbShowShadow is set up and saved in Reset(),
236  // eState == TRISTATE_INDET would imply
237  // !IsValueChangedFromSaved()
238  SdrOnOffItem aItem( makeSdrShadowItem(eState == TRISTATE_TRUE) );
239  pOld = GetOldItem( *rAttrs, SDRATTR_SHADOW );
240  if ( !pOld || !( *static_cast<const SdrOnOffItem*>(pOld) == aItem ) )
241  {
242  rAttrs->Put( aItem );
243  bModified = true;
244  }
245  }
246 
247  // shadow removal
248  // a bit intricate inquiry whether there was something changed,
249  // as the items can't be displayed directly on controls
250  sal_Int32 nX = 0, nY = 0;
251  sal_Int32 nXY = GetCoreValue( *m_xMtrDistance, m_ePoolUnit );
252 
253  switch (m_aCtlPosition.GetActualRP())
254  {
255  case RectPoint::LT: nX = nY = -nXY; break;
256  case RectPoint::MT: nY = -nXY; break;
257  case RectPoint::RT: nX = nXY; nY = -nXY; break;
258  case RectPoint::LM: nX = -nXY; break;
259  case RectPoint::RM: nX = nXY; break;
260  case RectPoint::LB: nX = -nXY; nY = nXY; break;
261  case RectPoint::MB: nY = nXY; break;
262  case RectPoint::RB: nX = nY = nXY; break;
263  case RectPoint::MM: break;
264  }
265 
266  // If the values of the shadow distances==SfxItemState::DONTCARE and the displayed
267  // string in the respective MetricField=="", then the comparison of the old
268  // and the new distance values would return a wrong result because in such a
269  // case the new distance values would match the default values of the MetricField !!!!
270  if ( !m_xMtrDistance->get_text().isEmpty() ||
271  m_rOutAttrs.GetItemState( SDRATTR_SHADOWXDIST ) != SfxItemState::DONTCARE ||
272  m_rOutAttrs.GetItemState( SDRATTR_SHADOWYDIST ) != SfxItemState::DONTCARE )
273  {
274  sal_Int32 nOldX = 9876543; // impossible value, so DontCare
275  sal_Int32 nOldY = 9876543;
276  if( m_rOutAttrs.GetItemState( SDRATTR_SHADOWXDIST ) != SfxItemState::DONTCARE &&
277  m_rOutAttrs.GetItemState( SDRATTR_SHADOWYDIST ) != SfxItemState::DONTCARE )
278  {
279  nOldX = m_rOutAttrs.Get( SDRATTR_SHADOWXDIST ).GetValue();
280  nOldY = m_rOutAttrs.Get( SDRATTR_SHADOWYDIST ).GetValue();
281  }
283  pOld = GetOldItem( *rAttrs, SDRATTR_SHADOWXDIST );
284  if ( nX != nOldX &&
285  ( !pOld || !( *static_cast<const SdrMetricItem*>(pOld) == aXItem ) ) )
286  {
287  rAttrs->Put( aXItem );
288  bModified = true;
289  }
291  pOld = GetOldItem( *rAttrs, SDRATTR_SHADOWYDIST );
292  if ( nY != nOldY &&
293  ( !pOld || !( *static_cast<const SdrMetricItem*>(pOld) == aYItem ) ) )
294  {
295  rAttrs->Put( aYItem );
296  bModified = true;
297  }
298  }
299 
300  // ShadowColor
301  {
302  XColorItem aItem(makeSdrShadowColorItem(m_xLbShadowColor->GetSelectEntryColor()));
303  pOld = GetOldItem( *rAttrs, SDRATTR_SHADOWCOLOR );
304  if ( !pOld || !( *static_cast<const XColorItem*>(pOld) == aItem ) )
305  {
306  rAttrs->Put( aItem );
307  bModified = true;
308  }
309  }
310 
311  // transparency
312  sal_uInt16 nVal = static_cast<sal_uInt16>(m_xMtrTransparent->get_value(FieldUnit::PERCENT));
313  if (m_xMtrTransparent->get_value_changed_from_saved())
314  {
316  pOld = GetOldItem( *rAttrs, SDRATTR_SHADOWTRANSPARENCE );
317  if ( !pOld || !( *static_cast<const SdrPercentItem*>(pOld) == aItem ) )
318  {
319  rAttrs->Put( aItem );
320  bModified = true;
321  }
322  }
323 
324  rAttrs->Put (CntUInt16Item(SID_PAGE_TYPE, static_cast<sal_uInt16>(m_nPageType)));
325 
326  return bModified;
327 }
328 
329 
330 void SvxShadowTabPage::Reset( const SfxItemSet* rAttrs )
331 {
332  // all objects can have a shadow
333  // at the moment there are only 8 possible positions where a shadow can be set
334 
335  // has a shadow been set?
336  if( rAttrs->GetItemState( SDRATTR_SHADOW ) != SfxItemState::DONTCARE )
337  {
338  if( rAttrs->Get( SDRATTR_SHADOW ).GetValue() )
339  m_xTsbShowShadow->set_state(TRISTATE_TRUE);
340  else
341  {
342  m_xTsbShowShadow->set_state(TRISTATE_FALSE);
343  }
344  }
345  else
346  m_xTsbShowShadow->set_state(TRISTATE_INDET);
347 
348  // distance (only 8 possible positions),
349  // so there is only one item evaluated
350 
351  if( rAttrs->GetItemState( SDRATTR_SHADOWXDIST ) != SfxItemState::DONTCARE &&
352  rAttrs->GetItemState( SDRATTR_SHADOWYDIST ) != SfxItemState::DONTCARE )
353  {
354  sal_Int32 nX = rAttrs->Get( SDRATTR_SHADOWXDIST ).GetValue();
355  sal_Int32 nY = rAttrs->Get( SDRATTR_SHADOWYDIST ).GetValue();
356 
357  if( nX != 0 )
358  SetMetricValue( *m_xMtrDistance, nX < 0 ? -nX : nX, m_ePoolUnit );
359  else
360  SetMetricValue( *m_xMtrDistance, nY < 0 ? -nY : nY, m_ePoolUnit );
361 
362  // setting the shadow control
363  if ( nX < 0 && nY < 0 ) m_aCtlPosition.SetActualRP( RectPoint::LT );
364  else if( nX == 0 && nY < 0 ) m_aCtlPosition.SetActualRP( RectPoint::MT );
365  else if( nX > 0 && nY < 0 ) m_aCtlPosition.SetActualRP( RectPoint::RT );
366  else if( nX < 0 && nY == 0 ) m_aCtlPosition.SetActualRP( RectPoint::LM );
367  // there's no center point anymore
368  else if( nX == 0 && nY == 0 ) m_aCtlPosition.SetActualRP( RectPoint::RB );
369  else if( nX > 0 && nY == 0 ) m_aCtlPosition.SetActualRP( RectPoint::RM );
370  else if( nX < 0 && nY > 0 ) m_aCtlPosition.SetActualRP( RectPoint::LB );
371  else if( nX == 0 && nY > 0 ) m_aCtlPosition.SetActualRP( RectPoint::MB );
372  else if( nX > 0 && nY > 0 ) m_aCtlPosition.SetActualRP( RectPoint::RB );
373  }
374  else
375  {
376  // determine default-distance
377  SfxItemPool* pPool = m_rOutAttrs.GetPool();
378  {
379  sal_Int32 n = pPool->GetDefaultItem(SDRATTR_SHADOWXDIST).GetValue();
380  if (n == 0)
381  n = pPool->GetDefaultItem(SDRATTR_SHADOWYDIST).GetValue();
382  SetMetricValue(*m_xMtrDistance, std::abs(n), m_ePoolUnit);
383  }
384 
385  // Tristate, e. g. multiple objects have been marked of which some have a shadow and some don't.
386  // The text (which shall be displayed) of the MetricFields is set to "" and serves as an
387  // identification in the method FillItemSet for the fact that the distance value was NOT changed !!!!
388  m_xMtrDistance->set_text( "" );
389  m_aCtlPosition.SetActualRP( RectPoint::MM );
390  }
391 
392  if( rAttrs->GetItemState( SDRATTR_SHADOWCOLOR ) != SfxItemState::DONTCARE )
393  {
394  m_xLbShadowColor->SelectEntry( rAttrs->Get( SDRATTR_SHADOWCOLOR ).GetColorValue() );
395  }
396  else
397  m_xLbShadowColor->SetNoSelection();
398 
399  if( rAttrs->GetItemState( SDRATTR_SHADOWTRANSPARENCE ) != SfxItemState::DONTCARE )
400  {
401  sal_uInt16 nTransp = rAttrs->Get( SDRATTR_SHADOWTRANSPARENCE ).GetValue();
402  m_xMtrTransparent->set_value(nTransp, FieldUnit::PERCENT);
403  }
404  else
405  m_xMtrTransparent->set_text("");
406 
407  //aCtlPosition
408  m_xMtrDistance->save_value();
409  m_xLbShadowColor->SaveValue();
410  m_xTsbShowShadow->save_state();
411 
412  // #66832# This field was not saved, but used to determine changes.
413  // Why? Seems to be the error.
414  // It IS the error.
415  m_xMtrTransparent->save_value();
416 
417  ClickShadowHdl_Impl(*m_xTsbShowShadow);
418  ModifyShadowHdl_Impl(*m_xMtrTransparent);
419 }
420 
422  const SfxItemSet* rAttrs )
423 {
424  return VclPtr<SvxShadowTabPage>::Create( pParent, *rAttrs );
425 }
426 
428 {
429  if (m_xTsbShowShadow->get_state() == TRISTATE_FALSE)
430  {
431  m_xGridShadow->set_sensitive(false);
432  m_xCtlPosition->set_sensitive(false);
433  }
434  else
435  {
436  m_xGridShadow->set_sensitive(true);
437  m_xCtlPosition->set_sensitive(true);
438  }
439  m_aCtlPosition.Invalidate();
440  ModifyShadowHdl_Impl(*m_xMtrTransparent);
441 }
442 
443 IMPL_LINK_NOARG(SvxShadowTabPage, SelectShadowHdl_Impl, ColorListBox&, void)
444 {
445  ModifyShadowHdl_Impl(*m_xMtrTransparent);
446 }
447 
449 {
450  if (m_xTsbShowShadow->get_state() == TRISTATE_TRUE)
451  m_rXFSet.Put( XFillStyleItem( drawing::FillStyle_SOLID ) );
452  else
453  m_rXFSet.Put( XFillStyleItem( drawing::FillStyle_NONE ) );
454 
455  m_rXFSet.Put( XFillColorItem( OUString(), m_xLbShadowColor->GetSelectEntryColor() ) );
456  sal_uInt16 nVal = static_cast<sal_uInt16>(m_xMtrTransparent->get_value(FieldUnit::PERCENT));
457  m_rXFSet.Put( XFillTransparenceItem( nVal ) );
458 
459  // shadow removal
460  sal_Int32 nX = 0, nY = 0;
461  sal_Int32 nXY = GetCoreValue( *m_xMtrDistance, m_ePoolUnit );
462  switch( m_aCtlPosition.GetActualRP() )
463  {
464  case RectPoint::LT: nX = nY = -nXY; break;
465  case RectPoint::MT: nY = -nXY; break;
466  case RectPoint::RT: nX = nXY; nY = -nXY; break;
467  case RectPoint::LM: nX = -nXY; break;
468  case RectPoint::RM: nX = nXY; break;
469  case RectPoint::LB: nX = -nXY; nY = nXY; break;
470  case RectPoint::MB: nY = nXY; break;
471  case RectPoint::RB: nX = nY = nXY; break;
472  case RectPoint::MM: break;
473  }
474 
475  m_aCtlXRectPreview.SetShadowPosition(Point(nX, nY));
476 
477  m_aCtlXRectPreview.SetShadowAttributes(m_aXFillAttr.GetItemSet());
478  m_aCtlXRectPreview.Invalidate();
479 }
480 
482 {
483  // repaint shadow
484  ModifyShadowHdl_Impl( *m_xMtrTransparent );
485 }
486 
488 {
489  const SvxColorListItem* pColorListItem = aSet.GetItem<SvxColorListItem>(SID_COLOR_TABLE, false);
490  const SfxUInt16Item* pPageTypeItem = aSet.GetItem<SfxUInt16Item>(SID_PAGE_TYPE, false);
491  const SfxUInt16Item* pDlgTypeItem = aSet.GetItem<SfxUInt16Item>(SID_DLG_TYPE, false);
492 
493  if (pColorListItem)
494  SetColorList(pColorListItem->GetColorList());
495  if (pPageTypeItem)
496  SetPageType(static_cast<PageType>(pPageTypeItem->GetValue()));
497  if (pDlgTypeItem)
498  SetDlgType(pDlgTypeItem->GetValue());
499 }
500 
501 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual bool FillItemSet(SfxItemSet *) override
Definition: tpshadow.cxx:225
void SetFieldUnit(weld::MetricSpinButton &rField, FieldUnit eUnit, bool bAll)
FieldUnit
void SetActualRP(RectPoint eNewRP)
#define XATTR_FILLHATCH
sal_uInt16 m_nDlgType
Definition: cuitabarea.hxx:311
const XColorListRef & GetNewColorList() const
Definition: cuitabarea.hxx:124
virtual void PointChanged(weld::DrawingArea *pWindow, RectPoint eRP) override
Definition: tpshadow.cxx:481
XFillAttrSetItem m_aXFillAttr
Definition: cuitabarea.hxx:313
std::string GetValue
void SetDlgType(sal_uInt16 nInType)
Definition: cuitabarea.hxx:347
#define XATTR_FILLGRADIENT
#define SDRATTR_SHADOWTRANSPARENCE
sal_uInt16 GetValue() const
static VclPtr< SfxTabPage > Create(TabPageParent, const SfxItemSet *)
Definition: tpshadow.cxx:421
#define SDRATTR_SHADOWCOLOR
RectPoint GetActualRP() const
PageType
constexpr::Color COL_LIGHTRED(0xFF, 0x00, 0x00)
virtual void dispose() override
Definition: tpshadow.cxx:163
std::unique_ptr< weld::CustomWeld > m_xCtlXRectPreview
Definition: cuitabarea.hxx:325
static const sal_uInt16 pShadowRanges[]
Definition: cuitabarea.hxx:303
void SetRectangleAttributes(const SfxItemSet &rItemSet)
TRISTATE_TRUE
ChangeType * m_pnColorListState
Definition: cuitabarea.hxx:309
#define XATTR_FILLCOLOR
FieldUnit GetModuleFieldUnit(const SfxItemSet &rSet)
virtual MapUnit GetMetric(sal_uInt16 nWhich) const
virtual ~SvxShadowTabPage() override
Definition: tpshadow.cxx:158
XColorListRef m_pColorList
Definition: cuitabarea.hxx:308
void SetPageType(PageType nInType)
Definition: cuitabarea.hxx:346
weld::Window * GetFrameWeld(SfxFrame *pFrame)
TRISTATE_INDET
SfxItemSet & m_rXFSet
Definition: cuitabarea.hxx:314
#define SDRATTR_SHADOWYDIST
IMPL_LINK_NOARG(SvxShadowTabPage, ClickShadowHdl_Impl, weld::ToggleButton &, void)
Definition: tpshadow.cxx:427
RectPoint
XColorItem makeSdrShadowColorItem(const Color &rTheColor)
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
#define DBG_ASSERT(sCon, aError)
#define SDRATTR_SHADOWXDIST
SdrPercentItem makeSdrShadowTransparenceItem(sal_uInt16 nTransp)
TRISTATE_FALSE
int GetCoreValue(const weld::MetricSpinButton &rField, MapUnit eUnit)
const SfxItemSet * GetItemSet(const SfxPoolItem &rAttr)
std::unique_ptr< weld::CustomWeld > m_xCtlPosition
Definition: cuitabarea.hxx:324
#define SDRATTR_SHADOW
void SetColorList(XColorListRef const &pColorList)
Definition: cuitabarea.hxx:345
const XColorListRef & GetColorList() const
#define XATTR_FILLSTYLE
void SetMetricValue(weld::MetricSpinButton &rField, int nCoreValue, MapUnit eUnit)
const SfxPoolItem & GetDefaultItem(sal_uInt16 nWhich) const
SfxItemPool * GetPool() const
SdrMetricItem makeSdrShadowYDistItem(long nDist)
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
std::unique_ptr< weld::CheckButton > m_xTsbShowShadow
Definition: cuitabarea.hxx:319
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
Definition: tpshadow.cxx:216
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
#define GetWhich(nSlot)
static VclPtr< reference_type > Create(Arg &&...arg)
const SfxItemSet & m_rOutAttrs
Definition: cuitabarea.hxx:306
const OUString PERCENT("Percent")
SdrOnOffItem makeSdrShadowItem(bool bShadow)
virtual void PageCreated(const SfxAllItemSet &aSet) override
Definition: tpshadow.cxx:487
DeactivateRC
PageType m_nPageType
Definition: cuitabarea.hxx:310
#define XATTR_FILLBITMAP
SVX_DLLPUBLIC MSO_SPT Get(const OUString &)
SvxShadowTabPage(TabPageParent pParent, const SfxItemSet &rInAttrs)
Definition: tpshadow.cxx:55
std::unique_ptr< weld::MetricSpinButton > m_xMtrTransparent
Definition: cuitabarea.hxx:323
TriState
const SfxPoolItem * GetItem(sal_uInt16 nWhich, bool bSearchInParent=true) const
const XColorListRef & GetNewColorList() const
Definition: cuitabline.hxx:77
virtual void ActivatePage(const SfxItemSet &rSet) override
Definition: tpshadow.cxx:171
SdrMetricItem makeSdrShadowXDistItem(long nDist)
SvxRectCtl m_aCtlPosition
Definition: cuitabarea.hxx:317
std::unique_ptr< ColorListBox > m_xLbShadowColor
Definition: cuitabarea.hxx:322
SvxXShadowPreview m_aCtlXRectPreview
Definition: cuitabarea.hxx:318
virtual void Reset(const SfxItemSet *) override
Definition: tpshadow.cxx:330
std::unique_ptr< weld::MetricSpinButton > m_xMtrDistance
Definition: cuitabarea.hxx:321