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

(-)a/main/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx (-3 / +14 lines)
Lines 1608-1616 namespace drawinglayer Link Here
1608
				}
1608
				}
1609
				case PRIMITIVE2D_ID_METAFILEPRIMITIVE2D :
1609
				case PRIMITIVE2D_ID_METAFILEPRIMITIVE2D :
1610
				{
1610
				{
1611
                    // direct draw of MetaFile, use default pocessing
1611
                    static bool bUseMetaFilePrimitiveDecomposition(true);
1612
					RenderMetafilePrimitive2D(static_cast< const primitive2d::MetafilePrimitive2D& >(rCandidate));
1612
                    
1613
					break;
1613
                    if(bUseMetaFilePrimitiveDecomposition)
1614
                    {
1615
                        // use new Metafile decomposition
1616
    					process(rCandidate.get2DDecomposition(getViewInformation2D()));
1617
                    }
1618
                    else
1619
                    {
1620
                        // direct draw of MetaFile, use default pocessing
1621
					    RenderMetafilePrimitive2D(static_cast< const primitive2d::MetafilePrimitive2D& >(rCandidate));
1622
                    }
1623
					
1624
                    break;
1614
				}
1625
				}
1615
				case PRIMITIVE2D_ID_MASKPRIMITIVE2D :
1626
				case PRIMITIVE2D_ID_MASKPRIMITIVE2D :
