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 
34 using 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 
63 IMPL_LINK_NOARG(SvxTransparenceTabPage, ClickTransLinearHdl_Impl, weld::Toggleable&, void)
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 
74 IMPL_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 
103 IMPL_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  sal_uInt8 nStartCol = static_cast<sal_uInt8>((static_cast<sal_uInt16>(m_xMtrTrgrStartValue->get_value(FieldUnit::PERCENT)) * 255) / 100);
123  sal_uInt8 nEndCol = static_cast<sal_uInt8>((static_cast<sal_uInt16>(m_xMtrTrgrEndValue->get_value(FieldUnit::PERCENT)) * 255) / 100);
124  XGradient aTmpGradient(
125  Color(nStartCol, nStartCol, nStartCol),
126  Color(nEndCol, nEndCol, nEndCol),
127  static_cast<css::awt::GradientStyle>(m_xLbTrgrGradientType->get_active()),
128  Degree10(static_cast<sal_Int16>(m_xMtrTrgrAngle->get_value(FieldUnit::DEGREE)) * 10),
129  static_cast<sal_uInt16>(m_xMtrTrgrCenterX->get_value(FieldUnit::PERCENT)),
130  static_cast<sal_uInt16>(m_xMtrTrgrCenterY->get_value(FieldUnit::PERCENT)),
131  static_cast<sal_uInt16>(m_xMtrTrgrBorder->get_value(FieldUnit::PERCENT)),
132  100, 100);
133 
134  XFillFloatTransparenceItem aItem( aTmpGradient);
135  rXFSet.Put ( aItem );
136 
137  InvalidatePreview();
138 }
139 
141 {
142  m_xGridGradient->set_sensitive(bActivate);
143 
144  if (bActivate)
145  {
146  css::awt::GradientStyle eXGS = static_cast<css::awt::GradientStyle>(m_xLbTrgrGradientType->get_active());
147  SetControlState_Impl( eXGS );
148  }
149 }
150 
151 void SvxTransparenceTabPage::SetControlState_Impl(css::awt::GradientStyle eXGS)
152 {
153  switch(eXGS)
154  {
155  case css::awt::GradientStyle_LINEAR:
156  case css::awt::GradientStyle_AXIAL:
157  m_xFtTrgrCenterX->set_sensitive(false);
158  m_xMtrTrgrCenterX->set_sensitive(false);
159  m_xFtTrgrCenterY->set_sensitive(false);
160  m_xMtrTrgrCenterY->set_sensitive(false);
161  m_xFtTrgrAngle->set_sensitive(true);
162  m_xMtrTrgrAngle->set_sensitive(true);
163  break;
164 
165  case css::awt::GradientStyle_RADIAL:
166  m_xFtTrgrCenterX->set_sensitive(true);
167  m_xMtrTrgrCenterX->set_sensitive(true);
168  m_xFtTrgrCenterY->set_sensitive(true);
169  m_xMtrTrgrCenterY->set_sensitive(true);
170  m_xFtTrgrAngle->set_sensitive(false);
171  m_xMtrTrgrAngle->set_sensitive(false);
172  break;
173 
174  case css::awt::GradientStyle_ELLIPTICAL:
175  case css::awt::GradientStyle_SQUARE:
176  case css::awt::GradientStyle_RECT:
177  m_xFtTrgrCenterX->set_sensitive(true);
178  m_xMtrTrgrCenterX->set_sensitive(true);
179  m_xFtTrgrCenterY->set_sensitive(true);
180  m_xMtrTrgrCenterY->set_sensitive(true);
181  m_xFtTrgrAngle->set_sensitive(true);
182  m_xMtrTrgrAngle->set_sensitive(true);
183  break;
184  default:
185  break;
186  }
187 }
188 
190  : SfxTabPage(pPage, pController, "cui/ui/transparencytabpage.ui", "TransparencyTabPage", &rInAttrs)
191  , rOutAttrs(rInAttrs)
192  , nPageType(PageType::Area)
193  , nDlgType(0)
194  , bBitmap(false)
195  , aXFillAttr(rInAttrs.GetPool())
196  , rXFSet(aXFillAttr.GetItemSet())
197  , m_xRbtTransOff(m_xBuilder->weld_radio_button("RBT_TRANS_OFF"))
198  , m_xRbtTransLinear(m_xBuilder->weld_radio_button("RBT_TRANS_LINEAR"))
199  , m_xRbtTransGradient(m_xBuilder->weld_radio_button("RBT_TRANS_GRADIENT"))
200  , m_xMtrTransparent(m_xBuilder->weld_metric_spin_button("MTR_TRANSPARENT", FieldUnit::PERCENT))
201  , m_xGridGradient(m_xBuilder->weld_widget("gridGradient"))
202  , m_xLbTrgrGradientType(m_xBuilder->weld_combo_box("LB_TRGR_GRADIENT_TYPES"))
203  , m_xFtTrgrCenterX(m_xBuilder->weld_label("FT_TRGR_CENTER_X"))
204  , m_xMtrTrgrCenterX(m_xBuilder->weld_metric_spin_button("MTR_TRGR_CENTER_X", FieldUnit::PERCENT))
205  , m_xFtTrgrCenterY(m_xBuilder->weld_label("FT_TRGR_CENTER_Y"))
206  , m_xMtrTrgrCenterY(m_xBuilder->weld_metric_spin_button("MTR_TRGR_CENTER_Y", FieldUnit::PERCENT))
207  , m_xFtTrgrAngle(m_xBuilder->weld_label("FT_TRGR_ANGLE"))
208  , m_xMtrTrgrAngle(m_xBuilder->weld_metric_spin_button("MTR_TRGR_ANGLE", FieldUnit::DEGREE))
209  , m_xMtrTrgrBorder(m_xBuilder->weld_metric_spin_button("MTR_TRGR_BORDER", FieldUnit::PERCENT))
210  , m_xMtrTrgrStartValue(m_xBuilder->weld_metric_spin_button("MTR_TRGR_START_VALUE", FieldUnit::PERCENT))
211  , m_xMtrTrgrEndValue(m_xBuilder->weld_metric_spin_button("MTR_TRGR_END_VALUE", FieldUnit::PERCENT))
212  , m_xCtlBitmapBorder(m_xBuilder->weld_widget("bitmap_border"))
213  , m_xCtlXRectBorder(m_xBuilder->weld_widget("trans_border"))
214  , m_xCtlBitmapPreview(new weld::CustomWeld(*m_xBuilder, "CTL_IMAGE_PREVIEW", m_aCtlBitmapPreview))
215  , m_xCtlXRectPreview(new weld::CustomWeld(*m_xBuilder, "CTL_TRANS_PREVIEW", m_aCtlXRectPreview))
216 {
217  // main selection
218  m_xRbtTransOff->connect_toggled(LINK(this, SvxTransparenceTabPage, ClickTransOffHdl_Impl));
219  m_xRbtTransLinear->connect_toggled(LINK(this, SvxTransparenceTabPage, ClickTransLinearHdl_Impl));
220  m_xRbtTransGradient->connect_toggled(LINK(this, SvxTransparenceTabPage, ClickTransGradientHdl_Impl));
221 
222  // linear transparency
223  m_xMtrTransparent->set_value(50, FieldUnit::PERCENT);
224  m_xMtrTransparent->connect_value_changed(LINK(this, SvxTransparenceTabPage, ModifyTransparentHdl_Impl));
225 
226  // gradient transparency
227  m_xMtrTrgrEndValue->set_value(100, FieldUnit::PERCENT);
228  m_xMtrTrgrStartValue->set_value(0, FieldUnit::PERCENT);
229  Link<weld::MetricSpinButton&,void> aLink = LINK( this, SvxTransparenceTabPage, ModifiedTrgrEditHdl_Impl);
230  m_xLbTrgrGradientType->connect_changed(LINK(this, SvxTransparenceTabPage, ModifiedTrgrListBoxHdl_Impl));
231  m_xMtrTrgrCenterX->connect_value_changed( aLink );
232  m_xMtrTrgrCenterY->connect_value_changed( aLink );
233  m_xMtrTrgrAngle->connect_value_changed( aLink );
234  m_xMtrTrgrBorder->connect_value_changed( aLink );
235  m_xMtrTrgrStartValue->connect_value_changed( aLink );
236  m_xMtrTrgrEndValue->connect_value_changed( aLink );
237 
238  // this page needs ExchangeSupport
240 }
241 
242 std::unique_ptr<SfxTabPage> SvxTransparenceTabPage::Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrs)
243 {
244  return std::make_unique<SvxTransparenceTabPage>(pPage, pController, *rAttrs);
245 }
246 
248 {
249  const SfxPoolItem* pGradientItem = nullptr;
250  const SfxPoolItem* pLinearItem = nullptr;
251  SfxItemState eStateGradient(rOutAttrs.GetItemState(XATTR_FILLFLOATTRANSPARENCE, true, &pGradientItem));
252  SfxItemState eStateLinear(rOutAttrs.GetItemState(XATTR_FILLTRANSPARENCE, true, &pLinearItem));
253  bool bGradActive = (eStateGradient == SfxItemState::SET && static_cast<const XFillFloatTransparenceItem*>(pGradientItem)->IsEnabled());
254  bool bLinearActive = (eStateLinear == SfxItemState::SET && static_cast<const XFillTransparenceItem*>(pLinearItem)->GetValue() != 0);
255 
256  bool bGradUsed = (eStateGradient == SfxItemState::DONTCARE);
257  bool bLinearUsed = (eStateLinear == SfxItemState::DONTCARE);
258 
259  bool bModified(false);
260  bool bSwitchOffLinear(false);
261  bool bSwitchOffGradient(false);
262 
263  if (m_xMtrTransparent->get_sensitive())
264  {
265  // linear transparence
266  sal_uInt16 nPos = m_xMtrTransparent->get_value(FieldUnit::PERCENT);
267  if (m_xMtrTransparent->get_value_changed_from_saved() || !bLinearActive)
268  {
269  XFillTransparenceItem aItem(nPos);
271  const SfxPoolItem* pOld = GetOldItem(*rAttrs, XATTR_FILLTRANSPARENCE);
272  if(!pOld || !(*static_cast<const XFillTransparenceItem*>(pOld) == aItem) || !bLinearActive)
273  {
274  rAttrs->Put(aItem);
275  rAttrs->Put(aShadowItem);
276  bModified = true;
277  bSwitchOffGradient = true;
278  }
279  }
280  }
281  else if (m_xGridGradient->get_sensitive())
282  {
283  // transparence gradient, fill ItemSet from values
284  if (!bGradActive
285  || m_xLbTrgrGradientType->get_value_changed_from_saved()
286  || m_xMtrTrgrAngle->get_value_changed_from_saved()
287  || m_xMtrTrgrCenterX->get_value_changed_from_saved()
288  || m_xMtrTrgrCenterY->get_value_changed_from_saved()
289  || m_xMtrTrgrBorder->get_value_changed_from_saved()
290  || m_xMtrTrgrStartValue->get_value_changed_from_saved()
291  || m_xMtrTrgrEndValue->get_value_changed_from_saved())
292  {
293  sal_uInt8 nStartCol = static_cast<sal_uInt8>((static_cast<sal_uInt16>(m_xMtrTrgrStartValue->get_value(FieldUnit::PERCENT)) * 255) / 100);
294  sal_uInt8 nEndCol = static_cast<sal_uInt8>((static_cast<sal_uInt16>(m_xMtrTrgrEndValue->get_value(FieldUnit::PERCENT)) * 255) / 100);
295  XGradient aTmpGradient(
296  Color(nStartCol, nStartCol, nStartCol),
297  Color(nEndCol, nEndCol, nEndCol),
298  static_cast<css::awt::GradientStyle>(m_xLbTrgrGradientType->get_active()),
299  Degree10(static_cast<sal_Int16>(m_xMtrTrgrAngle->get_value(FieldUnit::DEGREE)) * 10),
300  static_cast<sal_uInt16>(m_xMtrTrgrCenterX->get_value(FieldUnit::PERCENT)),
301  static_cast<sal_uInt16>(m_xMtrTrgrCenterY->get_value(FieldUnit::PERCENT)),
302  static_cast<sal_uInt16>(m_xMtrTrgrBorder->get_value(FieldUnit::PERCENT)),
303  100, 100);
304 
305  XFillFloatTransparenceItem aItem(aTmpGradient);
306  const SfxPoolItem* pOld = GetOldItem(*rAttrs, XATTR_FILLFLOATTRANSPARENCE);
307 
308  if(!pOld || !(*static_cast<const XFillFloatTransparenceItem*>(pOld) == aItem) || !bGradActive)
309  {
310  rAttrs->Put(aItem);
311  bModified = true;
312  bSwitchOffLinear = true;
313  }
314  }
315  }
316  else
317  {
318  // no transparence
319  bSwitchOffGradient = true;
320  bSwitchOffLinear = true;
321  }
322 
323  // disable unused XFillFloatTransparenceItem
324  if(bSwitchOffGradient && (bGradActive || bGradUsed))
325  {
326  XGradient aGrad(COL_BLACK, COL_WHITE);
327  aGrad.SetStartIntens(100);
328  aGrad.SetEndIntens(100);
329  XFillFloatTransparenceItem aItem(aGrad);
330  aItem.SetEnabled(false);
331  rAttrs->Put(aItem);
332  bModified = true;
333  }
334 
335  // disable unused XFillFloatTransparenceItem
336  if(bSwitchOffLinear && (bLinearActive || bLinearUsed))
337  {
338  XFillTransparenceItem aItem(0);
340  rAttrs->Put(aItem);
341  rAttrs->Put(aShadowItem);
342  bModified = true;
343  }
344  rAttrs->Put(CntUInt16Item(SID_PAGE_TYPE, static_cast<sal_uInt16>(nPageType)));
345  return bModified;
346 }
347 
349 {
350  const SfxPoolItem* pGradientItem = nullptr;
351  SfxItemState eStateGradient(rAttrs->GetItemState(XATTR_FILLFLOATTRANSPARENCE, true, &pGradientItem));
352  if(!pGradientItem)
353  pGradientItem = &rAttrs->Get(XATTR_FILLFLOATTRANSPARENCE);
354  bool bGradActive = (eStateGradient == SfxItemState::SET && static_cast<const XFillFloatTransparenceItem*>(pGradientItem)->IsEnabled());
355 
356  const SfxPoolItem* pLinearItem = nullptr;
357  SfxItemState eStateLinear(rAttrs->GetItemState(XATTR_FILLTRANSPARENCE, true, &pLinearItem));
358  if(!pLinearItem)
359  pLinearItem = &rAttrs->Get(XATTR_FILLTRANSPARENCE);
360  bool bLinearActive = (eStateLinear == SfxItemState::SET && static_cast<const XFillTransparenceItem*>(pLinearItem)->GetValue() != 0);
361 
362  // transparence gradient
363  const XGradient& rGradient = static_cast<const XFillFloatTransparenceItem*>(pGradientItem)->GetGradientValue();
364  css::awt::GradientStyle eXGS(rGradient.GetGradientStyle());
365  m_xLbTrgrGradientType->set_active(sal::static_int_cast< sal_Int32 >(eXGS));
366  m_xMtrTrgrAngle->set_value(rGradient.GetAngle().get() / 10, FieldUnit::DEGREE);
367  m_xMtrTrgrBorder->set_value(rGradient.GetBorder(), FieldUnit::PERCENT);
368  m_xMtrTrgrCenterX->set_value(rGradient.GetXOffset(), FieldUnit::PERCENT);
369  m_xMtrTrgrCenterY->set_value(rGradient.GetYOffset(), FieldUnit::PERCENT);
370  m_xMtrTrgrStartValue->set_value(static_cast<sal_uInt16>(((static_cast<sal_uInt16>(rGradient.GetStartColor().GetRed()) + 1) * 100) / 255), FieldUnit::PERCENT);
371  m_xMtrTrgrEndValue->set_value(static_cast<sal_uInt16>(((static_cast<sal_uInt16>(rGradient.GetEndColor().GetRed()) + 1) * 100) / 255), FieldUnit::PERCENT);
372 
373  // linear transparence
374  sal_uInt16 nTransp = static_cast<const XFillTransparenceItem*>(pLinearItem)->GetValue();
375  m_xMtrTransparent->set_value(bLinearActive ? nTransp : 50, FieldUnit::PERCENT);
376  ModifyTransparentHdl_Impl(*m_xMtrTransparent);
377 
378  // select the correct radio button
379  if(bGradActive)
380  {
381  // transparence gradient, set controls appropriate to item
382  m_xRbtTransGradient->set_active(true);
383  ClickTransGradientHdl_Impl(*m_xRbtTransGradient);
384  }
385  else if(bLinearActive)
386  {
387  // linear transparence
388  m_xRbtTransLinear->set_active(true);
389  ClickTransLinearHdl_Impl(*m_xRbtTransLinear);
390  }
391  else
392  {
393  // no transparence
394  m_xRbtTransOff->set_active(true);
395  ClickTransOffHdl_Impl(*m_xRbtTransOff);
396  ModifiedTrgrHdl_Impl(nullptr);
397  }
398 
399  // save values
400  ChangesApplied();
401  bool bActive = InitPreview ( *rAttrs );
402  InvalidatePreview ( bActive );
403 }
404 
406 {
407  m_xMtrTransparent->save_value();
408  m_xLbTrgrGradientType->save_value();
409  m_xMtrTrgrCenterX->save_value();
410  m_xMtrTrgrCenterY->save_value();
411  m_xMtrTrgrAngle->save_value();
412  m_xMtrTrgrBorder->save_value();
413  m_xMtrTrgrStartValue->save_value();
414  m_xMtrTrgrEndValue->save_value();
415 }
416 
418 {
419  const CntUInt16Item* pPageTypeItem = rSet.GetItem<CntUInt16Item>(SID_PAGE_TYPE, false);
420  if (pPageTypeItem)
421  SetPageType(static_cast<PageType>(pPageTypeItem->GetValue()));
422 
423  if(nDlgType == 0) // area dialog
425 
426  InitPreview ( rSet );
427 }
428 
430 {
431  if( _pSet )
432  FillItemSet( _pSet );
433  return DeactivateRC::LeavePage;
434 }
435 
436 // Preview-Methods
437 
439 {
440  // set transparencetype for preview
441  if (m_xRbtTransOff->get_active())
442  {
443  ClickTransOffHdl_Impl(*m_xRbtTransOff);
444  }
445  else if (m_xRbtTransLinear->get_active())
446  {
447  ClickTransLinearHdl_Impl(*m_xRbtTransLinear);
448  }
449  else if (m_xRbtTransGradient->get_active())
450  {
451  ClickTransGradientHdl_Impl(*m_xRbtTransGradient);
452  }
453 
454  // Get fillstyle for preview
455  rXFSet.Put ( rSet.Get(XATTR_FILLSTYLE) );
456  rXFSet.Put ( rSet.Get(XATTR_FILLCOLOR) );
457  rXFSet.Put ( rSet.Get(XATTR_FILLGRADIENT) );
458  rXFSet.Put ( rSet.Get(XATTR_FILLHATCH) );
460  rXFSet.Put ( rSet.Get(XATTR_FILLBITMAP) );
461 
464 
465  bBitmap = rSet.Get(XATTR_FILLSTYLE).GetValue() == drawing::FillStyle_BITMAP;
466 
467  // show the right preview window
468  if ( bBitmap )
469  {
470  m_xCtlBitmapBorder->show();
471  m_xCtlXRectBorder->hide();
472  }
473  else
474  {
475  m_xCtlBitmapBorder->hide();
476  m_xCtlXRectBorder->show();
477  }
478 
479  return !m_xRbtTransOff->get_active();
480 }
481 
483 {
484  if ( bBitmap )
485  {
486  if ( bEnable )
487  {
488  m_xCtlBitmapPreview->set_sensitive(true);
490  }
491  else
492  m_xCtlBitmapPreview->set_sensitive(false);
493  m_xCtlBitmapPreview->queue_draw();
494  }
495  else
496  {
497  if ( bEnable )
498  {
499  m_xCtlXRectPreview->set_sensitive(true);
501  }
502  else
503  m_xCtlXRectPreview->set_sensitive(false);
504  m_xCtlXRectPreview->queue_draw();
505  }
506 }
507 
509 {
510  const SfxUInt16Item* pPageTypeItem = aSet.GetItem<SfxUInt16Item>(SID_PAGE_TYPE, false);
511  const SfxUInt16Item* pDlgTypeItem = aSet.GetItem<SfxUInt16Item>(SID_DLG_TYPE, false);
512 
513  if (pPageTypeItem)
514  SetPageType(static_cast<PageType>(pPageTypeItem->GetValue()));
515  if (pDlgTypeItem)
516  SetDlgType(pDlgTypeItem->GetValue());
517 }
518 
519 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
FieldUnit
sal_uInt8 GetRed() const
std::unique_ptr< weld::MetricSpinButton > m_xMtrTrgrStartValue
Definition: cuitabarea.hxx:162
virtual void Reset(const SfxItemSet *) override
Definition: tptrans.cxx:348
Degree10 GetAngle() const
std::unique_ptr< weld::MetricSpinButton > m_xMtrTrgrCenterX
Definition: cuitabarea.hxx:156
static constexpr auto Items
std::string GetValue
std::unique_ptr< weld::Widget > m_xCtlXRectBorder
Definition: cuitabarea.hxx:165
virtual void ChangesApplied() override
Definition: tptrans.cxx:405
constexpr TypedWhichId< XFillStyleItem > XATTR_FILLSTYLE(XATTR_FILL_FIRST)
void ActivateLinear(bool bActivate)
Definition: tptrans.cxx:89
std::unique_ptr< weld::RadioButton > m_xRbtTransGradient
Definition: cuitabarea.hxx:147
constexpr OUStringLiteral PERCENT(u"Percent")
sal_uInt16 GetValue() const
XFillAttrSetItem aXFillAttr
Definition: cuitabarea.hxx:138
PageType
constexpr TypedWhichId< XFillHatchItem > XATTR_FILLHATCH(XATTR_FILL_FIRST+3)
std::unique_ptr< weld::MetricSpinButton > m_xMtrTrgrAngle
Definition: cuitabarea.hxx:160
constexpr TypedWhichId< XFillBackgroundItem > XATTR_FILLBACKGROUND(XATTR_FILL_FIRST+19)
std::unique_ptr< weld::MetricSpinButton > m_xMtrTrgrBorder
Definition: cuitabarea.hxx:161
std::unique_ptr< weld::RadioButton > m_xRbtTransOff
Definition: cuitabarea.hxx:145
std::unique_ptr< weld::Widget > m_xCtlBitmapBorder
Definition: cuitabarea.hxx:164
const Color & GetStartColor() const
IMPL_LINK(SvxTransparenceTabPage, ModifiedTrgrListBoxHdl_Impl, weld::ComboBox &, rListBox, void)
Definition: tptrans.cxx:103
sal_uInt16 GetYOffset() const
SvxXRectPreview m_aCtlXRectPreview
Definition: cuitabarea.hxx:142
static const WhichRangesContainer pTransparenceRanges
Definition: cuitabarea.hxx:129
void SetExchangeSupport()
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *)
Definition: tptrans.cxx:242
void InvalidatePreview(bool bEnable=true)
Definition: tptrans.cxx:482
void SetDlgType(sal_uInt16 nInType)
Definition: cuitabarea.hxx:200
std::unique_ptr< weld::CustomWeld > m_xCtlXRectPreview
Definition: cuitabarea.hxx:169
sal_uInt16 GetXOffset() const
void ModifiedTrgrHdl_Impl(const weld::ComboBox *)
Definition: tptrans.cxx:113
void SetPageType(PageType nInType)
Definition: cuitabarea.hxx:199
std::unique_ptr< weld::RadioButton > m_xRbtTransLinear
Definition: cuitabarea.hxx:146
IMPL_LINK_NOARG(SvxTransparenceTabPage, ClickTransOffHdl_Impl, weld::Toggleable &, void)
Definition: tptrans.cxx:48
void SetEndIntens(sal_uInt16 nNewIntens)
const SfxPoolItem * GetOldItem(const SfxItemSet &rSet, sal_uInt16 nSlot, bool bDeep=true)
virtual bool FillItemSet(SfxItemSet *) override
Definition: tptrans.cxx:247
const SfxItemSet & rOutAttrs
Definition: cuitabarea.hxx:131
UNDERLYING_TYPE get() const
sal_uInt16 GetBorder() const
constexpr TypedWhichId< XFillTransparenceItem > XATTR_FILLTRANSPARENCE(XATTR_FILL_FIRST+5)
constexpr TypedWhichId< XFillGradientItem > XATTR_FILLGRADIENT(XATTR_FILL_FIRST+2)
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
constexpr TypedWhichId< XFillBitmapItem > XATTR_FILLBITMAP(XATTR_FILL_FIRST+4)
SdrPercentItem makeSdrShadowTransparenceItem(sal_uInt16 nTransp)
std::unique_ptr< weld::MetricSpinButton > m_xMtrTrgrEndValue
Definition: cuitabarea.hxx:163
std::unique_ptr< weld::ComboBox > m_xLbTrgrGradientType
Definition: cuitabarea.hxx:154
const SfxItemSet * GetItemSet(const SfxPoolItem &rAttr)
void SetAttributes(const SfxItemSet &rItemSet)
bool InitPreview(const SfxItemSet &rSet)
Definition: tptrans.cxx:438
void SetStartIntens(sal_uInt16 nNewIntens)
css::awt::GradientStyle GetGradientStyle() const
constexpr TypedWhichId< XFillColorItem > XATTR_FILLCOLOR(XATTR_FILL_FIRST+1)
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
constexpr TypedWhichId< XFillFloatTransparenceItem > XATTR_FILLFLOATTRANSPARENCE(XATTR_FILL_FIRST+11)
SfxItemState
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
SvxXRectPreview m_aCtlBitmapPreview
Definition: cuitabarea.hxx:141
unsigned char sal_uInt8
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_WHITE
virtual ~SvxTransparenceTabPage() override
Definition: tptrans.cxx:85
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_BLACK
std::unique_ptr< weld::MetricSpinButton > m_xMtrTransparent
linear transparency
Definition: cuitabarea.hxx:150
virtual void PageCreated(const SfxAllItemSet &aSet) override
Definition: tptrans.cxx:508
SvxTransparenceTabPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rInAttrs)
Definition: tptrans.cxx:189
std::unique_ptr< weld::CustomWeld > m_xCtlBitmapPreview
Definition: cuitabarea.hxx:168
std::unique_ptr< weld::MetricSpinButton > m_xMtrTrgrCenterY
Definition: cuitabarea.hxx:158
void ActivateGradient(bool bActivate)
Definition: tptrans.cxx:140
DeactivateRC
virtual void ActivatePage(const SfxItemSet &rSet) override
Definition: tptrans.cxx:417
void SetEnabled(bool bEnable)
void SetControlState_Impl(css::awt::GradientStyle eXGS)
Definition: tptrans.cxx:151
const SfxPoolItem * GetItem(sal_uInt16 nWhich, bool bSearchInParent=true) const
std::unique_ptr< weld::Widget > m_xGridGradient
Definition: cuitabarea.hxx:153
const Color & GetEndColor() const
sal_uInt16 nPos
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
Definition: tptrans.cxx:429