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