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