View | Details | Raw Unified | Return to issue 120437
Collapse All | Expand All

(-)source/svdraw/svdoedge.cxx (-38 / +68 lines)
Lines 2261-2325 Link Here
2261
}
2261
}
2262
2262
2263
// #54102# added rotation support
2263
// #54102# added rotation support
2264
void SdrEdgeObj::NbcRotate(const Point& rRef, long /* nWink */, double sn, double cs)
2264
void SdrEdgeObj::NbcRotate(const Point& rRef, long nWink, double sn, double cs)
2265
{
2265
{
2266
    // handle start and end point if not connected
2266
    if(bEdgeTrackUserDefined)
2267
	FASTBOOL bCon1=aCon1.pObj!=NULL && aCon1.pObj->GetPage()==pPage;
2268
	FASTBOOL bCon2=aCon2.pObj!=NULL && aCon2.pObj->GetPage()==pPage;
2269
2270
    if(!bCon1 && pEdgeTrack)
2271
    {
2267
    {
2272
        RotatePoint((*pEdgeTrack)[0],rRef,sn,cs);
2268
        // #120437# special handling when track is imported. Do
2273
        ImpDirtyEdgeTrack();
2269
        // not apply transformation since the imported polygon seems 
2270
        // to be already transformed
2271
        SdrTextObj::NbcRotate(rRef, nWink, sn, cs);
2274
    }
2272
    }
2273
    else
2274
    {
2275
        // handle start and end point if not connected
2276
	    FASTBOOL bCon1=aCon1.pObj!=NULL && aCon1.pObj->GetPage()==pPage;
2277
	    FASTBOOL bCon2=aCon2.pObj!=NULL && aCon2.pObj->GetPage()==pPage;
2275
2278
2276
    if(!bCon2 && pEdgeTrack)
2279
        if(!bCon1 && pEdgeTrack)
2277
    {
2280
        {
2278
    	sal_uInt16 nPntAnz = pEdgeTrack->GetPointCount();
2281
            RotatePoint((*pEdgeTrack)[0],rRef,sn,cs);
2279
        RotatePoint((*pEdgeTrack)[sal_uInt16(nPntAnz-1)],rRef,sn,cs);
2282
            ImpDirtyEdgeTrack();
2280
        ImpDirtyEdgeTrack();
2283
        }
2284
2285
        if(!bCon2 && pEdgeTrack)
2286
        {
2287
    	    sal_uInt16 nPntAnz = pEdgeTrack->GetPointCount();
2288
            RotatePoint((*pEdgeTrack)[sal_uInt16(nPntAnz-1)],rRef,sn,cs);
2289
            ImpDirtyEdgeTrack();
2290
        }
2281
    }
2291
    }
2282
}
2292
}
2283
2293
2284
// #54102# added mirror support
2294
// #54102# added mirror support
2285
void SdrEdgeObj::NbcMirror(const Point& rRef1, const Point& rRef2)
2295
void SdrEdgeObj::NbcMirror(const Point& rRef1, const Point& rRef2)
2286
{
2296
{
2287
    // handle start and end point if not connected
2297
    if(bEdgeTrackUserDefined)
2288
	FASTBOOL bCon1=aCon1.pObj!=NULL && aCon1.pObj->GetPage()==pPage;
2289
	FASTBOOL bCon2=aCon2.pObj!=NULL && aCon2.pObj->GetPage()==pPage;
2290
2291
    if(!bCon1 && pEdgeTrack)
2292
    {
2298
    {
2293
    	MirrorPoint((*pEdgeTrack)[0],rRef1,rRef2);
2299
        // #120437# special handling when track is imported. Do
2294
        ImpDirtyEdgeTrack();
2300
        // not apply transformation since the imported polygon seems 
2301
        // to be already transformed
2302
        SdrTextObj::NbcMirror(rRef1, rRef2);
2295
    }
2303
    }
2304
    else
2305
    {
2306
        // handle start and end point if not connected
2307
	    FASTBOOL bCon1=aCon1.pObj!=NULL && aCon1.pObj->GetPage()==pPage;
2308
	    FASTBOOL bCon2=aCon2.pObj!=NULL && aCon2.pObj->GetPage()==pPage;
2296
2309
2297
    if(!bCon2 && pEdgeTrack)
2310
        if(!bCon1 && pEdgeTrack)
2298
    {
2311
        {
2299
    	sal_uInt16 nPntAnz = pEdgeTrack->GetPointCount();
2312
    	    MirrorPoint((*pEdgeTrack)[0],rRef1,rRef2);
2300
    	MirrorPoint((*pEdgeTrack)[sal_uInt16(nPntAnz-1)],rRef1,rRef2);
2313
            ImpDirtyEdgeTrack();
2301
        ImpDirtyEdgeTrack();
2314
        }
2315
2316
        if(!bCon2 && pEdgeTrack)
2317
        {
2318
    	    sal_uInt16 nPntAnz = pEdgeTrack->GetPointCount();
2319
    	    MirrorPoint((*pEdgeTrack)[sal_uInt16(nPntAnz-1)],rRef1,rRef2);
2320
            ImpDirtyEdgeTrack();
2321
        }
2302
    }
2322
    }
2303
}
2323
}
2304
2324
2305
// #54102# added shear support
2325
// #54102# added shear support
2306
void SdrEdgeObj::NbcShear(const Point& rRef, long /* nWink */, double tn, FASTBOOL bVShear)
2326
void SdrEdgeObj::NbcShear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear)
2307
{
2327
{
2308
    // handle start and end point if not connected
2328
    if(bEdgeTrackUserDefined)
2309
	FASTBOOL bCon1=aCon1.pObj!=NULL && aCon1.pObj->GetPage()==pPage;
2310
	FASTBOOL bCon2=aCon2.pObj!=NULL && aCon2.pObj->GetPage()==pPage;
2311
2312
    if(!bCon1 && pEdgeTrack)
2313
    {
2329
    {
2314
    	ShearPoint((*pEdgeTrack)[0],rRef,tn,bVShear);
2330
        // #120437# special handling when track is imported. Do
2315
        ImpDirtyEdgeTrack();
2331
        // not apply transformation since the imported polygon seems 
2332
        // to be already transformed
2333
        SdrTextObj::NbcShear(rRef, nWink, tn, bVShear);
2316
    }
2334
    }
2335
    else
2336
    {
2337
        // handle start and end point if not connected
2338
	    FASTBOOL bCon1=aCon1.pObj!=NULL && aCon1.pObj->GetPage()==pPage;
2339
	    FASTBOOL bCon2=aCon2.pObj!=NULL && aCon2.pObj->GetPage()==pPage;
2317
2340
2318
    if(!bCon2 && pEdgeTrack)
2341
        if(!bCon1 && pEdgeTrack)
2319
    {
2342
        {
2320
    	sal_uInt16 nPntAnz = pEdgeTrack->GetPointCount();
2343
    	    ShearPoint((*pEdgeTrack)[0],rRef,tn,bVShear);
2321
    	ShearPoint((*pEdgeTrack)[sal_uInt16(nPntAnz-1)],rRef,tn,bVShear);
2344
            ImpDirtyEdgeTrack();
2322
        ImpDirtyEdgeTrack();
2345
        }
2346
2347
        if(!bCon2 && pEdgeTrack)
2348
        {
2349
    	    sal_uInt16 nPntAnz = pEdgeTrack->GetPointCount();
2350
    	    ShearPoint((*pEdgeTrack)[sal_uInt16(nPntAnz-1)],rRef,tn,bVShear);
2351
            ImpDirtyEdgeTrack();
2352
        }
2323
    }
2353
    }
2324
}
2354
}
2325
2355
(-)source/svdraw/svdmodel.cxx (-2 / +4 lines)
Lines 1899-1911 Link Here
1899
{
1899
{
1900
	if( mbModelLocked != bLock )
1900
	if( mbModelLocked != bLock )
1901
	{
1901
	{
1902
		if( sal_False == bLock )
1902
        // #120437# need to set first, else ImpReformatAllEdgeObjects will do nothing
1903
		mbModelLocked = bLock;
1904
1905
        if( sal_False == bLock )
1903
		{
1906
		{
1904
			// ReformatAllTextObjects(); #103122# due to a typo in the above if, this code was never
1907
			// ReformatAllTextObjects(); #103122# due to a typo in the above if, this code was never
1905
			//							 executed, so I remove it until we discover that we need it here
1908
			//							 executed, so I remove it until we discover that we need it here
1906
			ImpReformatAllEdgeObjects();	// #103122#
1909
			ImpReformatAllEdgeObjects();	// #103122#
1907
		}
1910
		}
1908
		mbModelLocked = bLock;
1909
	}
1911
	}
1910
}
1912
}
1911
1913
(-)source/svdraw/svdpage.cxx (-7 / +12 lines)
Lines 727-740 Link Here
727
*/
727
*/
728
void SdrObjList::ReformatAllEdgeObjects()
728
void SdrObjList::ReformatAllEdgeObjects()
729
{
729
{
730
	const sal_uInt32 nCount=GetObjCount();
730
    // #120437# go over whole hierarchy, not only over object level null (seen from grouping)
731
	sal_uInt32 nObj;
731
	SdrObjListIter aIter(*this, IM_DEEPNOGROUPS);
732
732
733
	for( nObj = 0; nObj < nCount; nObj++ )
733
    while(aIter.IsMore())
734
	{
734
	{
735
		SdrObject* pObj = GetObj(nObj);
735
		SdrEdgeObj* pSdrEdgeObj = dynamic_cast< SdrEdgeObj* >(aIter.Next());
736
		if( pObj->ISA(SdrEdgeObj) )
736
		
737
			static_cast<SdrEdgeObj*>(pObj)->Reformat();
737
        if(pSdrEdgeObj)
738
        {
739
			pSdrEdgeObj->Reformat();
740
        }
738
	}
741
	}
739
}
742
}
740
743
Lines 1815-1821 Link Here
1815
	{
1818
	{
1816
		mbInserted = bIns;
1819
		mbInserted = bIns;
1817
1820
1818
		SdrObjListIter aIter( *this, IM_FLAT );
1821
        // #120437# go over whole hierarchy, not only over object level null (seen from grouping)
1822
		SdrObjListIter aIter(*this, IM_DEEPNOGROUPS);
1823
1819
 		while ( aIter.IsMore() )
1824
 		while ( aIter.IsMore() )
1820
		{
1825
		{
1821
			SdrObject* pObj = aIter.Next();
1826
			SdrObject* pObj = aIter.Next();

Return to issue 120437