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