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