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