44 if (maGeo.nRotationAngle || maGeo.nShearAngle)
60 ImpJustifyRect(maRect);
65 SetBoundAndSnapRectsDirty();
77 ImpJustifyRect(maRect);
81 SetBoundAndSnapRectsDirty();
86 return maGeo.nRotationAngle;
91 return maGeo.nShearAngle;
97 m_aOutRect.Move(rSiz);
98 maSnapRect.Move(rSiz);
99 SetBoundAndSnapRectsDirty(
true);
104 bool bNotSheared=maGeo.nShearAngle==0_deg100;
105 bool bRotate90=bNotSheared && maGeo.nRotationAngle.get() % 9000 ==0;
108 if (bXMirr || bYMirr) {
113 NbcMirrorGluePoints(aRef1,aRef2);
118 NbcMirrorGluePoints(aRef1,aRef2);
122 if (maGeo.nRotationAngle==0_deg100 && maGeo.nShearAngle==0_deg100) {
126 maRect.Move(maRect.Right()-maRect.Left(),maRect.Bottom()-maRect.Top());
127 maGeo.nRotationAngle=18000_deg100;
128 maGeo.RecalcSinCos();
156 bool bRota90=maGeo.nRotationAngle.get() % 9000 ==0;
159 if (a<4500_deg100) a=0_deg100;
160 else if (a<13500_deg100) a=9000_deg100;
161 else if (a<22500_deg100) a=18000_deg100;
162 else if (a<31500_deg100) a=27000_deg100;
164 maGeo.nRotationAngle=a;
165 maGeo.RecalcSinCos();
167 if (bNotSheared!=(maGeo.nShearAngle==0_deg100)) {
168 maGeo.nShearAngle=0_deg100;
173 ImpJustifyRect(maRect);
177 if(mbTextFrame && !getSdrModelFromSdrObject().IsPasteResize())
179 NbcAdjustTextFrameWidthAndHeight();
183 SetBoundAndSnapRectsDirty();
188 SetGlueReallyAbsolute(
true);
191 Point aP(maRect.TopLeft());
193 maRect.SetLeft(aP.X() );
194 maRect.SetTop(aP.Y() );
195 maRect.SetRight(maRect.Left()+dx );
196 maRect.SetBottom(maRect.Top()+dy );
197 if (maGeo.nRotationAngle==0_deg100) {
199 maGeo.mfSinRotationAngle=sn;
200 maGeo.mfCosRotationAngle=cs;
203 maGeo.RecalcSinCos();
205 SetBoundAndSnapRectsDirty();
206 NbcRotateGluePoints(rRef,nAngle,sn,cs);
207 SetGlueReallyAbsolute(
false);
212 SetGlueReallyAbsolute(
true);
217 sal_uInt16 nPointCount=aPol.
GetSize();
218 for (sal_uInt16
i=0;
i<nPointCount;
i++) {
222 ImpJustifyRect(maRect);
224 NbcAdjustTextFrameWidthAndHeight();
227 SetBoundAndSnapRectsDirty();
228 NbcShearGluePoints(rRef,tn,bVShear);
229 SetGlueReallyAbsolute(
false);
234 SetGlueReallyAbsolute(
true);
235 bool bNotSheared=maGeo.nShearAngle==0_deg100;
236 bool bRotate90 =
false;
238 (rRef1.X()==rRef2.X() || rRef1.Y()==rRef2.Y() ||
239 std::abs(rRef1.X()-rRef2.X())==std::abs(rRef1.Y()-rRef2.Y()))) {
240 bRotate90=maGeo.nRotationAngle.get() % 9000 ==0;
244 sal_uInt16 nPointCount=aPol.
GetSize();
245 for (i=0; i<nPointCount; i++) {
258 bool bRota90=maGeo.nRotationAngle.get() % 9000 ==0;
259 if (bRotate90 && !bRota90) {
261 if (a<4500_deg100) a=0_deg100;
262 else if (a<13500_deg100) a=9000_deg100;
263 else if (a<22500_deg100) a=18000_deg100;
264 else if (a<31500_deg100) a=27000_deg100;
266 maGeo.nRotationAngle=a;
267 maGeo.RecalcSinCos();
270 if (bNotSheared!=(maGeo.nShearAngle==0_deg100)) {
271 maGeo.nShearAngle=0_deg100;
275 ImpJustifyRect(maRect);
277 NbcAdjustTextFrameWidthAndHeight();
280 SetBoundAndSnapRectsDirty();
281 NbcMirrorGluePoints(rRef1,rRef2);
282 SetGlueReallyAbsolute(
false);
290 if(!ImpCanConvTextToCurve())
301 GetViewContact().getViewIndependentPrimitive2DContainer(aExtractor);
305 const sal_uInt32 nResultCount(rResult.size());
314 for(sal_uInt32
a(0);
a < nResultCount;
a++)
319 if(aPolyPolygon.count())
324 if(aPolyPolygon.areControlPointsUsed())
331 if(!aPolyPolygon.areControlPointsUsed())
353 getSdrModelFromSdrObject(),
367 getSdrModelFromSdrObject(),
400 pRetval.reset(pGroup);
412 return ImpConvertContainedTextToSdrPathObjs(!bBezier);
420 return !IsOutlText();
436 getSdrModelFromSdrObject(),
446 pPathObj->ImpSetAnchorPos(m_aAnchor);
447 pPathObj->NbcSetLayer(GetLayer());
449 pPathObj->ClearMergedItem();
450 pPathObj->SetMergedItemSet(GetObjectItemSet());
451 pPathObj->GetProperties().BroadcastItemChange(aC);
452 pPathObj->NbcSetStyleSheet(GetStyleSheet(),
true);
459 if(!ImpCanConvTextToCurve())
476 if(pText->IsGroupObject())
487 std::unique_ptr<SdrObjGroup, SdrObjectFreeOp> pGrp(
new SdrObjGroup(getSdrModelFromSdrObject()));
::std::vector< TextAsPolygonDataNode > TextAsPolygonDataNodeVector
virtual void NbcResize(const Point &rRef, const Fraction &xFact, const Fraction &yFact) override
void ShearPoint(Point &rPnt, const Point &rRef, double tn, bool bVShear=false)
void ResizePoint(Point &rPnt, const Point &rRef, const Fraction &xFract, const Fraction &yFract)
void Poly2Rect(const tools::Polygon &rPol, tools::Rectangle &rRect, GeoStat &rGeo)
B2DPolygon expandToCurve(const B2DPolygon &rCandidate)
bool ImpCanConvTextToCurve() const
const basegfx::B2DPolyPolygon & getB2DPolyPolygon() const
size_t GetObjCount() const
SdrObjectUniquePtr ImpConvertAddText(SdrObjectUniquePtr pObj, bool bBezier) const
static void Free(SdrObject *&_rpObject)
virtual void InsertObject(SdrObject *pObj, size_t nPos=SAL_MAX_SIZE)
std::unique_ptr< SdrPathObj, SdrObjectFreeOp > SdrPathObjUniquePtr
void ImpSetAnchorPos(const Point &rPnt)
virtual void NbcMirror(const Point &rRef1, const Point &rRef2) override
SVX_DLLPRIVATE SdrObjectUniquePtr ImpConvertContainedTextToSdrPathObjs(bool bToPoly) const
void SetMergedItemSet(const SfxItemSet &rSet, bool bClearAllItems=false)
virtual void NbcShear(const Point &rRef, Degree100 nAngle, double tn, bool bVShear) override
void ResizeRect(tools::Rectangle &rRect, const Point &rRef, const Fraction &rxFact, const Fraction &ryFact)
SdrPathObjUniquePtr ImpConvertMakeObj(const basegfx::B2DPolyPolygon &rPolyPolygon, bool bClosed, bool bBezier) const
const basegfx::BColor & getBColor() const
void MirrorPoint(Point &rPnt, const Point &rRef1, const Point &rRef2)
tools::Polygon Rect2Poly(const tools::Rectangle &rRect, const GeoStat &rGeo)
virtual SdrObjList * GetSubList() const override
virtual void NbcMove(const Size &rSiz) override
The methods Move, Resize, Rotate, Mirror, Shear, SetSnapRect and SetLogicRect call the corresponding ...
virtual void NbcRotate(const Point &rRef, Degree100 nAngle, double sn, double cs) override
virtual SdrObject * RemoveObject(size_t nObjNum)
Degree100 NormAngle36000(Degree100 a)
Normalize angle to -180.00..179.99.
virtual Degree100 GetRotateAngle() const override
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
void RotatePoint(Point &rPnt, const Point &rRef, double sn, double cs)
sal_Int32 GetDenominator() const
B2DPolygon adaptiveSubdivideByAngle(const B2DPolygon &rCandidate, double fAngleBound)
virtual Degree100 GetShearAngle(bool bVertical=false) const override
sal_Int32 GetNumerator() const
std::unique_ptr< SdrObject, SdrObjectFreeOp > SdrObjectUniquePtr
SdrOnOffItem makeSdrShadowItem(bool bShadow)
void NbcSetStyleSheet(SfxStyleSheet *pNewStyleSheet, bool bDontRemoveHardAttr)
virtual void NbcSetLogicRect(const tools::Rectangle &rRect) override
virtual SdrObjectUniquePtr DoConvertToPolyObj(bool bBezier, bool bAddText) const override
virtual void NbcSetSnapRect(const tools::Rectangle &rRect) override
virtual const tools::Rectangle & GetLogicRect() const override
virtual void NbcSetLayer(SdrLayerID nLayer)