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