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