LibreOffice Module svx (master)  1
sdrattributecreator.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 
21 #include <svl/itemset.hxx>
22 #include <svx/sdmetitm.hxx>
23 #include <svx/sdooitm.hxx>
24 #include <svx/sdprcitm.hxx>
25 #include <svx/xdef.hxx>
27 #include <svx/xlineit0.hxx>
28 #include <svx/xfillit0.hxx>
29 #include <svx/xflbmpit.hxx>
30 #include <svx/xlntrit.hxx>
31 #include <svx/xlnwtit.hxx>
32 #include <svx/xlinjoit.hxx>
33 #include <svx/xlncapit.hxx>
34 #include <svx/xlnclit.hxx>
35 #include <svx/xlnstwit.hxx>
36 #include <svx/xlnedwit.hxx>
37 #include <svx/xlnstit.hxx>
38 #include <svx/xlnstcit.hxx>
39 #include <svx/xlnedit.hxx>
40 #include <svx/xlnedcit.hxx>
41 #include <svx/xdash.hxx>
42 #include <svx/xlndsit.hxx>
43 #include <svx/xfltrit.hxx>
44 #include <svx/xflftrit.hxx>
45 #include <svx/xflclit.hxx>
46 #include <svx/xgrscit.hxx>
47 #include <svx/xflhtit.hxx>
48 #include <svx/xflbckit.hxx>
49 #include <svx/xflbmsxy.hxx>
50 #include <svx/xflbtoxy.hxx>
51 #include <svx/xflboxy.hxx>
52 #include <svx/xflbmtit.hxx>
53 #include <svx/xflbstit.hxx>
54 #include <svx/xtextit0.hxx>
56 #include <svx/svdotext.hxx>
58 #include <svx/xbtmpit.hxx>
59 #include <svl/itempool.hxx>
60 #include <vcl/svapp.hxx>
62 #include <svx/svx3ditems.hxx>
63 #include <com/sun/star/drawing/ProjectionMode.hpp>
64 #include <com/sun/star/drawing/ShadeMode.hpp>
66 #include <svx/rectenum.hxx>
67 #include <svx/sdtfchim.hxx>
68 #include <svx/svdoutl.hxx>
69 #include <svx/svdmodel.hxx>
70 #include <svx/xflbmsli.hxx>
71 #include <editeng/editstat.hxx>
72 #include <osl/diagnose.h>
84 #include <com/sun/star/drawing/LineCap.hpp>
85 
86 using namespace com::sun::star;
87 
88 namespace drawinglayer
89 {
90  namespace
91  {
92  attribute::GradientStyle XGradientStyleToGradientStyle(css::awt::GradientStyle eStyle)
93  {
94  switch(eStyle)
95  {
96  case css::awt::GradientStyle_LINEAR :
97  {
98  return attribute::GradientStyle::Linear;
99  }
100  case css::awt::GradientStyle_AXIAL :
101  {
102  return attribute::GradientStyle::Axial;
103  }
104  case css::awt::GradientStyle_RADIAL :
105  {
106  return attribute::GradientStyle::Radial;
107  }
108  case css::awt::GradientStyle_ELLIPTICAL :
109  {
110  return attribute::GradientStyle::Elliptical;
111  }
112  case css::awt::GradientStyle_SQUARE :
113  {
114  return attribute::GradientStyle::Square;
115  }
116  default :
117  {
118  return attribute::GradientStyle::Rect; // css::awt::GradientStyle_RECT
119  }
120  }
121  }
122 
123  attribute::HatchStyle XHatchStyleToHatchStyle(css::drawing::HatchStyle eStyle)
124  {
125  switch(eStyle)
126  {
127  case css::drawing::HatchStyle_SINGLE :
128  {
129  return attribute::HatchStyle::Single;
130  }
131  case css::drawing::HatchStyle_DOUBLE :
132  {
133  return attribute::HatchStyle::Double;
134  }
135  default :
136  {
137  return attribute::HatchStyle::Triple; // css::drawing::HatchStyle_TRIPLE
138  }
139  }
140  }
141 
142  basegfx::B2DLineJoin LineJointToB2DLineJoin(css::drawing::LineJoint eLineJoint)
143  {
144  switch(eLineJoint)
145  {
146  case css::drawing::LineJoint_BEVEL :
147  {
149  }
150  case css::drawing::LineJoint_MIDDLE :
151  case css::drawing::LineJoint_MITER :
152  {
154  }
155  case css::drawing::LineJoint_ROUND :
156  {
158  }
159  default : // css::drawing::LineJoint_NONE
160  {
162  }
163  }
164  }
165 
166  basegfx::B2DVector RectPointToB2DVector(RectPoint eRectPoint)
167  {
168  basegfx::B2DVector aRetval(0.0, 0.0);
169 
170  // position changes X
171  switch(eRectPoint)
172  {
173  case RectPoint::LT: case RectPoint::LM: case RectPoint::LB:
174  {
175  aRetval.setX(-1.0);
176  break;
177  }
178 
179  case RectPoint::RT: case RectPoint::RM: case RectPoint::RB:
180  {
181  aRetval.setX(1.0);
182  break;
183  }
184 
185  default :
186  {
187  break;
188  }
189  }
190 
191  // position changes Y
192  switch(eRectPoint)
193  {
194  case RectPoint::LT: case RectPoint::MT: case RectPoint::RT:
195  {
196  aRetval.setY(-1.0);
197  break;
198  }
199 
200  case RectPoint::LB: case RectPoint::MB: case RectPoint::RB:
201  {
202  aRetval.setY(1.0);
203  break;
204  }
205 
206  default :
207  {
208  break;
209  }
210  }
211 
212  return aRetval;
213  }
214 
215  attribute::SdrGlowAttribute createNewSdrGlowAttribute(const SfxItemSet& rSet)
216  {
217  sal_Int32 nRadius = rSet.Get(SDRATTR_GLOW_RADIUS).GetValue();
218  if (!nRadius)
219  return attribute::SdrGlowAttribute();
220  Color aColor(rSet.Get(SDRATTR_GLOW_COLOR).GetColorValue());
221  sal_uInt16 nTransparency(rSet.Get(SDRATTR_GLOW_TRANSPARENCY).GetValue());
222  if (nTransparency)
223  aColor.SetAlpha(255 - std::round(nTransparency / 100.0 * 255.0));
224 
225  attribute::SdrGlowAttribute glowAttr{ nRadius, aColor };
226  return glowAttr;
227  }
228 
229  sal_Int32 getSoftEdgeRadius(const SfxItemSet& rSet)
230  {
231  return rSet.Get(SDRATTR_SOFTEDGE_RADIUS).GetValue();
232  }
233  } // end of anonymous namespace
234 } // end of namespace drawinglayer
235 
236 
238 {
240  {
241  const css::drawing::LineStyle eStyle(rSet.Get(XATTR_LINESTYLE).GetValue());
242 
243  if(drawing::LineStyle_NONE != eStyle)
244  {
245  sal_uInt16 nTransparence(rSet.Get(XATTR_LINETRANSPARENCE).GetValue());
246 
247  if(nTransparence > 100)
248  {
249  nTransparence = 100;
250  }
251 
252  if(100 != nTransparence)
253  {
254  const sal_uInt32 nWidth(rSet.Get(XATTR_LINEWIDTH).GetValue());
255  const Color aColor(rSet.Get(XATTR_LINECOLOR).GetColorValue());
256  const css::drawing::LineJoint eJoint(rSet.Get(XATTR_LINEJOINT).GetValue());
257  const css::drawing::LineCap eCap(rSet.Get(XATTR_LINECAP).GetValue());
258  ::std::vector< double > aDotDashArray;
259  double fFullDotDashLen(0.0);
260 
261  if(drawing::LineStyle_DASH == eStyle)
262  {
263  const XDash& rDash = rSet.Get(XATTR_LINEDASH).GetDashValue();
264 
265  if(rDash.GetDots() || rDash.GetDashes())
266  {
267  fFullDotDashLen = rDash.CreateDotDashArray(aDotDashArray, static_cast<double>(nWidth));
268  }
269  }
270 
272  LineJointToB2DLineJoin(eJoint),
273  static_cast<double>(nWidth),
274  static_cast<double>(nTransparence) * 0.01,
275  aColor.getBColor(),
276  eCap,
277  aDotDashArray,
278  fFullDotDashLen);
279  }
280  }
281 
283  }
284 
286  const SfxItemSet& rSet,
287  double fWidth)
288  {
289  const sal_Int32 nTempStartWidth(rSet.Get(XATTR_LINESTARTWIDTH).GetValue());
290  const sal_Int32 nTempEndWidth(rSet.Get(XATTR_LINEENDWIDTH).GetValue());
291  basegfx::B2DPolyPolygon aStartPolyPolygon;
292  basegfx::B2DPolyPolygon aEndPolyPolygon;
293  double fStartWidth(0.0);
294  double fEndWidth(0.0);
295  bool bStartActive(false);
296  bool bEndActive(false);
297  bool bStartCentered(true);
298  bool bEndCentered(true);
299 
300  if(nTempStartWidth)
301  {
302  if(nTempStartWidth < 0)
303  {
304  fStartWidth = (static_cast<double>(-nTempStartWidth) * fWidth) * 0.01;
305  }
306  else
307  {
308  fStartWidth = static_cast<double>(nTempStartWidth);
309  }
310 
311  if(0.0 != fStartWidth)
312  {
313  aStartPolyPolygon = rSet.Get(XATTR_LINESTART).GetLineStartValue();
314 
315  if(aStartPolyPolygon.count() && aStartPolyPolygon.getB2DPolygon(0).count())
316  {
317  bStartActive = true;
318  bStartCentered = rSet.Get(XATTR_LINESTARTCENTER).GetValue();
319  }
320  }
321  }
322 
323  if(nTempEndWidth)
324  {
325  if(nTempEndWidth < 0)
326  {
327  fEndWidth = (static_cast<double>(-nTempEndWidth) * fWidth) * 0.01;
328  }
329  else
330  {
331  fEndWidth = static_cast<double>(nTempEndWidth);
332  }
333 
334  if(0.0 != fEndWidth)
335  {
336  aEndPolyPolygon = rSet.Get(XATTR_LINEEND).GetLineEndValue();
337 
338  if(aEndPolyPolygon.count() && aEndPolyPolygon.getB2DPolygon(0).count())
339  {
340  bEndActive = true;
341  bEndCentered = rSet.Get(XATTR_LINEENDCENTER).GetValue();
342  }
343  }
344  }
345 
346  if(bStartActive || bEndActive)
347  {
349  aStartPolyPolygon, aEndPolyPolygon, fStartWidth, fEndWidth,
350  bStartActive, bEndActive, bStartCentered, bEndCentered);
351  }
352 
354  }
355 
357  {
358  const bool bShadow(rSet.Get(SDRATTR_SHADOW).GetValue());
359 
360  if(bShadow)
361  {
362  sal_uInt16 nTransparence(rSet.Get(SDRATTR_SHADOWTRANSPARENCE).GetValue());
363 
364  if(nTransparence > 100)
365  {
366  nTransparence = 100;
367  }
368 
369  if(nTransparence)
370  {
371  sal_uInt16 nFillTransparence(rSet.Get(XATTR_FILLTRANSPARENCE).GetValue());
372 
373  if(nFillTransparence > 100)
374  {
375  nFillTransparence = 100;
376  }
377 
378  if(nTransparence == nFillTransparence)
379  {
380  // shadow does not really have an own transparence, but the application
381  // sets the shadow transparence equal to the object transparence for
382  // convenience. This is not useful for primitive creation, so take
383  // this as no shadow transparence
384  nTransparence = 0;
385  }
386  }
387 
388  if(100 != nTransparence)
389  {
390  const basegfx::B2DVector aOffset(
391  static_cast<double>(rSet.Get(SDRATTR_SHADOWXDIST).GetValue()),
392  static_cast<double>(rSet.Get(SDRATTR_SHADOWYDIST).GetValue()));
393 
394  const basegfx::B2DVector aSize(
395  static_cast<double>(rSet.Get(SDRATTR_SHADOWSIZEX).GetValue()),
396  static_cast<double>(rSet.Get(SDRATTR_SHADOWSIZEY).GetValue()));
397 
398  const Color aColor(rSet.Get(SDRATTR_SHADOWCOLOR).GetColorValue());
399 
400  sal_Int32 nBlur(rSet.Get(SDRATTR_SHADOWBLUR).GetValue());
401 
402  return attribute::SdrShadowAttribute(aOffset, aSize, static_cast<double>(nTransparence) * 0.01,nBlur, aColor.getBColor());
403  }
404  }
405 
407  }
408 
410  {
411  const drawing::FillStyle eStyle(rSet.Get(XATTR_FILLSTYLE).GetValue());
412 
413  sal_uInt16 nTransparence(rSet.Get(XATTR_FILLTRANSPARENCE).GetValue());
414 
415  if(nTransparence > 100)
416  {
417  nTransparence = 100;
418  }
419 
420  if(drawing::FillStyle_NONE != eStyle)
421  {
422  if(100 != nTransparence)
423  {
424  // need to check XFillFloatTransparence, object fill may still be completely transparent
425  const SfxPoolItem* pGradientItem;
426 
427  if(SfxItemState::SET == rSet.GetItemState(XATTR_FILLFLOATTRANSPARENCE, true, &pGradientItem)
428  && static_cast<const XFillFloatTransparenceItem*>(pGradientItem)->IsEnabled())
429  {
430  const XGradient& rGradient = static_cast<const XFillFloatTransparenceItem*>(pGradientItem)->GetGradientValue();
431  const sal_uInt8 nStartLuminance(rGradient.GetStartColor().GetLuminance());
432  const sal_uInt8 nEndLuminance(rGradient.GetEndColor().GetLuminance());
433  const bool bCompletelyTransparent(0xff == nStartLuminance && 0xff == nEndLuminance);
434 
435  if(bCompletelyTransparent)
436  {
437  nTransparence = 100;
438  }
439  }
440  }
441 
442  if(100 != nTransparence)
443  {
444  const Color aColor(rSet.Get(XATTR_FILLCOLOR).GetColorValue());
448 
449  switch(eStyle)
450  {
451  default:
452  {
453  // nothing to do, color is defined
454  break;
455  }
456  case drawing::FillStyle_GRADIENT :
457  {
458  XGradient aXGradient(rSet.Get(XATTR_FILLGRADIENT).GetGradientValue());
459 
460  const Color aStartColor(aXGradient.GetStartColor());
461  const sal_uInt16 nStartIntens(aXGradient.GetStartIntens());
462  basegfx::BColor aStart(aStartColor.getBColor());
463 
464  if(nStartIntens != 100)
465  {
466  const basegfx::BColor aBlack;
467  aStart = interpolate(aBlack, aStart, static_cast<double>(nStartIntens) * 0.01);
468  }
469 
470  const Color aEndColor(aXGradient.GetEndColor());
471  const sal_uInt16 nEndIntens(aXGradient.GetEndIntens());
472  basegfx::BColor aEnd(aEndColor.getBColor());
473 
474  if(nEndIntens != 100)
475  {
476  const basegfx::BColor aBlack;
477  aEnd = interpolate(aBlack, aEnd, static_cast<double>(nEndIntens) * 0.01);
478  }
479 
481  XGradientStyleToGradientStyle(aXGradient.GetGradientStyle()),
482  static_cast<double>(aXGradient.GetBorder()) * 0.01,
483  static_cast<double>(aXGradient.GetXOffset()) * 0.01,
484  static_cast<double>(aXGradient.GetYOffset()) * 0.01,
485  static_cast<double>(aXGradient.GetAngle().get()) * F_PI1800,
486  aStart,
487  aEnd,
488  rSet.Get(XATTR_GRADIENTSTEPCOUNT).GetValue());
489 
490  break;
491  }
492  case drawing::FillStyle_HATCH :
493  {
494  const XHatch& rHatch(rSet.Get(XATTR_FILLHATCH).GetHatchValue());
495  const Color aColorB(rHatch.GetColor());
496 
498  XHatchStyleToHatchStyle(rHatch.GetHatchStyle()),
499  static_cast<double>(rHatch.GetDistance()),
500  static_cast<double>(rHatch.GetAngle().get()) * F_PI1800,
501  aColorB.getBColor(),
502  3, // same default as VCL, a minimum of three discrete units (pixels) offset
503  rSet.Get(XATTR_FILLBACKGROUND).GetValue());
504 
505  break;
506  }
507  case drawing::FillStyle_BITMAP :
508  {
509  aFillGraphic = createNewSdrFillGraphicAttribute(rSet);
510  break;
511  }
512  }
513 
515  static_cast<double>(nTransparence) * 0.01,
516  aColor.getBColor(),
517  aGradient,
518  aHatch,
519  aFillGraphic);
520  }
521  }
522 
523  if(nTransparence == 100)
524  {
529  1,
530  basegfx::BColor( 0, 0, 0 ),
531  aGradient,
532  aHatch,
533  aFillGraphic);
534  }
535 
537  }
538 
539  // #i101508# Support handing over given text-to-border distances
541  const SfxItemSet& rSet,
542  const SdrText& rText,
543  const sal_Int32* pLeft,
544  const sal_Int32* pUpper,
545  const sal_Int32* pRight,
546  const sal_Int32* pLower)
547  {
548  const SdrTextObj& rTextObj = rText.GetObject();
549 
550  // Save chaining attributes
551  bool bChainable = rTextObj.IsChainable();
552 
553 
554  if(rText.GetOutlinerParaObject())
555  {
556  // added TextEdit text suppression
557  bool bInEditMode(false);
558 
559  if(rText.GetObject().getTextCount() > 1)
560  {
561  bInEditMode = rTextObj.IsInEditMode() && rText.GetObject().getActiveText() == &rText;
562  }
563  else
564  {
565  bInEditMode = rTextObj.IsInEditMode();
566  }
567 
568  OutlinerParaObject aOutlinerParaObject(*rText.GetOutlinerParaObject());
569 
570  if(bInEditMode)
571  {
572  std::unique_ptr<OutlinerParaObject> pTempObj = rTextObj.CreateEditOutlinerParaObject();
573 
574  if(pTempObj)
575  {
576  aOutlinerParaObject = *pTempObj;
577  }
578  else
579  {
580  // #i100537#
581  // CreateEditOutlinerParaObject() returning no object does not mean that
582  // text edit mode is not active. Do not reset the flag here
583  // bInEditMode = false;
584  }
585  }
586 
587  const SdrTextAniKind eAniKind(rTextObj.GetTextAniKind());
588 
589  // #i107346#
590  const SdrOutliner& rDrawTextOutliner(rText.GetObject().getSdrModelFromSdrObject().GetDrawOutliner(&rTextObj));
591  const bool bWrongSpell(rDrawTextOutliner.GetControlWord() & EEControlBits::ONLINESPELLING);
592 
594  rText,
595  aOutlinerParaObject,
596  rSet.Get(XATTR_FORMTXTSTYLE).GetValue(),
597  pLeft ? *pLeft : rTextObj.GetTextLeftDistance(),
598  pUpper ? *pUpper : rTextObj.GetTextUpperDistance(),
599  pRight ? *pRight : rTextObj.GetTextRightDistance(),
600  pLower ? *pLower : rTextObj.GetTextLowerDistance(),
601  rTextObj.GetTextHorizontalAdjust(rSet),
602  rTextObj.GetTextVerticalAdjust(rSet),
603  rSet.Get(SDRATTR_TEXT_CONTOURFRAME).GetValue(),
604  rTextObj.IsFitToSize(),
605  rTextObj.IsAutoFit(),
606  rSet.Get(XATTR_FORMTXTHIDEFORM).GetValue(),
607  SdrTextAniKind::Blink == eAniKind,
608  SdrTextAniKind::Scroll == eAniKind || SdrTextAniKind::Alternate == eAniKind || SdrTextAniKind::Slide == eAniKind,
609  bInEditMode,
610  rSet.Get(SDRATTR_TEXT_USEFIXEDCELLHEIGHT).GetValue(),
611  bWrongSpell,
612  bChainable);
613  }
614 
616  }
617 
619  {
620  const SfxPoolItem* pGradientItem;
621 
622  if(SfxItemState::SET == rSet.GetItemState(XATTR_FILLFLOATTRANSPARENCE, true, &pGradientItem)
623  && static_cast<const XFillFloatTransparenceItem*>(pGradientItem)->IsEnabled())
624  {
625  // test if float transparence is completely transparent
626  const XGradient& rGradient = static_cast<const XFillFloatTransparenceItem*>(pGradientItem)->GetGradientValue();
627  const sal_uInt8 nStartLuminance(rGradient.GetStartColor().GetLuminance());
628  const sal_uInt8 nEndLuminance(rGradient.GetEndColor().GetLuminance());
629  const bool bCompletelyTransparent(0xff == nStartLuminance && 0xff == nEndLuminance);
630  const bool bNotTransparent(0x00 == nStartLuminance && 0x00 == nEndLuminance);
631 
632  // create nothing when completely transparent: This case is already checked for the
633  // normal fill attributes, XFILL_NONE will be used.
634  // create nothing when not transparent: use normal fill, no need t create a FillGradientAttribute.
635  // Both cases are optimizations, always creating FillGradientAttribute will work, too
636  if(!bNotTransparent && !bCompletelyTransparent)
637  {
638  const double fStartLum(nStartLuminance / 255.0);
639  const double fEndLum(nEndLuminance / 255.0);
640 
642  XGradientStyleToGradientStyle(rGradient.GetGradientStyle()),
643  static_cast<double>(rGradient.GetBorder()) * 0.01,
644  static_cast<double>(rGradient.GetXOffset()) * 0.01,
645  static_cast<double>(rGradient.GetYOffset()) * 0.01,
646  static_cast<double>(rGradient.GetAngle().get()) * F_PI1800,
647  basegfx::BColor(fStartLum, fStartLum, fStartLum),
648  basegfx::BColor(fEndLum, fEndLum, fEndLum));
649  }
650  }
651 
653  }
654 
656  {
657  Graphic aGraphic(rSet.Get(XATTR_FILLBITMAP).GetGraphicObject().GetGraphic());
658 
659  if(GraphicType::Bitmap != aGraphic.GetType() && GraphicType::GdiMetafile != aGraphic.GetType())
660  {
661  // no content if not bitmap or metafile
662  OSL_ENSURE(false, "No fill graphic in SfxItemSet (!)");
664  }
665 
666  Size aPrefSize(aGraphic.GetPrefSize());
667 
668  if(!aPrefSize.Width() || !aPrefSize.Height())
669  {
670  // if there is no logical size, create a size from pixel size and set MapMode accordingly
671  if(GraphicType::Bitmap == aGraphic.GetType())
672  {
673  aGraphic.SetPrefSize(aGraphic.GetBitmapEx().GetSizePixel());
674  aGraphic.SetPrefMapMode(MapMode(MapUnit::MapPixel));
675  aPrefSize = aGraphic.GetPrefSize();
676  }
677  }
678 
679  if(!aPrefSize.Width() || !aPrefSize.Height())
680  {
681  // no content if no size
682  OSL_ENSURE(false, "Graphic has no size in SfxItemSet (!)");
684  }
685 
686  // convert size and MapMode to destination logical size and MapMode
687  const MapUnit aDestinationMapUnit(rSet.GetPool()->GetMetric(0));
688  basegfx::B2DVector aGraphicLogicSize(aGraphic.GetPrefSize().Width(), aGraphic.GetPrefSize().Height());
689 
690  if (aGraphic.GetPrefMapMode().GetMapUnit() != aDestinationMapUnit)
691  {
692  // #i100360# for MapUnit::MapPixel, LogicToLogic will not work properly,
693  // so fallback to Application::GetDefaultDevice()
694  Size aNewSize(0, 0);
695 
696  if(MapUnit::MapPixel == aGraphic.GetPrefMapMode().GetMapUnit())
697  {
699  aGraphic.GetPrefSize(),
700  MapMode(aDestinationMapUnit));
701  }
702  else
703  {
704  aNewSize = OutputDevice::LogicToLogic(
705  aGraphic.GetPrefSize(),
706  aGraphic.GetPrefMapMode(),
707  MapMode(aDestinationMapUnit));
708  }
709 
710  // #i124002# do not set new size using SetPrefSize at the graphic, this will lead to problems.
711  // Instead, adapt the GraphicLogicSize which will be used for further decompositions
712  aGraphicLogicSize = basegfx::B2DVector(aNewSize.Width(), aNewSize.Height());
713  }
714 
715  // get size
716  const basegfx::B2DVector aSize(
717  static_cast<double>(rSet.Get(XATTR_FILLBMP_SIZEX).GetValue()),
718  static_cast<double>(rSet.Get(XATTR_FILLBMP_SIZEY).GetValue()));
719  const basegfx::B2DVector aOffset(
720  static_cast<double>(rSet.Get(XATTR_FILLBMP_TILEOFFSETX).GetValue()),
721  static_cast<double>(rSet.Get(XATTR_FILLBMP_TILEOFFSETY).GetValue()));
722  const basegfx::B2DVector aOffsetPosition(
723  static_cast<double>(rSet.Get(XATTR_FILLBMP_POSOFFSETX).GetValue()),
724  static_cast<double>(rSet.Get(XATTR_FILLBMP_POSOFFSETY).GetValue()));
725 
727  aGraphic,
728  aGraphicLogicSize,
729  aSize,
730  aOffset,
731  aOffsetPosition,
732  RectPointToB2DVector(rSet.GetItem<XFillBmpPosItem>(XATTR_FILLBMP_POS)->GetValue()),
733  rSet.Get(XATTR_FILLBMP_TILE).GetValue(),
734  rSet.Get(XATTR_FILLBMP_STRETCH).GetValue(),
735  rSet.Get(XATTR_FILLBMP_SIZELOG).GetValue());
736  }
737 
739  const SfxItemSet& rSet,
740  const SdrText* pText,
741  bool bSuppressText)
742  {
744 
745  // #i98072# added option to suppress text
746  // look for text first
747  if(!bSuppressText && pText)
748  {
749  aText = createNewSdrTextAttribute(rSet, *pText);
750  }
751 
752  // try shadow
754  const attribute::SdrGlowAttribute aGlow(createNewSdrGlowAttribute(rSet));
755  const sal_Int32 nSoftEdgeRadius(getSoftEdgeRadius(rSet));
756 
757  return attribute::SdrEffectsTextAttribute(aShadow, aText, aGlow, nSoftEdgeRadius);
758  }
759 
761  const SfxItemSet& rSet,
762  const SdrText* pText)
763  {
767  bool bFontworkHideContour(false);
768 
769  // look for text first
770  if(pText)
771  {
772  aText = createNewSdrTextAttribute(rSet, *pText);
773 
774  // when object has text and text is fontwork and hide contour is set for fontwork, force
775  // line and fill style to empty
776  if(!aText.isDefault()
777  && !aText.getSdrFormTextAttribute().isDefault()
778  && aText.isHideContour())
779  {
780  bFontworkHideContour = true;
781  }
782  }
783 
784  // try line style
785  if(!bFontworkHideContour)
786  {
787  aLine = createNewSdrLineAttribute(rSet);
788 
789  if(!aLine.isDefault())
790  {
791  // try LineStartEnd
792  aLineStartEnd = createNewSdrLineStartEndAttribute(rSet, aLine.getWidth());
793  }
794  }
795 
796  if(!aLine.isDefault() || !aText.isDefault())
797  {
798  // try shadow
800  const attribute::SdrGlowAttribute aGlow = createNewSdrGlowAttribute(rSet);
801  const sal_Int32 nSoftEdgeRadius(getSoftEdgeRadius(rSet));
802 
803  return attribute::SdrLineEffectsTextAttribute(aLine, aLineStartEnd, aShadow, aText,
804  aGlow, nSoftEdgeRadius);
805  }
806 
808  }
809 
811  const SfxItemSet& rSet,
812  const SdrText* pText,
813  bool bHasContent)
814  {
818  attribute::FillGradientAttribute aFillFloatTransGradient;
820  bool bFontworkHideContour(false);
821 
822  // look for text first
823  if(pText)
824  {
825  aText = createNewSdrTextAttribute(rSet, *pText);
826 
827  // when object has text and text is fontwork and hide contour is set for fontwork, force
828  // line and fill style to empty
829  if(!aText.getSdrFormTextAttribute().isDefault() && aText.isHideContour())
830  {
831  bFontworkHideContour = true;
832  }
833  }
834 
835  if(!bFontworkHideContour)
836  {
837  // try line style
838  aLine = createNewSdrLineAttribute(rSet);
839 
840  if(!aLine.isDefault())
841  {
842  // try LineStartEnd
843  aLineStartEnd = createNewSdrLineStartEndAttribute(rSet, aLine.getWidth());
844  }
845 
846  // try fill style
847  aFill = createNewSdrFillAttribute(rSet);
848 
849  if(!aFill.isDefault())
850  {
851  // try fillfloattransparence
852  aFillFloatTransGradient = createNewTransparenceGradientAttribute(rSet);
853  }
854  }
855 
856  // bHasContent is used from OLE and graphic objects. Normally a possible shadow
857  // depends on line, fill or text to be set, but for these objects it is possible
858  // to have none of these, but still content which needs to have a shadow (if set),
859  // so shadow needs to be tried
860  if(bHasContent || !aLine.isDefault() || !aFill.isDefault() || !aText.isDefault())
861  {
862  // try shadow
864 
865  // glow
866  const attribute::SdrGlowAttribute aGlow = createNewSdrGlowAttribute(rSet);
867 
868  const sal_Int32 nSoftEdgeRadius(getSoftEdgeRadius(rSet));
869 
870  return attribute::SdrLineFillEffectsTextAttribute(aLine, aFill, aLineStartEnd,
871  aShadow, aFillFloatTransGradient,
872  aText, aGlow, nSoftEdgeRadius);
873  }
874 
876  }
877 
879  {
883  attribute::FillGradientAttribute aFillFloatTransGradient;
884 
885  // try line style
887 
888  if(!aLine.isDefault())
889  {
890  // try LineStartEnd
891  aLineStartEnd = createNewSdrLineStartEndAttribute(rSet, aLine.getWidth());
892  }
893 
894  // try fill style
895  if(!bSuppressFill)
896  {
897  aFill = createNewSdrFillAttribute(rSet);
898 
899  if(!aFill.isDefault())
900  {
901  // try fillfloattransparence
902  aFillFloatTransGradient = createNewTransparenceGradientAttribute(rSet);
903  }
904  }
905 
906  if(!aLine.isDefault() || !aFill.isDefault())
907  {
908  // try shadow
909  aShadow = createNewSdrShadowAttribute(rSet);
910 
912  aLine, aFill, aLineStartEnd, aShadow, aFillFloatTransGradient);
913  }
914 
916  }
917 
919  {
920  // get perspective
921  css::drawing::ProjectionMode aProjectionMode(css::drawing::ProjectionMode_PARALLEL);
922  const sal_uInt16 nProjectionValue(rSet.Get(SDRATTR_3DSCENE_PERSPECTIVE).GetValue());
923 
924  if(1 == nProjectionValue)
925  {
926  aProjectionMode = css::drawing::ProjectionMode_PERSPECTIVE;
927  }
928 
929  // get distance
930  const double fDistance(rSet.Get(SDRATTR_3DSCENE_DISTANCE).GetValue());
931 
932  // get shadow slant
933  const double fShadowSlant(
935 
936  // get shade mode
937  css::drawing::ShadeMode aShadeMode(css::drawing::ShadeMode_FLAT);
938  const sal_uInt16 nShadeValue(rSet.Get(SDRATTR_3DSCENE_SHADE_MODE).GetValue());
939 
940  if(1 == nShadeValue)
941  {
942  aShadeMode = css::drawing::ShadeMode_PHONG;
943  }
944  else if(2 == nShadeValue)
945  {
946  aShadeMode = css::drawing::ShadeMode_SMOOTH;
947  }
948  else if(3 == nShadeValue)
949  {
950  aShadeMode = css::drawing::ShadeMode_DRAFT;
951  }
952 
953  // get two sided lighting
954  const bool bTwoSidedLighting(rSet.Get(SDRATTR_3DSCENE_TWO_SIDED_LIGHTING).GetValue());
955 
956  return attribute::SdrSceneAttribute(fDistance, fShadowSlant, aProjectionMode, aShadeMode, bTwoSidedLighting);
957  }
958 
960  {
961  // extract lights from given SfxItemSet (from scene)
962  ::std::vector< attribute::Sdr3DLightAttribute > aLightVector;
963 
964  if(rSet.Get(SDRATTR_3DSCENE_LIGHTON_1).GetValue())
965  {
966  const basegfx::BColor aColor(rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_1).GetValue().getBColor());
968  aLightVector.emplace_back(aColor, aDirection, true);
969  }
970 
971  if(rSet.Get(SDRATTR_3DSCENE_LIGHTON_2).GetValue())
972  {
973  const basegfx::BColor aColor(rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_2).GetValue().getBColor());
975  aLightVector.emplace_back(aColor, aDirection, false);
976  }
977 
978  if(rSet.Get(SDRATTR_3DSCENE_LIGHTON_3).GetValue())
979  {
980  const basegfx::BColor aColor(rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_3).GetValue().getBColor());
982  aLightVector.emplace_back(aColor, aDirection, false);
983  }
984 
985  if(rSet.Get(SDRATTR_3DSCENE_LIGHTON_4).GetValue())
986  {
987  const basegfx::BColor aColor(rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_4).GetValue().getBColor());
989  aLightVector.emplace_back(aColor, aDirection, false);
990  }
991 
992  if(rSet.Get(SDRATTR_3DSCENE_LIGHTON_5).GetValue())
993  {
994  const basegfx::BColor aColor(rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_5).GetValue().getBColor());
996  aLightVector.emplace_back(aColor, aDirection, false);
997  }
998 
999  if(rSet.Get(SDRATTR_3DSCENE_LIGHTON_6).GetValue())
1000  {
1001  const basegfx::BColor aColor(rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_6).GetValue().getBColor());
1003  aLightVector.emplace_back(aColor, aDirection, false);
1004  }
1005 
1006  if(rSet.Get(SDRATTR_3DSCENE_LIGHTON_7).GetValue())
1007  {
1008  const basegfx::BColor aColor(rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_7).GetValue().getBColor());
1010  aLightVector.emplace_back(aColor, aDirection, false);
1011  }
1012 
1013  if(rSet.Get(SDRATTR_3DSCENE_LIGHTON_8).GetValue())
1014  {
1015  const basegfx::BColor aColor(rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_8).GetValue().getBColor());
1017  aLightVector.emplace_back(aColor, aDirection, false);
1018  }
1019 
1020  // get ambient color
1021  const Color aAmbientValue(rSet.Get(SDRATTR_3DSCENE_AMBIENTCOLOR).GetValue());
1022  const basegfx::BColor aAmbientLight(aAmbientValue.getBColor());
1023 
1024  return attribute::SdrLightingAttribute(aAmbientLight, aLightVector);
1025  }
1026 
1027  void calculateRelativeCornerRadius(sal_Int32 nRadius, const basegfx::B2DRange& rObjectRange, double& rfCornerRadiusX, double& rfCornerRadiusY)
1028  {
1029  rfCornerRadiusX = rfCornerRadiusY = static_cast<double>(nRadius);
1030 
1031  if(0.0 != rfCornerRadiusX)
1032  {
1033  const double fHalfObjectWidth(rObjectRange.getWidth() * 0.5);
1034 
1035  if(0.0 != fHalfObjectWidth)
1036  {
1037  if(rfCornerRadiusX < 0.0)
1038  {
1039  rfCornerRadiusX = 0.0;
1040  }
1041 
1042  if(rfCornerRadiusX > fHalfObjectWidth)
1043  {
1044  rfCornerRadiusX = fHalfObjectWidth;
1045  }
1046 
1047  rfCornerRadiusX /= fHalfObjectWidth;
1048  }
1049  else
1050  {
1051  rfCornerRadiusX = 0.0;
1052  }
1053  }
1054 
1055  if(0.0 == rfCornerRadiusY)
1056  return;
1057 
1058  const double fHalfObjectHeight(rObjectRange.getHeight() * 0.5);
1059 
1060  if(0.0 != fHalfObjectHeight)
1061  {
1062  if(rfCornerRadiusY < 0.0)
1063  {
1064  rfCornerRadiusY = 0.0;
1065  }
1066 
1067  if(rfCornerRadiusY > fHalfObjectHeight)
1068  {
1069  rfCornerRadiusY = fHalfObjectHeight;
1070  }
1071 
1072  rfCornerRadiusY /= fHalfObjectHeight;
1073  }
1074  else
1075  {
1076  rfCornerRadiusY = 0.0;
1077  }
1078  }
1079 
1080  // #i101508# Support handing over given text-to-border distances
1082  const SfxItemSet& rSet,
1083  const SdrText* pText,
1084  const sal_Int32* pLeft,
1085  const sal_Int32* pUpper,
1086  const sal_Int32* pRight,
1087  const sal_Int32* pLower)
1088  {
1090  attribute::FillGradientAttribute aFillFloatTransGradient;
1092  bool bFontworkHideContour(false);
1093 
1094  // look for text first
1095  if(pText)
1096  {
1097  aText = createNewSdrTextAttribute(rSet, *pText, pLeft, pUpper, pRight, pLower);
1098 
1099  // when object has text and text is fontwork and hide contour is set for fontwork, force
1100  // fill style to empty
1101  if(!aText.getSdrFormTextAttribute().isDefault() && aText.isHideContour())
1102  {
1103  bFontworkHideContour = true;
1104  }
1105  }
1106 
1107  if(!bFontworkHideContour)
1108  {
1109  // try fill style
1110  aFill = createNewSdrFillAttribute(rSet);
1111 
1112  if(!aFill.isDefault())
1113  {
1114  // try fillfloattransparence
1115  aFillFloatTransGradient = createNewTransparenceGradientAttribute(rSet);
1116  }
1117  }
1118 
1119  if(!aFill.isDefault() || !aText.isDefault())
1120  {
1121  return attribute::SdrFillTextAttribute(aFill, aFillFloatTransGradient, aText);
1122  }
1123 
1125  }
1126 
1127 } // end of namespace
1128 
1129 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SdrOutliner & GetDrawOutliner(const SdrTextObj *pObj=nullptr) const
Definition: svdmodel.cxx:645
constexpr TypedWhichId< XColorItem > SDRATTR_GLOW_COLOR(SDRATTR_GLOW_FIRST+1)
constexpr TypedWhichId< XFormTextHideFormItem > XATTR_FORMTXTHIDEFORM(XATTR_TEXT_FIRST+10)
tools::Long GetTextLowerDistance() const
Bottom inner spacing to borders.
Definition: svdotext.cxx:1750
constexpr TypedWhichId< SfxBoolItem > SDRATTR_3DSCENE_LIGHTON_4(SDRATTR_3DSCENE_FIRST+16)
constexpr TypedWhichId< SdrPercentItem > SDRATTR_SHADOWTRANSPARENCE(SDRATTR_SHADOW_FIRST+4)
constexpr TypedWhichId< SvxB3DVectorItem > SDRATTR_3DSCENE_LIGHTDIRECTION_5(SDRATTR_3DSCENE_FIRST+25)
constexpr TypedWhichId< XLineEndItem > XATTR_LINEEND(XATTR_LINE_FIRST+5)
constexpr TypedWhichId< XLineEndCenterItem > XATTR_LINEENDCENTER(XATTR_LINE_FIRST+9)
void SetAlpha(sal_uInt8 nAlpha)
constexpr TypedWhichId< XFillBmpTileOffsetYItem > XATTR_FILLBMP_TILEOFFSETY(XATTR_FILL_FIRST+15)
constexpr TypedWhichId< XLineStartItem > XATTR_LINESTART(XATTR_LINE_FIRST+4)
bool IsChainable() const
Definition: svdotext.cxx:1939
Degree10 GetAngle() const
Definition: xgrad.hxx:71
double getHeight() const
constexpr TypedWhichId< SvxB3DVectorItem > SDRATTR_3DSCENE_LIGHTDIRECTION_2(SDRATTR_3DSCENE_FIRST+22)
constexpr TypedWhichId< XLineJointItem > XATTR_LINEJOINT(XATTR_LINE_FIRST+11)
attribute::SdrFillAttribute createNewSdrFillAttribute(const SfxItemSet &rSet)
SAL_WARN_UNUSED_RESULT Point LogicToLogic(const Point &rPtSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
constexpr TypedWhichId< SvxColorItem > SDRATTR_3DSCENE_LIGHTCOLOR_5(SDRATTR_3DSCENE_FIRST+8)
attribute::SdrLineEffectsTextAttribute createNewSdrLineEffectsTextAttribute(const SfxItemSet &rSet, const SdrText *pText)
enum SAL_DLLPUBLIC_RTTI FillStyle
constexpr TypedWhichId< SfxMetricItem > XATTR_FILLBMP_SIZEX(XATTR_FILL_FIRST+9)
tools::Long GetTextLeftDistance() const
Left inner spacing to borders.
Definition: svdotext.cxx:1735
constexpr TypedWhichId< SdrOnOffItem > SDRATTR_TEXT_CONTOURFRAME(SDRATTR_MISC_FIRST+21)
#define F_PI1800
constexpr TypedWhichId< XFillStyleItem > XATTR_FILLSTYLE(XATTR_FILL_FIRST)
sal_uInt8 GetLuminance() const
constexpr TypedWhichId< XLineWidthItem > XATTR_LINEWIDTH(XATTR_LINE_FIRST+2)
bool IsInEditMode() const
Definition: svdotext.hxx:314
attribute::SdrFillGraphicAttribute createNewSdrFillGraphicAttribute(const SfxItemSet &rSet)
SdrTextAniKind GetTextAniKind() const
Definition: svdotext.cxx:1755
constexpr TypedWhichId< XLineStyleItem > XATTR_LINESTYLE(XATTR_LINE_FIRST)
constexpr TypedWhichId< XLineDashItem > XATTR_LINEDASH(XATTR_LINE_FIRST+1)
constexpr TypedWhichId< XFillHatchItem > XATTR_FILLHATCH(XATTR_FILL_FIRST+3)
constexpr TypedWhichId< SfxBoolItem > SDRATTR_3DSCENE_LIGHTON_7(SDRATTR_3DSCENE_FIRST+19)
constexpr TypedWhichId< XFillBackgroundItem > XATTR_FILLBACKGROUND(XATTR_FILL_FIRST+19)
constexpr TypedWhichId< SfxBoolItem > SDRATTR_3DSCENE_LIGHTON_2(SDRATTR_3DSCENE_FIRST+14)
SdrTextAniKind
Animation type for text frame.
Definition: sdtakitm.hxx:29
static OutputDevice * GetDefaultDevice()
HSLColor interpolate(const HSLColor &rFrom, const HSLColor &rTo, double t, bool bCCW)
const Color & GetStartColor() const
Definition: xgrad.hxx:69
constexpr TypedWhichId< XLineTransparenceItem > XATTR_LINETRANSPARENCE(XATTR_LINE_FIRST+10)
constexpr tools::Long Width() const
virtual MapUnit GetMetric(sal_uInt16 nWhich) const
attribute::SdrLineFillShadowAttribute3D createNewSdrLineFillShadowAttribute(const SfxItemSet &rSet, bool bSuppressFill)
constexpr TypedWhichId< SfxUInt32Item > SDRATTR_3DSCENE_DISTANCE(SDRATTR_3DSCENE_FIRST+1)
B2DPolygon const & getB2DPolygon(sal_uInt32 nIndex) const
sal_uInt16 GetYOffset() const
Definition: xgrad.hxx:74
SdrTextHorzAdjust GetTextHorizontalAdjust(const SfxItemSet &rSet) const
Definition: svdotext.cxx:364
constexpr TypedWhichId< SfxUInt16Item > SDRATTR_3DSCENE_SHADOW_SLANT(SDRATTR_3DSCENE_FIRST+29)
constexpr TypedWhichId< SvxColorItem > SDRATTR_3DSCENE_LIGHTCOLOR_3(SDRATTR_3DSCENE_FIRST+6)
Definition: xdash.hxx:31
double getWidth() const
constexpr TypedWhichId< SvxB3DVectorItem > SDRATTR_3DSCENE_LIGHTDIRECTION_7(SDRATTR_3DSCENE_FIRST+27)
constexpr TypedWhichId< SvxB3DVectorItem > SDRATTR_3DSCENE_LIGHTDIRECTION_6(SDRATTR_3DSCENE_FIRST+26)
attribute::SdrLineAttribute createNewSdrLineAttribute(const SfxItemSet &rSet)
constexpr TypedWhichId< XColorItem > SDRATTR_SHADOWCOLOR(SDRATTR_SHADOW_FIRST+1)
constexpr TypedWhichId< SfxBoolItem > SDRATTR_3DSCENE_LIGHTON_6(SDRATTR_3DSCENE_FIRST+18)
sal_uInt16 GetDots() const
Definition: xdash.hxx:55
sal_uInt16 GetXOffset() const
Definition: xgrad.hxx:73
constexpr TypedWhichId< SdrMetricItem > SDRATTR_SHADOWSIZEX(SDRATTR_SHADOW_FIRST+7)
constexpr TypedWhichId< SfxBoolItem > SDRATTR_3DSCENE_LIGHTON_1(SDRATTR_3DSCENE_FIRST+13)
constexpr TypedWhichId< SdrOnOffItem > SDRATTR_SHADOW(SDRATTR_SHADOW_FIRST+0)
constexpr TypedWhichId< SvxColorItem > SDRATTR_3DSCENE_LIGHTCOLOR_1(SDRATTR_3DSCENE_FIRST+4)
constexpr TypedWhichId< SdrMetricItem > SDRATTR_SHADOWBLUR(SDRATTR_SHADOW_FIRST+9)
constexpr TypedWhichId< XFormTextStyleItem > XATTR_FORMTXTSTYLE(XATTR_TEXT_FIRST)
constexpr TypedWhichId< SdrPercentItem > SDRATTR_GLOW_TRANSPARENCY(SDRATTR_GLOW_FIRST+2)
std::unique_ptr< OutlinerParaObject > CreateEditOutlinerParaObject() const
Definition: svdotext.cxx:876
constexpr TypedWhichId< SfxBoolItem > SDRATTR_3DSCENE_LIGHTON_3(SDRATTR_3DSCENE_FIRST+15)
RectPoint
Definition: rectenum.hxx:22
UNDERLYING_TYPE get() const
attribute::SdrTextAttribute createNewSdrTextAttribute(const SfxItemSet &rSet, const SdrText &rText, const sal_Int32 *pLeft, const sal_Int32 *pUpper, const sal_Int32 *pRight, const sal_Int32 *pLower)
sal_uInt16 GetBorder() const
Definition: xgrad.hxx:72
constexpr TypedWhichId< XLineStartWidthItem > XATTR_LINESTARTWIDTH(XATTR_LINE_FIRST+6)
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
attribute::FillGradientAttribute createNewTransparenceGradientAttribute(const SfxItemSet &rSet)
constexpr TypedWhichId< SvxColorItem > SDRATTR_3DSCENE_LIGHTCOLOR_7(SDRATTR_3DSCENE_FIRST+10)
constexpr TypedWhichId< SvxB3DVectorItem > SDRATTR_3DSCENE_LIGHTDIRECTION_1(SDRATTR_3DSCENE_FIRST+21)
constexpr TypedWhichId< XFillBitmapItem > XATTR_FILLBITMAP(XATTR_FILL_FIRST+4)
css::drawing::Direction3D aDirection
bool IsFitToSize() const
returns true if the old feature for fitting shape content should into shape is enabled. implies IsAutoFit()==false!
Definition: svdotext.cxx:1856
constexpr TypedWhichId< SfxBoolItem > SDRATTR_3DSCENE_LIGHTON_5(SDRATTR_3DSCENE_FIRST+17)
constexpr TypedWhichId< SfxBoolItem > SDRATTR_3DSCENE_TWO_SIDED_LIGHTING(SDRATTR_3DSCENE_FIRST+3)
SdrTextObj & GetObject() const
Definition: svdtext.hxx:63
constexpr TypedWhichId< XLineEndWidthItem > XATTR_LINEENDWIDTH(XATTR_LINE_FIRST+7)
constexpr TypedWhichId< SvxColorItem > SDRATTR_3DSCENE_AMBIENTCOLOR(SDRATTR_3DSCENE_FIRST+12)
constexpr TypedWhichId< XFillBmpPosItem > XATTR_FILLBMP_POS(XATTR_FILL_FIRST+8)
SdrModel & getSdrModelFromSdrObject() const
Definition: svdobj.cxx:279
constexpr TypedWhichId< SdrMetricItem > SDRATTR_SHADOWYDIST(SDRATTR_SHADOW_FIRST+3)
constexpr TypedWhichId< SfxBoolItem > SDRATTR_3DSCENE_LIGHTON_8(SDRATTR_3DSCENE_FIRST+20)
constexpr double deg2rad(double v)
virtual SdrText * getActiveText() const
returns the currently active text.
Definition: svdotext.cxx:2063
double CreateDotDashArray(::std::vector< double > &rDotDashArray, double fLineWidth) const
Definition: xattr.cxx:429
constexpr TypedWhichId< SvxB3DVectorItem > SDRATTR_3DSCENE_LIGHTDIRECTION_8(SDRATTR_3DSCENE_FIRST+28)
void calculateRelativeCornerRadius(sal_Int32 nRadius, const basegfx::B2DRange &rObjectRange, double &rfCornerRadiusX, double &rfCornerRadiusY)
constexpr TypedWhichId< XLineStartCenterItem > XATTR_LINESTARTCENTER(XATTR_LINE_FIRST+8)
constexpr TypedWhichId< Svx3DPerspectiveItem > SDRATTR_3DSCENE_PERSPECTIVE(SDRATTR_3DSCENE_FIRST+0)
attribute::SdrEffectsTextAttribute createNewSdrEffectsTextAttribute(const SfxItemSet &rSet, const SdrText *pText, bool bSuppressText)
SfxItemPool * GetPool() const
attribute::SdrLineStartEndAttribute createNewSdrLineStartEndAttribute(const SfxItemSet &rSet, double fWidth)
SAL_WARN_UNUSED_RESULT Point PixelToLogic(const Point &rDevicePt) const
tools::Long GetTextRightDistance() const
Right inner spacing to borders.
Definition: svdotext.cxx:1740
css::awt::GradientStyle GetGradientStyle() const
Definition: xgrad.hxx:68
constexpr TypedWhichId< XFillColorItem > XATTR_FILLCOLOR(XATTR_FILL_FIRST+1)
constexpr TypedWhichId< XGradientStepCountItem > XATTR_GRADIENTSTEPCOUNT(XATTR_FILL_FIRST+6)
constexpr TypedWhichId< SdrMetricItem > SDRATTR_SHADOWXDIST(SDRATTR_SHADOW_FIRST+2)
tools::Long GetTextUpperDistance() const
Top inner spacing to borders.
Definition: svdotext.cxx:1745
attribute::SdrSceneAttribute createNewSdrSceneAttribute(const SfxItemSet &rSet)
constexpr TypedWhichId< XFillFloatTransparenceItem > XATTR_FILLFLOATTRANSPARENCE(XATTR_FILL_FIRST+11)
sal_uInt32 count() const
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
constexpr TypedWhichId< XFillBmpPosOffsetYItem > XATTR_FILLBMP_POSOFFSETY(XATTR_FILL_FIRST+18)
constexpr tools::Long Height() const
unsigned char sal_uInt8
constexpr TypedWhichId< XFillBmpStretchItem > XATTR_FILLBMP_STRETCH(XATTR_FILL_FIRST+16)
constexpr TypedWhichId< SdrMetricItem > SDRATTR_GLOW_RADIUS(SDRATTR_GLOW_FIRST+0)
attribute::SdrShadowAttribute createNewSdrShadowAttribute(const SfxItemSet &rSet)
constexpr TypedWhichId< XLineCapItem > XATTR_LINECAP(XATTR_LINE_FIRST+12)
constexpr TypedWhichId< SvxB3DVectorItem > SDRATTR_3DSCENE_LIGHTDIRECTION_3(SDRATTR_3DSCENE_FIRST+23)
constexpr TypedWhichId< XFillBmpPosOffsetXItem > XATTR_FILLBMP_POSOFFSETX(XATTR_FILL_FIRST+17)
constexpr TypedWhichId< XFillBmpTileItem > XATTR_FILLBMP_TILE(XATTR_FILL_FIRST+7)
constexpr TypedWhichId< SvxColorItem > SDRATTR_3DSCENE_LIGHTCOLOR_8(SDRATTR_3DSCENE_FIRST+11)
attribute::SdrFillTextAttribute createNewSdrFillTextAttribute(const SfxItemSet &rSet, const SdrText *pText, const sal_Int32 *pLeft, const sal_Int32 *pUpper, const sal_Int32 *pRight, const sal_Int32 *pLower)
constexpr TypedWhichId< XFillBmpSizeLogItem > XATTR_FILLBMP_SIZELOG(XATTR_FILL_FIRST+13)
constexpr TypedWhichId< SvxColorItem > SDRATTR_3DSCENE_LIGHTCOLOR_6(SDRATTR_3DSCENE_FIRST+9)
constexpr TypedWhichId< SdrTextFixedCellHeightItem > SDRATTR_TEXT_USEFIXEDCELLHEIGHT(SDRATTR_MISC_FIRST+23)
bool IsAutoFit() const
returns true if the PPT autofit of text into shape bounds is enabled. implies IsFitToSize()==false! ...
Definition: svdotext.cxx:1851
virtual sal_Int32 getTextCount() const override
returns the number of texts available for this object.
Definition: svdotext.cxx:2087
MapUnit
const SdrFormTextAttribute & getSdrFormTextAttribute() const
constexpr TypedWhichId< Svx3DShadeModeItem > SDRATTR_3DSCENE_SHADE_MODE(SDRATTR_3DSCENE_FIRST+30)
constexpr TypedWhichId< SdrMetricItem > SDRATTR_SOFTEDGE_RADIUS(SDRATTR_SOFTEDGE_FIRST+0)
OutlinerParaObject * GetOutlinerParaObject() const
Definition: svdtext.cxx:89
constexpr TypedWhichId< SvxColorItem > SDRATTR_3DSCENE_LIGHTCOLOR_2(SDRATTR_3DSCENE_FIRST+5)
constexpr TypedWhichId< XFillBmpTileOffsetXItem > XATTR_FILLBMP_TILEOFFSETX(XATTR_FILL_FIRST+14)
SdrTextVertAdjust GetTextVerticalAdjust(const SfxItemSet &rSet) const
Definition: svdotext.cxx:396
const SfxPoolItem * GetItem(sal_uInt16 nWhich, bool bSearchInParent=true) const
constexpr TypedWhichId< XLineColorItem > XATTR_LINECOLOR(XATTR_LINE_FIRST+3)
constexpr TypedWhichId< XFillBmpSizeYItem > XATTR_FILLBMP_SIZEY(XATTR_FILL_FIRST+10)
constexpr TypedWhichId< SvxColorItem > SDRATTR_3DSCENE_LIGHTCOLOR_4(SDRATTR_3DSCENE_FIRST+7)
constexpr TypedWhichId< SvxB3DVectorItem > SDRATTR_3DSCENE_LIGHTDIRECTION_4(SDRATTR_3DSCENE_FIRST+24)
constexpr TypedWhichId< SdrMetricItem > SDRATTR_SHADOWSIZEY(SDRATTR_SHADOW_FIRST+8)
attribute::SdrLineFillEffectsTextAttribute createNewSdrLineFillEffectsTextAttribute(const SfxItemSet &rSet, const SdrText *pText, bool bHasContent)
const Color & GetEndColor() const
Definition: xgrad.hxx:70
scroll back and forth
sal_uInt16 GetDashes() const
Definition: xdash.hxx:57
sal_uInt32 count() const
attribute::SdrLightingAttribute createNewSdrLightingAttribute(const SfxItemSet &rSet)
EnumT GetValue() const