LibreOffice Module svx (master) 1
svdpoev.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
21#include <svx/svdpoev.hxx>
22#include <math.h>
23#include <svx/svdpagv.hxx>
24#include <svx/svdpage.hxx>
25#include <svx/svdopath.hxx>
26#include <svx/svdundo.hxx>
27#include <svx/strings.hrc>
28#include <svx/dialmgr.hxx>
29#include <svx/svdtrans.hxx>
32#include <tools/debug.hxx>
33#include <tools/helpers.hxx>
34
36
37using namespace sdr;
38
39
41{
46}
47
49 SdrModel& rSdrModel,
50 OutputDevice* pOut)
51: SdrEditView(rSdrModel, pOut)
52{
54}
55
57{
58}
59
61{
63 const size_t nMarkCount(GetMarkedObjectCount());
64
65 if(!nMarkCount || ImpIsFrameHandles())
66 return;
67
68 bool b1stSmooth(true);
69 bool b1stSegm(true);
70 bool bCurve(false);
71 bool bSmoothFuz(false);
72 bool bSegmFuz(false);
74
75 for(size_t nMarkNum = 0; nMarkNum < nMarkCount; ++nMarkNum)
76 {
77 SdrMark* pM = GetSdrMarkByIndex(nMarkNum);
78 CheckPolyPossibilitiesHelper( pM, b1stSmooth, b1stSegm, bCurve, bSmoothFuz, bSegmFuz, eSmooth );
79 }
80}
81
82void SdrPolyEditView::CheckPolyPossibilitiesHelper( SdrMark* pM, bool& b1stSmooth, bool& b1stSegm, bool& bCurve, bool& bSmoothFuz, bool& bSegmFuz, basegfx::B2VectorContinuity& eSmooth )
83{
84 SdrObject* pObj = pM->GetMarkedSdrObj();
85 SdrPathObj* pPath = dynamic_cast<SdrPathObj*>( pObj );
86
87 if (!pPath)
88 return;
89
90 SdrUShortCont& rPts = pM->GetMarkedPoints();
91 if (rPts.empty())
92 return;
93
94 const bool bClosed(pPath->IsClosed());
96
97 if (bClosed)
98 {
100 }
101
102 for (const auto& rPt : rPts)
103 {
104 sal_uInt32 nNum(rPt);
105 sal_uInt32 nPolyNum, nPntNum;
106
107 if(PolyPolygonEditor::GetRelativePolyPoint(pPath->GetPathPoly(), nNum, nPolyNum, nPntNum))
108 {
109 const basegfx::B2DPolygon aLocalPolygon(pPath->GetPathPoly().getB2DPolygon(nPolyNum));
110 bool bCanSegment(bClosed || nPntNum < aLocalPolygon.count() - 1);
111
112 if(!bSetMarkedSegmentsKindPossible && bCanSegment)
113 {
115 }
116
117 if(!bSmoothFuz)
118 {
119 if (b1stSmooth)
120 {
121 b1stSmooth = false;
122 eSmooth = basegfx::utils::getContinuityInPoint(aLocalPolygon, nPntNum);
123 }
124 else
125 {
126 bSmoothFuz = (eSmooth != basegfx::utils::getContinuityInPoint(aLocalPolygon, nPntNum));
127 }
128 }
129
130 if(!bSegmFuz && bCanSegment)
131 {
132 bool bCrv(aLocalPolygon.isNextControlPointUsed(nPntNum));
133
134 if(b1stSegm)
135 {
136 b1stSegm = false;
137 bCurve = bCrv;
138 }
139 else
140 {
141 bSegmFuz = (bCrv != bCurve);
142 }
143 }
144 }
145 }
146
147 if(!b1stSmooth && !bSmoothFuz)
148 {
150 {
152 }
153
155 {
157 }
158
160 {
162 }
163 }
164
165 if(!b1stSegm && !bSegmFuz)
166 {
168 }
169}
170
172{
174
175 if(SdrPathSmoothKind::Angular == eKind)
176 {
178 }
179 else if(SdrPathSmoothKind::Asymmetric == eKind)
180 {
182 }
183 else if(SdrPathSmoothKind::Symmetric == eKind)
184 {
186 }
187 else
188 {
189 return;
190 }
191
192 if(!HasMarkedPoints())
193 return;
194
196
197 const bool bUndo = IsUndoEnabled();
198 if( bUndo )
199 BegUndo(SvxResId(STR_EditSetPointsSmooth), GetDescriptionOfMarkedPoints());
200 const size_t nMarkCount(GetMarkedObjectCount());
201
202 for(size_t nMarkNum(nMarkCount); nMarkNum > 0;)
203 {
204 --nMarkNum;
205 SdrMark* pM = GetSdrMarkByIndex(nMarkNum);
206 SdrPathObj* pPath = dynamic_cast< SdrPathObj* >( pM->GetMarkedSdrObj() );
207 if (!pPath)
208 continue;
209
210 SdrUShortCont& rPts = pM->GetMarkedPoints();
211 PolyPolygonEditor aEditor(pPath->GetPathPoly());
212 if (aEditor.SetPointsSmooth(eFlags, rPts))
213 {
214 if( bUndo )
215 AddUndo(GetModel().GetSdrUndoFactory().CreateUndoGeoObject(*pPath));
216 pPath->SetPathPoly(aEditor.GetPolyPolygon());
217 }
218 }
219
220 if( bUndo )
221 EndUndo();
222}
223
225{
226 if(!HasMarkedPoints())
227 return;
228
230
231 const bool bUndo = IsUndoEnabled();
232 if( bUndo )
233 BegUndo(SvxResId(STR_EditSetSegmentsKind), GetDescriptionOfMarkedPoints());
234 const size_t nMarkCount(GetMarkedObjectCount());
235
236 for(size_t nMarkNum=nMarkCount; nMarkNum > 0;)
237 {
238 --nMarkNum;
239 SdrMark* pM = GetSdrMarkByIndex(nMarkNum);
240 SdrPathObj* pPath = dynamic_cast< SdrPathObj* >( pM->GetMarkedSdrObj() );
241 if (!pPath)
242 continue;
243 SdrUShortCont& rPts = pM->GetMarkedPoints();
244 PolyPolygonEditor aEditor( pPath->GetPathPoly());
245 if (aEditor.SetSegmentsKind(eKind, rPts))
246 {
247 if( bUndo )
248 AddUndo(GetModel().GetSdrUndoFactory().CreateUndoGeoObject(*pPath));
249 pPath->SetPathPoly(aEditor.GetPolyPolygon());
250 }
251 }
252
253 if( bUndo )
254 EndUndo();
255}
256
258{
261}
262
264{
266 return eMarkedPointsSmooth;
267}
268
270{
273}
274
276{
278 return eMarkedSegmentsKind;
279}
280
282{
283 return HasMarkedPoints();
284}
285
287{
288 if (!HasMarkedPoints())
289 return;
290
291 BrkAction();
293 const size_t nMarkCount=GetMarkedObjectCount();
294
295 const bool bUndo = IsUndoEnabled();
296 if( bUndo )
297 {
298 // Description
300 }
301
302 for (size_t nMarkNum=nMarkCount; nMarkNum>0;)
303 {
304 --nMarkNum;
305 SdrMark* pM=GetSdrMarkByIndex(nMarkNum);
306 SdrPathObj* pPath = dynamic_cast< SdrPathObj* >( pM->GetMarkedSdrObj() );
307 if (!pPath)
308 continue;
309
310 SdrUShortCont& rPts = pM->GetMarkedPoints();
311 PolyPolygonEditor aEditor( pPath->GetPathPoly());
312 if (aEditor.DeletePoints(rPts))
313 {
314 if( aEditor.GetPolyPolygon().count() )
315 {
316 if (bUndo)
317 AddUndo(GetModel().GetSdrUndoFactory().CreateUndoGeoObject(*pPath));
318 pPath->SetPathPoly( aEditor.GetPolyPolygon() );
319 }
320 else
321 {
322 if (bUndo)
323 AddUndo(GetModel().GetSdrUndoFactory().CreateUndoDeleteObject(*pPath));
324 pM->GetPageView()->GetObjList()->RemoveObject(pPath->GetOrdNum());
325 }
326 }
327 }
328
329 if( bUndo )
330 EndUndo();
333}
334
336{
337 if(!HasMarkedPoints())
338 return;
339
341 const size_t nMarkCount(GetMarkedObjectCount());
342
343 const bool bUndo = IsUndoEnabled();
344 if( bUndo )
346
347 for(size_t nMarkNum = nMarkCount; nMarkNum > 0;)
348 {
349 --nMarkNum;
350 SdrMark* pM = GetSdrMarkByIndex(nMarkNum);
351 SdrPathObj* pObj = dynamic_cast<SdrPathObj*>( pM->GetMarkedSdrObj() );
352 if (!pObj)
353 continue;
354
355 SdrUShortCont& rPts = pM->GetMarkedPoints();
356
357 if (bUndo)
358 AddUndo(GetModel().GetSdrUndoFactory().CreateUndoGeoObject(*pObj));
359 bool bCorrectionFlag(false);
360 sal_uInt32 nMax(pObj->GetHdlCount());
361
362 for(SdrUShortCont::const_reverse_iterator it = rPts.rbegin(); it != rPts.rend(); ++it)
363 {
364 sal_uInt32 nNewPt0Idx(0);
365 rtl::Reference<SdrPathObj> pNewObj = pObj->RipPoint(*it, nNewPt0Idx);
366
367 if(pNewObj)
368 {
369 pM->GetPageView()->GetObjList()->InsertObject(pNewObj.get(), pObj->GetOrdNum() + 1);
370 if (bUndo)
371 AddUndo(GetModel().GetSdrUndoFactory().CreateUndoNewObject(*pNewObj));
372 MarkObj(pNewObj.get(), pM->GetPageView(), false, true);
373 }
374
375 if(nNewPt0Idx)
376 {
377 // correction necessary?
378 DBG_ASSERT(!bCorrectionFlag,"Multiple index corrections at SdrPolyEditView::RipUp().");
379 if(!bCorrectionFlag)
380 {
381 bCorrectionFlag = true;
382
383 SdrUShortCont aReplaceSet;
384 for(const auto& rPt : rPts)
385 {
386 sal_uInt32 nPntNum(rPt);
387 nPntNum += nNewPt0Idx;
388
389 if(nPntNum >= nMax)
390 {
391 nPntNum -= nMax;
392 }
393
394 aReplaceSet.insert( static_cast<sal_uInt16>(nPntNum) );
395 }
396 rPts.swap(aReplaceSet);
397
398 it = rPts.rbegin();
399 }
400 }
401 }
402 }
403
405 if( bUndo )
406 EndUndo();
408}
409
411{
412 bool bRetval(false);
413 const size_t nMarkCount(GetMarkedObjectCount());
414
415 for(size_t a = 0; a < nMarkCount; ++a)
416 {
417 const SdrMark* pMark = GetSdrMarkByIndex(a);
418 const SdrPathObj* pMarkedPathObject = dynamic_cast< const SdrPathObj* >(pMark->GetMarkedSdrObj());
419
420 if (!pMarkedPathObject)
421 continue;
422
423 const SdrUShortCont& rSelectedPoints = pMark->GetMarkedPoints();
424 if (rSelectedPoints.empty())
425 continue;
426
427 const basegfx::B2DPolyPolygon& rPathPolyPolygon = pMarkedPathObject->GetPathPoly();
428
429 if(1 == rPathPolyPolygon.count())
430 {
431 // #i76617# Do not yet use basegfx::B2DPolygon since curve definitions
432 // are different and methods need to be changed thoroughly with interaction rework
433 const tools::Polygon aPathPolygon(rPathPolyPolygon.getB2DPolygon(0));
434 const sal_uInt16 nPointCount(aPathPolygon.GetSize());
435
436 if(nPointCount >= 3)
437 {
438 bRetval = pMarkedPathObject->IsClosedObj() // #i76617#
439 || std::any_of(rSelectedPoints.begin(), rSelectedPoints.end(),
440 [nPointCount](const sal_uInt16 nMarkedPointNum) {
441 return nMarkedPointNum > 0 && nMarkedPointNum < nPointCount - 1;
442 });
443 }
444 }
445 }
446
447 return bRetval;
448}
449
451{
452 bool bRetval(false);
453 const size_t nMarkCount(GetMarkedObjectCount());
454
455 for(size_t a = 0; a < nMarkCount; ++a)
456 {
457 const SdrMark* pMark = GetSdrMarkByIndex(a);
458 const SdrPathObj* pMarkedPathObject = dynamic_cast< const SdrPathObj* >(pMark->GetMarkedSdrObj());
459
460 if(pMarkedPathObject)
461 {
462 // #i76617# Do not yet use basegfx::B2DPolygon since curve definitions
463 // are different and methods need to be changed thoroughly with interaction rework
464 const tools::PolyPolygon aPathPolyPolygon(pMarkedPathObject->GetPathPoly());
465 const sal_uInt16 nPolygonCount(aPathPolyPolygon.Count());
466
467 for(sal_uInt16 b(0); !bRetval && b < nPolygonCount; b++)
468 {
469 const tools::Polygon& rPathPolygon = aPathPolyPolygon[b];
470 const sal_uInt16 nPointCount(rPathPolygon.GetSize());
471
472 bRetval = (nPointCount >= 3);
473 }
474 }
475 }
476
477 return bRetval;
478}
479
481{
482 bool bOpen(false);
483 bool bClosed(false);
484 const size_t nMarkCount(GetMarkedObjectCount());
485
486 for(size_t a = 0; !(bOpen && bClosed) && a < nMarkCount; ++a)
487 {
488 const SdrMark* pMark = GetSdrMarkByIndex(a);
489 const SdrPathObj* pMarkedPathObject = dynamic_cast< const SdrPathObj* >(pMark->GetMarkedSdrObj());
490
491 if(pMarkedPathObject)
492 {
493 if(pMarkedPathObject->IsClosedObj())
494 {
495 bClosed = true;
496 }
497 else
498 {
499 bOpen = true;
500 }
501 }
502 }
503
504 if(bOpen && bClosed)
505 {
507 }
508 else if(bOpen)
509 {
511 }
512 else
513 {
515 }
516}
517
518void SdrPolyEditView::ImpTransformMarkedPoints(PPolyTrFunc pTrFunc, const void* p1, const void* p2, const void* p3, const void* p4)
519{
520 const bool bUndo = IsUndoEnabled();
521
522 const size_t nMarkCount=GetMarkedObjectCount();
523 for (size_t nm=0; nm<nMarkCount; ++nm)
524 {
526 SdrObject* pObj=pM->GetMarkedSdrObj();
527 SdrPathObj* pPath=dynamic_cast<SdrPathObj*>( pObj );
528 if (!pPath)
529 continue;
530
531 const SdrUShortCont& rPts = pM->GetMarkedPoints();
532 if (rPts.empty())
533 continue;
534
535 if( bUndo )
536 AddUndo(GetModel().GetSdrUndoFactory().CreateUndoGeoObject(*pObj));
537
539
540 for (const auto& rPt : rPts)
541 {
542 sal_uInt32 nPt = rPt;
543 sal_uInt32 nPolyNum, nPointNum;
544
545 if(PolyPolygonEditor::GetRelativePolyPoint(aXPP, nPt, nPolyNum, nPointNum))
546 {
547 //#i83671# used nLocalPointNum (which was the polygon point count)
548 // instead of the point index (nPointNum). This of course led
549 // to a wrong point access to the B2DPolygon.
550 basegfx::B2DPolygon aNewXP(aXPP.getB2DPolygon(nPolyNum));
551 Point aPos, aC1, aC2;
552 bool bC1(false);
553 bool bC2(false);
554
555 const basegfx::B2DPoint aB2DPos(aNewXP.getB2DPoint(nPointNum));
556 aPos = Point(FRound(aB2DPos.getX()), FRound(aB2DPos.getY()));
557
558 if(aNewXP.isPrevControlPointUsed(nPointNum))
559 {
560 const basegfx::B2DPoint aB2DC1(aNewXP.getPrevControlPoint(nPointNum));
561 aC1 = Point(FRound(aB2DC1.getX()), FRound(aB2DC1.getY()));
562 bC1 = true;
563 }
564
565 if(aNewXP.isNextControlPointUsed(nPointNum))
566 {
567 const basegfx::B2DPoint aB2DC2(aNewXP.getNextControlPoint(nPointNum));
568 aC2 = Point(FRound(aB2DC2.getX()), FRound(aB2DC2.getY()));
569 bC2 = true;
570 }
571
572 (*pTrFunc)(aPos,&aC1,&aC2,p1,p2,p3,p4);
573 aNewXP.setB2DPoint(nPointNum, basegfx::B2DPoint(aPos.X(), aPos.Y()));
574
575 if (bC1)
576 {
577 aNewXP.setPrevControlPoint(nPointNum, basegfx::B2DPoint(aC1.X(), aC1.Y()));
578 }
579
580 if (bC2)
581 {
582 aNewXP.setNextControlPoint(nPointNum, basegfx::B2DPoint(aC2.X(), aC2.Y()));
583 }
584
585 aXPP.setB2DPolygon(nPolyNum, aNewXP);
586 }
587 }
588
589 pPath->SetPathPoly(aXPP);
590 }
591}
592
593
594static void ImpMove(Point& rPt, Point* pC1, Point* pC2, const void* p1, const void* /*p2*/, const void* /*p3*/, const void* /*p4*/)
595{
596 rPt.Move(*static_cast<const Size*>(p1));
597 if (pC1!=nullptr) pC1->Move(*static_cast<const Size*>(p1));
598 if (pC2!=nullptr) pC2->Move(*static_cast<const Size*>(p1));
599}
600
602{
604 OUString aStr(SvxResId(STR_EditMove));
607 EndUndo();
609}
610
611static void ImpResize(Point& rPt, Point* pC1, Point* pC2, const void* p1, const void* p2, const void* p3, const void* /*p4*/)
612{
613 ResizePoint(rPt,*static_cast<const Point*>(p1),*static_cast<const Fraction*>(p2),*static_cast<const Fraction*>(p3));
614 if (pC1!=nullptr) ResizePoint(*pC1,*static_cast<const Point*>(p1),*static_cast<const Fraction*>(p2),*static_cast<const Fraction*>(p3));
615 if (pC2!=nullptr) ResizePoint(*pC2,*static_cast<const Point*>(p1),*static_cast<const Fraction*>(p2),*static_cast<const Fraction*>(p3));
616}
617
618void SdrPolyEditView::ResizeMarkedPoints(const Point& rRef, const Fraction& xFact, const Fraction& yFact)
619{
621 OUString aStr(SvxResId(STR_EditResize));
623 ImpTransformMarkedPoints(ImpResize,&rRef,&xFact,&yFact);
624 EndUndo();
626}
627
628static void ImpRotate(Point& rPt, Point* pC1, Point* pC2, const void* p1, const void* /*p2*/, const void* p3, const void* p4)
629{
630 RotatePoint(rPt,*static_cast<const Point*>(p1),*static_cast<const double*>(p3),*static_cast<const double*>(p4));
631 if (pC1!=nullptr) RotatePoint(*pC1,*static_cast<const Point*>(p1),*static_cast<const double*>(p3),*static_cast<const double*>(p4));
632 if (pC2!=nullptr) RotatePoint(*pC2,*static_cast<const Point*>(p1),*static_cast<const double*>(p3),*static_cast<const double*>(p4));
633}
634
636{
638 OUString aStr(SvxResId(STR_EditResize));
640 double nSin = sin(toRadians(nAngle));
641 double nCos = cos(toRadians(nAngle));
642 ImpTransformMarkedPoints(ImpRotate,&rRef,&nAngle,&nSin,&nCos);
643 EndUndo();
645}
646
647/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
constexpr tools::Long Y() const
void Move(tools::Long nHorzMove, tools::Long nVertMove)
constexpr tools::Long X() const
bool IsUndoEnabled() const
Definition: svdedtv.cxx:1056
virtual void MarkListHasChanged() override
Definition: svdedtv.cxx:371
void AddUndo(std::unique_ptr< SdrUndoAction > pUndo)
Definition: svdedtv.hxx:196
void BegUndo()
Definition: svdedtv.hxx:178
void ForcePossibilities() const
Definition: svdedtv.hxx:161
void EndUndo()
Definition: svdedtv.cxx:295
bool ImpIsFrameHandles() const
Definition: svdmrkv.cxx:602
void SortMarkedObjects() const
Definition: svdmrkv.hxx:265
OUString const & GetDescriptionOfMarkedPoints() const
Definition: svdmrkv.hxx:268
virtual bool HasMarkedPoints() const
Definition: svdmrkv1.cxx:65
size_t GetMarkedObjectCount() const
Definition: svdmrkv.hxx:264
void ForceUndirtyMrkPnt() const
Definition: svdmrkv.hxx:170
SdrMark * GetSdrMarkByIndex(size_t nNum) const
Definition: svdmrkv.hxx:262
bool UnmarkAllPoints()
Definition: svdmrkv.hxx:348
virtual void BrkAction() override
Definition: svdmrkv.cxx:339
void AdjustMarkHdl(SfxViewShell *pOtherShell=nullptr)
Definition: svdmrkv.cxx:2614
bool MarkObj(const Point &rPnt, short nTol=-2, bool bToggle=false, bool bDeep=false)
Definition: svdmrkv.cxx:1941
Everything a View needs to know about a selected object.
Definition: svdmark.hxx:45
SdrPageView * GetPageView() const
Definition: svdmark.hxx:70
SdrObject * GetMarkedSdrObj() const
Definition: svdmark.hxx:68
const SdrUShortCont & GetMarkedPoints() const
Definition: svdmark.hxx:110
virtual void InsertObject(SdrObject *pObj, size_t nPos=SAL_MAX_SIZE)
Definition: svdpage.cxx:295
virtual rtl::Reference< SdrObject > RemoveObject(size_t nObjNum)
Definition: svdpage.cxx:373
Abstract DrawObject.
Definition: svdobj.hxx:260
bool IsClosedObj() const
Definition: svdobj.hxx:745
sal_uInt32 GetOrdNum() const
The order number (aka ZOrder, aka z-index) determines whether a SdrObject is located above or below a...
Definition: svdobj.cxx:905
SdrObjList * GetObjList() const
Return current List.
Definition: svdpagv.hxx:169
SdrModel & GetModel() const
Definition: svdpntv.hxx:282
void SetPathPoly(const basegfx::B2DPolyPolygon &rPathPoly)
Definition: svdopath.cxx:2737
rtl::Reference< SdrPathObj > RipPoint(sal_uInt32 nHdlNum, sal_uInt32 &rNewPt0Index)
Definition: svdopath.cxx:2618
virtual sal_uInt32 GetHdlCount() const override
Via GetHdlCount the number of Handles can be retrieved.
Definition: svdopath.cxx:1949
const basegfx::B2DPolyPolygon & GetPathPoly() const
Definition: svdopath.hxx:141
bool IsClosed() const
Definition: svdopath.hxx:146
bool IsRipUpAtMarkedPointsPossible() const override
Definition: svdpoev.cxx:410
void CheckPolyPossibilitiesHelper(SdrMark *pM, bool &b1stSmooth, bool &b1stSegm, bool &bCurve, bool &bSmoothFuz, bool &bSegmFuz, basegfx::B2VectorContinuity &eSmooth)
Definition: svdpoev.cxx:82
SVX_DLLPRIVATE void ImpCheckPolyPossibilities()
Definition: svdpoev.cxx:60
virtual ~SdrPolyEditView() override
Definition: svdpoev.cxx:56
bool bSetMarkedSegmentsKindPossible
Definition: svdpoev.hxx:32
void SetMarkedSegmentsKind(SdrPathSegmentKind eKind) override
Definition: svdpoev.cxx:224
void SetMarkedPointsSmooth(SdrPathSmoothKind eKind) override
Definition: svdpoev.cxx:171
SVX_DLLPRIVATE void ImpTransformMarkedPoints(PPolyTrFunc pTrFunc, const void *p1, const void *p2=nullptr, const void *p3=nullptr, const void *p4=nullptr)
Definition: svdpoev.cxx:518
void MoveMarkedPoints(const Size &rSiz)
Definition: svdpoev.cxx:601
bool bSetMarkedPointsSmoothPossible
Definition: svdpoev.hxx:31
SdrPathSmoothKind GetMarkedPointsSmooth() const override
Definition: svdpoev.cxx:263
bool IsOpenCloseMarkedObjectsPossible() const override
Definition: svdpoev.cxx:450
void DeleteMarkedPoints() override
Definition: svdpoev.cxx:286
SVX_DLLPRIVATE void ImpResetPolyPossibilityFlags()
Definition: svdpoev.cxx:40
SdrObjClosedKind GetMarkedObjectsClosedState() const override
Definition: svdpoev.cxx:480
void RipUpAtMarkedPoints() override
Definition: svdpoev.cxx:335
SdrPathSegmentKind eMarkedSegmentsKind
Definition: svdpoev.hxx:35
SdrPathSmoothKind eMarkedPointsSmooth
Definition: svdpoev.hxx:34
bool IsSetMarkedPointsSmoothPossible() const override
Definition: svdpoev.cxx:257
SdrPolyEditView(SdrModel &rSdrModel, OutputDevice *pOut)
Definition: svdpoev.cxx:48
SdrPathSegmentKind GetMarkedSegmentsKind() const override
Definition: svdpoev.cxx:275
void RotateMarkedPoints(const Point &rRef, Degree100 nAngle)
Definition: svdpoev.cxx:635
bool IsDeleteMarkedPointsPossible() const override
Definition: svdpoev.cxx:281
void ResizeMarkedPoints(const Point &rRef, const Fraction &xFact, const Fraction &yFact)
Definition: svdpoev.cxx:618
bool IsSetMarkedSegmentsKindPossible() const override
Definition: svdpoev.cxx:269
B2DPolygon const & getB2DPolygon(sal_uInt32 nIndex) const
void setB2DPolygon(sal_uInt32 nIndex, const B2DPolygon &rPolygon)
sal_uInt32 count() const
bool isPrevControlPointUsed(sal_uInt32 nIndex) const
void setB2DPoint(sal_uInt32 nIndex, const basegfx::B2DPoint &rValue)
bool isNextControlPointUsed(sal_uInt32 nIndex) const
void setPrevControlPoint(sal_uInt32 nIndex, const basegfx::B2DPoint &rValue)
basegfx::B2DPoint const & getB2DPoint(sal_uInt32 nIndex) const
void setNextControlPoint(sal_uInt32 nIndex, const basegfx::B2DPoint &rValue)
basegfx::B2DPoint getPrevControlPoint(sal_uInt32 nIndex) const
sal_uInt32 count() const
basegfx::B2DPoint getNextControlPoint(sal_uInt32 nIndex) const
TYPE getX() const
TYPE getY() const
const_reverse_iterator rend() const
std::vector< Value >::const_reverse_iterator const_reverse_iterator
const_iterator begin() const
const_reverse_iterator rbegin() const
bool empty() const
const_iterator end() const
std::pair< const_iterator, bool > insert(Value &&x)
this class implements some helper functions to edit a B2DPolyPolygon
const basegfx::B2DPolyPolygon & GetPolyPolygon() const
bool SetPointsSmooth(basegfx::B2VectorContinuity eFlags, const o3tl::sorted_vector< sal_uInt16 > &rAbsPoints)
returns true if the B2DPolyPolygon was changed.
bool DeletePoints(const o3tl::sorted_vector< sal_uInt16 > &rAbsPoints)
returns true if the B2DPolyPolygon was changed.
bool SetSegmentsKind(SdrPathSegmentKind eKind, const o3tl::sorted_vector< sal_uInt16 > &rAbsPoints)
returns true if the B2DPolyPolygon was changed.
sal_uInt16 Count() const
sal_uInt16 GetSize() const
#define DBG_ASSERT(sCon, aError)
double toRadians(D x)
OUString SvxResId(TranslateId aId)
Definition: dialmgr.cxx:24
tools::Long FRound(double fVal)
uno_Any a
aStr
B2VectorContinuity getContinuityInPoint(const B2DPolygon &rCandidate, sal_uInt32 nIndex)
B2VectorContinuity
static void ImpRotate(Point &rPt, Point *pC1, Point *pC2, const void *p1, const void *, const void *p3, const void *p4)
Definition: svdpoev.cxx:628
static void ImpResize(Point &rPt, Point *pC1, Point *pC2, const void *p1, const void *p2, const void *p3, const void *)
Definition: svdpoev.cxx:611
static void ImpMove(Point &rPt, Point *pC1, Point *pC2, const void *p1, const void *, const void *, const void *)
Definition: svdpoev.cxx:594
void RotatePoint(Point &rPnt, const Point &rRef, double sn, double cs)
Definition: svdtrans.hxx:101
void ResizePoint(Point &rPnt, const Point &rRef, const Fraction &xFract, const Fraction &yFract)
Definition: svdtrans.hxx:93
oslFileHandle & pOut