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