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>
61 #include <vcl/GraphicLoader.hxx>
63 #include <svx/svx3ditems.hxx>
64 #include <com/sun/star/drawing/ProjectionMode.hpp>
65 #include <com/sun/star/drawing/ShadeMode.hpp>
67 #include <svx/rectenum.hxx>
68 #include <svx/sdtfchim.hxx>
69 #include <svx/svdoutl.hxx>
70 #include <svx/svdmodel.hxx>
71 #include <svx/xflbmsli.hxx>
72 #include <editeng/editstat.hxx>
73 #include <osl/diagnose.h>
85 #include <com/sun/star/drawing/LineCap.hpp>
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.SetAlpha(255 - 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  std::move(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  {
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  }
651  }
652 
654  }
655 
657  {
658  Graphic aGraphic(rSet.Get(XATTR_FILLBITMAP).GetGraphicObject().GetGraphic());
659 
660  OUString aOriginURL = aGraphic.getOriginURL();
661  if (aGraphic.GetType() == GraphicType::Default && !aOriginURL.isEmpty())
662  {
663  aGraphic = vcl::graphic::loadFromURL(aGraphic.getOriginURL());
664  aGraphic.setOriginURL(aOriginURL);
665  }
666 
667  if(GraphicType::Bitmap != aGraphic.GetType() && GraphicType::GdiMetafile != aGraphic.GetType())
668  {
669  // no content if not bitmap or metafile
670  OSL_ENSURE(false, "No fill graphic in SfxItemSet (!)");
672  }
673 
674  Size aPrefSize(aGraphic.GetPrefSize());
675 
676  if(!aPrefSize.Width() || !aPrefSize.Height())
677  {
678  // if there is no logical size, create a size from pixel size and set MapMode accordingly
679  if(GraphicType::Bitmap == aGraphic.GetType())
680  {
681  aGraphic.SetPrefSize(aGraphic.GetBitmapEx().GetSizePixel());
682  aGraphic.SetPrefMapMode(MapMode(MapUnit::MapPixel));
683  aPrefSize = aGraphic.GetPrefSize();
684  }
685  }
686 
687  if(!aPrefSize.Width() || !aPrefSize.Height())
688  {
689  // no content if no size
690  OSL_ENSURE(false, "Graphic has no size in SfxItemSet (!)");
692  }
693 
694  // convert size and MapMode to destination logical size and MapMode
695  const MapUnit aDestinationMapUnit(rSet.GetPool()->GetMetric(0));
696  basegfx::B2DVector aGraphicLogicSize(aGraphic.GetPrefSize().Width(), aGraphic.GetPrefSize().Height());
697 
698  if (aGraphic.GetPrefMapMode().GetMapUnit() != aDestinationMapUnit)
699  {
700  // #i100360# for MapUnit::MapPixel, LogicToLogic will not work properly,
701  // so fallback to Application::GetDefaultDevice()
702  Size aNewSize(0, 0);
703 
704  if(MapUnit::MapPixel == aGraphic.GetPrefMapMode().GetMapUnit())
705  {
707  aGraphic.GetPrefSize(),
708  MapMode(aDestinationMapUnit));
709  }
710  else
711  {
712  aNewSize = OutputDevice::LogicToLogic(
713  aGraphic.GetPrefSize(),
714  aGraphic.GetPrefMapMode(),
715  MapMode(aDestinationMapUnit));
716  }
717 
718  // #i124002# do not set new size using SetPrefSize at the graphic, this will lead to problems.
719  // Instead, adapt the GraphicLogicSize which will be used for further decompositions
720  aGraphicLogicSize = basegfx::B2DVector(aNewSize.Width(), aNewSize.Height());
721  }
722 
723  // get size
724  const basegfx::B2DVector aSize(
725  static_cast<double>(rSet.Get(XATTR_FILLBMP_SIZEX).GetValue()),
726  static_cast<double>(rSet.Get(XATTR_FILLBMP_SIZEY).GetValue()));
727  const basegfx::B2DVector aOffset(
728  static_cast<double>(rSet.Get(XATTR_FILLBMP_TILEOFFSETX).GetValue()),
729  static_cast<double>(rSet.Get(XATTR_FILLBMP_TILEOFFSETY).GetValue()));
730  const basegfx::B2DVector aOffsetPosition(
731  static_cast<double>(rSet.Get(XATTR_FILLBMP_POSOFFSETX).GetValue()),
732  static_cast<double>(rSet.Get(XATTR_FILLBMP_POSOFFSETY).GetValue()));
733 
735  aGraphic,
736  aGraphicLogicSize,
737  aSize,
738  aOffset,
739  aOffsetPosition,
740  RectPointToB2DVector(rSet.GetItem<XFillBmpPosItem>(XATTR_FILLBMP_POS)->GetValue()),
741  rSet.Get(XATTR_FILLBMP_TILE).GetValue(),
742  rSet.Get(XATTR_FILLBMP_STRETCH).GetValue(),
743  rSet.Get(XATTR_FILLBMP_SIZELOG).GetValue());
744  }
745 
747  const SfxItemSet& rSet,
748  const SdrText* pText,
749  bool bSuppressText)
750  {
752 
753  // #i98072# added option to suppress text
754  // look for text first
755  if(!bSuppressText && pText)
756  {
757  aText = createNewSdrTextAttribute(rSet, *pText);
758  }
759 
760  // try shadow
762  const attribute::SdrGlowAttribute aGlow(createNewSdrGlowAttribute(rSet));
763  const sal_Int32 nSoftEdgeRadius(getSoftEdgeRadius(rSet));
764 
765  return attribute::SdrEffectsTextAttribute(aShadow, aText, aGlow, nSoftEdgeRadius);
766  }
767 
769  const SfxItemSet& rSet,
770  const SdrText* pText)
771  {
775  bool bFontworkHideContour(false);
776 
777  // look for text first
778  if(pText)
779  {
780  aText = createNewSdrTextAttribute(rSet, *pText);
781 
782  // when object has text and text is fontwork and hide contour is set for fontwork, force
783  // line and fill style to empty
784  if(!aText.isDefault()
785  && !aText.getSdrFormTextAttribute().isDefault()
786  && aText.isHideContour())
787  {
788  bFontworkHideContour = true;
789  }
790  }
791 
792  // try line style
793  if(!bFontworkHideContour)
794  {
795  aLine = createNewSdrLineAttribute(rSet);
796 
797  if(!aLine.isDefault())
798  {
799  // try LineStartEnd
800  aLineStartEnd = createNewSdrLineStartEndAttribute(rSet, aLine.getWidth());
801  }
802  }
803 
804  if(!aLine.isDefault() || !aText.isDefault())
805  {
806  // try shadow
808  const attribute::SdrGlowAttribute aGlow = createNewSdrGlowAttribute(rSet);
809  const sal_Int32 nSoftEdgeRadius(getSoftEdgeRadius(rSet));
810 
811  return attribute::SdrLineEffectsTextAttribute(aLine, aLineStartEnd, aShadow, aText,
812  aGlow, nSoftEdgeRadius);
813  }
814 
816  }
817 
819  const SfxItemSet& rSet,
820  const SdrText* pText,
821  bool bHasContent)
822  {
826  attribute::FillGradientAttribute aFillFloatTransGradient;
828  bool bFontworkHideContour(false);
829 
830  // look for text first
831  if(pText)
832  {
833  aText = createNewSdrTextAttribute(rSet, *pText);
834 
835  // when object has text and text is fontwork and hide contour is set for fontwork, force
836  // line and fill style to empty
837  if(!aText.getSdrFormTextAttribute().isDefault() && aText.isHideContour())
838  {
839  bFontworkHideContour = true;
840  }
841  }
842 
843  if(!bFontworkHideContour)
844  {
845  // try line style
846  aLine = createNewSdrLineAttribute(rSet);
847 
848  if(!aLine.isDefault())
849  {
850  // try LineStartEnd
851  aLineStartEnd = createNewSdrLineStartEndAttribute(rSet, aLine.getWidth());
852  }
853 
854  // try fill style
855  aFill = createNewSdrFillAttribute(rSet);
856 
857  if(!aFill.isDefault())
858  {
859  // try fillfloattransparence
860  aFillFloatTransGradient = createNewTransparenceGradientAttribute(rSet);
861  }
862  }
863 
864  // bHasContent is used from OLE and graphic objects. Normally a possible shadow
865  // depends on line, fill or text to be set, but for these objects it is possible
866  // to have none of these, but still content which needs to have a shadow (if set),
867  // so shadow needs to be tried
868  if(bHasContent || !aLine.isDefault() || !aFill.isDefault() || !aText.isDefault())
869  {
870  // try shadow
872 
873  // glow
874  const attribute::SdrGlowAttribute aGlow = createNewSdrGlowAttribute(rSet);
875 
876  const sal_Int32 nSoftEdgeRadius(getSoftEdgeRadius(rSet));
877 
878  return attribute::SdrLineFillEffectsTextAttribute(aLine, aFill, aLineStartEnd,
879  aShadow, aFillFloatTransGradient,
880  aText, aGlow, nSoftEdgeRadius);
881  }
882 
884  }
885 
887  {
891  attribute::FillGradientAttribute aFillFloatTransGradient;
892 
893  // try line style
895 
896  if(!aLine.isDefault())
897  {
898  // try LineStartEnd
899  aLineStartEnd = createNewSdrLineStartEndAttribute(rSet, aLine.getWidth());
900  }
901 
902  // try fill style
903  if(!bSuppressFill)
904  {
905  aFill = createNewSdrFillAttribute(rSet);
906 
907  if(!aFill.isDefault())
908  {
909  // try fillfloattransparence
910  aFillFloatTransGradient = createNewTransparenceGradientAttribute(rSet);
911  }
912  }
913 
914  if(!aLine.isDefault() || !aFill.isDefault())
915  {
916  // try shadow
917  aShadow = createNewSdrShadowAttribute(rSet);
918 
920  aLine, aFill, aLineStartEnd, aShadow, aFillFloatTransGradient);
921  }
922 
924  }
925 
927  {
928  // get perspective
929  css::drawing::ProjectionMode aProjectionMode(css::drawing::ProjectionMode_PARALLEL);
930  const sal_uInt16 nProjectionValue(rSet.Get(SDRATTR_3DSCENE_PERSPECTIVE).GetValue());
931 
932  if(1 == nProjectionValue)
933  {
934  aProjectionMode = css::drawing::ProjectionMode_PERSPECTIVE;
935  }
936 
937  // get distance
938  const double fDistance(rSet.Get(SDRATTR_3DSCENE_DISTANCE).GetValue());
939 
940  // get shadow slant
941  const double fShadowSlant(
943 
944  // get shade mode
945  css::drawing::ShadeMode aShadeMode(css::drawing::ShadeMode_FLAT);
946  const sal_uInt16 nShadeValue(rSet.Get(SDRATTR_3DSCENE_SHADE_MODE).GetValue());
947 
948  if(1 == nShadeValue)
949  {
950  aShadeMode = css::drawing::ShadeMode_PHONG;
951  }
952  else if(2 == nShadeValue)
953  {
954  aShadeMode = css::drawing::ShadeMode_SMOOTH;
955  }
956  else if(3 == nShadeValue)
957  {
958  aShadeMode = css::drawing::ShadeMode_DRAFT;
959  }
960 
961  // get two sided lighting
962  const bool bTwoSidedLighting(rSet.Get(SDRATTR_3DSCENE_TWO_SIDED_LIGHTING).GetValue());
963 
964  return attribute::SdrSceneAttribute(fDistance, fShadowSlant, aProjectionMode, aShadeMode, bTwoSidedLighting);
965  }
966 
968  {
969  // extract lights from given SfxItemSet (from scene)
970  ::std::vector< attribute::Sdr3DLightAttribute > aLightVector;
971 
972  if(rSet.Get(SDRATTR_3DSCENE_LIGHTON_1).GetValue())
973  {
974  const basegfx::BColor aColor(rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_1).GetValue().getBColor());
976  aLightVector.emplace_back(aColor, aDirection, true);
977  }
978 
979  if(rSet.Get(SDRATTR_3DSCENE_LIGHTON_2).GetValue())
980  {
981  const basegfx::BColor aColor(rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_2).GetValue().getBColor());
983  aLightVector.emplace_back(aColor, aDirection, false);
984  }
985 
986  if(rSet.Get(SDRATTR_3DSCENE_LIGHTON_3).GetValue())
987  {
988  const basegfx::BColor aColor(rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_3).GetValue().getBColor());
990  aLightVector.emplace_back(aColor, aDirection, false);
991  }
992 
993  if(rSet.Get(SDRATTR_3DSCENE_LIGHTON_4).GetValue())
994  {
995  const basegfx::BColor aColor(rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_4).GetValue().getBColor());
997  aLightVector.emplace_back(aColor, aDirection, false);
998  }
999 
1000  if(rSet.Get(SDRATTR_3DSCENE_LIGHTON_5).GetValue())
1001  {
1002  const basegfx::BColor aColor(rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_5).GetValue().getBColor());
1004  aLightVector.emplace_back(aColor, aDirection, false);
1005  }
1006 
1007  if(rSet.Get(SDRATTR_3DSCENE_LIGHTON_6).GetValue())
1008  {
1009  const basegfx::BColor aColor(rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_6).GetValue().getBColor());
1011  aLightVector.emplace_back(aColor, aDirection, false);
1012  }
1013 
1014  if(rSet.Get(SDRATTR_3DSCENE_LIGHTON_7).GetValue())
1015  {
1016  const basegfx::BColor aColor(rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_7).GetValue().getBColor());
1018  aLightVector.emplace_back(aColor, aDirection, false);
1019  }
1020 
1021  if(rSet.Get(SDRATTR_3DSCENE_LIGHTON_8).GetValue())
1022  {
1023  const basegfx::BColor aColor(rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_8).GetValue().getBColor());
1025  aLightVector.emplace_back(aColor, aDirection, false);
1026  }
1027 
1028  // get ambient color
1029  const Color aAmbientValue(rSet.Get(SDRATTR_3DSCENE_AMBIENTCOLOR).GetValue());
1030  const basegfx::BColor aAmbientLight(aAmbientValue.getBColor());
1031 
1032  return attribute::SdrLightingAttribute(aAmbientLight, std::move(aLightVector));
1033  }
1034 
1035  void calculateRelativeCornerRadius(sal_Int32 nRadius, const basegfx::B2DRange& rObjectRange, double& rfCornerRadiusX, double& rfCornerRadiusY)
1036  {
1037  rfCornerRadiusX = rfCornerRadiusY = static_cast<double>(nRadius);
1038 
1039  if(0.0 != rfCornerRadiusX)
1040  {
1041  const double fHalfObjectWidth(rObjectRange.getWidth() * 0.5);
1042 
1043  if(0.0 != fHalfObjectWidth)
1044  {
1045  if(rfCornerRadiusX < 0.0)
1046  {
1047  rfCornerRadiusX = 0.0;
1048  }
1049 
1050  if(rfCornerRadiusX > fHalfObjectWidth)
1051  {
1052  rfCornerRadiusX = fHalfObjectWidth;
1053  }
1054 
1055  rfCornerRadiusX /= fHalfObjectWidth;
1056  }
1057  else
1058  {
1059  rfCornerRadiusX = 0.0;
1060  }
1061  }
1062 
1063  if(0.0 == rfCornerRadiusY)
1064  return;
1065 
1066  const double fHalfObjectHeight(rObjectRange.getHeight() * 0.5);
1067 
1068  if(0.0 != fHalfObjectHeight)
1069  {
1070  if(rfCornerRadiusY < 0.0)
1071  {
1072  rfCornerRadiusY = 0.0;
1073  }
1074 
1075  if(rfCornerRadiusY > fHalfObjectHeight)
1076  {
1077  rfCornerRadiusY = fHalfObjectHeight;
1078  }
1079 
1080  rfCornerRadiusY /= fHalfObjectHeight;
1081  }
1082  else
1083  {
1084  rfCornerRadiusY = 0.0;
1085  }
1086  }
1087 
1088  // #i101508# Support handing over given text-to-border distances
1090  const SfxItemSet& rSet,
1091  const SdrText* pText,
1092  const sal_Int32* pLeft,
1093  const sal_Int32* pUpper,
1094  const sal_Int32* pRight,
1095  const sal_Int32* pLower)
1096  {
1098  attribute::FillGradientAttribute aFillFloatTransGradient;
1100  bool bFontworkHideContour(false);
1101 
1102  // look for text first
1103  if(pText)
1104  {
1105  aText = createNewSdrTextAttribute(rSet, *pText, pLeft, pUpper, pRight, pLower);
1106 
1107  // when object has text and text is fontwork and hide contour is set for fontwork, force
1108  // fill style to empty
1109  if(!aText.getSdrFormTextAttribute().isDefault() && aText.isHideContour())
1110  {
1111  bFontworkHideContour = true;
1112  }
1113  }
1114 
1115  if(!bFontworkHideContour)
1116  {
1117  // try fill style
1118  aFill = createNewSdrFillAttribute(rSet);
1119 
1120  if(!aFill.isDefault())
1121  {
1122  // try fillfloattransparence
1123  aFillFloatTransGradient = createNewTransparenceGradientAttribute(rSet);
1124  }
1125  }
1126 
1127  if(!aFill.isDefault() || !aText.isDefault())
1128  {
1129  return attribute::SdrFillTextAttribute(aFill, aFillFloatTransGradient, aText);
1130  }
1131 
1133  }
1134 
1135 } // end of namespace
1136 
1137 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SdrOutliner & GetDrawOutliner(const SdrTextObj *pObj=nullptr) const
Definition: svdmodel.cxx:648
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:1742
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:1931
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:1727
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
void setOriginURL(OUString const &rOriginURL)
attribute::SdrFillGraphicAttribute createNewSdrFillGraphicAttribute(const SfxItemSet &rSet)
SdrTextAniKind GetTextAniKind() const
Definition: svdotext.cxx:1747
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)
Graphic loadFromURL(OUString const &rURL, weld::Window *pParentWin)
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
OutlinerParaObject * GetOutlinerParaObject()
Definition: svdtext.cxx:89
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:360
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)
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:1848
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:66
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)
OUString getOriginURL() const
virtual SdrText * getActiveText() const
returns the currently active text.
Definition: svdotext.cxx:2055
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:1732
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:1737
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)
std::optional< OutlinerParaObject > CreateEditOutlinerParaObject() const
Definition: svdotext.cxx:872
bool IsAutoFit() const
returns true if the PPT autofit of text into shape bounds is enabled. implies IsFitToSize()==false! ...
Definition: svdotext.cxx:1843
virtual sal_Int32 getTextCount() const override
returns the number of texts available for this object.
Definition: svdotext.cxx:2079
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)
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:392
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