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