LibreOffice Module svx (master)  1
svdorect.cxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #include <svx/svdorect.hxx>
21 #include <svx/xpoly.hxx>
22 #include <svx/svdtrans.hxx>
23 #include <svx/svddrag.hxx>
24 #include <svx/svdmodel.hxx>
25 #include <svx/svdview.hxx>
26 #include <svx/svdopath.hxx>
27 #include <svx/dialmgr.hxx>
28 #include <svx/strings.hrc>
31 #include <rtl/ustrbuf.hxx>
32 #include <tools/debug.hxx>
33 #include <vcl/ptrstyle.hxx>
34 #include <osl/diagnose.h>
35 
36 using namespace com::sun::star;
37 
38 // BaseProperties section
39 
40 std::unique_ptr<sdr::properties::BaseProperties> SdrRectObj::CreateObjectSpecificProperties()
41 {
42  return std::make_unique<sdr::properties::RectangleProperties>(*this);
43 }
44 
45 
46 // DrawContact section
47 
48 std::unique_ptr<sdr::contact::ViewContact> SdrRectObj::CreateObjectSpecificViewContact()
49 {
50  return std::make_unique<sdr::contact::ViewContactOfSdrRectObj>(*this);
51 }
52 
53 
55 : SdrTextObj(rSdrModel)
56 {
57  m_bClosedObj=true;
58 }
59 
60 SdrRectObj::SdrRectObj(SdrModel& rSdrModel, SdrRectObj const & rSource)
61 : SdrTextObj(rSdrModel, rSource)
62 {
63  m_bClosedObj=true;
64  mpXPoly = rSource.mpXPoly;
65 }
66 
68  SdrModel& rSdrModel,
69  const tools::Rectangle& rRect)
70 : SdrTextObj(rSdrModel, rRect)
71 {
72  m_bClosedObj=true;
73 }
74 
76  SdrModel& rSdrModel,
77  SdrObjKind eNewTextKind)
78 : SdrTextObj(rSdrModel, eNewTextKind)
79 {
82  "SdrRectObj::SdrRectObj(SdrObjKind) can only be applied to text frames.");
83  m_bClosedObj=true;
84 }
85 
87  SdrModel& rSdrModel,
88  SdrObjKind eNewTextKind,
89  const tools::Rectangle& rRect)
90 : SdrTextObj(rSdrModel, eNewTextKind, rRect)
91 {
94  "SdrRectObj::SdrRectObj(SdrObjKind,...) can only be applied to text frames.");
95  m_bClosedObj=true;
96 }
97 
99 {
100 }
101 
103 {
104  mpXPoly.reset();
105 }
106 
108 {
109  XPolygon aXPoly(rRect1,nRad1,nRad1);
110  const sal_uInt16 nPointCnt(aXPoly.GetPointCount());
111  XPolygon aNewPoly(nPointCnt+1);
112  sal_uInt16 nShift=nPointCnt-2;
113  if (nRad1!=0) nShift=nPointCnt-5;
114  sal_uInt16 j=nShift;
115  for (sal_uInt16 i=1; i<nPointCnt; i++) {
116  aNewPoly[i]=aXPoly[j];
117  aNewPoly.SetFlags(i,aXPoly.GetFlags(j));
118  j++;
119  if (j>=nPointCnt) j=1;
120  }
121  aNewPoly[0]=rRect1.BottomCenter();
122  aNewPoly[nPointCnt]=aNewPoly[0];
123  aXPoly=aNewPoly;
124 
125  // these angles always relate to the top left corner of aRect
128  return aXPoly;
129 }
130 
132 {
134 }
135 
137 {
138  if(!mpXPoly)
139  {
140  const_cast<SdrRectObj*>(this)->RecalcXPoly();
141  }
142 
143  return *mpXPoly;
144 }
145 
147 {
148  bool bNoTextFrame=!IsTextFrame();
149  rInfo.bResizeFreeAllowed=bNoTextFrame || ((maGeo.nRotationAngle.get() % 9000) == 0);
150  rInfo.bResizePropAllowed=true;
151  rInfo.bRotateFreeAllowed=true;
152  rInfo.bRotate90Allowed =true;
153  rInfo.bMirrorFreeAllowed=bNoTextFrame;
154  rInfo.bMirror45Allowed =bNoTextFrame;
155  rInfo.bMirror90Allowed =bNoTextFrame;
156 
157  // allow transparency
158  rInfo.bTransparenceAllowed = true;
159 
160  rInfo.bShearAllowed =bNoTextFrame;
161  rInfo.bEdgeRadiusAllowed=true;
162 
163  bool bCanConv=!HasText() || ImpCanConvTextToCurve();
164  if (bCanConv && !bNoTextFrame && !HasText()) {
165  bCanConv=HasFill() || HasLine();
166  }
167  rInfo.bCanConvToPath =bCanConv;
168  rInfo.bCanConvToPoly =bCanConv;
170 }
171 
173 {
174  if (IsTextFrame())
175  return meTextKind;
176  else return OBJ_RECT;
177 }
178 
180 {
181  rRect = maRect;
182  if (maGeo.nShearAngle==0_deg100)
183  return;
184 
186  if (maGeo.nShearAngle>0_deg100)
187  {
188  Point aRef(rRect.TopLeft());
189  rRect.AdjustLeft( -nDst );
190  Point aTmpPt(rRect.TopLeft());
192  aTmpPt-=rRect.TopLeft();
193  rRect.Move(aTmpPt.X(),aTmpPt.Y());
194  }
195  else
196  {
197  rRect.AdjustRight( -nDst );
198  }
199 }
200 
202 {
203  if (IsTextFrame())
204  {
206  }
207 
208  bool bRounded = GetEckenradius() != 0; // rounded down
209  TranslateId pResId = bRounded ? STR_ObjNameSingulRECTRND : STR_ObjNameSingulRECT;
210  if (maGeo.nShearAngle)
211  {
212  pResId = bRounded ? STR_ObjNameSingulPARALRND : STR_ObjNameSingulPARAL; // parallelogram or, maybe, rhombus
213  }
214  else if (maRect.GetWidth() == maRect.GetHeight())
215  {
216  pResId = bRounded ? STR_ObjNameSingulQUADRND : STR_ObjNameSingulQUAD; // square
217  }
218  OUString sName(SvxResId(pResId));
219 
220  OUString aName(GetName());
221  if (!aName.isEmpty())
222  sName += " '" + aName + "'";
223 
224  return sName;
225 }
226 
228 {
229  if (IsTextFrame())
230  {
232  }
233 
234  bool bRounded = GetEckenradius() != 0; // rounded down
235  TranslateId pResId = bRounded ? STR_ObjNamePluralRECTRND : STR_ObjNamePluralRECT;
236  if (maGeo.nShearAngle)
237  {
238  pResId = bRounded ? STR_ObjNamePluralPARALRND : STR_ObjNamePluralPARAL; // parallelogram or rhombus
239  }
240  else if (maRect.GetWidth() == maRect.GetHeight())
241  {
242  pResId = bRounded ? STR_ObjNamePluralQUADRND : STR_ObjNamePluralQUAD; // square
243  }
244 
245  return SvxResId(pResId);
246 }
247 
249 {
250  return new SdrRectObj(rTargetModel, *this);
251 }
252 
254 {
255  XPolyPolygon aXPP;
257  return aXPP.getB2DPolyPolygon();
258 }
259 
261 {
262  tools::Long nEckRad=GetEckenradius();
263  if ((maGeo.nRotationAngle || maGeo.nShearAngle) && nEckRad!=0) {
265  } else {
267  }
268 }
269 
271 {
273  SetXPolyDirty();
274 }
275 
277 {
279  SetXPolyDirty();
280 }
281 
282 sal_uInt32 SdrRectObj::GetHdlCount() const
283 {
284  return IsTextFrame() ? 10 : 9;
285 }
286 
288 {
289  // A text box has an additional (pseudo-)handle for the blinking frame.
290  if(IsTextFrame())
291  {
292  OSL_ENSURE(!IsTextEditActive(), "Do not use an ImpTextframeHdl for highlighting text in active text edit, this will collide with EditEngine paints (!)");
293  std::unique_ptr<SdrHdl> pH(new ImpTextframeHdl(maRect));
294  pH->SetObj(const_cast<SdrRectObj*>(this));
295  pH->SetRotationAngle(maGeo.nRotationAngle);
296  rHdlList.AddHdl(std::move(pH));
297  }
298 
299  for(sal_Int32 nHdlNum = 1; nHdlNum <= 9; ++nHdlNum)
300  {
301  Point aPnt;
303 
304  switch(nHdlNum)
305  {
306  case 1: // Handle for changing the corner radius
307  {
309  tools::Long b = std::max(maRect.GetWidth(),maRect.GetHeight())/2; // rounded up, because GetWidth() adds 1
310  if (a>b) a=b;
311  if (a<0) a=0;
312  aPnt=maRect.TopLeft();
313  aPnt.AdjustX(a );
314  eKind = SdrHdlKind::Circle;
315  break;
316  }
317  case 2: aPnt=maRect.TopLeft(); eKind = SdrHdlKind::UpperLeft; break;
318  case 3: aPnt=maRect.TopCenter(); eKind = SdrHdlKind::Upper; break;
319  case 4: aPnt=maRect.TopRight(); eKind = SdrHdlKind::UpperRight; break;
320  case 5: aPnt=maRect.LeftCenter(); eKind = SdrHdlKind::Left ; break;
321  case 6: aPnt=maRect.RightCenter(); eKind = SdrHdlKind::Right; break;
322  case 7: aPnt=maRect.BottomLeft(); eKind = SdrHdlKind::LowerLeft; break;
323  case 8: aPnt=maRect.BottomCenter(); eKind = SdrHdlKind::Lower; break;
324  case 9: aPnt=maRect.BottomRight(); eKind = SdrHdlKind::LowerRight; break;
325  }
326 
327  if (maGeo.nShearAngle)
328  {
330  }
331  if (maGeo.nRotationAngle)
332  {
334  }
335 
336  std::unique_ptr<SdrHdl> pH(new SdrHdl(aPnt,eKind));
337  pH->SetObj(const_cast<SdrRectObj*>(this));
338  pH->SetRotationAngle(maGeo.nRotationAngle);
339  rHdlList.AddHdl(std::move(pH));
340  }
341 }
342 
344 {
345  return true;
346 }
347 
349 {
350  const bool bRad(rDrag.GetHdl() && SdrHdlKind::Circle == rDrag.GetHdl()->GetKind());
351 
352  if(bRad)
353  {
354  rDrag.SetEndDragChangesAttributes(true);
355 
356  return true;
357  }
358 
359  return SdrTextObj::beginSpecialDrag(rDrag);
360 }
361 
363 {
364  const bool bRad(rDrag.GetHdl() && SdrHdlKind::Circle == rDrag.GetHdl()->GetKind());
365 
366  if (bRad)
367  {
368  Point aPt(rDrag.GetNow());
369 
370  if (maGeo.nRotationAngle)
372 
373  sal_Int32 nRad(aPt.X() - maRect.Left());
374 
375  if (nRad < 0)
376  nRad = 0;
377 
378  if(nRad != GetEckenradius())
379  {
380  NbcSetEckenradius(nRad);
381  }
382 
383  return true;
384  }
385  else
386  {
387  return SdrTextObj::applySpecialDrag(rDrag);
388  }
389 }
390 
391 OUString SdrRectObj::getSpecialDragComment(const SdrDragStat& rDrag) const
392 {
393  const bool bCreateComment(rDrag.GetView() && this == rDrag.GetView()->GetCreateObj());
394 
395  if(bCreateComment)
396  {
397  return OUString();
398  }
399  else
400  {
401  const bool bRad(rDrag.GetHdl() && SdrHdlKind::Circle == rDrag.GetHdl()->GetKind());
402 
403  if(bRad)
404  {
405  Point aPt(rDrag.GetNow());
406 
407  // -sin for reversal
408  if (maGeo.nRotationAngle)
410 
411  sal_Int32 nRad(aPt.X() - maRect.Left());
412 
413  if(nRad < 0)
414  nRad = 0;
415 
416  return ImpGetDescriptionStr(STR_DragRectEckRad) +
417  " (" +
418  GetMetrStr(nRad) +
419  ")";
420  }
421  else
422  {
423  return SdrTextObj::getSpecialDragComment(rDrag);
424  }
425  }
426 }
427 
428 
430 {
431  tools::Rectangle aRect1;
432  rDrag.TakeCreateRect(aRect1);
433  aRect1.Justify();
434 
435  basegfx::B2DPolyPolygon aRetval;
436  aRetval.append(ImpCalcXPoly(aRect1,GetEckenradius()).getB2DPolygon());
437  return aRetval;
438 }
439 
441 {
442  if (IsTextFrame()) return PointerStyle::DrawText;
443  return PointerStyle::DrawRect;
444 }
445 
446 void SdrRectObj::NbcMove(const Size& rSiz)
447 {
448  SdrTextObj::NbcMove(rSiz);
449  SetXPolyDirty();
450 }
451 
452 void SdrRectObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact)
453 {
454  SdrTextObj::NbcResize(rRef,xFact,yFact);
455  SetXPolyDirty();
456 }
457 
458 void SdrRectObj::NbcRotate(const Point& rRef, Degree100 nAngle, double sn, double cs)
459 {
460  SdrTextObj::NbcRotate(rRef,nAngle,sn,cs);
461  SetXPolyDirty();
462 }
463 
464 void SdrRectObj::NbcShear(const Point& rRef, Degree100 nAngle, double tn, bool bVShear)
465 {
466  SdrTextObj::NbcShear(rRef,nAngle,tn,bVShear);
467  SetXPolyDirty();
468 }
469 
470 void SdrRectObj::NbcMirror(const Point& rRef1, const Point& rRef2)
471 {
472  SdrTextObj::NbcMirror(rRef1,rRef2);
473  SetXPolyDirty();
474 }
475 
477 {
478  sal_Int32 nWdt = ImpGetLineWdt(); // #i25616#
479 
480  // #i25616#
481  if(!LineIsOutsideGeometry())
482  {
483  nWdt++;
484  nWdt /= 2;
485  }
486 
487  Point aPt;
488  switch (nPosNum) {
489  case 0: aPt=maRect.TopCenter(); aPt.AdjustY( -nWdt ); break;
490  case 1: aPt=maRect.RightCenter(); aPt.AdjustX(nWdt ); break;
491  case 2: aPt=maRect.BottomCenter(); aPt.AdjustY(nWdt ); break;
492  case 3: aPt=maRect.LeftCenter(); aPt.AdjustX( -nWdt ); break;
493  }
496  aPt-=GetSnapRect().Center();
497  SdrGluePoint aGP(aPt);
498  aGP.SetPercent(false);
499  return aGP;
500 }
501 
503 {
504  sal_Int32 nWdt = ImpGetLineWdt(); // #i25616#
505 
506  // #i25616#
507  if(!LineIsOutsideGeometry())
508  {
509  nWdt++;
510  nWdt /= 2;
511  }
512 
513  Point aPt;
514  switch (nPosNum) {
515  case 0: aPt=maRect.TopLeft(); aPt.AdjustX( -nWdt ); aPt.AdjustY( -nWdt ); break;
516  case 1: aPt=maRect.TopRight(); aPt.AdjustX(nWdt ); aPt.AdjustY( -nWdt ); break;
517  case 2: aPt=maRect.BottomRight(); aPt.AdjustX(nWdt ); aPt.AdjustY(nWdt ); break;
518  case 3: aPt=maRect.BottomLeft(); aPt.AdjustX( -nWdt ); aPt.AdjustY(nWdt ); break;
519  }
522  aPt-=GetSnapRect().Center();
523  SdrGluePoint aGP(aPt);
524  aGP.SetPercent(false);
525  return aGP;
526 }
527 
528 SdrObjectUniquePtr SdrRectObj::DoConvertToPolyObj(bool bBezier, bool bAddText) const
529 {
531  { // TODO: this is only for the moment, until we have the new TakeContour()
532  aXP.Remove(0,1);
533  aXP[aXP.GetPointCount()-1]=aXP[0];
534  }
535 
536  basegfx::B2DPolyPolygon aPolyPolygon(aXP.getB2DPolygon());
537  aPolyPolygon.removeDoublePoints();
538  SdrObjectUniquePtr pRet;
539 
540  // small correction: Do not create something when no fill and no line. To
541  // be sure to not damage something with non-text frames, do this only
542  // when used with bAddText==false from other converters
543  if((bAddText && !IsTextFrame()) || HasFill() || HasLine())
544  {
545  pRet = ImpConvertMakeObj(aPolyPolygon, true, bBezier);
546  }
547 
548  if(bAddText)
549  {
550  pRet = ImpConvertAddText(std::move(pRet), bBezier);
551  }
552 
553  return pRet;
554 }
555 
556 void SdrRectObj::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
557 {
558  SdrTextObj::Notify(rBC,rHint);
559  SetXPolyDirty(); // because of the corner radius
560 }
561 
563 {
565  SetXPolyDirty();
566 }
567 
568 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void NbcMove(const Size &rSiz) override
The methods Move, Resize, Rotate, Mirror, Shear, SetSnapRect and SetLogicRect call the corresponding ...
Definition: svdorect.cxx:446
virtual bool applySpecialDrag(SdrDragStat &rDrag) override
Definition: svdorect.cxx:362
void Insert(XPolygon &&rXPoly)
Definition: _xpoly.cxx:860
SdrRectObj(SdrModel &rSdrModel)
The corner radius parameter is dropped at some point.
Definition: svdorect.cxx:54
virtual void NbcResize(const Point &rRef, const Fraction &xFact, const Fraction &yFact) override
Definition: svdotxtr.cxx:102
virtual void RestoreGeoData(const SdrObjGeoData &rGeo) override
Definition: svdorect.cxx:562
void ShearXPoly(XPolygon &rPoly, const Point &rRef, double tn, bool bVShear)
Definition: svdtrans.cxx:155
line
Definition: svdobjkind.hxx:29
tools::Rectangle GetBoundRect() const
Definition: _xpoly.cxx:396
virtual std::unique_ptr< sdr::properties::BaseProperties > CreateObjectSpecificProperties() override
Definition: svdorect.cxx:40
void ShearPoint(Point &rPnt, const Point &rRef, double tn, bool bVShear=false)
Definition: svdtrans.hxx:122
tools::Long AdjustRight(tools::Long nHorzMoveDelta)
virtual void NbcMirror(const Point &rRef1, const Point &rRef2) override
Definition: svdorect.cxx:470
virtual OUString getSpecialDragComment(const SdrDragStat &rDrag) const override
Definition: svdorect.cxx:391
virtual SdrGluePoint GetVertexGluePoint(sal_uInt16 nNum) const override
Definition: svdorect.cxx:476
bool m_bClosedObj
Definition: svdobj.hxx:896
OUString GetMetrStr(tools::Long nVal) const
Definition: svdobj.cxx:1121
virtual void RecalcSnapRect() override
Snap is not done on the BoundRect but if possible on logic coordinates (i.e.
Definition: svdorect.cxx:260
PolyFlags GetFlags(sal_uInt16 nPos) const
get the flags for the point at the given position
Definition: _xpoly.cxx:452
sal_Int32 ImpGetLineWdt() const
Detects the width of the line. No line ->0.
Definition: svdoattr.cxx:78
constexpr tools::Long Left() const
SdrHdlKind
Definition: svdhdl.hxx:52
constexpr Point RightCenter() const
virtual OUString TakeObjNameSingul() const override
Definition: svdorect.cxx:201
std::optional< XPolygon > mpXPoly
Definition: svdorect.hxx:49
tools::Long GetEckenradius() const
Definition: svdotext.cxx:1686
long Long
bool ImpCanConvTextToCurve() const
Definition: svdotxtr.cxx:424
bool IsTextFrame() const
Definition: svdotext.hxx:334
double mfSinRotationAngle
Definition: svdtrans.hxx:219
basegfx::B2DPolyPolygon getB2DPolyPolygon() const
Definition: _xpoly.cxx:934
virtual void TakeUnrotatedSnapRect(tools::Rectangle &rRect) const override
Definition: svdorect.cxx:179
SdrObjectUniquePtr ImpConvertAddText(SdrObjectUniquePtr pObj, bool bBezier) const
Definition: svdotxtr.cxx:463
constexpr Point BottomCenter() const
virtual OUString TakeObjNameSingul() const override
Definition: svdotext.cxx:994
virtual basegfx::B2DPolyPolygon TakeXorPoly() const override
The Xor-Polygon is required by the View to drag the object.
Definition: svdorect.cxx:253
virtual basegfx::B2DPolyPolygon TakeCreatePoly(const SdrDragStat &rDrag) const override
Polygon dragged by the user when creating the object.
Definition: svdorect.cxx:429
bool IsTextEditActive() const
Definition: svdotext.hxx:354
virtual const tools::Rectangle & GetSnapRect() const override
Definition: svdoattr.cxx:49
virtual void RecalcSnapRect() override
Snap is not done on the BoundRect but if possible on logic coordinates (i.e.
Definition: svdotext.cxx:1114
All geometrical data of an arbitrary object for use in undo/redo.
Definition: svdobj.hxx:173
SdrObjKind
Definition: svdobjkind.hxx:24
virtual bool HasText() const override
Definition: svdotxat.cxx:417
virtual void RecalcXPoly()
Subclasses should override RecalcXPoly() by creating an XPolygon instance with new and assigning it t...
Definition: svdorect.cxx:131
virtual void NbcMirror(const Point &rRef1, const Point &rRef2) override
Definition: svdotxtr.cxx:232
virtual SdrGluePoint GetCornerGluePoint(sal_uInt16 nNum) const override
Definition: svdorect.cxx:502
Rectangle objects (rectangle, circle, ...)
Definition: svdorect.hxx:38
Provides information about various ZObject properties.
Definition: svdobj.hxx:195
const SdrHdl * GetHdl() const
Definition: svddrag.hxx:111
virtual bool hasSpecialDrag() const override
The standard transformations (Move,Resize,Rotate,Mirror,Shear) are taken over by the View (TakeXorPol...
Definition: svdorect.cxx:343
virtual bool beginSpecialDrag(SdrDragStat &rDrag) const override
Definition: svdorect.cxx:348
constexpr Point BottomLeft() const
OUString SvxResId(TranslateId aId)
Definition: dialmgr.cxx:24
virtual SdrObjectUniquePtr DoConvertToPolyObj(bool bBezier, bool bAddText) const override
Definition: svdorect.cxx:528
constexpr Point TopCenter() const
bool LineIsOutsideGeometry() const
Definition: svdobj.hxx:849
tools::Rectangle maRect
Definition: svdotext.hxx:170
constexpr tools::Long GetWidth() const
void TakeCreateRect(tools::Rectangle &rRect) const
Definition: svddrag.cxx:115
virtual void NbcShear(const Point &rRef, Degree100 nAngle, double tn, bool bVShear) override
Definition: svdotxtr.cxx:210
tools::Rectangle maSnapRect
Definition: svdoattr.hxx:41
virtual void NbcShear(const Point &rRef, Degree100 nAngle, double tn, bool bVShear) override
Definition: svdorect.cxx:464
double mfTanShearAngle
Definition: svdtrans.hxx:218
SdrObjKind meTextKind
Definition: svdotext.hxx:192
UNDERLYING_TYPE get() const
virtual bool applySpecialDrag(SdrDragStat &rDrag) override
Definition: svdotxdr.cxx:149
virtual OUString getSpecialDragComment(const SdrDragStat &rDrag) const override
Definition: svdotxdr.cxx:174
const XPolygon & GetXPoly() const
Definition: svdorect.cxx:136
#define DBG_ASSERT(sCon, aError)
XPolygon ImpCalcXPoly(const tools::Rectangle &rRect1, tools::Long nRad1) const
Definition: svdorect.cxx:107
int i
uno_Any a
OUString sName
SdrObject * GetCreateObj() const
Definition: svdcrtv.hxx:120
tools::Long FRound(double fVal)
virtual sal_uInt32 GetHdlCount() const override
Via GetHdlCount the number of Handles can be retrieved.
Definition: svdorect.cxx:282
SdrPathObjUniquePtr ImpConvertMakeObj(const basegfx::B2DPolyPolygon &rPolyPolygon, bool bClosed, bool bBezier) const
Definition: svdotxtr.cxx:429
OUString ImpGetDescriptionStr(TranslateId pStrCacheID) const
Definition: svdobj.cxx:1097
SdrView * GetView() const
Definition: svddrag.hxx:96
void SetXPolyDirty()
Definition: svdorect.cxx:102
basegfx::B2DPolygon getB2DPolygon() const
Definition: _xpoly.cxx:815
void SetPercent(bool bOn)
Definition: svdglue.hxx:126
constexpr tools::Long Top() const
virtual void NbcMove(const Size &rSiz) override
The methods Move, Resize, Rotate, Mirror, Shear, SetSnapRect and SetLogicRect call the corresponding ...
Definition: svdotxtr.cxx:94
void SetEndDragChangesAttributes(bool bOn)
Definition: svddrag.hxx:143
virtual void NbcRotate(const Point &rRef, Degree100 nAngle, double sn, double cs) override
Definition: svdotxtr.cxx:186
virtual void NbcRotate(const Point &rRef, Degree100 nAngle, double sn, double cs) override
Definition: svdorect.cxx:458
constexpr Point LeftCenter() const
OUString GetName() const
Definition: svdobj.cxx:802
constexpr Point Center() const
constexpr Point TopLeft() const
void NbcSetEckenradius(tools::Long nRad)
Definition: svdotext.cxx:509
virtual PointerStyle GetCreatePointer() const override
get the cursor/pointer that signals creating this object
Definition: svdorect.cxx:440
constexpr tools::Long Bottom() const
virtual void TakeObjInfo(SdrObjTransformInfoRec &rInfo) const override
Definition: svdorect.cxx:146
void append(const B2DPolygon &rPolygon, sal_uInt32 nCount=1)
virtual void NbcSetLogicRect(const tools::Rectangle &rRect) override
Definition: svdorect.cxx:276
virtual SdrRectObj * CloneSdrObject(SdrModel &rTargetModel) const override
Definition: svdorect.cxx:248
void RotatePoint(Point &rPnt, const Point &rRef, double sn, double cs)
Definition: svdtrans.hxx:114
virtual SdrObjKind GetObjIdentifier() const override
Definition: svdorect.cxx:172
bool HasFill() const
Definition: svdoattr.cxx:90
void Remove(sal_uInt16 nPos, sal_uInt16 nCount)
Definition: _xpoly.cxx:376
bool HasLine() const
Definition: svdoattr.cxx:97
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
Detects when a stylesheet is changed.
Definition: svdoattr.cxx:61
virtual std::unique_ptr< sdr::contact::ViewContact > CreateObjectSpecificViewContact() override
Definition: svdorect.cxx:48
virtual void NbcResize(const Point &rRef, const Fraction &xFact, const Fraction &yFact) override
Definition: svdorect.cxx:452
GeoStat maGeo
Definition: svdotext.hxx:173
void SetFlags(sal_uInt16 nPos, PolyFlags eFlags)
set the flags for the point at the given position
Definition: _xpoly.cxx:459
Degree100 nRotationAngle
Definition: svdtrans.hxx:216
OUString aName
constexpr Point TopRight() const
double mfCosRotationAngle
Definition: svdtrans.hxx:220
virtual void RestoreGeoData(const SdrObjGeoData &rGeo) override
Definition: svdotext.cxx:1416
std::unique_ptr< SdrObject, SdrObjectFreeOp > SdrObjectUniquePtr
Definition: svdobj.hxx:97
const Point & GetNow() const
Definition: svddrag.hxx:105
virtual bool beginSpecialDrag(SdrDragStat &rDrag) const
Definition: svdobj.cxx:1344
PointerStyle
text object
Definition: svdobjkind.hxx:43
virtual void AddToHdlList(SdrHdlList &rHdlList) const override
Definition: svdorect.cxx:287
constexpr Point BottomRight() const
void Move(tools::Long nHorzMoveDelta, tools::Long nVertMoveDelta)
void RotateXPoly(XPolygon &rPoly, const Point &rRef, double sn, double cs)
Definition: svdtrans.cxx:89
tools::Long AdjustLeft(tools::Long nHorzMoveDelta)
bool LineGeometryUsageIsNecessary() const
Definition: svdobj.cxx:1065
virtual void NbcSetSnapRect(const tools::Rectangle &rRect) override
Definition: svdorect.cxx:270
virtual void NbcSetLogicRect(const tools::Rectangle &rRect) override
Definition: svdotxtr.cxx:74
sal_uInt16 GetPointCount() const
Definition: _xpoly.cxx:346
TitleText, special text object for StarDraw.
Definition: svdobjkind.hxx:44
periodic cubic Spline (ni)
Definition: svdobjkind.hxx:42
Degree100 nShearAngle
Definition: svdtrans.hxx:217
virtual ~SdrRectObj() override
Definition: svdorect.cxx:98
virtual void NbcSetSnapRect(const tools::Rectangle &rRect) override
Definition: svdotxtr.cxx:42
void AddHdl(std::unique_ptr< SdrHdl > pHdl)
Definition: svdhdl.cxx:2289
virtual OUString TakeObjNamePlural() const override
Definition: svdorect.cxx:227
SdrHdlKind GetKind() const
Definition: svdhdl.hxx:194
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
Detects when a stylesheet is changed.
Definition: svdorect.cxx:556
constexpr tools::Long GetHeight() const
virtual OUString TakeObjNamePlural() const override
Definition: svdotext.cxx:1053