1616
				{
1627
				{
(-)a/main/sd/source/ui/view/drviews7.cxx (-2 / +3 lines)
Lines 1424-1432 void DrawViewShell::GetMenuState( SfxItemSet &rSet ) Link Here
1424
						bFoundNoGraphicObj = sal_True;
1424
						bFoundNoGraphicObj = sal_True;
1425
						break;
1425
						break;
1426
					case OBJ_OLE2 :
1426
					case OBJ_OLE2 :
1427
						// #i118485# Allow Line, Area and Graphic (Metafile)
1427
						// #i118485# #i118525# Allow Line, Area and Graphic (Metafile, Bitmap)
1428
						bSingleGraphicSelected = nMarkCount == 1;
1428
						bSingleGraphicSelected = nMarkCount == 1;
1429
    					bFoundMetafile = sal_True;
1429
    					bFoundBitmap = true;
1430
    					bFoundMetafile = true;
1430
						break;
1431
						break;
1431
					case OBJ_GRAF :
1432
					case OBJ_GRAF :
1432
						bSingleGraphicSelected = nMarkCount == 1;
1433
						bSingleGraphicSelected = nMarkCount == 1;
(-)a/main/svx/source/svdraw/svdedtv2.cxx (-7 / +43 lines)
Lines 2075-2105 void SdrEditView::DoImportMarkedMtf(SvdProgressInfo *pProgrInfo) Link Here
2075
		SdrGrafObj*  pGraf=PTR_CAST(SdrGrafObj,pObj);
2075
		SdrGrafObj*  pGraf=PTR_CAST(SdrGrafObj,pObj);
2076
		SdrOle2Obj*  pOle2=PTR_CAST(SdrOle2Obj,pObj);
2076
		SdrOle2Obj*  pOle2=PTR_CAST(SdrOle2Obj,pObj);
2077
		sal_uIntPtr        nInsAnz=0;
2077
		sal_uIntPtr        nInsAnz=0;
2078
        Rectangle aLogicRect;
2079
2078
		if (pGraf!=NULL && pGraf->HasGDIMetaFile())
2080
		if (pGraf!=NULL && pGraf->HasGDIMetaFile())
2079
		{
2081
		{
2080
			ImpSdrGDIMetaFileImport aFilter(*pMod);
2082
			ImpSdrGDIMetaFileImport aFilter(*pMod);
2081
			aFilter.SetScaleRect(pGraf->GetSnapRect());
2083
			
2084
            aLogicRect = pGraf->GetLogicRect();
2085
            aFilter.SetScaleRect(aLogicRect);
2082
			aFilter.SetLayer(pObj->GetLayer());
2086
			aFilter.SetLayer(pObj->GetLayer());
2083
			nInsAnz=aFilter.DoImport(pGraf->GetTransformedGraphic().GetGDIMetaFile(),*pOL,nInsPos,pProgrInfo);
2087
			
2088
            nInsAnz=aFilter.DoImport(pGraf->GetTransformedGraphic(
2089
                SDRGRAFOBJ_TRANSFORMATTR_COLOR|SDRGRAFOBJ_TRANSFORMATTR_MIRROR).GetGDIMetaFile(),
2090
                *pOL,nInsPos,pProgrInfo);
2084
		}
2091
		}
2085
        if ( pOle2!=NULL && pOle2->GetGraphic() )
2092
        if ( pOle2!=NULL && pOle2->GetGraphic() )
2086
		{
2093
		{
2087
            //const GDIMetaFile* pMtf=pOle2->GetGDIMetaFile();
2094
            //const GDIMetaFile* pMtf=pOle2->GetGDIMetaFile();
2088
			ImpSdrGDIMetaFileImport aFilter(*pMod);
2095
			ImpSdrGDIMetaFileImport aFilter(*pMod);
2089
			aFilter.SetScaleRect(pOle2->GetLogicRect());
2096
			
2097
            aLogicRect = pOle2->GetLogicRect();
2098
            aFilter.SetScaleRect(aLogicRect);
2090
			aFilter.SetLayer(pObj->GetLayer());
2099
			aFilter.SetLayer(pObj->GetLayer());
2100
            
2091
            nInsAnz=aFilter.DoImport(pOle2->GetGraphic()->GetGDIMetaFile(),*pOL,nInsPos,pProgrInfo);
2101
            nInsAnz=aFilter.DoImport(pOle2->GetGraphic()->GetGDIMetaFile(),*pOL,nInsPos,pProgrInfo);
2092
		}
2102
		}
2093
		if (nInsAnz!=0)
2103
		if (nInsAnz!=0)
2094
		{
2104
		{
2095
			sal_uIntPtr nObj=nInsPos;
2105
            // transformation
2096
			for (sal_uIntPtr i=0; i<nInsAnz; i++)
2106
            GeoStat aGeoStat(pGraf ? pGraf->GetGeoStat() : pOle2->GetGeoStat());
2107
            sal_uIntPtr nObj=nInsPos;
2108
2109
	        if(aGeoStat.nShearWink) 
2110
            {
2111
                aGeoStat.RecalcTan();
2112
            }
2113
	        
2114
            if(aGeoStat.nDrehWink) 
2115
            {
2116
	            aGeoStat.RecalcSinCos();
2117
            }
2118
2119
            for (sal_uIntPtr i=0; i<nInsAnz; i++)
2097
			{
2120
			{
2098
				if( bUndo )
2121
                if( bUndo )
2099
					AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pOL->GetObj(nObj)));
2122
					AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pOL->GetObj(nObj)));
2100
2123
2101
				// Neue MarkList pflegen
2124
				// Neue MarkList pflegen
2102
				SdrMark aNewMark(pOL->GetObj(nObj), pPV);
2125
                SdrObject* pCandidate = pOL->GetObj(nObj);
2126
2127
                // apply original transformation
2128
	            if(aGeoStat.nShearWink) 
2129
                {
2130
                    pCandidate->NbcShear(aLogicRect.TopLeft(), aGeoStat.nShearWink, aGeoStat.nTan, false);
2131
                }
2132
2133
	            if(aGeoStat.nDrehWink) 
2134
                {
2135
                    pCandidate->NbcRotate(aLogicRect.TopLeft(), aGeoStat.nDrehWink, aGeoStat.nSin, aGeoStat.nCos);
2136
                }
2137
2138
                SdrMark aNewMark(pCandidate, pPV);
2103
				aNewMarked.InsertEntry(aNewMark);
2139
				aNewMarked.InsertEntry(aNewMark);
2104
2140
2105
				nObj++;
2141
				nObj++;
(-)a/main/svx/source/svdraw/svdograf.cxx (-1 / +5 lines)
Lines 1099-1105 SdrObject* SdrGrafObj::DoConvertToPolyObj(sal_Bool bBezier, bool bAddText) const Link Here
1099
                pRetval = pGrp;
1099
                pRetval = pGrp;
1100
				pGrp->NbcSetLayer(GetLayer());
1100
				pGrp->NbcSetLayer(GetLayer());
1101
				pGrp->SetModel(GetModel());
1101
				pGrp->SetModel(GetModel());
1102
				pRetval = ImpConvertAddText(pRetval, bBezier);
1102
                
1103
                if(bAddText)
1104
                {
1105
				    pRetval = ImpConvertAddText(pRetval, bBezier);
1106
                }
1103
1107
1104
                // convert all children
1108
                // convert all children
1105
                if( pRetval )
1109
                if( pRetval )

Return to issue 118529