LibreOffice Module cui (master) 1
tptrans.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/svxids.hrc>
21
22#include <svx/xfillit0.hxx>
23#include <svx/xflclit.hxx>
24#include <svx/xflftrit.hxx>
25#include <svx/xflgrit.hxx>
26#include <svx/xflhtit.hxx>
27#include <svx/xbtmpit.hxx>
28#include <svx/xflbckit.hxx>
29#include <svx/sdshtitm.hxx>
30#include <svx/xfltrit.hxx>
31#include <cuitabarea.hxx>
32#include <svl/intitem.hxx>
33
34using namespace com::sun::star;
35
37 XATTR_FILLTRANSPARENCE, XATTR_FILLTRANSPARENCE,
38 XATTR_FILLFLOATTRANSPARENCE, XATTR_FILLFLOATTRANSPARENCE,
39 SDRATTR_SHADOWTRANSPARENCE, SDRATTR_SHADOWTRANSPARENCE
40>);
41
42/*************************************************************************
43|*
44|* Dialog for transparence
45|*
46\************************************************************************/
47
49{
50 // disable all other controls
51 ActivateLinear(false);
52 ActivateGradient(false);
53
54 // Preview
55 rXFSet.ClearItem(XATTR_FILLTRANSPARENCE);
56 rXFSet.ClearItem(XATTR_FILLFLOATTRANSPARENCE);
57 m_aCtlXRectPreview.SetAttributes( aXFillAttr.GetItemSet() );
58 m_aCtlBitmapPreview.SetAttributes( aXFillAttr.GetItemSet() );
59
60 InvalidatePreview(false);
61}
62
64{
65 // enable linear, disable other
66 ActivateLinear(true);
67 ActivateGradient(false);
68
69 // preview
70 rXFSet.ClearItem (XATTR_FILLFLOATTRANSPARENCE);
71 ModifyTransparentHdl_Impl(*m_xMtrTransparent);
72}
73
74IMPL_LINK_NOARG(SvxTransparenceTabPage, ClickTransGradientHdl_Impl, weld::Toggleable&, void)
75{
76 // enable gradient, disable other
77 ActivateLinear(false);
78 ActivateGradient(true);
79
80 // preview
81 rXFSet.ClearItem (XATTR_FILLTRANSPARENCE);
82 ModifiedTrgrHdl_Impl(nullptr);
83}
84
86{
87}
88
90{
91 m_xMtrTransparent->set_sensitive(bActivate);
92}
93
95{
96 sal_uInt16 nPos = m_xMtrTransparent->get_value(FieldUnit::PERCENT);
97 rXFSet.Put(XFillTransparenceItem(nPos));
98
99 // preview
100 InvalidatePreview();
101}
102
103IMPL_LINK(SvxTransparenceTabPage, ModifiedTrgrListBoxHdl_Impl, weld::ComboBox&, rListBox, void)
104{
105 ModifiedTrgrHdl_Impl(&rListBox);
106}
107
109{
110 ModifiedTrgrHdl_Impl(nullptr);
111}
112
114{
115 if (pControl == m_xLbTrgrGradientType.get())
116 {
117 css::awt::GradientStyle eXGS = static_cast<css::awt::GradientStyle>(m_xLbTrgrGradientType->get_active());
118 SetControlState_Impl( eXGS );
119 }
120
121 // preview
122 basegfx::BGradient aTmpGradient(
124 static_cast<css::awt::GradientStyle>(m_xLbTrgrGradientType->get_active()),
125 Degree10(static_cast<sal_Int16>(m_xMtrTrgrAngle->get_value(FieldUnit::DEGREE)) * 10),
126 static_cast<sal_uInt16>(m_xMtrTrgrCenterX->get_value(FieldUnit::PERCENT)),
127 static_cast<sal_uInt16>(m_xMtrTrgrCenterY->get_value(FieldUnit::PERCENT)),
128 static_cast<sal_uInt16>(m_xMtrTrgrBorder->get_value(FieldUnit::PERCENT)),
129 100, 100);
130
131 XFillFloatTransparenceItem aItem( aTmpGradient);
132 rXFSet.Put ( aItem );
133
135}
136
138{
139 m_xGridGradient->set_sensitive(bActivate);
140
141 if (bActivate)
142 {
143 css::awt::GradientStyle eXGS = static_cast<css::awt::GradientStyle>(m_xLbTrgrGradientType->get_active());
144 SetControlState_Impl( eXGS );
145 }
146}
147
148void SvxTransparenceTabPage::SetControlState_Impl(css::awt::GradientStyle eXGS)
149{
150 switch(eXGS)
151 {
152 case css::awt::GradientStyle_LINEAR:
153 case css::awt::GradientStyle_AXIAL:
154 m_xFtTrgrCenterX->set_sensitive(false);
155 m_xMtrTrgrCenterX->set_sensitive(false);
156 m_xFtTrgrCenterY->set_sensitive(false);
157 m_xMtrTrgrCenterY->set_sensitive(false);
158 m_xFtTrgrAngle->set_sensitive(true);
159 m_xMtrTrgrAngle->set_sensitive(true);
160 break;
161
162 case css::awt::GradientStyle_RADIAL:
163 m_xFtTrgrCenterX->set_sensitive(true);
164 m_xMtrTrgrCenterX->set_sensitive(true);
165 m_xFtTrgrCenterY->set_sensitive(true);
166 m_xMtrTrgrCenterY->set_sensitive(true);
167 m_xFtTrgrAngle->set_sensitive(false);
168 m_xMtrTrgrAngle->set_sensitive(false);
169 break;
170
171 case css::awt::GradientStyle_ELLIPTICAL:
172 case css::awt::GradientStyle_SQUARE:
173 case css::awt::GradientStyle_RECT:
174 m_xFtTrgrCenterX->set_sensitive(true);
175 m_xMtrTrgrCenterX->set_sensitive(true);
176 m_xFtTrgrCenterY->set_sensitive(true);
177 m_xMtrTrgrCenterY->set_sensitive(true);
178 m_xFtTrgrAngle->set_sensitive(true);
179 m_xMtrTrgrAngle->set_sensitive(true);
180 break;
181 default:
182 break;
183 }
184}
185
187 : SfxTabPage(pPage, pController, "cui/ui/transparencytabpage.ui", "TransparencyTabPage", &rInAttrs)
188 , rOutAttrs(rInAttrs)
189 , nPageType(PageType::Area)
190 , nDlgType(0)
191 , bBitmap(false)
192 , aXFillAttr(rInAttrs.GetPool())
193 , rXFSet(aXFillAttr.GetItemSet())
194 , m_xRbtTransOff(m_xBuilder->weld_radio_button("RBT_TRANS_OFF"))
195 , m_xRbtTransLinear(m_xBuilder->weld_radio_button("RBT_TRANS_LINEAR"))
196 , m_xRbtTransGradient(m_xBuilder->weld_radio_button("RBT_TRANS_GRADIENT"))
197 , m_xMtrTransparent(m_xBuilder->weld_metric_spin_button("MTR_TRANSPARENT", FieldUnit::PERCENT))
198 , m_xGridGradient(m_xBuilder->weld_widget("gridGradient"))
199 , m_xLbTrgrGradientType(m_xBuilder->weld_combo_box("LB_TRGR_GRADIENT_TYPES"))
200 , m_xFtTrgrCenterX(m_xBuilder->weld_label("FT_TRGR_CENTER_X"))
201 , m_xMtrTrgrCenterX(m_xBuilder->weld_metric_spin_button("MTR_TRGR_CENTER_X", FieldUnit::PERCENT))
202 , m_xFtTrgrCenterY(m_xBuilder->weld_label("FT_TRGR_CENTER_Y"))
203 , m_xMtrTrgrCenterY(m_xBuilder->weld_metric_spin_button("MTR_TRGR_CENTER_Y", FieldUnit::PERCENT))
204 , m_xFtTrgrAngle(m_xBuilder->weld_label("FT_TRGR_ANGLE"))
205 , m_xMtrTrgrAngle(m_xBuilder->weld_metric_spin_button("MTR_TRGR_ANGLE", FieldUnit::DEGREE))
206 , m_xMtrTrgrBorder(m_xBuilder->weld_metric_spin_button("MTR_TRGR_BORDER", FieldUnit::PERCENT))
207 , m_xMtrTrgrStartValue(m_xBuilder->weld_metric_spin_button("MTR_TRGR_START_VALUE", FieldUnit::PERCENT))
208 , m_xMtrTrgrEndValue(m_xBuilder->weld_metric_spin_button("MTR_TRGR_END_VALUE", FieldUnit::PERCENT))
209 , m_xCtlBitmapBorder(m_xBuilder->weld_widget("bitmap_border"))
210 , m_xCtlXRectBorder(m_xBuilder->weld_widget("trans_border"))
211 , m_xCtlBitmapPreview(new weld::CustomWeld(*m_xBuilder, "CTL_IMAGE_PREVIEW", m_aCtlBitmapPreview))
212 , m_xCtlXRectPreview(new weld::CustomWeld(*m_xBuilder, "CTL_TRANS_PREVIEW", m_aCtlXRectPreview))
213{
214 // main selection
215 m_xRbtTransOff->connect_toggled(LINK(this, SvxTransparenceTabPage, ClickTransOffHdl_Impl));
216 m_xRbtTransLinear->connect_toggled(LINK(this, SvxTransparenceTabPage, ClickTransLinearHdl_Impl));
217 m_xRbtTransGradient->connect_toggled(LINK(this, SvxTransparenceTabPage, ClickTransGradientHdl_Impl));
218
219 // linear transparency
220 m_xMtrTransparent->set_value(50, FieldUnit::PERCENT);
221 m_xMtrTransparent->connect_value_changed(LINK(this, SvxTransparenceTabPage, ModifyTransparentHdl_Impl));
222
223 // gradient transparency
224 m_xMtrTrgrEndValue->set_value(100, FieldUnit::PERCENT);
225 m_xMtrTrgrStartValue->set_value(0, FieldUnit::PERCENT);
226 Link<weld::MetricSpinButton&,void> aLink = LINK( this, SvxTransparenceTabPage, ModifiedTrgrEditHdl_Impl);
227 m_xLbTrgrGradientType->connect_changed(LINK(this, SvxTransparenceTabPage, ModifiedTrgrListBoxHdl_Impl));
228 m_xMtrTrgrCenterX->connect_value_changed( aLink );
229 m_xMtrTrgrCenterY->connect_value_changed( aLink );
230 m_xMtrTrgrAngle->connect_value_changed( aLink );
231 m_xMtrTrgrBorder->connect_value_changed( aLink );
232 m_xMtrTrgrStartValue->connect_value_changed( aLink );
233 m_xMtrTrgrEndValue->connect_value_changed( aLink );
234
235 // this page needs ExchangeSupport
237}
238
239std::unique_ptr<SfxTabPage> SvxTransparenceTabPage::Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrs)
240{
241 return std::make_unique<SvxTransparenceTabPage>(pPage, pController, *rAttrs);
242}
243
245{
246 const SfxPoolItem* pGradientItem = nullptr;
247 const SfxPoolItem* pLinearItem = nullptr;
248 SfxItemState eStateGradient(rOutAttrs.GetItemState(XATTR_FILLFLOATTRANSPARENCE, true, &pGradientItem));
249 SfxItemState eStateLinear(rOutAttrs.GetItemState(XATTR_FILLTRANSPARENCE, true, &pLinearItem));
250 bool bGradActive = (eStateGradient == SfxItemState::SET && static_cast<const XFillFloatTransparenceItem*>(pGradientItem)->IsEnabled());
251 bool bLinearActive = (eStateLinear == SfxItemState::SET && static_cast<const XFillTransparenceItem*>(pLinearItem)->GetValue() != 0);
252
253 bool bGradUsed = (eStateGradient == SfxItemState::DONTCARE);
254 bool bLinearUsed = (eStateLinear == SfxItemState::DONTCARE);
255
256 bool bModified(false);
257 bool bSwitchOffLinear(false);
258 bool bSwitchOffGradient(false);
259
260 if (m_xMtrTransparent->get_sensitive())
261 {
262 // linear transparence
263 sal_uInt16 nPos = m_xMtrTransparent->get_value(FieldUnit::PERCENT);
264 if (m_xMtrTransparent->get_value_changed_from_saved() || !bLinearActive)
265 {
268 const SfxPoolItem* pOld = GetOldItem(*rAttrs, XATTR_FILLTRANSPARENCE);
269 if(!pOld || !(*static_cast<const XFillTransparenceItem*>(pOld) == aItem) || !bLinearActive)
270 {
271 rAttrs->Put(aItem);
272 rAttrs->Put(aShadowItem);
273 bModified = true;
274 bSwitchOffGradient = true;
275 }
276 }
277 }
278 else if (m_xGridGradient->get_sensitive())
279 {
280 // transparence gradient, fill ItemSet from values
281 if (!bGradActive
282 || m_xLbTrgrGradientType->get_value_changed_from_saved()
283 || m_xMtrTrgrAngle->get_value_changed_from_saved()
284 || m_xMtrTrgrCenterX->get_value_changed_from_saved()
285 || m_xMtrTrgrCenterY->get_value_changed_from_saved()
286 || m_xMtrTrgrBorder->get_value_changed_from_saved()
287 || m_xMtrTrgrStartValue->get_value_changed_from_saved()
288 || m_xMtrTrgrEndValue->get_value_changed_from_saved())
289 {
290 basegfx::BGradient aTmpGradient(
292 static_cast<css::awt::GradientStyle>(m_xLbTrgrGradientType->get_active()),
293 Degree10(static_cast<sal_Int16>(m_xMtrTrgrAngle->get_value(FieldUnit::DEGREE)) * 10),
294 static_cast<sal_uInt16>(m_xMtrTrgrCenterX->get_value(FieldUnit::PERCENT)),
295 static_cast<sal_uInt16>(m_xMtrTrgrCenterY->get_value(FieldUnit::PERCENT)),
296 static_cast<sal_uInt16>(m_xMtrTrgrBorder->get_value(FieldUnit::PERCENT)),
297 100, 100);
298
299 XFillFloatTransparenceItem aItem(aTmpGradient);
300 const SfxPoolItem* pOld = GetOldItem(*rAttrs, XATTR_FILLFLOATTRANSPARENCE);
301
302 if(!pOld || !(*static_cast<const XFillFloatTransparenceItem*>(pOld) == aItem) || !bGradActive)
303 {
304 rAttrs->Put(aItem);
305 bModified = true;
306 bSwitchOffLinear = true;
307 }
308 }
309 }
310 else
311 {
312 // no transparence
313 bSwitchOffGradient = true;
314 bSwitchOffLinear = true;
315 }
316
317 // disable unused XFillFloatTransparenceItem
318 if(bSwitchOffGradient && (bGradActive || bGradUsed))
319 {
320 // basegfx::BGradient() default already creates [COL_BLACK, COL_WHITE] with same defaults
321 // basegfx::BGradient() default also sets the Start/EndIntensity to 100 already
322 basegfx::BGradient aGrad;
323
324 XFillFloatTransparenceItem aItem(aGrad);
325 aItem.SetEnabled(false);
326 rAttrs->Put(aItem);
327 bModified = true;
328 }
329
330 // disable unused XFillFloatTransparenceItem
331 if(bSwitchOffLinear && (bLinearActive || bLinearUsed))
332 {
333 XFillTransparenceItem aItem(0);
335 rAttrs->Put(aItem);
336 rAttrs->Put(aShadowItem);
337 bModified = true;
338 }
339 rAttrs->Put(CntUInt16Item(SID_PAGE_TYPE, static_cast<sal_uInt16>(nPageType)));
340 return bModified;
341}
342
344{
345 const XFillFloatTransparenceItem* pGradientItem =
347 bool bGradActive = (pGradientItem && pGradientItem->IsEnabled());
348 if(!pGradientItem)
349 pGradientItem = &rAttrs->Get(XATTR_FILLFLOATTRANSPARENCE);
350
351 const XFillTransparenceItem* pLinearItem =
353 bool bLinearActive = (pLinearItem && pLinearItem->GetValue() != 0);
354 if(!pLinearItem)
355 pLinearItem = &rAttrs->Get(XATTR_FILLTRANSPARENCE);
356
357 // transparence gradient
358 const basegfx::BGradient& rGradient = pGradientItem->GetGradientValue();
359 css::awt::GradientStyle eXGS(rGradient.GetGradientStyle());
360 m_xLbTrgrGradientType->set_active(sal::static_int_cast< sal_Int32 >(eXGS));
361 m_xMtrTrgrAngle->set_value(rGradient.GetAngle().get() / 10, FieldUnit::DEGREE);
362 m_xMtrTrgrBorder->set_value(rGradient.GetBorder(), FieldUnit::PERCENT);
363 m_xMtrTrgrCenterX->set_value(rGradient.GetXOffset(), FieldUnit::PERCENT);
364 m_xMtrTrgrCenterY->set_value(rGradient.GetYOffset(), FieldUnit::PERCENT);
365 const Color aStart(rGradient.GetColorStops().front().getStopColor());
366 const Color aEnd(rGradient.GetColorStops().back().getStopColor());
367 m_xMtrTrgrStartValue->set_value(static_cast<sal_uInt16>(((static_cast<sal_uInt16>(aStart.GetRed()) + 1) * 100) / 255), FieldUnit::PERCENT);
368 m_xMtrTrgrEndValue->set_value(static_cast<sal_uInt16>(((static_cast<sal_uInt16>(aEnd.GetRed()) + 1) * 100) / 255), FieldUnit::PERCENT);
369
370 // MCGR: preserve ColorStops if given
371 // tdf#155901 We need offset of first and last stop, so include them.
372 if (rGradient.GetColorStops().size() >= 2)
373 maColorStops = rGradient.GetColorStops();
374 else
375 maColorStops.clear();
376
377 // linear transparence
378 sal_uInt16 nTransp = pLinearItem->GetValue();
379 m_xMtrTransparent->set_value(bLinearActive ? nTransp : 50, FieldUnit::PERCENT);
380 ModifyTransparentHdl_Impl(*m_xMtrTransparent);
381
382 // select the correct radio button
383 if(bGradActive)
384 {
385 // transparence gradient, set controls appropriate to item
386 m_xRbtTransGradient->set_active(true);
387 ClickTransGradientHdl_Impl(*m_xRbtTransGradient);
388 }
389 else if(bLinearActive)
390 {
391 // linear transparence
392 m_xRbtTransLinear->set_active(true);
393 ClickTransLinearHdl_Impl(*m_xRbtTransLinear);
394 }
395 else
396 {
397 // no transparence
398 m_xRbtTransOff->set_active(true);
399 ClickTransOffHdl_Impl(*m_xRbtTransOff);
400 ModifiedTrgrHdl_Impl(nullptr);
401 }
402
403 // save values
405 bool bActive = InitPreview ( *rAttrs );
406 InvalidatePreview ( bActive );
407}
408
410{
411 m_xMtrTransparent->save_value();
412 m_xLbTrgrGradientType->save_value();
413 m_xMtrTrgrCenterX->save_value();
414 m_xMtrTrgrCenterY->save_value();
415 m_xMtrTrgrAngle->save_value();
416 m_xMtrTrgrBorder->save_value();
417 m_xMtrTrgrStartValue->save_value();
418 m_xMtrTrgrEndValue->save_value();
419}
420
422{
423 const CntUInt16Item* pPageTypeItem = rSet.GetItem<SfxUInt16Item>(SID_PAGE_TYPE, false);
424 if (pPageTypeItem)
425 SetPageType(static_cast<PageType>(pPageTypeItem->GetValue()));
426
427 if(nDlgType == 0) // area dialog
429
430 InitPreview ( rSet );
431}
432
434{
435 if( _pSet )
436 FillItemSet( _pSet );
437 return DeactivateRC::LeavePage;
438}
439
440// Preview-Methods
441
443{
444 // set transparencetype for preview
445 if (m_xRbtTransOff->get_active())
446 {
447 ClickTransOffHdl_Impl(*m_xRbtTransOff);
448 }
449 else if (m_xRbtTransLinear->get_active())
450 {
451 ClickTransLinearHdl_Impl(*m_xRbtTransLinear);
452 }
453 else if (m_xRbtTransGradient->get_active())
454 {
455 ClickTransGradientHdl_Impl(*m_xRbtTransGradient);
456 }
457
458 // Get fillstyle for preview
465
468
469 bBitmap = rSet.Get(XATTR_FILLSTYLE).GetValue() == drawing::FillStyle_BITMAP;
470
471 // show the right preview window
472 if ( bBitmap )
473 {
474 m_xCtlBitmapBorder->show();
475 m_xCtlXRectBorder->hide();
476 }
477 else
478 {
479 m_xCtlBitmapBorder->hide();
480 m_xCtlXRectBorder->show();
481 }
482
483 return !m_xRbtTransOff->get_active();
484}
485
487{
488 if ( bBitmap )
489 {
490 if ( bEnable )
491 {
492 m_xCtlBitmapPreview->set_sensitive(true);
494 }
495 else
496 m_xCtlBitmapPreview->set_sensitive(false);
497 m_xCtlBitmapPreview->queue_draw();
498 }
499 else
500 {
501 if ( bEnable )
502 {
503 m_xCtlXRectPreview->set_sensitive(true);
505 }
506 else
507 m_xCtlXRectPreview->set_sensitive(false);
508 m_xCtlXRectPreview->queue_draw();
509 }
510}
511
513{
514 basegfx::BColorStops aColorStops;
515 basegfx::BColor aStartBColor(m_xMtrTrgrStartValue->get_value(FieldUnit::PERCENT) / 100.0);
516 aStartBColor.clamp();
517 basegfx::BColor aEndBColor(m_xMtrTrgrEndValue->get_value(FieldUnit::PERCENT) / 100.0);
518 aEndBColor.clamp();
519
520 if(maColorStops.size() >= 2)
521 {
522 aColorStops = maColorStops;
523 aColorStops.front() = basegfx::BColorStop(maColorStops.front().getStopOffset(), aStartBColor);
524 aColorStops.back() = basegfx::BColorStop(maColorStops.back().getStopOffset(), aEndBColor);
525 }
526 else
527 {
528 aColorStops.emplace_back(0.0, aStartBColor);
529 aColorStops.emplace_back(1.0, aEndBColor);
530 }
531
532 return aColorStops;
533}
534
536{
537 const SfxUInt16Item* pPageTypeItem = aSet.GetItem<SfxUInt16Item>(SID_PAGE_TYPE, false);
538 const SfxUInt16Item* pDlgTypeItem = aSet.GetItem<SfxUInt16Item>(SID_DLG_TYPE, false);
539
540 if (pPageTypeItem)
541 SetPageType(static_cast<PageType>(pPageTypeItem->GetValue()));
542 if (pDlgTypeItem)
543 SetDlgType(pDlgTypeItem->GetValue());
544}
545
546/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sal_uInt16 GetValue() const
sal_uInt8 GetRed() const
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) 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
void SetExchangeSupport()
const SfxPoolItem * GetOldItem(const SfxItemSet &rSet, sal_uInt16 nSlot, bool bDeep=true)
bool InitPreview(const SfxItemSet &rSet)
Definition: tptrans.cxx:442
std::unique_ptr< weld::MetricSpinButton > m_xMtrTrgrStartValue
Definition: cuitabarea.hxx:163
basegfx::BColorStops createColorStops()
Definition: tptrans.cxx:512
virtual ~SvxTransparenceTabPage() override
Definition: tptrans.cxx:85
void ActivateGradient(bool bActivate)
Definition: tptrans.cxx:137
std::unique_ptr< weld::Widget > m_xCtlXRectBorder
Definition: cuitabarea.hxx:166
XFillAttrSetItem aXFillAttr
Definition: cuitabarea.hxx:139
std::unique_ptr< weld::MetricSpinButton > m_xMtrTrgrCenterX
Definition: cuitabarea.hxx:157
basegfx::BColorStops maColorStops
Definition: cuitabarea.hxx:173
std::unique_ptr< weld::Label > m_xFtTrgrCenterX
Definition: cuitabarea.hxx:156
const SfxItemSet & rOutAttrs
Definition: cuitabarea.hxx:132
SvxXRectPreview m_aCtlBitmapPreview
Definition: cuitabarea.hxx:142
virtual bool FillItemSet(SfxItemSet *) override
Definition: tptrans.cxx:244
std::unique_ptr< weld::Widget > m_xGridGradient
Definition: cuitabarea.hxx:154
void InvalidatePreview(bool bEnable=true)
Definition: tptrans.cxx:486
std::unique_ptr< weld::CustomWeld > m_xCtlXRectPreview
Definition: cuitabarea.hxx:170
std::unique_ptr< weld::CustomWeld > m_xCtlBitmapPreview
Definition: cuitabarea.hxx:169
virtual void Reset(const SfxItemSet *) override
Definition: tptrans.cxx:343
std::unique_ptr< weld::ComboBox > m_xLbTrgrGradientType
Definition: cuitabarea.hxx:155
std::unique_ptr< weld::Widget > m_xCtlBitmapBorder
Definition: cuitabarea.hxx:165
std::unique_ptr< weld::RadioButton > m_xRbtTransOff
Definition: cuitabarea.hxx:146
std::unique_ptr< weld::RadioButton > m_xRbtTransGradient
Definition: cuitabarea.hxx:148
virtual void ChangesApplied() override
Definition: tptrans.cxx:409
SvxTransparenceTabPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rInAttrs)
Definition: tptrans.cxx:186
void ModifiedTrgrHdl_Impl(const weld::ComboBox *)
Definition: tptrans.cxx:113
virtual void PageCreated(const SfxAllItemSet &aSet) override
Definition: tptrans.cxx:535
std::unique_ptr< weld::MetricSpinButton > m_xMtrTransparent
linear transparency
Definition: cuitabarea.hxx:151
std::unique_ptr< weld::MetricSpinButton > m_xMtrTrgrBorder
Definition: cuitabarea.hxx:162
void SetControlState_Impl(css::awt::GradientStyle eXGS)
Definition: tptrans.cxx:148
std::unique_ptr< weld::MetricSpinButton > m_xMtrTrgrAngle
Definition: cuitabarea.hxx:161
SvxXRectPreview m_aCtlXRectPreview
Definition: cuitabarea.hxx:143
std::unique_ptr< weld::MetricSpinButton > m_xMtrTrgrCenterY
Definition: cuitabarea.hxx:159
void SetPageType(PageType nInType)
Definition: cuitabarea.hxx:206
std::unique_ptr< weld::MetricSpinButton > m_xMtrTrgrEndValue
Definition: cuitabarea.hxx:164
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *)
Definition: tptrans.cxx:239
void ActivateLinear(bool bActivate)
Definition: tptrans.cxx:89
std::unique_ptr< weld::RadioButton > m_xRbtTransLinear
Definition: cuitabarea.hxx:147
static const WhichRangesContainer pTransparenceRanges
Definition: cuitabarea.hxx:130
std::unique_ptr< weld::Label > m_xFtTrgrCenterY
Definition: cuitabarea.hxx:158
virtual void ActivatePage(const SfxItemSet &rSet) override
Definition: tptrans.cxx:421
void SetDlgType(sal_uInt16 nInType)
Definition: cuitabarea.hxx:207
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
Definition: tptrans.cxx:433
std::unique_ptr< weld::Label > m_xFtTrgrAngle
Definition: cuitabarea.hxx:160
void SetAttributes(const SfxItemSet &rItemSet)
void SetEnabled(bool bEnable)
const basegfx::BGradient & GetGradientValue() const
BColor & clamp()
sal_uInt16 GetBorder() const
sal_uInt16 GetXOffset() const
const basegfx::BColorStops & GetColorStops() const
Degree10 GetAngle() const
css::awt::GradientStyle GetGradientStyle() const
sal_uInt16 GetYOffset() const
virtual tools::Long GetValue() const override
@ Area
PageType
FieldUnit
sal_uInt16 nPos
const SfxItemSet * GetItemSet(const SfxPoolItem &rAttr)
static constexpr auto Items
SfxItemState
SdrPercentItem makeSdrShadowTransparenceItem(sal_uInt16 nTransp)
static SfxItemSet & rSet
UNDERLYING_TYPE get() const
DeactivateRC
IMPL_LINK_NOARG(SvxTransparenceTabPage, ClickTransOffHdl_Impl, weld::Toggleable &, void)
Definition: tptrans.cxx:48
IMPL_LINK(SvxTransparenceTabPage, ModifiedTrgrListBoxHdl_Impl, weld::ComboBox &, rListBox, void)
Definition: tptrans.cxx:103
constexpr OUStringLiteral PERCENT(u"Percent")
constexpr TypedWhichId< XFillColorItem > XATTR_FILLCOLOR(XATTR_FILL_FIRST+1)
constexpr TypedWhichId< XFillTransparenceItem > XATTR_FILLTRANSPARENCE(XATTR_FILL_FIRST+5)
constexpr TypedWhichId< XFillHatchItem > XATTR_FILLHATCH(XATTR_FILL_FIRST+3)
constexpr TypedWhichId< XFillBitmapItem > XATTR_FILLBITMAP(XATTR_FILL_FIRST+4)
constexpr TypedWhichId< XFillBackgroundItem > XATTR_FILLBACKGROUND(XATTR_FILL_FIRST+19)
constexpr TypedWhichId< XFillFloatTransparenceItem > XATTR_FILLFLOATTRANSPARENCE(XATTR_FILL_FIRST+11)
constexpr TypedWhichId< XFillStyleItem > XATTR_FILLSTYLE(XATTR_FILL_FIRST)
constexpr TypedWhichId< XFillGradientItem > XATTR_FILLGRADIENT(XATTR_FILL_FIRST+2)