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