48 if (aGeo.nRotationAngle!=0 || aGeo.nShearAngle!=0)
64 ImpJustifyRect(maRect);
81 ImpJustifyRect(maRect);
90 return aGeo.nRotationAngle;
95 return aGeo.nShearAngle;
102 maSnapRect.Move(rSiz);
108 bool bNotSheared=aGeo.nShearAngle==0;
109 bool bRotate90=bNotSheared && aGeo.nRotationAngle % 9000 ==0;
112 if (bXMirr || bYMirr) {
117 NbcMirrorGluePoints(aRef1,aRef2);
122 NbcMirrorGluePoints(aRef1,aRef2);
126 if (aGeo.nRotationAngle==0 && aGeo.nShearAngle==0) {
130 maRect.Move(maRect.Right()-maRect.Left(),maRect.Bottom()-maRect.Top());
131 aGeo.nRotationAngle=18000;
160 bool bRota90=aGeo.nRotationAngle % 9000 ==0;
164 else if (a<13500) a=9000;
165 else if (a<22500) a=18000;
166 else if (a<31500) a=27000;
168 aGeo.nRotationAngle=a;
171 if (bNotSheared!=(aGeo.nShearAngle==0)) {
177 ImpJustifyRect(maRect);
181 if(bTextFrame && !getSdrModelFromSdrObject().IsPasteResize())
183 NbcAdjustTextFrameWidthAndHeight();
192 SetGlueReallyAbsolute(
true);
193 long dx=maRect.Right()-maRect.Left();
194 long dy=maRect.Bottom()-maRect.Top();
195 Point aP(maRect.TopLeft());
197 maRect.SetLeft(aP.X() );
198 maRect.SetTop(aP.Y() );
199 maRect.SetRight(maRect.Left()+dx );
200 maRect.SetBottom(maRect.Top()+dy );
201 if (aGeo.nRotationAngle==0) {
210 NbcRotateGluePoints(rRef,nAngle,sn,cs);
211 SetGlueReallyAbsolute(
false);
216 SetGlueReallyAbsolute(
true);
221 sal_uInt16 nPointCount=aPol.
GetSize();
222 for (sal_uInt16
i=0;
i<nPointCount;
i++) {
226 ImpJustifyRect(maRect);
228 NbcAdjustTextFrameWidthAndHeight();
232 NbcShearGluePoints(rRef,tn,bVShear);
233 SetGlueReallyAbsolute(
false);
238 SetGlueReallyAbsolute(
true);
239 bool bNotSheared=aGeo.nShearAngle==0;
240 bool bRotate90 =
false;
242 (rRef1.
X()==rRef2.
X() || rRef1.
Y()==rRef2.
Y() ||
243 std::abs(rRef1.
X()-rRef2.
X())==std::abs(rRef1.
Y()-rRef2.
Y()))) {
244 bRotate90=aGeo.nRotationAngle % 9000 ==0;
248 sal_uInt16 nPointCount=aPol.
GetSize();
249 for (i=0; i<nPointCount; i++) {
262 bool bRota90=aGeo.nRotationAngle % 9000 ==0;
263 if (bRotate90 && !bRota90) {
266 else if (a<13500) a=9000;
267 else if (a<22500) a=18000;
268 else if (a<31500) a=27000;
270 aGeo.nRotationAngle=a;
274 if (bNotSheared!=(aGeo.nShearAngle==0)) {
279 ImpJustifyRect(maRect);
281 NbcAdjustTextFrameWidthAndHeight();
285 NbcMirrorGluePoints(rRef1,rRef2);
286 SetGlueReallyAbsolute(
false);
294 if(!ImpCanConvTextToCurve())
303 if(!xSequence.empty())
314 const sal_uInt32 nResultCount(rResult.size());
323 for(sal_uInt32
a(0);
a < nResultCount;
a++)
328 if(aPolyPolygon.count())
333 if(aPolyPolygon.areControlPointsUsed())
340 if(!aPolyPolygon.areControlPointsUsed())
362 getSdrModelFromSdrObject(),
376 getSdrModelFromSdrObject(),
409 pRetval.reset(pGroup);
422 return ImpConvertContainedTextToSdrPathObjs(!bBezier);
430 return !IsOutlText();
446 getSdrModelFromSdrObject(),
456 pPathObj->ImpSetAnchorPos(aAnchor);
457 pPathObj->NbcSetLayer(GetLayer());
459 pPathObj->ClearMergedItem();
460 pPathObj->SetMergedItemSet(GetObjectItemSet());
461 pPathObj->GetProperties().BroadcastItemChange(aC);
462 pPathObj->NbcSetStyleSheet(GetStyleSheet(),
true);
469 if(!ImpCanConvTextToCurve())
486 if(pText->IsGroupObject())
497 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)
long AdjustX(long nHorzMove)
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)
long NormAngle36000(long a)
Normalize angle to -180.00..179.99.
std::unique_ptr< SdrPathObj, SdrObjectFreeOp > SdrPathObjUniquePtr
void ImpSetAnchorPos(const Point &rPnt)
virtual void NbcMirror(const Point &rRef1, const Point &rRef2) override
virtual long GetRotateAngle() const override
SVX_DLLPRIVATE SdrObjectUniquePtr ImpConvertContainedTextToSdrPathObjs(bool bToPoly) const
void SetMergedItemSet(const SfxItemSet &rSet, bool bClearAllItems=false)
void ResizeRect(tools::Rectangle &rRect, const Point &rRef, const Fraction &rxFact, const Fraction &ryFact)
long AdjustY(long nVertMove)
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)
virtual long GetShearAngle(bool bVertical=false) const override
void process(const primitive2d::Primitive2DContainer &rSource)
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 SdrObject * RemoveObject(size_t nObjNum)
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)
sal_Int32 GetNumerator() const
std::unique_ptr< SdrObject, SdrObjectFreeOp > SdrObjectUniquePtr
SdrOnOffItem makeSdrShadowItem(bool bShadow)
virtual void NbcRotate(const Point &rRef, long nAngle, double sn, double cs) override
virtual void NbcSetStyleSheet(SfxStyleSheet *pNewStyleSheet, bool bDontRemoveHardAttr)
virtual void NbcSetLogicRect(const tools::Rectangle &rRect) override
virtual void NbcShear(const Point &rRef, long nAngle, double tn, bool bVShear) 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)